diff options
author | rohit.raj@t-systems.com <rohit.raj@t-systems.com> | 2025-01-22 20:40:10 +0100 |
---|---|---|
committer | rohit.raj@t-systems.com <rohit.raj@t-systems.com> | 2025-01-22 20:40:23 +0100 |
commit | 110909a23b78884a58710d4d304ab51ef1233095 (patch) | |
tree | 4cb2df350238a9504cd8c193d6e2f92e14ba5164 | |
parent | 7529a63846644ae84d33b8c0588f24fb258f27d5 (diff) |
Chef removal changes for openecomp-be1.13.9
- Removal of Chef recipes in the module.
- Introduction of shell scripts in the module to replace some recipes.
- Generation of module configuration using Charts.
- Introduction of config files in integration tests to simulate files generated by Charts in the module.
Issue-ID: SDC-4698
Change-Id: I9bb68309d49899247a9cebe4142a568f5ee597f2
Signed-off-by: rohit.raj@t-systems.com <rohit.raj@t-systems.com>
42 files changed, 178 insertions, 752 deletions
diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/http-ini.erb b/integration-tests/openecomp-be-config/jetty-config/http.ini index 8f2669032b..c5b62c1217 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/http-ini.erb +++ b/integration-tests/openecomp-be-config/jetty-config/http.ini @@ -1,6 +1,6 @@ # --------------------------------------- # Module: http -<%= @http_option %> +--module=http ### HTTP Connector Configuration @@ -8,7 +8,7 @@ # jetty.http.host=0.0.0.0 ## Connector port to listen on -jetty.http.port=<%= @http_port %> +jetty.http.port=8081 ## Connector idle timeout in milliseconds jetty.http.idleTimeout=30000 diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/https-ini.erb b/integration-tests/openecomp-be-config/jetty-config/https.ini index 9999a4109b..9cc18dd319 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/https-ini.erb +++ b/integration-tests/openecomp-be-config/jetty-config/https.ini @@ -8,7 +8,7 @@ # jetty.https.host=0.0.0.0 ## Connector port to listen on -jetty.https.port=<%= @https_port %> +jetty.https.port=8445 ## Connector idle timeout in milliseconds jetty.https.idleTimeout=30000 diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/ssl-ini.erb b/integration-tests/openecomp-be-config/jetty-config/ssl.ini index 278fdea2ae..eaeccca4aa 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/ssl-ini.erb +++ b/integration-tests/openecomp-be-config/jetty-config/ssl.ini @@ -8,7 +8,7 @@ # jetty.ssl.host=0.0.0.0 ## Connector port to listen on -jetty.ssl.port=<%= @https_port %> +jetty.ssl.port=8445 ## Connector idle timeout in milliseconds # jetty.ssl.idleTimeout=30000 @@ -49,7 +49,7 @@ jetty.sslContext.trustStorePath=etc/org.onap.sdc.trust.jks ## Keystore password # jetty.sslContext.keyStorePassword=OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4 -jetty.sslContext.keyStorePassword=<%= @jetty_keystore_pwd %> +jetty.sslContext.keyStorePassword=?(kP!Yur![*!Y5!E^f(ZKc31 ## Keystore type and provider # jetty.sslContext.keyStoreType=JKS @@ -57,11 +57,11 @@ jetty.sslContext.keyStorePassword=<%= @jetty_keystore_pwd %> ## KeyManager password # jetty.sslContext.keyManagerPassword=OBF:1u2u1wml1z7s1z7a1wnl1u2g -jetty.sslContext.keyManagerPassword=<%= @jetty_keymanager_pwd %> +jetty.sslContext.keyManagerPassword=?(kP!Yur![*!Y5!E^f(ZKc31 ## Truststore password # jetty.sslContext.trustStorePassword=OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4 -jetty.sslContext.trustStorePassword=<%= @jetty_truststore_pwd %> +jetty.sslContext.trustStorePassword=z+KEj;t+,KN^iimSiS89e#p0 ## Truststore type and provider # jetty.sslContext.trustStoreType=JKS diff --git a/integration-tests/openecomp-be-config/onboard-backend-config/config-helmvalidator.yaml b/integration-tests/openecomp-be-config/onboard-backend-config/config-helmvalidator.yaml new file mode 100644 index 0000000000..de6dfa1172 --- /dev/null +++ b/integration-tests/openecomp-be-config/onboard-backend-config/config-helmvalidator.yaml @@ -0,0 +1,7 @@ +hValidatorEnabled: true +hValidatorUrl: http://helm-validator:8080/validate +hValidatorVersion: v3 +hValidatorDeployable: true +hValidatorLintable: true +hValidatorStrictLintable: false + diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/vnfrepo-configuration.yaml.erb b/integration-tests/openecomp-be-config/onboard-backend-config/config-vnfrepo.yaml index 07e26629f0..07694adf16 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/vnfrepo-configuration.yaml.erb +++ b/integration-tests/openecomp-be-config/onboard-backend-config/config-vnfrepo.yaml @@ -1,4 +1,5 @@ -vnfRepoPort: <%= @VNFREPO_PORT %> -vnfRepoHost: <%= @VNFREPO_IP %> +vnfRepoPort: 8702 +vnfRepoHost: 10.0.14.1 getVnfUri: /onapapi/vnfsdk-marketplace/v1/PackageResource/csars -downloadVnfUri: /onapapi/vnfsdk-marketplace/v1/PackageResource/csars/%s/files
\ No newline at end of file +downloadVnfUri: /onapapi/vnfsdk-marketplace/v1/PackageResource/csars/%s/files + diff --git a/integration-tests/openecomp-be-config/onboard-backend-config/externaltesting-configuration.yaml b/integration-tests/openecomp-be-config/onboard-backend-config/externaltesting-configuration.yaml new file mode 100644 index 0000000000..9bea6fc50e --- /dev/null +++ b/integration-tests/openecomp-be-config/onboard-backend-config/externaltesting-configuration.yaml @@ -0,0 +1,6 @@ +client: + enabled: true +endpoints: + - vtp,VTP,true,http://refrepo:8702/onapapi/vnfsdk-marketplace,onap.* + - repository,Repository,false,,.* + diff --git a/integration-tests/openecomp-be-config/onboard-backend-config/features.properties b/integration-tests/openecomp-be-config/onboard-backend-config/features.properties new file mode 100644 index 0000000000..27390ed706 --- /dev/null +++ b/integration-tests/openecomp-be-config/onboard-backend-config/features.properties @@ -0,0 +1,2 @@ +EXTERNAL_LICENSE=true + diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/configuration.yaml.erb b/integration-tests/openecomp-be-config/onboard-backend-config/onboarding_configuration.yaml index 142977c078..88fa84cb64 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/configuration.yaml.erb +++ b/integration-tests/openecomp-be-config/onboard-backend-config/onboarding_configuration.yaml @@ -1,37 +1,32 @@ catalogNotificationsConfig: # catalog backend protocol - <% if node[:disableHttp] -%> - catalogBeProtocol: https - <% else %> catalogBeProtocol: http - <% end -%> - catalogBeHttpPort: <%= @catalog_be_http_port %> - catalogBeSslPort: <%= @catalog_be_ssl_port %> - catalogBeFqdn: <%= @catalog_be_fqdn %> + catalogBeHttpPort: 8080 + catalogBeSslPort: 8443 + catalogBeFqdn: sdc-BE # do not remove the "" from catalog_notification_url. it is escaping % characters coming from AUTO.json - catalogNotificationUrl: "<%= @catalog_notification_url %>" + catalogNotificationUrl: "%s://%s:%s/sdc2/rest/v1/catalog/notif/vsp/" notifications: pollingIntervalMsec: 2000 selectionSize: 100 - beHost: <%= @onboard_ip %> - beHttpPort: <%= @onboard_port %> + beHost: sdc-onboard-BE + beHttpPort: 8081 cassandraConfig: - cassandraHosts: [ <%= @cassandra_ip %> ] - cassandraPort: <%= @cassandra_port %> - localDataCenter: <%= @DC_NAME %> + cassandraHosts: [ sdc-cs ] + cassandraPort: 9042 + localDataCenter: SDC-CS-integration-test reconnectTimeout: 30000 - socketReadTimeout: <%= @socket_read_timeout %> - socketConnectTimeout: <%= @socket_connect_timeout %> + socketReadTimeout: 40000 + socketConnectTimeout: 40000 authenticate: true - username: <%= @cassandra_usr %> - password: <%= @cassandra_pwd %> - ssl: <%= @cassandra_ssl_enabled %> - truststorePath: <%= node['jetty']['truststore_path'] %> - truststorePassword: <%= @cassandra_truststore_password %> + username: asdc_user + password: Aa1234%^! + ssl: false + truststorePath: /app/jetty/etc/truststore + truststorePassword: Aa123456 -# access restriction authCookie: securityKey: MlB1WHFpSHNVTWdJZU1PcQ== maxSessionTimeOut: 86400000 @@ -46,9 +41,9 @@ authCookie: onboardingExcludedUrls: [ '/.*' ] basicAuth: - enabled: <%= @basic_auth_enabled %> - userName: <%= @basic_auth_username %> - userPass: <%= @basic_auth_password %> + enabled: true + userName: testName + userPass: testPass excludedUrls: "/v1.0/healthcheck" zipValidation: @@ -71,7 +66,8 @@ externalCsarStore: uploadPartSize: 200000000 #Space separated list of permitted ancestors -permittedAncestors: <%= @permittedAncestors %> +permittedAncestors: # Comma separated list of excluded URLs by the DataValidatorFilter dataValidatorFilterExcludedUrls: "/healthCheck,/followed,/authorize" + diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/ready-probe.sh.erb b/integration-tests/openecomp-be-config/ready-probe.sh index 4ca281cee3..ad97abf27b 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/ready-probe.sh.erb +++ b/integration-tests/openecomp-be-config/ready-probe.sh @@ -1,8 +1,9 @@ #!/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") +health_check_http_code=$(curl -k --max-time 5 -o /dev/null -w '%{http_code}' -X GET --header "Accept: application/json" "http://127.0.0.1:8081/onboarding-api/v1.0/healthcheck") if [ "$health_check_http_code" -eq 200 ]; then exit 0 else echo "Health check http status: $health_check_http_code" exit 1 fi + diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 15c691ef69..9b6366363d 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -47,7 +47,10 @@ limitations under the License. <it.sdc.user>asdc_user</it.sdc.user> <it.sdc.password>Aa1234%^!</it.sdc.password> <it.chef.config>${project.build.directory}/chef-config</it.chef.config> - <it.catalog.resource>${project.build.directory}/catalog-be-resources</it.catalog.resource> + <it.catalog.resource>${project.build.directory}/catalog-be-resources</it.catalog.resource> + <it.sdc-onboard.probe>${project.build.directory}/openecomp-be-config</it.sdc-onboard.probe> + <it.sdc-onboard.config>${project.build.directory}/openecomp-be-config/onboard-backend-config</it.sdc-onboard.config> + <it.sdc-onboard.jetty>${project.build.directory}/openecomp-be-config/jetty-config</it.sdc-onboard.jetty> <it.sdc-be.plugins>${project.build.directory}/plugins/sdc-be</it.sdc-be.plugins> <it.shared.volume>/tmp/sdc-integration-tests</it.shared.volume> <it.docker.version>latest</it.docker.version> @@ -514,7 +517,63 @@ limitations under the License. </configuration> </execution> - + <execution> + <id>copy-onboard-backend-config</id> + <phase>pre-integration-test</phase> + <goals> + <goal>copy-resources</goal> + </goals> + <configuration> + <outputDirectory>${it.sdc-onboard.config}</outputDirectory> + <resources> + <resource> + <directory>openecomp-be-config/onboard-backend-config/</directory> + <filtering>false</filtering> + <includes> + <include>**/*</include> + </includes> + </resource> + </resources> + </configuration> + </execution> + <execution> + <id>copy-onboard-backend-http-config</id> + <phase>pre-integration-test</phase> + <goals> + <goal>copy-resources</goal> + </goals> + <configuration> + <outputDirectory>${it.sdc-onboard.jetty}</outputDirectory> + <resources> + <resource> + <directory>openecomp-be-config/jetty-config</directory> + <filtering>false</filtering> + <includes> + <include>**/*</include> + </includes> + </resource> + </resources> + </configuration> + </execution> + <execution> + <id>copy-onboard-backend-probe</id> + <phase>pre-integration-test</phase> + <goals> + <goal>copy-resources</goal> + </goals> + <configuration> + <outputDirectory>${it.sdc-onboard.probe}</outputDirectory> + <resources> + <resource> + <directory>openecomp-be-config</directory> + <filtering>false</filtering> + <includes> + <include>ready-probe.sh</include> + </includes> + </resource> + </resources> + </configuration> + </execution> <execution> <id>copy-sdc-be-plugins</id> @@ -898,7 +957,6 @@ limitations under the License. <SDC_CLUSTER_NAME>${it.sdc.cluster.name}</SDC_CLUSTER_NAME> <SDC_USER>${it.sdc.user}</SDC_USER> <SDC_PASSWORD>${it.sdc.password}</SDC_PASSWORD> - <ENVNAME>${it.env.name}</ENVNAME> <SDC_CERT_DIR>onap/cert</SDC_CERT_DIR> <JAVA_OPTIONS> -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:4001 @@ -907,8 +965,16 @@ limitations under the License. </env> <hostname>sdc-onboard-BE</hostname> <volumes> - <bind> - <volume>${it.chef.config}:/app/jetty/chef-solo/environments</volume> + <bind> + <volume>${it.sdc-onboard.config}/config-vnfrepo.yaml:/app/jetty/config/onboarding-be/config-vnfrepo.yaml</volume> + <volume>${it.sdc-onboard.config}/onboarding_configuration.yaml:/app/jetty/config/onboarding-be/onboarding_configuration.yaml</volume> + <volume>${it.sdc-onboard.config}/config-helmvalidator.yaml:/app/jetty/config/onboarding-be/config-helmvalidator.yaml</volume> + <volume>${it.sdc-onboard.config}/externaltesting-configuration.yaml:/app/jetty/config/onboarding-be/externaltesting-configuration.yaml</volume> + <volume>${it.sdc-onboard.config}/features.properties:/app/jetty/config/onboarding-be/features.properties</volume> + <volume>${it.sdc-onboard.jetty}/http.ini:/app/jetty/start.d/http.ini</volume> + <volume>${it.sdc-onboard.jetty}/https.ini:/app/jetty/start.d/https.ini</volume> + <volume>${it.sdc-onboard.jetty}/ssl.ini:/app/jetty/start.d/ssl.ini</volume> + <volume>${it.sdc-onboard.probe}/ready-probe.sh:/app/jetty/ready.probe.sh</volume> <volume>${project.basedir}/src/test/resources/cert/onboarding-be:/app/jetty/onap/cert </volume> <volume>${it.shared.volume}:/app/jetty/logs</volume> @@ -1145,7 +1211,7 @@ limitations under the License. <run> <hostname>firefox-standalone</hostname> <wait> - <time>20000</time> + <time>30000</time> <tcp> <host>firefox-standalone</host> <mode>direct</mode> diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/Dockerfile b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/Dockerfile index fc809b5afe..ac49e854db 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/Dockerfile +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/Dockerfile @@ -1,26 +1,19 @@ FROM onap/integration-java11:10.0.0 +# Switch to root user for system installations USER root ARG JETTY_FOLDER=/app/jetty -# Install Chef +# Install necessary packages and dependencies RUN set -ex && \ apk update && \ apk add --no-cache \ wget \ build-base \ - ruby \ - ruby-dev \ libffi-dev \ - libxml2-dev && \ - gem install --no-update-sources \ - rspec-its:1.3.0 hitimes:1.3.1 public_suffix:4.0.7 multipart-post:2.2.0 etc:1.3.0 bundler:2.3.26 chef:13.8.5 \ - faraday:2.8.1 minitar:0.12.1 berkshelf:6.3.1 \ - io-console:0.4.6 \ - webrick \ - json \ - --no-document && \ - gem cleanup + libxml2-dev \ + libressl-dev && \ + apk update ENV JETTY_HOME=$JETTY_FOLDER ENV JETTY_BASE=$JETTY_FOLDER @@ -37,12 +30,19 @@ RUN wget -q https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/ 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/ +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/ - +COPY --chown=onap:onap scripts/cleanup_jettydir.sh $JETTY_FOLDER/ +COPY --chown=onap:onap scripts/create_jetty_modules.sh $JETTY_FOLDER/ +# Set executable permissions on the startup script RUN chmod 770 $JETTY_FOLDER/startup.sh - +RUN chmod 770 $JETTY_FOLDER/cleanup_jettydir.sh && $JETTY_FOLDER/cleanup_jettydir.sh +RUN chmod +x $JETTY_FOLDER/create_jetty_modules.sh && $JETTY_FOLDER/create_jetty_modules.sh + +COPY --chown=onap:onap files/logback.xml $JETTY_FOLDER/config/onboarding-be/ +COPY --chown=onap:onap files/org.onap.sdc.p12 $JETTY_FOLDER/etc/ +COPY --chown=onap:onap files/org.onap.sdc.trust.jks $JETTY_FOLDER/etc/ +COPY --chown=onap:onap files/base_template.yaml $JETTY_BASE/resources/ +COPY --chown=onap:onap files/base_template.env $JETTY_BASE/resources/ 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 deleted file mode 100644 index 074584a6e8..0000000000 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/attributes/default.rb +++ /dev/null @@ -1,32 +0,0 @@ -# -default['ONBOARDING_BE'][:http_port] = 8081 -default['ONBOARDING_BE'][:https_port] = 8445 -default['FE'][:http_port] = 8181 -default['FE'][:https_port] = 9443 -default['disableHttp'] = true -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" - -#Cassandra -default['cassandra']['cassandra_port'] = 9042 -default['cassandra']['datacenter_name'] = "DC-" -default['cassandra']['cluster_name'] = "SDC-CS-" -default['cassandra']['socket_read_timeout'] = 20000 -default['cassandra']['socket_connect_timeout'] = 20000 -default['cassandra']['janusgraph_connection_timeout'] = 10000 - -#Basicauth -default['basic_auth']['enabled'] = true -default['basic_auth'][:user_name] = "testName" -default['basic_auth'][:user_pass] = "testPass" -default['basic_auth']['excludedUrls'] = "/v1.0/healthcheck" - -#ExternalTesting -default['EXTTEST']['ep1_config'] = "vtp,VTP,true,http://refrepo:8702/onapapi/vnfsdk-marketplace,onap.*" -default['EXTTEST']['ep2_config'] = "repository,Repository,false,,.*" 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 deleted file mode 100644 index 305ff2384b..0000000000 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_1_cleanup_jettydir.rb +++ /dev/null @@ -1,23 +0,0 @@ -directory "tempdir_creation" do - path "#{ENV['JETTY_BASE']}/temp" - owner "#{ENV['JETTY_USER']}" - group "#{ENV['JETTY_GROUP']}" - mode '0755' - action :create -end - -directory "create_config_dir" do - path "#{ENV['JETTY_BASE']}/config" - 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 "#{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 deleted file mode 100644 index 1a678397d8..0000000000 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_2_locate_keystore.rb +++ /dev/null @@ -1,22 +0,0 @@ -directory "Jetty_etcdir_creation" do - path "#{ENV['JETTY_BASE']}/etc" - 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 "#{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 "#{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 deleted file mode 100644 index 0d97645420..0000000000 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_3_logback.rb +++ /dev/null @@ -1,7 +0,0 @@ -cookbook_file "#{ENV['JETTY_BASE']}/config/onboarding-be/logback.xml" do - source "logback.xml" - mode 0755 - 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 deleted file mode 100644 index 6b2b79b49c..0000000000 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_4_setup_jetty_modules.rb +++ /dev/null @@ -1,50 +0,0 @@ -#Set the http module option -if node['disableHttp'] - http_option = "#--module=http" -else - http_option = "--module=http" -end - -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,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 "#{ENV['JETTY_USER']}" - group "#{ENV['JETTY_GROUP']}" - mode "0755" - variables ({ - :http_option => http_option , - :http_port => "#{node['ONBOARDING_BE'][:http_port]}" - }) - -end - - -template "https-ini" do - path "#{ENV['JETTY_BASE']}/start.d/https.ini" - source "https-ini.erb" - owner "#{ENV['JETTY_USER']}" - group "#{ENV['JETTY_GROUP']}" - mode "0755" - variables :https_port => "#{node['ONBOARDING_BE'][:https_port]}" -end - - -template "ssl-ini" do - path "#{ENV['JETTY_BASE']}/start.d/ssl.ini" - source "ssl-ini.erb" - owner "#{ENV['JETTY_USER']}" - group "#{ENV['JETTY_GROUP']}" - mode "0755" - variables ({ - :https_port => "#{node['ONBOARDING_BE'][: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/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 deleted file mode 100644 index 526f2dd4b4..0000000000 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_5_setup_configuration.rb +++ /dev/null @@ -1,77 +0,0 @@ -template "onboard-be-config" do - path "#{ENV['JETTY_BASE']}/config/onboarding-be/onboarding_configuration.yaml" - source "configuration.yaml.erb" - owner "#{ENV['JETTY_USER']}" - group "#{ENV['JETTY_GROUP']}" - mode "0755" - variables({ - :onboard_ip => node['ONBOARDING_BE_VIP'], - :onboard_port => node['ONBOARDING_BE'][:http_port], - :ssl_port => node['ONBOARDING_BE'][:https_port], - :cassandra_ip => node['Nodes']['CS'].join(",").gsub(/[|]/,''), - :cassandra_port => node['cassandra']['cassandra_port'], - :DC_NAME => node['cassandra']['datacenter_name'], - :socket_connect_timeout => node['cassandra']['socket_connect_timeout'], - :socket_read_timeout => node['cassandra']['socket_read_timeout'], - :cassandra_pwd => node['cassandra'][:cassandra_password], - :cassandra_usr => node['cassandra'][:cassandra_user], - :cassandra_truststore_password => node['cassandra'][:truststore_password], - :cassandra_ssl_enabled => "#{ENV['cassandra_ssl_enabled']}", - :basic_auth_enabled => node['basic_auth']['enabled'], - :basic_auth_username => node['basic_auth'][:user_name], - :basic_auth_password => node['basic_auth'][:user_pass], - :catalog_notification_url => node['ONBOARDING_BE']['catalog_notification_url'], - :catalog_be_http_port => node['BE'][:http_port], - :catalog_be_ssl_port => node['BE'][:https_port], - :permittedAncestors => "#{ENV['permittedAncestors']}", - :catalog_be_fqdn => node['Nodes']['BE'] - }) -end - -template "VnfrepoConfiguration" do - path "#{ENV['JETTY_BASE']}/config/onboarding-be/config-vnfrepo.yaml" - source "vnfrepo-configuration.yaml.erb" - owner "#{ENV['JETTY_USER']}" - group "#{ENV['JETTY_GROUP']}" - mode "0755" - variables({ - :VNFREPO_IP => node['VnfRepo']['vnfRepoHost'], - :VNFREPO_PORT => node['VnfRepo']['vnfRepoPort'] - }) -end - -template "HelmValidatorConfiguration" do - path "#{ENV['JETTY_BASE']}/config/onboarding-be/config-helmvalidator.yaml" - source "helmvalidator-configuration.yaml.erb" - owner "#{ENV['JETTY_USER']}" - group "#{ENV['JETTY_GROUP']}" - mode "0755" - variables({ - :HVALIDATOR_ENABLED => node['HelmValidator']['validator_enabled'], - :HVALIDATOR_URL => node['HelmValidator']['validator_url'], - :HVALIDATOR_HELM_VERSION => node['HelmValidator']['helm_version'], - :HVALIDATOR_DEPLOYABLE => node['HelmValidator']['deployable'], - :HVALIDATOR_LINTABLE => node['HelmValidator']['lintable'], - :HVALIDATOR_STRICT_LINTABLE => node['HelmValidator']['strict_lintable'] - }) -end - -template "ExternalTestingConfiguration" do - path "#{ENV['JETTY_BASE']}/config/onboarding-be/externaltesting-configuration.yaml" - source "externaltesting-configuration.yaml.erb" - owner "#{ENV['JETTY_USER']}" - group "#{ENV['JETTY_GROUP']}" - mode "0755" - variables({ - :EP1_CONFIG => node['EXTTEST']['ep1_config'], - :EP2_CONFIG => node['EXTTEST']['ep2_config'] - }) -end - -template "FeaturesProperties" do - path "#{ENV['JETTY_BASE']}/config/onboarding-be/features.properties" - source "features.properties.erb" - 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_6_prepareProbeFile.rb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_6_prepareProbeFile.rb deleted file mode 100644 index 6351be35b2..0000000000 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_6_prepareProbeFile.rb +++ /dev/null @@ -1,17 +0,0 @@ -if node[:disableHttp] - protocol = "https" - port = "#{node['ONBOARDING_BE'][:https_port]}" -else - protocol = "http" - port = "#{node['ONBOARDING_BE'][:http_port]}" -end - -template "#{ENV['JETTY_BASE']}/ready-probe.sh" do - source "ready-probe.sh.erb" - sensitive true - mode 0755 - variables({ - :protocol => protocol, - :port => port - }) -end 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 deleted file mode 100644 index 2660eb0e6d..0000000000 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_7_setup_base_template.rb +++ /dev/null @@ -1,13 +0,0 @@ -cookbook_file "#{ENV['JETTY_BASE']}/resources/base_template.yaml" do - source "base_template.yaml" - mode 0644 - 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 "#{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/externaltesting-configuration.yaml.erb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/externaltesting-configuration.yaml.erb deleted file mode 100644 index 599b5d40f7..0000000000 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/externaltesting-configuration.yaml.erb +++ /dev/null @@ -1,5 +0,0 @@ -client: - enabled: true -endpoints: - - <%= @EP1_CONFIG %> - - <%= @EP2_CONFIG %> diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/features.properties.erb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/features.properties.erb deleted file mode 100644 index 1f87ee24d4..0000000000 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/features.properties.erb +++ /dev/null @@ -1 +0,0 @@ -EXTERNAL_LICENSE=true
\ 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/helmvalidator-configuration.yaml.erb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/helmvalidator-configuration.yaml.erb deleted file mode 100644 index 37021c7a9a..0000000000 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/helmvalidator-configuration.yaml.erb +++ /dev/null @@ -1,6 +0,0 @@ -hValidatorEnabled: <%= @HVALIDATOR_ENABLED %> -hValidatorUrl: <%= @HVALIDATOR_URL %> -hValidatorVersion: <%= @HVALIDATOR_HELM_VERSION %> -hValidatorDeployable: <%= @HVALIDATOR_DEPLOYABLE %> -hValidatorLintable: <%= @HVALIDATOR_LINTABLE %> -hValidatorStrictLintable: <%= @HVALIDATOR_STRICT_LINTABLE %> diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/LICENSE b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/LICENSE deleted file mode 100644 index 11069edd79..0000000000 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/README.md b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/README.md deleted file mode 100644 index ddb0fda830..0000000000 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/README.md +++ /dev/null @@ -1,37 +0,0 @@ -Deprecated -========== - -Use of this repository is deprecated. We recommend using the `chef generate repo` command that comes with [ChefDK](http://downloads.chef.io/chef-dk/). - -Overview -======== - -Every Chef installation needs a Chef Repository. This is the place where cookbooks, roles, config files and other artifacts for managing systems with Chef will live. We strongly recommend storing this repository in a version control system such as Git and treat it like source code. - -While we prefer Git, and make this repository available via GitHub, you are welcome to download a tar or zip archive and use your favorite version control system to manage the code. - -Repository Directories -====================== - -This repository contains several directories, and each directory contains a README file that describes what it is for in greater detail, and how to use it for managing your systems with Chef. - -* `cookbooks/` - Cookbooks you download or create. -* `data_bags/` - Store data bags and items in .json in the repository. -* `roles/` - Store roles in .rb or .json in the repository. -* `environments/` - Store environments in .rb or .json in the repository. - -Configuration -============= - -The repository contains a knife configuration file. - -* .chef/knife.rb - -The knife configuration file `.chef/knife.rb` is a repository specific configuration file for knife. If you're using Hosted Chef, you can download one for your organization from the management console. If you're using the Open Source Chef Server, you can generate a new one with `knife configure`. For more information about configuring Knife, see the Knife documentation. - -https://docs.chef.io/knife.html - -Next Steps -========== - -Read the README file in each of the subdirectories for more information about what goes in those directories. diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/chefignore b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/chefignore deleted file mode 100644 index ba30af6cff..0000000000 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/chefignore +++ /dev/null @@ -1,11 +0,0 @@ -# Put files/directories that should be ignored in this file. -# Lines that start with '# ' are comments. - -# emacs -*~ - -# vim -*.sw[a-z] - -# subversion -*/.svn/* diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/cookbooks/README.md b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/cookbooks/README.md deleted file mode 100644 index 86ea46bfbb..0000000000 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/cookbooks/README.md +++ /dev/null @@ -1,54 +0,0 @@ -This directory contains the cookbooks used to configure systems in your infrastructure with Chef. - -Knife needs to be configured to know where the cookbooks are located with the `cookbook_path` setting. If this is not set, then several cookbook operations will fail to work properly. - - cookbook_path ["./cookbooks"] - -This setting tells knife to look for the cookbooks directory in the present working directory. This means the knife cookbook subcommands need to be run in the `chef-repo` directory itself. To make sure that the cookbooks can be found elsewhere inside the repository, use an absolute path. This is a Ruby file, so something like the following can be used: - - current_dir = File.dirname(__FILE__) - cookbook_path ["#{current_dir}/../cookbooks"] - -Which will set `current_dir` to the location of the knife.rb file itself (e.g. `~/chef-repo/.chef/knife.rb`). - -Configure knife to use your preferred copyright holder, email contact and license. Add the following lines to `.chef/knife.rb`. - - cookbook_copyright "Example, Com." - cookbook_email "cookbooks@example.com" - cookbook_license "apachev2" - -Supported values for `cookbook_license` are "apachev2", "mit","gplv2","gplv3", or "none". These settings are used to prefill comments in the default recipe, and the corresponding values in the metadata.rb. You are free to change the the comments in those files. - -Create new cookbooks in this directory with Knife. - - knife cookbook create COOKBOOK - -This will create all the cookbook directory components. You don't need to use them all, and can delete the ones you don't need. It also creates a README file, metadata.rb and default recipe. - -You can also download cookbooks directly from the Opscode Cookbook Site. There are two subcommands to help with this depending on what your preference is. - -The first and recommended method is to use a vendor branch if you're using Git. This is automatically handled with Knife. - - knife cookbook site install COOKBOOK - -This will: - -* Download the cookbook tarball from cookbooks.opscode.com. -* Ensure its on the git master branch. -* Checks for an existing vendor branch, and creates if it doesn't. -* Checks out the vendor branch (chef-vendor-COOKBOOK). -* Removes the existing (old) version. -* Untars the cookbook tarball it downloaded in the first step. -* Adds the cookbook files to the git index and commits. -* Creates a tag for the version downloaded. -* Checks out the master branch again. -* Merges the cookbook into master. -* Repeats the above for all the cookbooks dependencies, downloading them from the community site - -The last step will ensure that any local changes or modifications you have made to the cookbook are preserved, so you can keep your changes through upstream updates. - -If you're not using Git, use the site download subcommand to download the tarball. - - knife cookbook site download COOKBOOK - -This creates the COOKBOOK.tar.gz from in the current directory (e.g., `~/chef-repo`). We recommend following a workflow similar to the above for your version control tool. diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/data_bags/README.md b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/data_bags/README.md deleted file mode 100644 index 0c15a391fa..0000000000 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/data_bags/README.md +++ /dev/null @@ -1,63 +0,0 @@ -Data Bags ---------- - -This directory contains directories of the various data bags you create for your infrastructure. Each subdirectory corresponds to a data bag on the Chef Server, and contains JSON files of the items that go in the bag. - -First, create a directory for the data bag. - - mkdir data_bags/BAG - -Then create the JSON files for items that will go into that bag. - - $EDITOR data_bags/BAG/ITEM.json - -The JSON for the ITEM must contain a key named "id" with a value equal to "ITEM". For example, - - { - "id": "foo" - } - -Next, create the data bag on the Chef Server. - - knife data bag create BAG - -Then upload the items in the data bag's directory to the Chef Server. - - knife data bag from file BAG ITEM.json - - -Encrypted Data Bags -------------------- - -Added in Chef 0.10, encrypted data bags allow you to encrypt the contents of your data bags. The content of attributes will no longer be searchable. To use encrypted data bags, first you must have or create a secret key. - - openssl rand -base64 512 > secret_key - -You may use this secret_key to add items to a data bag during a create. - - knife data bag create --secret-file secret_key passwords mysql - -You may also use it when adding ITEMs from files, - - knife data bag create passwords - knife data bag from file passwords data_bags/passwords/mysql.json --secret-file secret_key - -The JSON for the ITEM must contain a key named "id" with a value equal to "ITEM" and the contents will be encrypted when uploaded. For example, - - { - "id": "mysql", - "password": "abc123" - } - -Without the secret_key, the contents are encrypted. - - knife data bag show passwords mysql - id: mysql - password: 2I0XUUve1TXEojEyeGsjhw== - -Use the secret_key to view the contents. - - knife data bag show passwords mysql --secret-file secret_key - id: mysql - password: abc123 - diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/environments/README.md b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/environments/README.md deleted file mode 100644 index 50ac48db2b..0000000000 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/environments/README.md +++ /dev/null @@ -1,5 +0,0 @@ -Requires Chef 0.10.0+. - -This directory is for Ruby DSL and JSON files for environments. For more information see the Chef wiki page: - -http://docs.chef.io/environments.html diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/roles/README.md b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/roles/README.md deleted file mode 100644 index b0ee0b4d21..0000000000 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/roles/README.md +++ /dev/null @@ -1,16 +0,0 @@ -Create roles here, in either the Role Ruby DSL (.rb) or JSON (.json) files. To install roles on the server, use knife. - -For example, create `roles/base_example.rb`: - - name "base_example" - description "Example base role applied to all nodes." - # List of recipes and roles to apply. Requires Chef 0.8, earlier versions use 'recipes()'. - #run_list() - # Attributes applied if the node doesn't have it set already. - #default_attributes() - # Attributes applied no matter what the node has set already. - #override_attributes() - -Then upload it to the Chef Server: - - knife role from file roles/base_example.rb diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/roles/sdc-onboard-backend.json b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/roles/sdc-onboard-backend.json deleted file mode 100644 index 5fdf89b882..0000000000 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/roles/sdc-onboard-backend.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "sdc-onboard-backend", - "description": "Installation application - SDC_Onboard_Backend", - "json_class": "Chef::Role", - "default_attributes": { - - }, - "override_attributes": { - - }, - "chef_type": "role", - "run_list": [ - "recipe[sdc-onboard-backend::ON_1_cleanup_jettydir]", - "recipe[sdc-onboard-backend::ON_2_locate_keystore]", - "recipe[sdc-onboard-backend::ON_3_logback]", - "recipe[sdc-onboard-backend::ON_4_setup_jetty_modules]", - "recipe[sdc-onboard-backend::ON_5_setup_configuration]", - "recipe[sdc-onboard-backend::ON_6_prepareProbeFile]", - "recipe[sdc-onboard-backend::ON_7_setup_base_template]" - ], - "env_run_lists": { - } -} - diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/solo.json b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/solo.json deleted file mode 100644 index 0b032da81e..0000000000 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/solo.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "run_list": [ "role[sdc-onboard-backend]" ] -} - diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/solo.rb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/solo.rb deleted file mode 100644 index 06c1af4592..0000000000 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-solo/solo.rb +++ /dev/null @@ -1,16 +0,0 @@ -root = File.absolute_path(File.dirname(__FILE__)) -file_cache_path root -cookbook_path root + '/cookbooks' -json_attribs root + '/solo.json' -checksum_path root + '/checksums' -data_bag_path root + '/data_bags' -environment_path root + '/environments' -file_backup_path root + '/backup' -file_cache_path root + '/cache' -log_level :info -log_location STDOUT -rest_timeout 300 -role_path root + '/roles' -syntax_check_cache_path -umask 0022 -verbose_logging nil diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/files/default/base_template.env b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/files/base_template.env index 1b96230a96..e4d92fffce 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/files/default/base_template.env +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/files/base_template.env @@ -1,4 +1,4 @@ parameters: vnf_name: demo_vnf_ignore vnf_id: demo_app - vf_module_id: demo_module_id
\ No newline at end of file + vf_module_id: demo_module_id diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/files/default/base_template.yaml b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/files/base_template.yaml index eb6962b95e..eb6962b95e 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/files/default/base_template.yaml +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/files/base_template.yaml diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/files/default/logback.xml b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/files/logback.xml index 5b11824969..5b11824969 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/files/default/logback.xml +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/files/logback.xml diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/files/default/org.onap.sdc.p12 b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/files/org.onap.sdc.p12 Binary files differindex 446856071b..446856071b 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/files/default/org.onap.sdc.p12 +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/files/org.onap.sdc.p12 diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/files/default/org.onap.sdc.trust.jks b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/files/org.onap.sdc.trust.jks Binary files differindex e6686cc08c..e6686cc08c 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/files/default/org.onap.sdc.trust.jks +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/files/org.onap.sdc.trust.jks diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/scripts/cleanup_jettydir.sh b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/scripts/cleanup_jettydir.sh new file mode 100644 index 0000000000..fdb4befb1c --- /dev/null +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/scripts/cleanup_jettydir.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +#Create temp directory +mkdir -p "$JETTY_BASE/temp" +chown "$JETTY_USER:$JETTY_GROUP" "$JETTY_BASE/temp" +chmod 0755 "$JETTY_BASE/temp" + +# Create config directory +mkdir -p "$JETTY_BASE/config" +chown "$JETTY_USER:$JETTY_GROUP" "$JETTY_BASE/config" +chmod 0755 "$JETTY_BASE/config" + +# Create onboarding-be directory +mkdir -p "$JETTY_BASE/config/onboarding-be" +chown -R "$JETTY_USER:$JETTY_GROUP" "$JETTY_BASE/config/onboarding-be" +chmod -R 0755 "$JETTY_BASE/config/onboarding-be" + +#Create etc directory +mkdir -p "$JETTY_BASE/etc" +chown -R "$JETTY_USER:$JETTY_GROUP" "$JETTY_BASE/etc" +chmod -R 0755 "$JETTY_BASE/etc" diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/scripts/create_jetty_modules.sh b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/scripts/create_jetty_modules.sh new file mode 100644 index 0000000000..306a8d3314 --- /dev/null +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/scripts/create_jetty_modules.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Define environment variables +export JETTY_HOME="/app/jetty/" # Replace with your Jetty home directory +export JETTY_BASE="/app/jetty/" # Replace with your Jetty base directory + +# Navigate to the Jetty base directory +cd "$JETTY_BASE" + +# Run the Jetty start-up jar with deploy module added +java -Duser.dir="$JETTY_BASE" -jar $JETTY_HOME/start.jar --add-to-start=deploy + +# Create startd configuration and add http, https, setuid modules +java -Duser.dir="$JETTY_BASE" -jar $JETTY_HOME/start.jar --create-startd --add-to-start=http,https,setuid + 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 43aad8726a..e08d61a09e 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/startup.sh +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/startup.sh @@ -3,6 +3,7 @@ JAVA_OPTIONS="$JAVA_OPTIONS \ -Dcom.datastax.driver.USE_NATIVE_CLOCK=false \ -Dconfig.home=$JETTY_BASE/config \ + -Duser.dir=$JETTY_BASE \ -Dlog.home=$JETTY_BASE/logs \ -Dlogback.configurationFile=$JETTY_BASE/config/onboarding-be/logback.xml \ -Dconfiguration.yaml=$JETTY_BASE/config/onboarding-be/onboarding_configuration.yaml \ @@ -10,11 +11,6 @@ JAVA_OPTIONS="$JAVA_OPTIONS \ -XX:+HeapDumpOnOutOfMemoryError \ -Dconfig.location=$JETTY_BASE/config/onboarding-be/." -cd $JETTY_BASE - -cd $JETTY_BASE/chef-solo -chef-solo -c solo.rb -E ${ENVNAME} - cd $JETTY_HOME echo "jetty.httpConfig.sendServerVersion=false" >> $JETTY_HOME/start.d/start.ini 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 6560e7f2a6..c467acf5cf 100644 --- a/openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/Dockerfile +++ b/openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/Dockerfile @@ -42,3 +42,4 @@ COPY --chown=sdc:sdc startup.sh /home/sdc/ RUN chmod 770 /home/sdc/startup.sh ENTRYPOINT [ "/home/sdc/startup.sh" ] + diff --git a/openecomp-be/readMe.txt b/openecomp-be/readMe.txt index 3d5054c16e..e1ce660758 100644 --- a/openecomp-be/readMe.txt +++ b/openecomp-be/readMe.txt @@ -1,8 +1,6 @@ # OpenECOMP SDC Onboarding(back-end) - --- --- - # Introduction SDC is the component within the design time environment that provides multiple organizations the ability to create and manage OPENECOMP assets in terms of “models”. SDC asset models are generally categorized into four object types: Resource, Service, Product and Offer. |