diff options
author | Tal Gitelman <tg851x@intl.att.com> | 2017-08-20 20:49:00 +0300 |
---|---|---|
committer | Michael Lando <ml636r@att.com> | 2017-08-21 10:04:46 +0000 |
commit | 7e3cfece4dc9a814e4146755ae8f7f09a7968c3b (patch) | |
tree | 27633b3d1b7d63f027347832946219a58c11b5a7 /utils/webseal-simulator/sdc-simulator/chef-repo | |
parent | 31bef24f2fd943569df555826f20e5ad23c4420d (diff) |
[SDC-154] - sdc-simulator docker task
Change-Id: Iaa4c30237a2eef2c40fb4bfda114bc2eca6df9d5
Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
Diffstat (limited to 'utils/webseal-simulator/sdc-simulator/chef-repo')
13 files changed, 76 insertions, 234 deletions
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" + } + ] + } + +} + |