aboutsummaryrefslogtreecommitdiffstats
path: root/utils/webseal-simulator
diff options
context:
space:
mode:
Diffstat (limited to 'utils/webseal-simulator')
-rw-r--r--utils/webseal-simulator/scripts/simulator_docker_run.sh80
-rw-r--r--utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_1_cleanup_jettydir.rb40
-rw-r--r--utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_2_setup_configuration.rb11
-rw-r--r--utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_3_errors_config.rb7
-rw-r--r--utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_3_logback.rb (renamed from utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_4_logback.rb)0
-rw-r--r--utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_4_locate_keystore.rb (renamed from utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_6_locate_keystore.rb)0
-rw-r--r--utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_5_create_jetty_modules.rb14
-rw-r--r--utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_5_rest_configuration.rb7
-rw-r--r--utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_7_create_jetty_modules.rb45
-rw-r--r--utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-configuration.yaml.erb85
-rw-r--r--utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-http-ini.erb32
-rw-r--r--utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-https-ini.erb15
-rw-r--r--utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-onboarding-configuration.yaml.erb5
-rw-r--r--utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-webseal.conf.erb49
-rw-r--r--utils/webseal-simulator/sdc-simulator/chef-solo/roles/sdc-simulator.json6
-rw-r--r--utils/webseal-simulator/sdc-simulator/startup.sh10
-rw-r--r--utils/webseal-simulator/src/main/resources/logback.xml341
17 files changed, 175 insertions, 572 deletions
diff --git a/utils/webseal-simulator/scripts/simulator_docker_run.sh b/utils/webseal-simulator/scripts/simulator_docker_run.sh
new file mode 100644
index 0000000000..bc8cdca09d
--- /dev/null
+++ b/utils/webseal-simulator/scripts/simulator_docker_run.sh
@@ -0,0 +1,80 @@
+#!/bin/bash
+
+
+function usage {
+ echo "usage: simulator_docker_run.sh [ -r|--release <RELEASE-NAME> ] [ -e|--environment <ENV-NAME> ] [ -p|--port <Docker-hub-port>] [ -h|--help ]"
+}
+
+
+function cleanup {
+ echo "performing old dockers cleanup"
+ docker_ids=`docker ps -a | egrep "openecomp/sdc-simulator|Exit" | awk '{print $1}'`
+ for X in ${docker_ids}
+ do
+ docker rm -f ${X}
+ done
+}
+
+
+function dir_perms {
+ mkdir -p /data/logs/WS/
+ chmod -R 777 /data/logs
+}
+
+
+RELEASE=latest
+LOCAL=true
+[ -f /opt/config/env_name.txt ] && DEP_ENV=$(cat /opt/config/env_name.txt) || DEP_ENV=__ENV-NAME__
+[ -f /opt/config/nexus_username.txt ] && NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) || NEXUS_USERNAME=release
+[ -f /opt/config/nexus_password.txt ] && NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) || NEXUS_PASSWD=sfWU3DFVdBr7GVxB85mTYgAW
+[ -f /opt/config/nexus_docker_repo.txt ] && NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) || NEXUS_DOCKER_REPO=ecomp-nexus:${PORT}
+
+while [ "$1" != "" ]; do
+ case $1 in
+ -r | --release )
+ shift
+ RELEASE=${1}
+ ;;
+ -e | --environment )
+ shift
+ DEP_ENV=${1}
+ ;;
+ -p | --port )
+ shift
+ PORT=${1}
+ ;;
+ -h | --help )
+ usage
+ exit
+ ;;
+ * )
+ usage
+ exit 1
+ esac
+ shift
+done
+
+[ -f /opt/config/nexus_username.txt ] && docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
+
+
+cleanup
+
+
+export IP=`ifconfig eth0 | awk -F: '/inet addr/ {gsub(/ .*/,"",$2); print $2}'`
+export PREFIX=${NEXUS_DOCKER_REPO}'/openecomp'
+
+PREFIX='openecomp'
+
+echo ""
+echo "${PREFIX}"
+
+dir_perms
+
+# SDC-Simulator
+docker run --detach --name sdc-simulator --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env http_proxy=${http_proxy} --env https_proxy=${https_proxy} --env no_proxy=${no_proxy} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --memory 256m --memory-swap=256m --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume /data/logs/WS/:/var/lib/jetty/logs --volume /data/environments:/root/chef-solo/environments --publish 8285:8080 ${PREFIX}/sdc-simulator:${RELEASE}
+
+
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+
diff --git a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_1_cleanup_jettydir.rb b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_1_cleanup_jettydir.rb
index 95b90ca0a2..bb67b8cdbc 100644
--- a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_1_cleanup_jettydir.rb
+++ b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_1_cleanup_jettydir.rb
@@ -1,5 +1,7 @@
+jetty_base="/var/lib/jetty"
+
directory "SDC_Simulator_tempdir_creation" do
- path "/var/lib/jetty/temp"
+ path "#{jetty_base}/temp"
owner 'jetty'
group 'jetty'
mode '0755'
@@ -8,7 +10,7 @@ end
directory "SDC_Simulator_create_config_dir" do
- path "/var/lib/jetty/config"
+ path "#{jetty_base}/config"
owner 'jetty'
group 'jetty'
mode '0755'
@@ -17,41 +19,9 @@ end
directory "SDC_Simulator_create_sdc-simulator" do
- path "/var/lib/jetty/config/sdc-simulator"
+ path "#{jetty_base}/config/sdc-simulator"
owner 'jetty'
group 'jetty'
mode '0755'
action :create
end
-
-
-#directory "SDC_Simulator_tempdir_cleanup" do
-# path "/var/lib/jetty/tempdir"
-# recursive true
-# action :delete
-#end
-
-
-#directory "SDC_Simulator_webapps_cleanup" do
-# path "/var/lib/jetty/webapps"
-# recursive true
-# action :delete
-#end
-
-
-#directory "SDC_Simulator_webapps_creation" do
-# path "/var/lib/jetty/webapps"
-# owner 'jetty'
-# group 'jetty'
-# mode '0755'
-# action :create
-#end
-
-
-#directory "SDC_Simulator_create_catalog-fe" do
-# path "/var/lib/jetty/config/onboarding-fe"
-# owner 'jetty'
-# group 'jetty'
-# mode '0755'
-# action :create
-#end \ No newline at end of file
diff --git a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_2_setup_configuration.rb b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_2_setup_configuration.rb
index ca7d23737c..85fedfd9e5 100644
--- a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_2_setup_configuration.rb
+++ b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_2_setup_configuration.rb
@@ -1,9 +1,14 @@
jetty_base="/var/lib/jetty"
-cookbook_file "webseal.conf" do
+
+template "webseal.conf" do
path "#{jetty_base}/config/sdc-simulator/webseal.conf"
- source "webseal.conf"
+ source "SDC-Simulator-webseal.conf.erb"
owner "jetty"
group "jetty"
mode "0755"
-end \ No newline at end of file
+ variables({
+ :fe_host_ip => node['HOST_IP'],
+ :fe_http_port => "#{node['FE'][:http_port]}"
+ })
+end
diff --git a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_3_errors_config.rb b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_3_errors_config.rb
deleted file mode 100644
index 81211866a0..0000000000
--- a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_3_errors_config.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-#cookbook_file "/var/lib/jetty/config/catalog-fe/ecomp-error-configuration.yaml" do
-# source "FE-ecomp-error-configuration.yaml"
-# mode 0755
-# owner "jetty"
-# group "jetty"
-#end
-
diff --git a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_4_logback.rb b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_3_logback.rb
index 0d9282b28a..0d9282b28a 100644
--- a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_4_logback.rb
+++ b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_3_logback.rb
diff --git a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_6_locate_keystore.rb b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_4_locate_keystore.rb
index 3bb482d89a..3bb482d89a 100644
--- a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_6_locate_keystore.rb
+++ b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_4_locate_keystore.rb
diff --git a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_5_create_jetty_modules.rb b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_5_create_jetty_modules.rb
new file mode 100644
index 0000000000..38b87fa65d
--- /dev/null
+++ b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_5_create_jetty_modules.rb
@@ -0,0 +1,14 @@
+jetty_base="/var/lib/jetty"
+jetty_home="/usr/local/jetty"
+
+###### create Jetty modules
+bash "create-jetty-modules" do
+cwd "#{jetty_base}"
+code <<-EOH
+ cd "#{jetty_base}"
+ java -jar "/#{jetty_home}"/start.jar --add-to-start=deploy
+ java -jar "/#{jetty_home}"/start.jar --add-to-startd=http,https,logging,setuid
+EOH
+not_if "ls /#{jetty_base}/start.d/https.ini"
+end
+
diff --git a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_5_rest_configuration.rb b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_5_rest_configuration.rb
deleted file mode 100644
index 710286a8dd..0000000000
--- a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_5_rest_configuration.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-cookbook_file "/var/lib/jetty/config/catalog-fe/rest-configuration-info.yaml" do
- source "FE-rest-configuration.yaml"
- mode 0755
- owner "jetty"
- group "jetty"
-end
-
diff --git a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_7_create_jetty_modules.rb b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_7_create_jetty_modules.rb
deleted file mode 100644
index b4de469563..0000000000
--- a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_7_create_jetty_modules.rb
+++ /dev/null
@@ -1,45 +0,0 @@
-jetty_base="/var/lib/jetty"
-jetty_home="/usr/local/jetty"
-
-###### create Jetty modules
-bash "create-jetty-modules" do
-cwd "#{jetty_base}"
-code <<-EOH
- cd "#{jetty_base}"
- java -jar "/#{jetty_home}"/start.jar --add-to-start=deploy
- java -jar "/#{jetty_home}"/start.jar --add-to-startd=http,https,logging,setuid
-EOH
-not_if "ls /#{jetty_base}/start.d/https.ini"
-end
-
-
-####### configure Jetty modules
-#template "SDC-Simulator-http-ini" do
-# path "/#{jetty_base}/start.d/http.ini"
-# source "SDC-Simulator-http-ini.erb"
-# owner "jetty"
-# group "jetty"
-# mode "0755"
-# variables :Simulator_http_port => "#{node['simulator'][:http_port]}"
-#end
-
-
-#template "FE-https-ini" do
-# path "/#{jetty_base}/start.d/https.ini"
-# source "FE-https-ini.erb"
-# owner "jetty"
-# group "jetty"
-# mode "0755"
-# variables :FE_https_port => "#{node['FE'][:https_port]}"
-#end
-#
-#
-#template "FE-ssl-ini" do
-# path "/#{jetty_base}/start.d/ssl.ini"
-# source "FE-ssl-ini.erb"
-# owner "jetty"
-# group "jetty"
-# mode "0755"
-# variables :FE_https_port => "#{node['FE'][:https_port]}"
-#end
-
diff --git a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-configuration.yaml.erb b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-configuration.yaml.erb
deleted file mode 100644
index 6a6ea29608..0000000000
--- a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-configuration.yaml.erb
+++ /dev/null
@@ -1,85 +0,0 @@
-# Needed for logging purposes. To be populated by DevOps - currently dummy
-feFqdn: <%= @fe_host_ip %>
-
-# catalog backend hostname
-beHost: <%= @be_host_ip %>
-
-# catalog backend http port
-beHttpPort: <%= @catalog_port %>
-
-# catalog backend http context
-beContext: /sdc2/rest/v1/catalog/upload/resources
-
-# catalog backend protocol
-beProtocol: http
-
-# catalog backend ssl port
-beSslPort: <%= @ssl_port %>
-
-# threadpool size for handling requests
-threadpoolSize: 50
-
-# request processing timeout (seconds)
-requestTimeout: 10
-
-healthCheckSocketTimeoutInMs: 5000
-
-healthCheckIntervalInSeconds: 5
-
-onboarding:
- protocol: http
- host: <%= @fe_host_ip %>
- port: 8181
- healthCheckUri: "/onboarding/v1.0/healthcheck"
-
-identificationHeaderFields:
- -
- - &HTTP_IV_USER HTTP_IV_USER
- - &iv-user iv-user
- -
- - &USER_ID USER_ID
- - &user-id user-id
- -
- - &HTTP_CSP_ATTUID HTTP_CSP_ATTUID
- - &csp-attuid csp-attuid
- -
- - &HTTP_CSP_WSTYPE HTTP_CSP_WSTYPE
- - &csp-wstype csp-wstype
-
-optionalHeaderFields:
- -
- - &HTTP_CSP_FIRSTNAME HTTP_CSP_FIRSTNAME
- - &csp-firstname csp-firstname
- -
- - &HTTP_CSP_LASTNAME HTTP_CSP_LASTNAME
- - &csp-lastname csp-lastname
- -
- - &HTTP_IV_REMOTE_ADDRESS HTTP_IV_REMOTE_ADDRESS
- - &iv-remote-address iv-remote-address
- -
- - &HTTP_CSP_EMAIL HTTP_CSP_EMAIL
- - &csp-email csp-email
-
-
-version: 1.0
-released: 2012-11-30
-
-# Connection parameters
-connection:
- url: jdbc:mysql://localhost:3306/db
- poolSize: 17
-
-# Protocols
-protocols:
- - http
- - https
-
-
-systemMonitoring:
- enabled: false
- isProxy: true
- probeIntervalInSeconds: 15
-
-kibanaHost: localhost
-kibanaPort: 5601
-kibanaProtocol: http
diff --git a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-http-ini.erb b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-http-ini.erb
deleted file mode 100644
index 51b9addd93..0000000000
--- a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-http-ini.erb
+++ /dev/null
@@ -1,32 +0,0 @@
-# ---------------------------------------
-# Module: http
---module=http
-
-### HTTP Connector Configuration
-
-## Connector host/address to bind to
-# jetty.http.host=0.0.0.0
-
-## Connector port to listen on
-jetty.http.port=<%= @Simulator_http_port %>
-
-## Connector idle timeout in milliseconds
-jetty.http.idleTimeout=30000
-
-## Connector socket linger time in seconds (-1 to disable)
-# jetty.http.soLingerTime=-1
-
-## Number of acceptors (-1 picks default based on number of cores)
-# jetty.http.acceptors=-1
-
-## Number of selectors (-1 picks default based on number of cores)
-# jetty.http.selectors=-1
-
-## ServerSocketChannel backlog (0 picks platform default)
-# jetty.http.acceptorQueueSize=0
-
-## Thread priority delta to give to acceptor threads
-# jetty.http.acceptorPriorityDelta=0
-
-## HTTP Compliance: RFC7230, RFC2616, LEGACY
-# jetty.http.compliance=RFC7230
diff --git a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-https-ini.erb b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-https-ini.erb
deleted file mode 100644
index f8ca5252b0..0000000000
--- a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-https-ini.erb
+++ /dev/null
@@ -1,15 +0,0 @@
-# ---------------------------------------
-# Module: https
---module=https
-
-## HTTPS Configuration
-# HTTP port to listen on
-https.port=<%= @FE_https_port %>
-
-# HTTPS idle timeout in milliseconds
-jetty.https.idleTimeout=300000
-
-# HTTPS Socket.soLingerTime in seconds. (-1 to disable)
-# https.soLingerTime=-1
-
-
diff --git a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-onboarding-configuration.yaml.erb b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-onboarding-configuration.yaml.erb
deleted file mode 100644
index 4646661dfb..0000000000
--- a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-onboarding-configuration.yaml.erb
+++ /dev/null
@@ -1,5 +0,0 @@
-notifications:
- pollingIntervalMsec: 2000
- selectionSize: 100
- beHost: <%= @catalog_ip %>
- beHttpPort: <%= @catalog_port %> \ No newline at end of file
diff --git a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-webseal.conf.erb b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-webseal.conf.erb
new file mode 100644
index 0000000000..d5e2cbeaac
--- /dev/null
+++ b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-webseal.conf.erb
@@ -0,0 +1,49 @@
+{
+ webseal {
+ fe="http://<%= @fe_host_ip %>:<%= @fe_http_port %>"
+ users = [
+ {
+ userId="cs0008"
+ password="123123a"
+ firstName="Carlos"
+ lastName="Santana"
+ role="Designer"
+ email="csantana@sdc.com"
+ },
+ {
+ userId="op0001"
+ password="123123a"
+ firstName="Aretha"
+ lastName="Franklin"
+ role="Ops"
+ email="afranklin@sdc.com"
+ },
+ {
+ userId="jh0003"
+ password="123123a"
+ firstName="Jimmy"
+ lastName="Hendrix"
+ role="Admin"
+ email="admin@sdc.com"
+ },
+ {
+ userId="jm0007"
+ password="123123a"
+ firstName="Johnny"
+ lastName="Depp"
+ role="Tester"
+ email="tester@sdc.com"
+ },
+ {
+ userId="gv0001"
+ password="123123a"
+ firstName="David"
+ lastName="Shadmi"
+ role="Governor"
+ email="governor@sdc.com"
+ }
+ ]
+ }
+
+}
+
diff --git a/utils/webseal-simulator/sdc-simulator/chef-solo/roles/sdc-simulator.json b/utils/webseal-simulator/sdc-simulator/chef-solo/roles/sdc-simulator.json
index 36a163708a..457dbad6c4 100644
--- a/utils/webseal-simulator/sdc-simulator/chef-solo/roles/sdc-simulator.json
+++ b/utils/webseal-simulator/sdc-simulator/chef-solo/roles/sdc-simulator.json
@@ -12,9 +12,9 @@
"run_list": [
"recipe[sdc-simulator::SDC_Simulator_1_cleanup_jettydir]",
"recipe[sdc-simulator::SDC_Simulator_2_setup_configuration]",
- "recipe[sdc-simulator::SDC_Simulator_4_logback]",
- "recipe[sdc-simulator::SDC_Simulator_6_locate_keystore]",
- "recipe[sdc-simulator::SDC_Simulator_7_create_jetty_modules]"
+ "recipe[sdc-simulator::SDC_Simulator_3_logback]",
+ "recipe[sdc-simulator::SDC_Simulator_4_locate_keystore]",
+ "recipe[sdc-simulator::SDC_Simulator_5_create_jetty_modules]"
],
"env_run_lists": {
}
diff --git a/utils/webseal-simulator/sdc-simulator/startup.sh b/utils/webseal-simulator/sdc-simulator/startup.sh
index d5abda9f1e..aca8b5e984 100644
--- a/utils/webseal-simulator/sdc-simulator/startup.sh
+++ b/utils/webseal-simulator/sdc-simulator/startup.sh
@@ -1,17 +1,13 @@
#!/bin/sh
-#export CHEFNAME=${ENVNAME}
+export CHEFNAME=${ENVNAME}
cd /root/chef-solo
echo "normal['HOST_IP'] = \"${HOST_IP}\"" > /root/chef-solo/cookbooks/sdc-simulator/attributes/default.rb
-chef-solo -c solo.rb
-#chef-solo -c solo.rb -E ${CHEFNAME}
+chef-solo -c solo.rb -E ${CHEFNAME}
-sed -i '/^set -e/aJAVA_OPTIONS=\"-Xdebug -Xmx128m -Xms128m -Xss1m -Dconfig.home=${JETTY_BASE}/config/sdc-simulator -Dlog.home=${JETTY_BASE}/logs -Dlogback.configurationFile=${JETTY_BASE}/config/sdc-simulator/logback.xml -Djetty.logging.dir=${JETTY_BASE}/logs -Djetty.base=${JETTY_BASE} \"' /docker-entrypoint.sh
-#Moty Default WS startup args
-#/usr/bin/java -Dconfig.home=/apps/jetty/base/ws/config -Dlog.home=/apps/jetty/base/ws/logs -Dlogback.configurationFile=/apps/jetty/base/ws/logback.xml -Djetty.logging.dir=/apps/jetty/base/ws/logs -Djetty.home=/apps/jetty/jetty-distribution-9.3.6.v20151106 -Djetty.base=/apps/jetty/base/ws -Djava.io.tmpdir=/tmp -jar /apps/jetty/jetty-distribution-9.3.6.v20151106/start.jar jetty.state=/apps/jetty/base/ws/webseal-simulator.state jetty-logging.xml jetty-started.xml
+sed -i '/^set -e/aJAVA_OPTIONS=\"-Xdebug -Xmx128m -Xms128m -Xss1m -Dconfig.home=${JETTY_BASE}/config/sdc-simulator -Dlog.home=${JETTY_BASE}/logs -Dlogback.configurationFile=${JETTY_BASE}/config/sdc-simulator/logback.xml -Djetty.logging.dir=${JETTY_BASE}/logs -Djetty.base=${JETTY_BASE} \"' /docker-entrypoint.sh
sed -i '/^set -e/aTMPDIR=${JETTY_BASE}\/temp' /docker-entrypoint.sh
cd /var/lib/jetty
/docker-entrypoint.sh
-#sed -i '/^set -e/aJAVA_OPTIONS=\"-Xdebug -Xmx128m -Xms128m -Xss1m -agentlib:jdwp=transport=dt_socket,address=4002,server=y,suspend=n -Dconfig.home=${JETTY_BASE}/config -Dlog.home=${JETTY_BASE}/logs -Dlogback.configurationFile=${JETTY_BASE}/config/catalog-be/logback.xml -Djetty.logging.dir=${JETTY_BASE}/logs -Djetty.home=/home/vagrant/jetty/jetty-distribution-9.3.6.v20151106 -Djetty.base=${JETTY_BASE} -Djava.io.tmpdir=/home/vagrant/webseal-simulator/tmp -jar /home/vagrant/jetty/jetty-distribution-9.3.6.v20151106/start.jar jetty.state=/home/vagrant/webseal-simulator/webseal-simulator.state jetty-logging.xml jetty-started.xml\"' /docker-entrypoint.sh \ No newline at end of file
diff --git a/utils/webseal-simulator/src/main/resources/logback.xml b/utils/webseal-simulator/src/main/resources/logback.xml
index ba16783536..58fab30d38 100644
--- a/utils/webseal-simulator/src/main/resources/logback.xml
+++ b/utils/webseal-simulator/src/main/resources/logback.xml
@@ -1,328 +1,13 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration scan="true" scanPeriod="5 seconds">
-
- <property scope="system" name="ECOMP-component-name" value="SDC" />
- <property scope="system" name="ECOMP-subcomponent-name" value="SDC-BE" />
- <property file="${config.home}/catalog-be/configuration.yaml" />
- <property scope="context" name="enable-all-log" value="false" />
-
- <!-- value used by pattern field list (| - is inter-field separator, || - unavailable or not applicable field value) (m - mandatory, o- optional)-->
- <!--timestamp(m)| requestID(m)| serviceInstanceID(o)| threadID(m)| physicalServerName(o)| serviceName(m)| userID(m)| logLevel(m)| severity(o)| serverIpAddress(m)| serverName(m)| clientIpAddress(o)| className(m)| timer(o)| detailedMessage(o)-->
- <property name="default-log-pattern"
- value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{BeginTimestamp}|%X{EndTimestamp}|%X{uuid}|%X{serviceInstanceID}|%thread|%X{ServerName}|%X{ServiceName}|${ECOMP-subcomponent-name}|%X{userId}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%level|%X{alarmSeverity}|%X{localAddr}|%X{ElapsedTime}|${beFqdn}|%X{remoteAddr}|%logger{35}|%X{timer}|ActivityType=&lt;%M&gt;, Desc=&lt;%msg&gt;%n" />
-
- <property name="asdc-debug-log-pattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%msg %n"/>
-
- <!-- All log -->
- <if condition='property("enable-all-log").equalsIgnoreCase("true")'>
- <then>
- <appender name="ALL_ROLLING"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/all.log
- </file>
-
- <rollingPolicy
- class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/all.log.%i
- </fileNamePattern>
- <minIndex>1</minIndex>
- <maxIndex>10</maxIndex>
- </rollingPolicy>
-
- <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>20MB</maxFileSize>
- </triggeringPolicy>
- <encoder>
- <pattern>${default-log-pattern}</pattern>
- </encoder>
- </appender>
-
- <appender name="ASYNC_ALL" class="ch.qos.logback.classic.AsyncAppender">
- <appender-ref ref="ALL_ROLLING" />
- </appender>
- </then>
- </if>
-
- <!-- Error log -->
- <appender name="ERROR_ROLLING"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/error.log
- </file>
-
- <!-- Audit messages filter - deny audit messages -->
- <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
- <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
- <marker>AUDIT_MARKER</marker>
- </evaluator>
- <onMismatch>NEUTRAL</onMismatch>
- <onMatch>DENY</onMatch>
- </filter>
-
- <!-- Transaction messages filter - deny Transaction messages -->
- <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
- <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
- <marker>TRANSACTION_MARKER</marker>
- </evaluator>
- <onMismatch>NEUTRAL</onMismatch>
- <onMatch>DENY</onMatch>
- </filter>
-
- <!-- deny all events with a level below INFO, that is TRACE and DEBUG -->
- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
- <level>INFO</level>
- </filter>
-
- <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/error.log.%i
- </fileNamePattern>
- <minIndex>1</minIndex>
- <maxIndex>10</maxIndex>
- </rollingPolicy>
-
- <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>20MB</maxFileSize>
- </triggeringPolicy>
- <encoder>
- <pattern>${default-log-pattern}</pattern>
- </encoder>
- </appender>
-
- <!-- Debug log -->
- <appender name="DEBUG_ROLLING"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug.log
- </file>
-
- <!-- No need to deny audit messages - they are INFO only, will be denied
- anyway -->
- <!-- Transaction messages filter - deny Transaction messages, there are
- some DEBUG level messages among them -->
- <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
- <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
- <marker>TRANSACTION_MARKER</marker>
- </evaluator>
- <onMismatch>NEUTRAL</onMismatch>
- <onMatch>DENY</onMatch>
- </filter>
-
- <!-- accept DEBUG and TRACE level -->
- <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
- <evaluator class="ch.qos.logback.classic.boolex.GEventEvaluator">
- <expression>
- e.level.toInt() &lt;= DEBUG.toInt()
- </expression>
- </evaluator>
- <OnMismatch>DENY</OnMismatch>
- <!--<OnMatch>NEUTRAL</OnMatch>-->
- <OnMatch>ACCEPT</OnMatch>
- </filter>
-
- <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug.log.%i
- </fileNamePattern>
- <minIndex>1</minIndex>
- <maxIndex>10</maxIndex>
- </rollingPolicy>
-
- <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>20MB</maxFileSize>
- </triggeringPolicy>
- <encoder>
- <pattern>${default-log-pattern}</pattern>
- </encoder>
- </appender>
-
-
- <!-- ASDC debug by package-->
- <appender name="PACKAGE_DEBUG_ROLLING"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug_by_package.log
- </file>
-
- <!-- No need to deny audit messages - they are INFO only, will be denied
- anyway -->
- <!-- Transaction messages filter - deny Transaction messages, there are
- some DEBUG level messages among them -->
- <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
- <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
- <marker>TRANSACTION_MARKER</marker>
- </evaluator>
- <onMismatch>NEUTRAL</onMismatch>
- <onMatch>DENY</onMatch>
- </filter>
-
- <!-- accept DEBUG and TRACE level -->
- <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
- <evaluator class="ch.qos.logback.classic.boolex.GEventEvaluator">
- <expression>
- e.level.toInt() &lt;= DEBUG.toInt()
- </expression>
- </evaluator>
- <OnMismatch>DENY</OnMismatch>
- <OnMatch>NEUTRAL</OnMatch>
- </filter>
-
- <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug_by_package.log.%i
- </fileNamePattern>
- <minIndex>1</minIndex>
- <maxIndex>10</maxIndex>
- </rollingPolicy>
-
- <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>20MB</maxFileSize>
- </triggeringPolicy>
- <encoder>
- <pattern>${asdc-debug-log-pattern}</pattern>
- </encoder>
- </appender>
-
- <!-- Audit log -->
- <appender name="AUDIT_ROLLING"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
-
- <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/audit.log
- </file>
-
- <!-- Audit messages filter - accept audit messages -->
- <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
- <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
- <marker>AUDIT_MARKER</marker>
- <marker>AUDIT</marker>
- </evaluator>
- <onMismatch>DENY</onMismatch>
- <onMatch>ACCEPT</onMatch>
- </filter>
-
- <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/audit.log.%i
- </fileNamePattern>
- <minIndex>1</minIndex>
- <maxIndex>10</maxIndex>
- </rollingPolicy>
-
- <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>20MB</maxFileSize>
- </triggeringPolicy>
- <encoder>
- <pattern>${default-log-pattern}</pattern>
- </encoder>
- </appender>
-
- <!-- Metrics log -->
- <appender name="METRICS_ROLLING"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
-
- <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/metrics.log
- </file>
-
- <!-- Metric messages filter - accept metric messages -->
- <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
- <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
- <marker>METRICS</marker>
- </evaluator>
- <onMismatch>DENY</onMismatch>
- <onMatch>ACCEPT</onMatch>
- </filter>
-
- <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/metrics.log.%i
- </fileNamePattern>
- <minIndex>1</minIndex>
- <maxIndex>10</maxIndex>
- </rollingPolicy>
-
- <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>20MB</maxFileSize>
- </triggeringPolicy>
- <encoder>
- <pattern>${default-log-pattern}</pattern>
- </encoder>
- </appender>
-
- <!-- SdncTransaction log -->
- <appender name="TRANSACTION_ROLLING"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
-
- <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/transaction.log
- </file>
-
- <!-- Transaction messages filter - accept audit messages -->
- <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
- <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
- <marker>TRANSACTION_MARKER</marker>
- </evaluator>
- <onMismatch>DENY</onMismatch>
- <onMatch>ACCEPT</onMatch>
- </filter>
-
- <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/transaction.log.%i
- </fileNamePattern>
- <minIndex>1</minIndex>
- <maxIndex>10</maxIndex>
- </rollingPolicy>
-
- <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>20MB</maxFileSize>
- </triggeringPolicy>
- <encoder>
- <pattern>${default-log-pattern}</pattern>
- </encoder>
- </appender>
-
- <!-- Asynchronicity Configurations -->
- <appender name="ASYNC_DEBUG" class="ch.qos.logback.classic.AsyncAppender">
- <appender-ref ref="DEBUG_ROLLING" />
- </appender>
-
- <appender name="ASYNC_TRANSACTION" class="ch.qos.logback.classic.AsyncAppender">
- <appender-ref ref="TRANSACTION_ROLLING" />
- </appender>
-
- <appender name="ASYNC_ERROR" class="ch.qos.logback.classic.AsyncAppender">
- <appender-ref ref="ERROR_ROLLING" />
- </appender>
-
- <!-- <appender name="DISPATCHER" class="ch.qos.logback.classic.sift.SiftingAppender">
- <discriminator class="org.openecomp.core.logging.logback.EventTypeDiscriminator"/>
- <sift>
- <appender name="Audit" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDirectory}/audit.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${logDirectory}/audit.%i.log.zip</fileNamePattern>
- <minIndex>1</minIndex>
- <maxIndex>9</maxIndex>
- </rollingPolicy>
- <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>5MB</maxFileSize>
- </triggeringPolicy>
- <encoder>
- <pattern>${default-log-pattern}</pattern>
- </encoder>
- </appender>
- </sift>
- </appender>-->
-
- <root level="INFO">
- <appender-ref ref="ASYNC_ERROR" />
- <appender-ref ref="ASYNC_DEBUG" />
- <appender-ref ref="AUDIT_ROLLING" />
- <appender-ref ref="ASYNC_TRANSACTION" />
- <appender-ref ref="METRICS_ROLLING" />
- <if condition='property("enable-all-log").equalsIgnoreCase("true")'>
- <then>
- <appender-ref ref="ALL_ROLLING" />
- </then>
- </if>
- </root>
-
- <logger name="org.openecomp.sdc" level="INFO" />
-</configuration> \ No newline at end of file
+<!-- only one line, shut up logback ! -->
+<configuration >
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <Pattern>
+ %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
+ </Pattern>
+ </encoder>
+ </appender>
+ <root level="INFO">
+ <appender-ref ref="STDOUT" />
+ </root>
+</configuration>