diff options
author | sebdet <sebastien.determe@intl.att.com> | 2020-09-21 22:13:05 +0200 |
---|---|---|
committer | Michael Morris <michael.morris@est.tech> | 2021-05-12 10:27:10 +0000 |
commit | df353be353e1ec25ac2a0e64a9eb617dcbc87703 (patch) | |
tree | e79c636bc4f67bdd8392b24c85f2f6cb26e3c67a /openecomp-be/dist | |
parent | 936781153118364e60662529dbd7217416a26148 (diff) |
Use integration-java11 Dockerfile
Use onap/integration-java11:7.1.0 as a source for the images requiring JDK 11 in SDC
Issue-ID: SDC-3298
Change-Id: Ifee3d2942dcb9c078f2ebb686bdabc0ecca857b3
Signed-off-by: xuegao <xue.gao@intl.att.com>
Diffstat (limited to 'openecomp-be/dist')
16 files changed, 95 insertions, 109 deletions
diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/Dockerfile b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/Dockerfile index 9c6275d87a..c3f3a757ac 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/Dockerfile +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/Dockerfile @@ -1,20 +1,18 @@ -FROM jetty:9.4.31-jre11-slim +FROM onap/integration-java11:8.0.0 USER root +ARG JETTY_FOLDER=/app/jetty # Install Chef RUN set -ex && \ - apt-get update -y && \ - apt-get install -y \ - jq \ - curl \ - vim \ - make \ - gcc \ + apk update && \ + apk add --no-cache \ + build-base \ ruby \ ruby-dev \ libffi-dev \ - libxml2-dev && \ + libxml2-dev \ + libressl-dev && \ gem install \ chef:13.8.5 \ berkshelf:6.3.1 \ @@ -22,33 +20,30 @@ RUN set -ex && \ etc webrick \ --no-document && \ gem cleanup && \ - apt-get update -y && \ - apt-get install -y binutils jq && \ - apt-get clean - -# Replace Jetty user ID -ENV USER_JETTY="jetty" -ENV GROUP_JETTY="jetty" -ENV UID_JETTY="352070" -ENV GID_JETTY="35953" - -# Remove user: -RUN deluser ${USER_JETTY} -#RUN delgroup ${GROUP_JETTY} -RUN echo "${USER_JETTY}:x:${UID_JETTY}:${GID_JETTY}::/home/${USER_JETTY}:Linux User,,,:/home/jetty:/bin/false" >> /etc/passwd -RUN echo "${GROUP_JETTY}:x:${GID_JETTY}:${USER_JETTY}" >> /etc/group -RUN echo "${USER_JETTY}:!:17501:0:99999:7:::" >> /etc/shadow -RUN mkdir /home/${USER_JETTY} && chown ${USER_JETTY}:${GROUP_JETTY} /home/${USER_JETTY} -RUN chown -R jetty:jetty ${JETTY_BASE}/webapps /var/lib/jetty - -USER jetty - -COPY --chown=jetty:jetty chef-solo ${JETTY_BASE}/chef-solo/ -COPY --chown=jetty:jetty chef-repo/cookbooks ${JETTY_BASE}/chef-solo/cookbooks/ -ADD --chown=jetty:jetty onboarding-be-*.war ${JETTY_BASE}/webapps/ -ADD --chown=jetty:jetty api-docs.war ${JETTY_BASE}/webapps/ -COPY --chown=jetty:jetty startup.sh ${JETTY_BASE}/ - -RUN chmod 770 ${JETTY_BASE}/startup.sh - -ENTRYPOINT [ "sh", "-c", "${JETTY_BASE}/startup.sh"] + apk update + +ENV JETTY_HOME=$JETTY_FOLDER +ENV JETTY_BASE=$JETTY_FOLDER +ENV JETTY_USER=onap +ENV JETTY_GROUP=onap + +RUN mkdir $JETTY_FOLDER && chown onap:onap $JETTY_FOLDER + +USER onap + +#Download jetty +RUN wget https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/9.4.31.v20200723/jetty-distribution-9.4.31.v20200723.tar.gz -O $JETTY_FOLDER/jetty.tar.gz && \ + tar xvz -C $JETTY_FOLDER -f $JETTY_FOLDER/jetty.tar.gz --strip 1 && \ + rm -rf $JETTY_FOLDER/jetty.tar.gz +RUN sed -i 's/"jetty"/"onap"/g' $JETTY_FOLDER/etc/jetty-setuid.xml + + +COPY --chown=onap:onap chef-solo $JETTY_FOLDER/chef-solo/ +COPY --chown=onap:onap chef-repo/cookbooks $JETTY_FOLDER/chef-solo/cookbooks/ +ADD --chown=onap:onap onboarding-be-*.war $JETTY_FOLDER/webapps/ +ADD --chown=onap:onap api-docs.war $JETTY_FOLDER/webapps/ +COPY --chown=onap:onap startup.sh $JETTY_FOLDER/ + +RUN chmod 770 $JETTY_FOLDER/startup.sh + +ENTRYPOINT [ "sh", "-c", "${JETTY_HOME}/startup.sh"] diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/attributes/default.rb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/attributes/default.rb index 761edc9e5b..074584a6e8 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/attributes/default.rb +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/attributes/default.rb @@ -8,6 +8,7 @@ default['cassandra'][:truststore_password] = "Aa123456" default['jetty'][:keystore_pwd] = "?(kP!Yur![*!Y5!E^f(ZKc31" default['jetty'][:keymanager_pwd] = "?(kP!Yur![*!Y5!E^f(ZKc31" default['jetty'][:truststore_pwd] = "z+KEj;t+,KN^iimSiS89e#p0" +default['jetty']['truststore_path'] = "#{ENV['JETTY_BASE']}/etc/truststore" default['VnfRepo']['vnfRepoPort'] = 8702 default['VnfRepo']['vnfRepoHost'] = "refrepo" diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_1_cleanup_jettydir.rb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_1_cleanup_jettydir.rb index 2c703f2039..305ff2384b 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_1_cleanup_jettydir.rb +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_1_cleanup_jettydir.rb @@ -1,23 +1,23 @@ directory "tempdir_creation" do path "#{ENV['JETTY_BASE']}/temp" - owner 'jetty' - group 'jetty' + owner "#{ENV['JETTY_USER']}" + group "#{ENV['JETTY_GROUP']}" mode '0755' action :create end directory "create_config_dir" do path "#{ENV['JETTY_BASE']}/config" - owner 'jetty' - group 'jetty' + owner "#{ENV['JETTY_USER']}" + group "#{ENV['JETTY_GROUP']}" mode '0755' action :create end directory "onboarding-be" do path "#{ENV['JETTY_BASE']}/config/onboarding-be" - owner 'jetty' - group 'jetty' + owner "#{ENV['JETTY_USER']}" + group "#{ENV['JETTY_GROUP']}" mode '0755' action :create end diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_2_locate_keystore.rb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_2_locate_keystore.rb index e482b693e7..1a678397d8 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_2_locate_keystore.rb +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_2_locate_keystore.rb @@ -1,22 +1,22 @@ directory "Jetty_etcdir_creation" do path "#{ENV['JETTY_BASE']}/etc" - owner 'jetty' - group 'jetty' + owner "#{ENV['JETTY_USER']}" + group "#{ENV['JETTY_GROUP']}" mode '0755' action :create end cookbook_file "#{ENV['JETTY_BASE']}/etc/org.onap.sdc.p12" do source "org.onap.sdc.p12" - owner "jetty" - group "jetty" + owner "#{ENV['JETTY_USER']}" + group "#{ENV['JETTY_GROUP']}" mode 0755 end cookbook_file "#{ENV['JETTY_BASE']}/etc/org.onap.sdc.trust.jks" do source "org.onap.sdc.trust.jks" - owner "jetty" - group "jetty" + owner "#{ENV['JETTY_USER']}" + group "#{ENV['JETTY_GROUP']}" mode 0755 end diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_3_logback.rb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_3_logback.rb index 823c3cd44e..0d97645420 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_3_logback.rb +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_3_logback.rb @@ -1,7 +1,7 @@ cookbook_file "#{ENV['JETTY_BASE']}/config/onboarding-be/logback.xml" do source "logback.xml" mode 0755 - owner "jetty" - group "jetty" + owner "#{ENV['JETTY_USER']}" + group "#{ENV['JETTY_GROUP']}" end diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_4_setup_jetty_modules.rb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_4_setup_jetty_modules.rb index 64a02e9559..9fe747851e 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_4_setup_jetty_modules.rb +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_4_setup_jetty_modules.rb @@ -5,22 +5,17 @@ else http_option = "--module=http" 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 --create-startd --add-to-start=http,https,console-capture,setuid -EOH +execute "create-jetty-modules" do + command "java -jar #{ENV['JETTY_HOME']}/start.jar --add-to-start=deploy && java -jar #{ENV['JETTY_HOME']}/start.jar --create-startd --add-to-start=http,https,console-capture,setuid" + cwd "#{ENV['JETTY_BASE']}" + action :run end - template "http-ini" do path "#{ENV['JETTY_BASE']}/start.d/http.ini" source "http-ini.erb" - owner "jetty" - group "jetty" + owner "#{ENV['JETTY_USER']}" + group "#{ENV['JETTY_GROUP']}" mode "0755" variables ({ :http_option => http_option , @@ -33,8 +28,8 @@ end template "https-ini" do path "#{ENV['JETTY_BASE']}/start.d/https.ini" source "https-ini.erb" - owner "jetty" - group "jetty" + owner "#{ENV['JETTY_USER']}" + group "#{ENV['JETTY_GROUP']}" mode "0755" variables :https_port => "#{node['ONBOARDING_BE'][:https_port]}" end @@ -43,8 +38,8 @@ end template "ssl-ini" do path "#{ENV['JETTY_BASE']}/start.d/ssl.ini" source "ssl-ini.erb" - owner "jetty" - group "jetty" + owner "#{ENV['JETTY_USER']}" + group "#{ENV['JETTY_GROUP']}" mode "0755" variables ({ :https_port => "#{node['ONBOARDING_BE'][:https_port]}" , diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_5_setup_configuration.rb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_5_setup_configuration.rb index d767ddd1c8..e7048427c7 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_5_setup_configuration.rb +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_5_setup_configuration.rb @@ -1,8 +1,8 @@ template "onboard-be-config" do path "#{ENV['JETTY_BASE']}/config/onboarding-be/onboarding_configuration.yaml" source "configuration.yaml.erb" - owner "jetty" - group "jetty" + owner "#{ENV['JETTY_USER']}" + group "#{ENV['JETTY_GROUP']}" mode "0755" variables({ :onboard_ip => node['ONBOARDING_BE_VIP'], @@ -32,8 +32,8 @@ end template "VnfrepoConfiguration" do path "#{ENV['JETTY_BASE']}/config/onboarding-be/config-vnfrepo.yaml" source "vnfrepo-configuration.yaml.erb" - owner "jetty" - group "jetty" + owner "#{ENV['JETTY_USER']}" + group "#{ENV['JETTY_GROUP']}" mode "0755" variables({ :VNFREPO_IP => node['VnfRepo']['vnfRepoHost'], @@ -46,8 +46,8 @@ end template "ExternalTestingConfiguration" do path "#{ENV['JETTY_BASE']}/config/onboarding-be/externaltesting-configuration.yaml" source "externaltesting-configuration.yaml.erb" - owner "jetty" - group "jetty" + owner "#{ENV['JETTY_USER']}" + group "#{ENV['JETTY_GROUP']}" mode "0755" variables({ :EP1_CONFIG => node['EXTTEST']['ep1_config'], diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_6_prepareProbeFile.rb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_6_prepareProbeFile.rb index 8d77d61481..6351be35b2 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_6_prepareProbeFile.rb +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_6_prepareProbeFile.rb @@ -6,7 +6,7 @@ else port = "#{node['ONBOARDING_BE'][:http_port]}" end -template "/var/lib/jetty/ready-probe.sh" do +template "#{ENV['JETTY_BASE']}/ready-probe.sh" do source "ready-probe.sh.erb" sensitive true mode 0755 diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_7_setup_base_template.rb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_7_setup_base_template.rb index c84e660534..2660eb0e6d 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_7_setup_base_template.rb +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_7_setup_base_template.rb @@ -1,14 +1,13 @@ cookbook_file "#{ENV['JETTY_BASE']}/resources/base_template.yaml" do source "base_template.yaml" mode 0644 - owner "jetty" - group "jetty" + owner "#{ENV['JETTY_USER']}" + group "#{ENV['JETTY_GROUP']}" end - + cookbook_file "#{ENV['JETTY_BASE']}/resources/base_template.env" do source "base_template.env" mode 0644 - owner "jetty" - group "jetty" -end - + owner "#{ENV['JETTY_USER']}" + group "#{ENV['JETTY_GROUP']}" +end
\ No newline at end of file diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/configuration.yaml.erb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/configuration.yaml.erb index a7b0411e9e..853fcf7ab6 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/configuration.yaml.erb +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/configuration.yaml.erb @@ -28,7 +28,7 @@ cassandraConfig: username: <%= @cassandra_usr %> password: <%= @cassandra_pwd %> ssl: <%= @cassandra_ssl_enabled %> - truststorePath: /var/lib/jetty/etc/truststore + truststorePath: <%= node['jetty']['truststore_path'] %> truststorePassword: <%= @cassandra_truststore_password %> # access restriction diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/ready-probe.sh.erb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/ready-probe.sh.erb index bea3c34488..4ca281cee3 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/ready-probe.sh.erb +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/ready-probe.sh.erb @@ -1,6 +1,6 @@ -#!/bin/bash +#!/bin/sh health_check_http_code=$(curl -k --max-time 5 -o /dev/null -w '%{http_code}' -X GET --header "Accept: application/json" "<%= @protocol %>://127.0.0.1:<%= @port %>/onboarding-api/v1.0/healthcheck") -if [[ "$health_check_http_code" -eq 200 ]]; then +if [ "$health_check_http_code" -eq 200 ]; then exit 0 else echo "Health check http status: $health_check_http_code" diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/startup.sh b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/startup.sh index cf1b6227ad..7381d50dfe 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/startup.sh +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/startup.sh @@ -1,21 +1,18 @@ #!/bin/sh -cd /var/lib/jetty/chef-solo -chef-solo -c solo.rb -E ${ENVNAME} -rc=$? -if [ $rc -ne 0 ]; then - echo "Chef exaction failed." - exit $rc; -fi +JAVA_OPTIONS="$JAVA_OPTIONS \ + -Dcom.datastax.driver.USE_NATIVE_CLOCK=false \ + -Dconfig.home=$JETTY_BASE/config \ + -Dlog.home=$JETTY_BASE/logs \ + -Dlogback.configurationFile=$JETTY_BASE/config/onboarding-be/logback.xml \ + -Dconfiguration.yaml=$JETTY_BASE/config/onboarding-be/onboarding_configuration.yaml \ + -Dconfig.location=$JETTY_BASE/config/onboarding-be/." +cd $JETTY_BASE -JAVA_OPTIONS=" ${JAVA_OPTIONS} \ - -Dconfig.home=${JETTY_BASE}/config \ - -Dlog.home=${JETTY_BASE}/logs \ - -Dlogback.configurationFile=${JETTY_BASE}/config/onboarding-be/logback.xml \ - -Dconfiguration.yaml=${JETTY_BASE}/config/onboarding-be/onboarding_configuration.yaml \ - -Dconfig.location=${JETTY_BASE}/config/onboarding-be/." +cd $JETTY_BASE/chef-solo +chef-solo -c solo.rb -E ${ENVNAME} -cd /var/lib/jetty +cd $JETTY_HOME -java $JAVA_OPTIONS -jar "$JETTY_HOME/start.jar" +java $JAVA_OPTIONS -jar "${JETTY_HOME}/start.jar" diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/pom.xml b/openecomp-be/dist/sdc-onboard-backend-docker/pom.xml index 3002ff529d..ce0de87c4a 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/pom.xml +++ b/openecomp-be/dist/sdc-onboard-backend-docker/pom.xml @@ -108,7 +108,8 @@ <groupId>io.fabric8</groupId> <artifactId>docker-maven-plugin</artifactId> <configuration> - <apiVersion>1.23</apiVersion> + <verbose>${verbose}</verbose> + <apiVersion>${docker.api.version}</apiVersion> <registry>${docker.registry}</registry> <authConfig> <pull> diff --git a/openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/Dockerfile b/openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/Dockerfile index 226654ddc3..8408d2f51c 100644 --- a/openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/Dockerfile +++ b/openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/Dockerfile @@ -25,17 +25,14 @@ RUN apt-get update && apt-get install -y python-pip && \ libffi-dev \ libxml2-dev && \ gem install chef:13.8.5 berkshelf:6.3.1 io-console:0.4.6 etc webrick --no-document && \ - apt-get update -y && \ + apt-get update -y && apt-get remove bash -y --allow-remove-essential && \ apt-get install -y binutils && apt-get clean && gem cleanup USER sdc COPY --chown=sdc:sdc init_keyspaces.cql /home/sdc/ - COPY --chown=sdc:sdc init_schemas.cql /home/sdc/ - -COPY --chown=sdc:sdc alter_tables.cql /home/sdc/ - +COPY --chown=sdc:sdc alter_tables.cql /home/sdc/ COPY --chown=sdc:sdc startup.sh /home/sdc/ RUN chmod 770 /home/sdc/startup.sh diff --git a/openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/startup.sh b/openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/startup.sh index 2f398b2f91..92bf869ccc 100644 --- a/openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/startup.sh +++ b/openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/startup.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh cd /home/sdc @@ -21,7 +21,7 @@ cqlsh -u $SDC_USER -p $SDC_PASSWORD -f init_keyspaces.cql $CS_HOST $CS_PORT rc=$? date; -if [[ $rc != 0 ]]; then +if [ $rc != 0 ]; then echo "[Error] Failed to initialize onboard keyspaces"; exit $rc; fi @@ -32,7 +32,7 @@ cqlsh -u $SDC_USER -p $SDC_PASSWORD -f init_schemas.cql $CS_HOST $CS_PORT rc=$? date; -if [[ $rc != 0 ]]; then +if [ $rc != 0 ]; then echo "[Error] Failed to initialize onboard schemas"; exit $rc; fi diff --git a/openecomp-be/dist/sdc-onboard-db-init-docker/pom.xml b/openecomp-be/dist/sdc-onboard-db-init-docker/pom.xml index 9ce1125474..e4ea7a7859 100644 --- a/openecomp-be/dist/sdc-onboard-db-init-docker/pom.xml +++ b/openecomp-be/dist/sdc-onboard-db-init-docker/pom.xml @@ -59,6 +59,7 @@ <artifactId>docker-maven-plugin</artifactId> <configuration> + <verbose>${verbose}</verbose> <apiVersion>${docker.api.version}</apiVersion> <registry>nexus3.onap.org:10001</registry> <authConfig> |