From 6fd60f573407abcd258ca4463836328ba039f50e Mon Sep 17 00:00:00 2001 From: "k.kedron" Date: Fri, 23 Aug 2019 17:11:51 +0200 Subject: Implement HTTPS calls into DCAE-DS FE Implemented HTTPS calls into dcae-ds fe: -Added p12 keystore certificate. -Updated application configuration. -Added trust-store. -Updated the onap/base_sdc-jetty docker image version -Updated the chef script to properly used of the new docker image Issue-ID: SDC-2533 Signed-off-by: Krystian Kedron Change-Id: I1bac50ff08aa4f703de458661c9d52f985c4a75d --- docker/Dockerfile | 25 +- docker/chef-repo/cookbooks/Deploy-DCAE/README.md | 3 + .../cookbooks/Deploy-DCAE/attributes/default.rb | 16 + .../Deploy-DCAE/files/default/logback-spring.xml | 342 +++++++++++++++++++++ .../Deploy-DCAE/files/default/org.onap.sdc.p12 | Bin 0 -> 4051 bytes .../files/default/org.onap.sdc.trust.jks | Bin 0 -> 1413 bytes .../cookbooks/Deploy-DCAE/recipes/dcae_setup.rb | 68 ++++ .../cookbooks/Deploy-DCAE/recipes/jetty_setup.rb | 83 +++++ .../default/dcae-application.properties.erb | 5 + .../templates/default/dcae-logback-spring.erb | 342 +++++++++++++++++++++ .../Deploy-DCAE/templates/default/http-ini.erb | 29 ++ .../Deploy-DCAE/templates/default/https-ini.erb | 29 ++ .../Deploy-DCAE/templates/default/ssl-ini.erb | 90 ++++++ docker/chef-solo/cookbooks/Deploy-DCAE/.gitignore | 20 -- .../chef-solo/cookbooks/Deploy-DCAE/.kitchen.yml | 16 - docker/chef-solo/cookbooks/Deploy-DCAE/README.md | 4 - .../cookbooks/Deploy-DCAE/attributes/default.rb | 16 - .../cookbooks/Deploy-DCAE/files/default/keystore | Bin 4255 -> 0 bytes .../Deploy-DCAE/files/default/logback-spring.xml | 342 --------------------- .../cookbooks/Deploy-DCAE/files/default/truststore | Bin 4255 -> 0 bytes docker/chef-solo/cookbooks/Deploy-DCAE/metadata.rb | 7 - .../cookbooks/Deploy-DCAE/recipes/dcae_setup.rb | 68 ---- .../cookbooks/Deploy-DCAE/recipes/jetty_setup.rb | 86 ------ .../default/dcae-application.properties.erb | 5 - .../templates/default/dcae-logback-spring.erb | 342 --------------------- .../Deploy-DCAE/templates/default/http-ini.erb | 29 -- .../Deploy-DCAE/templates/default/https-ini.erb | 29 -- .../Deploy-DCAE/templates/default/ssl-ini.erb | 90 ------ docker/set_user.sh | 20 -- docker/startup.sh | 13 +- 30 files changed, 1021 insertions(+), 1098 deletions(-) create mode 100644 docker/chef-repo/cookbooks/Deploy-DCAE/README.md create mode 100644 docker/chef-repo/cookbooks/Deploy-DCAE/attributes/default.rb create mode 100644 docker/chef-repo/cookbooks/Deploy-DCAE/files/default/logback-spring.xml create mode 100644 docker/chef-repo/cookbooks/Deploy-DCAE/files/default/org.onap.sdc.p12 create mode 100644 docker/chef-repo/cookbooks/Deploy-DCAE/files/default/org.onap.sdc.trust.jks create mode 100644 docker/chef-repo/cookbooks/Deploy-DCAE/recipes/dcae_setup.rb create mode 100644 docker/chef-repo/cookbooks/Deploy-DCAE/recipes/jetty_setup.rb create mode 100644 docker/chef-repo/cookbooks/Deploy-DCAE/templates/default/dcae-application.properties.erb create mode 100644 docker/chef-repo/cookbooks/Deploy-DCAE/templates/default/dcae-logback-spring.erb create mode 100644 docker/chef-repo/cookbooks/Deploy-DCAE/templates/default/http-ini.erb create mode 100644 docker/chef-repo/cookbooks/Deploy-DCAE/templates/default/https-ini.erb create mode 100644 docker/chef-repo/cookbooks/Deploy-DCAE/templates/default/ssl-ini.erb delete mode 100644 docker/chef-solo/cookbooks/Deploy-DCAE/.gitignore delete mode 100644 docker/chef-solo/cookbooks/Deploy-DCAE/.kitchen.yml delete mode 100644 docker/chef-solo/cookbooks/Deploy-DCAE/README.md delete mode 100644 docker/chef-solo/cookbooks/Deploy-DCAE/attributes/default.rb delete mode 100644 docker/chef-solo/cookbooks/Deploy-DCAE/files/default/keystore delete mode 100644 docker/chef-solo/cookbooks/Deploy-DCAE/files/default/logback-spring.xml delete mode 100644 docker/chef-solo/cookbooks/Deploy-DCAE/files/default/truststore delete mode 100644 docker/chef-solo/cookbooks/Deploy-DCAE/metadata.rb delete mode 100644 docker/chef-solo/cookbooks/Deploy-DCAE/recipes/dcae_setup.rb delete mode 100644 docker/chef-solo/cookbooks/Deploy-DCAE/recipes/jetty_setup.rb delete mode 100644 docker/chef-solo/cookbooks/Deploy-DCAE/templates/default/dcae-application.properties.erb delete mode 100644 docker/chef-solo/cookbooks/Deploy-DCAE/templates/default/dcae-logback-spring.erb delete mode 100644 docker/chef-solo/cookbooks/Deploy-DCAE/templates/default/http-ini.erb delete mode 100644 docker/chef-solo/cookbooks/Deploy-DCAE/templates/default/https-ini.erb delete mode 100644 docker/chef-solo/cookbooks/Deploy-DCAE/templates/default/ssl-ini.erb delete mode 100755 docker/set_user.sh diff --git a/docker/Dockerfile b/docker/Dockerfile index e6b9a36..ed54b2b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,26 +1,15 @@ -FROM onap/base_sdc-jetty:1.2.0-SNAPSHOT-latest +FROM onap/base_sdc-jetty:1.4.1 -COPY chef-solo /var/opt/dcae-fe/chef-solo/ +COPY chef-solo /root/chef-solo/ -COPY startup.sh /var/opt/dcae-fe/ +COPY chef-repo/cookbooks /root/chef-solo/cookbooks/ -ADD target/dcae_*.war ${JETTY_BASE}/webapps/ +ADD --chown=jetty:jetty target/dcae_*.war ${JETTY_BASE}/webapps/ USER root -RUN mkdir -p /opt/logs/fe +COPY startup.sh /root/ -COPY set_user.sh /tmp/set_user.sh - -RUN sh -x /tmp/set_user.sh && rm -f /tmp/set_user.sh - -RUN chown -R jetty:jetty ${JETTY_BASE}/webapps /var/opt/dcae-fe /opt/logs /var/lib/jetty - -RUN chmod 770 /var/opt/dcae-fe/startup.sh - -EXPOSE 8082 8444 - -USER jetty - -ENTRYPOINT [ "/var/opt/dcae-fe/startup.sh" ] +RUN chmod 770 /root/startup.sh +ENTRYPOINT [ "/root/startup.sh" ] diff --git a/docker/chef-repo/cookbooks/Deploy-DCAE/README.md b/docker/chef-repo/cookbooks/Deploy-DCAE/README.md new file mode 100644 index 0000000..ba9ee43 --- /dev/null +++ b/docker/chef-repo/cookbooks/Deploy-DCAE/README.md @@ -0,0 +1,3 @@ +# Deploy-DCAE + +TODO: Enter the cookbook description here. diff --git a/docker/chef-repo/cookbooks/Deploy-DCAE/attributes/default.rb b/docker/chef-repo/cookbooks/Deploy-DCAE/attributes/default.rb new file mode 100644 index 0000000..f566bdc --- /dev/null +++ b/docker/chef-repo/cookbooks/Deploy-DCAE/attributes/default.rb @@ -0,0 +1,16 @@ +default['JETTY_BASE'] = "/var/lib/jetty" +default['JETTY_HOME'] = "/usr/local/jetty" +default['APP_LOG_DIR'] = "/opt/logs/fe" + +default['DCAE']['BE'][:http_port] = 8082 +default['DCAE']['BE'][:https_port] = 8444 + +default['DCAE']['FE'][:http_port] = 8183 +default['DCAE']['FE'][:https_port] = 9444 + +default['jetty']['keystore_pwd'] = "rTIS;B4kM]2GHcNK2c3B4&Ng" +default['jetty']['keymanager_pwd'] = "rTIS;B4kM]2GHcNK2c3B4&Ng" +default['jetty']['truststore_pwd'] = "Y,f975ZNJfVZhV*{+Y[}pA?0" + +default['disableHttp'] = true + diff --git a/docker/chef-repo/cookbooks/Deploy-DCAE/files/default/logback-spring.xml b/docker/chef-repo/cookbooks/Deploy-DCAE/files/default/logback-spring.xml new file mode 100644 index 0000000..7c0bfb6 --- /dev/null +++ b/docker/chef-repo/cookbooks/Deploy-DCAE/files/default/logback-spring.xml @@ -0,0 +1,342 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${defaultPattern} + + + + + + + + + + + + ${logDirectory}/${generalLogName}.log + + ${logDirectory}/${generalLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${defaultPattern} + + + + + 256 + + + + + + ${logDirectory}/${securityLogName}.log + + ${logDirectory}/${securityLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${defaultPattern} + + + + + 256 + 0 + + + + + + ${logDirectory}/${performanceLogName}.log + + ${logDirectory}/${performanceLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${defaultPattern} + + + + 256 + + + + + + ${logDirectory}/${serverLogName}.log + + ${logDirectory}/${serverLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${defaultPattern} + + + + 256 + + + + + + + ${logDirectory}/${policyLogName}.log + + ${logDirectory}/${policyLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${defaultPattern} + + + + 256 + + + + + + + + + ${logDirectory}/${auditLogName}.log + + + + AUDIT_MARKER + AUDIT + + DENY + ACCEPT + + + + ${logDirectory}/${auditLogName}.%i.log.zip + 1 + 10 + + + + 20MB + + + ${auditLoggerPattern} + + + + + 256 + + + + + ${logDirectory}/${metricsLogName}.log + + ${logDirectory}/${metricsLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + + ${metricsLoggerPattern} + + + + + + 256 + + + + + ${logDirectory}/${errorLogName}.log + + ${logDirectory}/${errorLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${errorLoggerPattern} + + + + + 256 + + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${debugLoggerPattern} + + + + + 256 + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docker/chef-repo/cookbooks/Deploy-DCAE/files/default/org.onap.sdc.p12 b/docker/chef-repo/cookbooks/Deploy-DCAE/files/default/org.onap.sdc.p12 new file mode 100644 index 0000000..ee000dc Binary files /dev/null and b/docker/chef-repo/cookbooks/Deploy-DCAE/files/default/org.onap.sdc.p12 differ diff --git a/docker/chef-repo/cookbooks/Deploy-DCAE/files/default/org.onap.sdc.trust.jks b/docker/chef-repo/cookbooks/Deploy-DCAE/files/default/org.onap.sdc.trust.jks new file mode 100644 index 0000000..342c4f2 Binary files /dev/null and b/docker/chef-repo/cookbooks/Deploy-DCAE/files/default/org.onap.sdc.trust.jks differ diff --git a/docker/chef-repo/cookbooks/Deploy-DCAE/recipes/dcae_setup.rb b/docker/chef-repo/cookbooks/Deploy-DCAE/recipes/dcae_setup.rb new file mode 100644 index 0000000..0f8ca09 --- /dev/null +++ b/docker/chef-repo/cookbooks/Deploy-DCAE/recipes/dcae_setup.rb @@ -0,0 +1,68 @@ +dcae_be_vip = node['DCAE_BE_VIP'] + + +if node['disableHttp'] + protocol = "https" + dcae_be_port = node['DCAE']['BE'][:https_port] + dcae_fe_port = node['DCAE']['FE'][:https_port] +else + protocol = "http" + dcae_be_port = node['DCAE']['BE'][:http_port] + dcae_fe_port = node['DCAE']['FE'][:http_port] +end + + +printf("DEBUG: [%s]:[%s] disableHttp=[%s], protocol=[%s], dcae_be_vip=[%s], dcae_be_port=[%s] !!! \n", cookbook_name, recipe_name, node['disableHttp'], protocol, dcae_be_vip ,dcae_be_port ) +raise "[ERROR] 'DCAE_BE_FQDN' is not defined" if dcae_be_vip.nil? || dcae_be_vip == "" + +directory "DCAE FE_tempdir_creation" do + path "#{ENV['JETTY_BASE']}/temp" + owner 'jetty' + group 'jetty' + mode '0755' + action :create +end + + +directory "#{ENV['JETTY_BASE']}/config" do + owner "jetty" + group "jetty" + mode '0755' + recursive true + action :create +end + + +directory "#{ENV['JETTY_BASE']}/config/dcae-fe" do + owner "jetty" + group "jetty" + mode '0755' + recursive true + action :create +end + + +template "dcae-fe-config" do + sensitive true + path "#{ENV['JETTY_BASE']}/config/dcae-fe/application.properties" + source "dcae-application.properties.erb" + owner "jetty" + group "jetty" + mode "0755" + variables({ + :dcae_be_vip => dcae_be_vip, + :dcae_be_port => dcae_be_port, + :protocol => protocol, + :dcae_fe_port => dcae_fe_port + }) +end + + +template "dcae-logback-spring-config" do + sensitive true + path "#{ENV['JETTY_BASE']}/config/dcae-fe/logback-spring.xml" + source "dcae-logback-spring.erb" + owner "jetty" + group "jetty" + mode "0755" +end diff --git a/docker/chef-repo/cookbooks/Deploy-DCAE/recipes/jetty_setup.rb b/docker/chef-repo/cookbooks/Deploy-DCAE/recipes/jetty_setup.rb new file mode 100644 index 0000000..64eb214 --- /dev/null +++ b/docker/chef-repo/cookbooks/Deploy-DCAE/recipes/jetty_setup.rb @@ -0,0 +1,83 @@ +#Set the http module option +if node['disableHttp'] + http_option = "#--module=http" +else + http_option = "--module=http" +end + + +printf("DEBUG: [%s]:[%s] disableHttp=[%s], http_option=[%s] !!! \n", cookbook_name, recipe_name, node['disableHttp'], http_option ) + + +directory "Jetty_etcdir_creation" do + path "/#{ENV['JETTY_BASE']}/etc" + owner 'jetty' + group 'jetty' + mode '0755' + action :create +end + + +# Create Keystore +cookbook_file "#{ENV['JETTY_BASE']}/etc/org.onap.sdc.p12" do + source "org.onap.sdc.p12" + owner "jetty" + group "jetty" + mode 0755 +end + +# Create Trustore +cookbook_file "#{ENV['JETTY_BASE']}/etc/org.onap.sdc.trust.jks" do + source "org.onap.sdc.trust.jks" + owner "jetty" + group "jetty" + mode 0755 +end + +bash "create-jetty-modules" do + cwd "#{ENV['JETTY_BASE']}" + code <<-EOH + cd "#{ENV['JETTY_BASE']}" + java -jar "#{ENV['JETTY_HOME']}"/start.jar --add-to-start=deploy + java -jar "#{ENV['JETTY_HOME']}"/start.jar --add-to-startd=http,https,console-capture,setuid + EOH +end + +# configure Jetty modules +template "http-ini" do + path "#{ENV['JETTY_BASE']}/start.d/http.ini" + source "http-ini.erb" + owner "jetty" + group "jetty" + mode "0755" + variables({ + :http_option => http_option , + :http_port => "#{node['DCAE']['FE'][:http_port]}" + }) +end + +template "https-ini" do + path "#{ENV['JETTY_BASE']}/start.d/https.ini" + source "https-ini.erb" + owner "jetty" + group "jetty" + mode "0755" + variables({ + :https_port => "#{node['DCAE']['FE'][:https_port]}" + }) +end + +template "ssl-ini" do + path "#{ENV['JETTY_BASE']}/start.d/ssl.ini" + source "ssl-ini.erb" + owner "jetty" + group "jetty" + mode "0755" + variables({ + :https_port => "#{node['DCAE']['FE'][:https_port]}" , + :jetty_keystore_pwd => "#{node['jetty'][:keystore_pwd]}" , + :jetty_keymanager_pwd => "#{node['jetty'][:keymanager_pwd]}" , + :jetty_truststore_pwd => "#{node['jetty'][:truststore_pwd]}" + }) +end + diff --git a/docker/chef-repo/cookbooks/Deploy-DCAE/templates/default/dcae-application.properties.erb b/docker/chef-repo/cookbooks/Deploy-DCAE/templates/default/dcae-application.properties.erb new file mode 100644 index 0000000..c8b6747 --- /dev/null +++ b/docker/chef-repo/cookbooks/Deploy-DCAE/templates/default/dcae-application.properties.erb @@ -0,0 +1,5 @@ +server.port=<%= @dcae_fe_port %> +# this is the context path in which the dcae_fe is exposed: +server.context-path=/dcaed +# this is the dcae-d be url which the dcaeProxy in the FE is delegating the request to +beUrl=<%= @protocol %>://<%= @dcae_be_vip %>:<%= @dcae_be_port %> \ No newline at end of file diff --git a/docker/chef-repo/cookbooks/Deploy-DCAE/templates/default/dcae-logback-spring.erb b/docker/chef-repo/cookbooks/Deploy-DCAE/templates/default/dcae-logback-spring.erb new file mode 100644 index 0000000..7c0bfb6 --- /dev/null +++ b/docker/chef-repo/cookbooks/Deploy-DCAE/templates/default/dcae-logback-spring.erb @@ -0,0 +1,342 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${defaultPattern} + + + + + + + + + + + + ${logDirectory}/${generalLogName}.log + + ${logDirectory}/${generalLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${defaultPattern} + + + + + 256 + + + + + + ${logDirectory}/${securityLogName}.log + + ${logDirectory}/${securityLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${defaultPattern} + + + + + 256 + 0 + + + + + + ${logDirectory}/${performanceLogName}.log + + ${logDirectory}/${performanceLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${defaultPattern} + + + + 256 + + + + + + ${logDirectory}/${serverLogName}.log + + ${logDirectory}/${serverLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${defaultPattern} + + + + 256 + + + + + + + ${logDirectory}/${policyLogName}.log + + ${logDirectory}/${policyLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${defaultPattern} + + + + 256 + + + + + + + + + ${logDirectory}/${auditLogName}.log + + + + AUDIT_MARKER + AUDIT + + DENY + ACCEPT + + + + ${logDirectory}/${auditLogName}.%i.log.zip + 1 + 10 + + + + 20MB + + + ${auditLoggerPattern} + + + + + 256 + + + + + ${logDirectory}/${metricsLogName}.log + + ${logDirectory}/${metricsLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + + ${metricsLoggerPattern} + + + + + + 256 + + + + + ${logDirectory}/${errorLogName}.log + + ${logDirectory}/${errorLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${errorLoggerPattern} + + + + + 256 + + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${debugLoggerPattern} + + + + + 256 + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docker/chef-repo/cookbooks/Deploy-DCAE/templates/default/http-ini.erb b/docker/chef-repo/cookbooks/Deploy-DCAE/templates/default/http-ini.erb new file mode 100644 index 0000000..8f26690 --- /dev/null +++ b/docker/chef-repo/cookbooks/Deploy-DCAE/templates/default/http-ini.erb @@ -0,0 +1,29 @@ +# --------------------------------------- +# Module: http +<%= @http_option %> + +### HTTP Connector Configuration + +## Connector host/address to bind to +# jetty.http.host=0.0.0.0 + +## Connector port to listen on +jetty.http.port=<%= @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 diff --git a/docker/chef-repo/cookbooks/Deploy-DCAE/templates/default/https-ini.erb b/docker/chef-repo/cookbooks/Deploy-DCAE/templates/default/https-ini.erb new file mode 100644 index 0000000..9999a41 --- /dev/null +++ b/docker/chef-repo/cookbooks/Deploy-DCAE/templates/default/https-ini.erb @@ -0,0 +1,29 @@ +# --------------------------------------- +# Module: https +--module=https + +### HTTPS Connector Configuration + +## Connector host/address to bind to +# jetty.https.host=0.0.0.0 + +## Connector port to listen on +jetty.https.port=<%= @https_port %> + +## Connector idle timeout in milliseconds +jetty.https.idleTimeout=30000 + +## Connector socket linger time in seconds (-1 to disable) +# jetty.https.soLingerTime=-1 + +## Number of acceptors (-1 picks default based on number of cores) +# jetty.https.acceptors=-1 + +## Number of selectors (-1 picks default based on number of cores) +# jetty.https.selectors=-1 + +## ServerSocketChannel backlog (0 picks platform default) +# jetty.https.acceptorQueueSize=0 + +## Thread priority delta to give to acceptor threads +# jetty.https.acceptorPriorityDelta=0 diff --git a/docker/chef-repo/cookbooks/Deploy-DCAE/templates/default/ssl-ini.erb b/docker/chef-repo/cookbooks/Deploy-DCAE/templates/default/ssl-ini.erb new file mode 100644 index 0000000..278fdea --- /dev/null +++ b/docker/chef-repo/cookbooks/Deploy-DCAE/templates/default/ssl-ini.erb @@ -0,0 +1,90 @@ +# --------------------------------------- +# Module: ssl +--module=ssl + +### TLS(SSL) Connector Configuration + +## Connector host/address to bind to +# jetty.ssl.host=0.0.0.0 + +## Connector port to listen on +jetty.ssl.port=<%= @https_port %> + +## Connector idle timeout in milliseconds +# jetty.ssl.idleTimeout=30000 + +## Connector socket linger time in seconds (-1 to disable) +# jetty.ssl.soLingerTime=-1 + +## Number of acceptors (-1 picks default based on number of cores) +# jetty.ssl.acceptors=-1 + +## Number of selectors (-1 picks default based on number of cores) +# jetty.ssl.selectors=-1 + +## ServerSocketChannel backlog (0 picks platform default) +# jetty.ssl.acceptorQueueSize=0 + +## Thread priority delta to give to acceptor threads +# jetty.ssl.acceptorPriorityDelta=0 + +## Whether request host names are checked to match any SNI names +# jetty.ssl.sniHostCheck=true + +## max age in seconds for a Strict-Transport-Security response header (default -1) +# jetty.ssl.stsMaxAgeSeconds=31536000 + +## include subdomain property in any Strict-Transport-Security header (default false) +# jetty.ssl.stsIncludeSubdomains=true + +### SslContextFactory Configuration +## Note that OBF passwords are not secure, just protected from casual observation +## See http://www.eclipse.org/jetty/documentation/current/configuring-security-secure-passwords.html + +## Keystore file path (relative to $jetty.base) +jetty.sslContext.keyStorePath=etc/org.onap.sdc.p12 + +## Truststore file path (relative to $jetty.base) +jetty.sslContext.trustStorePath=etc/org.onap.sdc.trust.jks + +## Keystore password +# jetty.sslContext.keyStorePassword=OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4 +jetty.sslContext.keyStorePassword=<%= @jetty_keystore_pwd %> + +## Keystore type and provider +# jetty.sslContext.keyStoreType=JKS +# jetty.sslContext.keyStoreProvider= + +## KeyManager password +# jetty.sslContext.keyManagerPassword=OBF:1u2u1wml1z7s1z7a1wnl1u2g +jetty.sslContext.keyManagerPassword=<%= @jetty_keymanager_pwd %> + +## Truststore password +# jetty.sslContext.trustStorePassword=OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4 +jetty.sslContext.trustStorePassword=<%= @jetty_truststore_pwd %> + +## Truststore type and provider +# jetty.sslContext.trustStoreType=JKS +# jetty.sslContext.trustStoreProvider= + +## whether client certificate authentication is required +# jetty.sslContext.needClientAuth=false + +## Whether client certificate authentication is desired +# jetty.sslContext.wantClientAuth=false + +## Whether cipher order is significant (since java 8 only) +# jetty.sslContext.useCipherSuitesOrder=true + +## To configure Includes / Excludes for Cipher Suites or Protocols see tweak-ssl.xml example at +## https://www.eclipse.org/jetty/documentation/current/configuring-ssl.html#configuring-sslcontextfactory-cipherSuites + +## Set the size of the SslSession cache +# jetty.sslContext.sslSessionCacheSize=-1 + +## Set the timeout (in seconds) of the SslSession cache timeout +# jetty.sslContext.sslSessionTimeout=-1 + +## Allow SSL renegotiation +# jetty.sslContext.renegotiationAllowed=true +# jetty.sslContext.renegotiationLimit=5 diff --git a/docker/chef-solo/cookbooks/Deploy-DCAE/.gitignore b/docker/chef-solo/cookbooks/Deploy-DCAE/.gitignore deleted file mode 100644 index b31c0d3..0000000 --- a/docker/chef-solo/cookbooks/Deploy-DCAE/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -.vagrant -Berksfile.lock -*~ -*# -.#* -\#*# -.*.sw[a-z] -*.un~ - -# Bundler -Gemfile.lock -bin/* -.bundle/* - -.kitchen/ -.kitchen.local.yml - -######### Private -run.me -DCAE-CI01.json diff --git a/docker/chef-solo/cookbooks/Deploy-DCAE/.kitchen.yml b/docker/chef-solo/cookbooks/Deploy-DCAE/.kitchen.yml deleted file mode 100644 index 37d2844..0000000 --- a/docker/chef-solo/cookbooks/Deploy-DCAE/.kitchen.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -driver: - name: vagrant - -provisioner: - name: chef_zero - -platforms: - - name: ubuntu-16.04 - - name: centos-7.1 - -suites: - - name: default - run_list: - - recipe[Deploy-DCAE::default] - attributes: diff --git a/docker/chef-solo/cookbooks/Deploy-DCAE/README.md b/docker/chef-solo/cookbooks/Deploy-DCAE/README.md deleted file mode 100644 index 27aba53..0000000 --- a/docker/chef-solo/cookbooks/Deploy-DCAE/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Deploy-DCAE - -TODO: Enter the cookbook description here. - diff --git a/docker/chef-solo/cookbooks/Deploy-DCAE/attributes/default.rb b/docker/chef-solo/cookbooks/Deploy-DCAE/attributes/default.rb deleted file mode 100644 index 0ea50da..0000000 --- a/docker/chef-solo/cookbooks/Deploy-DCAE/attributes/default.rb +++ /dev/null @@ -1,16 +0,0 @@ -default['JETTY_BASE'] = "/var/lib/jetty" -default['JETTY_HOME'] = "/usr/local/jetty" -default['APP_LOG_DIR'] = "/opt/logs/fe" - -default['DCAE']['BE'][:http_port] = 8082 -default['DCAE']['BE'][:https_port] = 8444 - -default['DCAE']['FE'][:http_port] = 8183 -default['DCAE']['FE'][:https_port] = 9444 - -default['jetty'][:keystore_pwd] = "OBF:1cp61iuj194s194u194w194y1is31cok" -default['jetty'][:keymanager_pwd] = "OBF:1cp61iuj194s194u194w194y1is31cok" -default['jetty'][:truststore_pwd] = "OBF:1cp61iuj194s194u194w194y1is31cok" - -default['disableHttp'] = true - diff --git a/docker/chef-solo/cookbooks/Deploy-DCAE/files/default/keystore b/docker/chef-solo/cookbooks/Deploy-DCAE/files/default/keystore deleted file mode 100644 index c408393..0000000 Binary files a/docker/chef-solo/cookbooks/Deploy-DCAE/files/default/keystore and /dev/null differ diff --git a/docker/chef-solo/cookbooks/Deploy-DCAE/files/default/logback-spring.xml b/docker/chef-solo/cookbooks/Deploy-DCAE/files/default/logback-spring.xml deleted file mode 100644 index 7c0bfb6..0000000 --- a/docker/chef-solo/cookbooks/Deploy-DCAE/files/default/logback-spring.xml +++ /dev/null @@ -1,342 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${defaultPattern} - - - - - - - - - - - - ${logDirectory}/${generalLogName}.log - - ${logDirectory}/${generalLogName}.%i.log.zip - - 1 - 9 - - - 5MB - - - ${defaultPattern} - - - - - 256 - - - - - - ${logDirectory}/${securityLogName}.log - - ${logDirectory}/${securityLogName}.%i.log.zip - - 1 - 9 - - - 5MB - - - ${defaultPattern} - - - - - 256 - 0 - - - - - - ${logDirectory}/${performanceLogName}.log - - ${logDirectory}/${performanceLogName}.%i.log.zip - - 1 - 9 - - - 5MB - - - ${defaultPattern} - - - - 256 - - - - - - ${logDirectory}/${serverLogName}.log - - ${logDirectory}/${serverLogName}.%i.log.zip - - 1 - 9 - - - 5MB - - - ${defaultPattern} - - - - 256 - - - - - - - ${logDirectory}/${policyLogName}.log - - ${logDirectory}/${policyLogName}.%i.log.zip - - 1 - 9 - - - 5MB - - - ${defaultPattern} - - - - 256 - - - - - - - - - ${logDirectory}/${auditLogName}.log - - - - AUDIT_MARKER - AUDIT - - DENY - ACCEPT - - - - ${logDirectory}/${auditLogName}.%i.log.zip - 1 - 10 - - - - 20MB - - - ${auditLoggerPattern} - - - - - 256 - - - - - ${logDirectory}/${metricsLogName}.log - - ${logDirectory}/${metricsLogName}.%i.log.zip - - 1 - 9 - - - 5MB - - - - ${metricsLoggerPattern} - - - - - - 256 - - - - - ${logDirectory}/${errorLogName}.log - - ${logDirectory}/${errorLogName}.%i.log.zip - - 1 - 9 - - - 5MB - - - ${errorLoggerPattern} - - - - - 256 - - - - - ${logDirectory}/${debugLogName}.log - - ${logDirectory}/${debugLogName}.%i.log.zip - - 1 - 9 - - - 5MB - - - ${debugLoggerPattern} - - - - - 256 - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docker/chef-solo/cookbooks/Deploy-DCAE/files/default/truststore b/docker/chef-solo/cookbooks/Deploy-DCAE/files/default/truststore deleted file mode 100644 index c408393..0000000 Binary files a/docker/chef-solo/cookbooks/Deploy-DCAE/files/default/truststore and /dev/null differ diff --git a/docker/chef-solo/cookbooks/Deploy-DCAE/metadata.rb b/docker/chef-solo/cookbooks/Deploy-DCAE/metadata.rb deleted file mode 100644 index 7935c22..0000000 --- a/docker/chef-solo/cookbooks/Deploy-DCAE/metadata.rb +++ /dev/null @@ -1,7 +0,0 @@ -name 'Deploy-DCAE' -maintainer 'The Authors' -maintainer_email 'you@example.com' -license 'all_rights' -description 'Installs/Configures Deploy-DCAE' -long_description 'Installs/Configures Deploy-DCAE' -version '1.0.0' diff --git a/docker/chef-solo/cookbooks/Deploy-DCAE/recipes/dcae_setup.rb b/docker/chef-solo/cookbooks/Deploy-DCAE/recipes/dcae_setup.rb deleted file mode 100644 index 068e7c1..0000000 --- a/docker/chef-solo/cookbooks/Deploy-DCAE/recipes/dcae_setup.rb +++ /dev/null @@ -1,68 +0,0 @@ -jetty_base = "#{node['JETTY_BASE']}" -dcae_logs = "#{node['APP_LOG_DIR']}" - -dcae_be_vip = node['DCAE_BE_VIP'] - -if node['disableHttp'] - protocol = "https" - dcae_be_port = node['DCAE']['BE'][:https_port] - dcae_fe_port = node['DCAE']['FE'][:https_port] -else - protocol = "http" - dcae_be_port = node['DCAE']['BE'][:http_port] - dcae_fe_port = node['DCAE']['FE'][:http_port] -end - -printf("DEBUG: [%s]:[%s] disableHttp=[%s], protocol=[%s], dcae_be_vip=[%s], dcae_be_port=[%s] !!! \n", cookbook_name, recipe_name, node['disableHttp'], protocol, dcae_be_vip ,dcae_be_port ) - -raise "[ERROR] 'DCAE_BE_FQDN' is not defined" if dcae_be_vip.nil? || dcae_be_vip == "" - -directory "#{jetty_base}/config" do - owner "jetty" - group "jetty" - mode '0755' - recursive true - action :create -end - -directory "#{jetty_base}/config/dcae-fe" do - owner "jetty" - group "jetty" - mode '0755' - recursive true - action :create -end - -template "dcae-fe-config" do - sensitive true - path "#{jetty_base}/config/dcae-fe/application.properties" - source "dcae-application.properties.erb" - owner "jetty" - group "jetty" - mode "0755" - variables ({ - :dcae_be_vip => dcae_be_vip, - :dcae_be_port => dcae_be_port, - :protocol => protocol, - :dcae_fe_port => dcae_fe_port - }) -end - - -template "dcae-logback-spring-config" do - sensitive true - path "#{jetty_base}/config/dcae-fe/logback-spring.xml" - source "dcae-logback-spring.erb" - owner "jetty" - group "jetty" - mode "0755" -end - - -directory "#{dcae_logs}" do - owner "jetty" - group "jetty" - mode '0755' - recursive true - action :create -end \ No newline at end of file diff --git a/docker/chef-solo/cookbooks/Deploy-DCAE/recipes/jetty_setup.rb b/docker/chef-solo/cookbooks/Deploy-DCAE/recipes/jetty_setup.rb deleted file mode 100644 index 74c384e..0000000 --- a/docker/chef-solo/cookbooks/Deploy-DCAE/recipes/jetty_setup.rb +++ /dev/null @@ -1,86 +0,0 @@ -jetty_base = "#{node['JETTY_BASE']}" -jetty_home = "#{node['JETTY_HOME']}" - -#Set the http module option -if node['disableHttp'] - http_option = "#--module=http" -else - http_option = "--module=http" -end - - -printf("DEBUG: [%s]:[%s] disableHttp=[%s], http_option=[%s] !!! \n", cookbook_name, recipe_name, node['disableHttp'], http_option ) - - -directory "Jetty_etcdir_creation" do - path "/#{jetty_base}/etc" - owner 'jetty' - group 'jetty' - mode '0755' - action :create -end - - -# Create Keystore -cookbook_file "#{jetty_base}/etc/keystore" do - source "keystore" - owner "jetty" - group "jetty" - mode 0755 -end - -# Create Trustore -cookbook_file "#{jetty_base}/etc/truststore" do - source "truststore" - owner "jetty" - group "jetty" - mode 0755 -end - -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 -end - -# configure Jetty modules -template "http-ini" do - path "#{jetty_base}/start.d/http.ini" - source "http-ini.erb" - owner "jetty" - group "jetty" - mode "0755" - variables ({ - :http_option => http_option , - :http_port => "#{node['DCAE']['FE'][:http_port]}" - }) -end - -template "https-ini" do - path "#{jetty_base}/start.d/https.ini" - source "https-ini.erb" - owner "jetty" - group "jetty" - mode "0755" - variables ({ - :https_port => "#{node['DCAE']['FE'][:https_port]}" - }) -end - -template "ssl-ini" do - path "#{jetty_base}/start.d/ssl.ini" - source "ssl-ini.erb" - owner "jetty" - group "jetty" - mode "0755" - variables ({ - :https_port => "#{node['DCAE']['FE'][:https_port]}" , - :jetty_keystore_pwd => "#{node['jetty'][:keystore_pwd]}" , - :jetty_keymanager_pwd => "#{node['jetty'][:keymanager_pwd]}" , - :jetty_truststore_pwd => "#{node['jetty'][:truststore_pwd]}" - }) -end - diff --git a/docker/chef-solo/cookbooks/Deploy-DCAE/templates/default/dcae-application.properties.erb b/docker/chef-solo/cookbooks/Deploy-DCAE/templates/default/dcae-application.properties.erb deleted file mode 100644 index c8b6747..0000000 --- a/docker/chef-solo/cookbooks/Deploy-DCAE/templates/default/dcae-application.properties.erb +++ /dev/null @@ -1,5 +0,0 @@ -server.port=<%= @dcae_fe_port %> -# this is the context path in which the dcae_fe is exposed: -server.context-path=/dcaed -# this is the dcae-d be url which the dcaeProxy in the FE is delegating the request to -beUrl=<%= @protocol %>://<%= @dcae_be_vip %>:<%= @dcae_be_port %> \ No newline at end of file diff --git a/docker/chef-solo/cookbooks/Deploy-DCAE/templates/default/dcae-logback-spring.erb b/docker/chef-solo/cookbooks/Deploy-DCAE/templates/default/dcae-logback-spring.erb deleted file mode 100644 index 7c0bfb6..0000000 --- a/docker/chef-solo/cookbooks/Deploy-DCAE/templates/default/dcae-logback-spring.erb +++ /dev/null @@ -1,342 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${defaultPattern} - - - - - - - - - - - - ${logDirectory}/${generalLogName}.log - - ${logDirectory}/${generalLogName}.%i.log.zip - - 1 - 9 - - - 5MB - - - ${defaultPattern} - - - - - 256 - - - - - - ${logDirectory}/${securityLogName}.log - - ${logDirectory}/${securityLogName}.%i.log.zip - - 1 - 9 - - - 5MB - - - ${defaultPattern} - - - - - 256 - 0 - - - - - - ${logDirectory}/${performanceLogName}.log - - ${logDirectory}/${performanceLogName}.%i.log.zip - - 1 - 9 - - - 5MB - - - ${defaultPattern} - - - - 256 - - - - - - ${logDirectory}/${serverLogName}.log - - ${logDirectory}/${serverLogName}.%i.log.zip - - 1 - 9 - - - 5MB - - - ${defaultPattern} - - - - 256 - - - - - - - ${logDirectory}/${policyLogName}.log - - ${logDirectory}/${policyLogName}.%i.log.zip - - 1 - 9 - - - 5MB - - - ${defaultPattern} - - - - 256 - - - - - - - - - ${logDirectory}/${auditLogName}.log - - - - AUDIT_MARKER - AUDIT - - DENY - ACCEPT - - - - ${logDirectory}/${auditLogName}.%i.log.zip - 1 - 10 - - - - 20MB - - - ${auditLoggerPattern} - - - - - 256 - - - - - ${logDirectory}/${metricsLogName}.log - - ${logDirectory}/${metricsLogName}.%i.log.zip - - 1 - 9 - - - 5MB - - - - ${metricsLoggerPattern} - - - - - - 256 - - - - - ${logDirectory}/${errorLogName}.log - - ${logDirectory}/${errorLogName}.%i.log.zip - - 1 - 9 - - - 5MB - - - ${errorLoggerPattern} - - - - - 256 - - - - - ${logDirectory}/${debugLogName}.log - - ${logDirectory}/${debugLogName}.%i.log.zip - - 1 - 9 - - - 5MB - - - ${debugLoggerPattern} - - - - - 256 - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docker/chef-solo/cookbooks/Deploy-DCAE/templates/default/http-ini.erb b/docker/chef-solo/cookbooks/Deploy-DCAE/templates/default/http-ini.erb deleted file mode 100644 index 8f26690..0000000 --- a/docker/chef-solo/cookbooks/Deploy-DCAE/templates/default/http-ini.erb +++ /dev/null @@ -1,29 +0,0 @@ -# --------------------------------------- -# Module: http -<%= @http_option %> - -### HTTP Connector Configuration - -## Connector host/address to bind to -# jetty.http.host=0.0.0.0 - -## Connector port to listen on -jetty.http.port=<%= @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 diff --git a/docker/chef-solo/cookbooks/Deploy-DCAE/templates/default/https-ini.erb b/docker/chef-solo/cookbooks/Deploy-DCAE/templates/default/https-ini.erb deleted file mode 100644 index 9999a41..0000000 --- a/docker/chef-solo/cookbooks/Deploy-DCAE/templates/default/https-ini.erb +++ /dev/null @@ -1,29 +0,0 @@ -# --------------------------------------- -# Module: https ---module=https - -### HTTPS Connector Configuration - -## Connector host/address to bind to -# jetty.https.host=0.0.0.0 - -## Connector port to listen on -jetty.https.port=<%= @https_port %> - -## Connector idle timeout in milliseconds -jetty.https.idleTimeout=30000 - -## Connector socket linger time in seconds (-1 to disable) -# jetty.https.soLingerTime=-1 - -## Number of acceptors (-1 picks default based on number of cores) -# jetty.https.acceptors=-1 - -## Number of selectors (-1 picks default based on number of cores) -# jetty.https.selectors=-1 - -## ServerSocketChannel backlog (0 picks platform default) -# jetty.https.acceptorQueueSize=0 - -## Thread priority delta to give to acceptor threads -# jetty.https.acceptorPriorityDelta=0 diff --git a/docker/chef-solo/cookbooks/Deploy-DCAE/templates/default/ssl-ini.erb b/docker/chef-solo/cookbooks/Deploy-DCAE/templates/default/ssl-ini.erb deleted file mode 100644 index 9abac51..0000000 --- a/docker/chef-solo/cookbooks/Deploy-DCAE/templates/default/ssl-ini.erb +++ /dev/null @@ -1,90 +0,0 @@ -# --------------------------------------- -# Module: ssl ---module=ssl - -### TLS(SSL) Connector Configuration - -## Connector host/address to bind to -# jetty.ssl.host=0.0.0.0 - -## Connector port to listen on -jetty.ssl.port=<%= @https_port %> - -## Connector idle timeout in milliseconds -# jetty.ssl.idleTimeout=30000 - -## Connector socket linger time in seconds (-1 to disable) -# jetty.ssl.soLingerTime=-1 - -## Number of acceptors (-1 picks default based on number of cores) -# jetty.ssl.acceptors=-1 - -## Number of selectors (-1 picks default based on number of cores) -# jetty.ssl.selectors=-1 - -## ServerSocketChannel backlog (0 picks platform default) -# jetty.ssl.acceptorQueueSize=0 - -## Thread priority delta to give to acceptor threads -# jetty.ssl.acceptorPriorityDelta=0 - -## Whether request host names are checked to match any SNI names -# jetty.ssl.sniHostCheck=true - -## max age in seconds for a Strict-Transport-Security response header (default -1) -# jetty.ssl.stsMaxAgeSeconds=31536000 - -## include subdomain property in any Strict-Transport-Security header (default false) -# jetty.ssl.stsIncludeSubdomains=true - -### SslContextFactory Configuration -## Note that OBF passwords are not secure, just protected from casual observation -## See http://www.eclipse.org/jetty/documentation/current/configuring-security-secure-passwords.html - -## Keystore file path (relative to $jetty.base) -#jetty.sslContext.keyStorePath=etc/keystore - -## Truststore file path (relative to $jetty.base) -#jetty.sslContext.trustStorePath=etc/truststore - -## Keystore password -# jetty.sslContext.keyStorePassword=OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4 -jetty.sslContext.keyStorePassword=<%= @jetty_keystore_pwd %> - -## Keystore type and provider -# jetty.sslContext.keyStoreType=JKS -# jetty.sslContext.keyStoreProvider= - -## KeyManager password -# jetty.sslContext.keyManagerPassword=OBF:1u2u1wml1z7s1z7a1wnl1u2g -jetty.sslContext.keyManagerPassword=<%= @jetty_keymanager_pwd %> - -## Truststore password -# jetty.sslContext.trustStorePassword=OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4 -jetty.sslContext.trustStorePassword=<%= @jetty_truststore_pwd %> - -## Truststore type and provider -# jetty.sslContext.trustStoreType=JKS -# jetty.sslContext.trustStoreProvider= - -## whether client certificate authentication is required -# jetty.sslContext.needClientAuth=false - -## Whether client certificate authentication is desired -# jetty.sslContext.wantClientAuth=false - -## Whether cipher order is significant (since java 8 only) -# jetty.sslContext.useCipherSuitesOrder=true - -## To configure Includes / Excludes for Cipher Suites or Protocols see tweak-ssl.xml example at -## https://www.eclipse.org/jetty/documentation/current/configuring-ssl.html#configuring-sslcontextfactory-cipherSuites - -## Set the size of the SslSession cache -# jetty.sslContext.sslSessionCacheSize=-1 - -## Set the timeout (in seconds) of the SslSession cache timeout -# jetty.sslContext.sslSessionTimeout=-1 - -## Allow SSL renegotiation -# jetty.sslContext.renegotiationAllowed=true -# jetty.sslContext.renegotiationLimit=5 diff --git a/docker/set_user.sh b/docker/set_user.sh deleted file mode 100755 index 539a200..0000000 --- a/docker/set_user.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -# Create user - -USER="jetty" -GROUP="jetty" -UID="352070" -GID="35953" - -# Remove user: -deluser ${USER} - -##delgroup ${GROUP} - -echo "${USER}:x:${UID}:${GID}::/home/${USER}:Linux User,,,:/home/jetty:/bin/false" >> /etc/passwd - -echo "${GROUP}:x:${GID}:${USER}" >> /etc/group - -echo "${USER}:!:17501:0:99999:7:::" >> /etc/shadow - -mkdir /home/${USER} && chown ${USER}:${GROUP} /home/${USER} diff --git a/docker/startup.sh b/docker/startup.sh index 46925ae..8b7d914 100644 --- a/docker/startup.sh +++ b/docker/startup.sh @@ -1,17 +1,18 @@ #!/bin/sh -#set -x -# Run chef-solo for configuration -cd /var/opt/dcae-fe/chef-solo -chef-solo -c solo.rb -E ${ENVNAME} --log_level "debug" --logfile "/tmp/Chef-Solo.log" +JAVA_OPTIONS=" ${JAVA_OPTIONS} -Dconfig.home=${JETTY_BASE}/config + -Dlog.home=${JETTY_BASE}/logs + -Dlogback.configurationFile=${JETTY_BASE}/dcae-fe/logback-spring.xml" + +cd /root/chef-solo +chef-solo -c solo.rb -E ${ENVNAME} status=$? -if [ $status != 0 ]; then +if [[ ${status} != 0 ]]; then echo "[ERROR] Problem detected while running chef. Aborting !" exit 1 fi -# Execute Jetty cd /var/lib/jetty /docker-entrypoint.sh & -- cgit 1.2.3-korg