aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-os-chef
diff options
context:
space:
mode:
authorMurali-P <murali.p@huawei.com>2017-10-16 15:07:16 +0530
committerMurali-P <murali.p@huawei.com>2017-12-04 11:04:54 +0530
commitbaebe989f102c10d5077fb24a6948893284a236d (patch)
tree84566a75879428a950f04a9c369ab1a80afcd8f7 /sdc-os-chef
parentdcf55799473fe5d585ff1bc8121ab48485baab2b (diff)
Integrate VNF Repository with SDC
Add Browse VNF packages feature Change-Id: I0c721829efdac8ad6f72c4ac9d25ec96e091f7ca Issue-ID: VNFSDK-82 Signed-off-by: Michael Lando <ml636r@att.com> Signed-off-by: Murali-P <murali.p@huawei.com>
Diffstat (limited to 'sdc-os-chef')
-rw-r--r--sdc-os-chef/environments/Template.json4
-rw-r--r--sdc-os-chef/pom.xml1
-rw-r--r--sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_1_cleanup_jettydir.rb9
-rw-r--r--sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb13
-rw-r--r--sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-vnfrepo-configuration.yaml.erb4
-rw-r--r--sdc-os-chef/sdc-backend/startup.sh2
6 files changed, 32 insertions, 1 deletions
diff --git a/sdc-os-chef/environments/Template.json b/sdc-os-chef/environments/Template.json
index 1022a03285..267579ec08 100644
--- a/sdc-os-chef/environments/Template.json
+++ b/sdc-os-chef/environments/Template.json
@@ -36,6 +36,10 @@
"BE": "yyy",
"FE": "yyy",
"ES": "yyy"
+ },
+ "VnfRepo": {
+ "vnfRepoPort": "8702",
+ "vnfRepoHost": "yyy"
}
},
"override_attributes": {
diff --git a/sdc-os-chef/pom.xml b/sdc-os-chef/pom.xml
index 04c2a9355f..ad40309455 100644
--- a/sdc-os-chef/pom.xml
+++ b/sdc-os-chef/pom.xml
@@ -182,6 +182,7 @@
<include>Artifact-Generator.properties</include>
<include>error-configuration.yaml</include>
<include>ecomp-error-configuration.yaml</include>
+ <include>config-vnfsdk.yaml</include>
<include>logback.xml</include>
</includes>
</resource>
diff --git a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_1_cleanup_jettydir.rb b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_1_cleanup_jettydir.rb
index d989eb20bb..bd653a7ec5 100644
--- a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_1_cleanup_jettydir.rb
+++ b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_1_cleanup_jettydir.rb
@@ -46,3 +46,12 @@ directory "BE_create_catalog-be" do
mode '0755'
action :create
end
+
+directory "BE_create_onboarding-be" do
+ path "/var/lib/jetty/config/onboarding-be"
+ owner 'jetty'
+ group 'jetty'
+ mode '0755'
+ action :create
+end
+
diff --git a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb
index 067642fed9..e9a00c3d95 100644
--- a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb
+++ b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb
@@ -51,3 +51,16 @@ cookbook_file "ArtifactGenerator" do
group "jetty"
mode "0755"
end
+
+
+template "VnfrepoConfiguration" do
+ path "/#{jetty_base}/config/onboarding-be/config-vnfsdk.yaml"
+ source "BE-vnfrepo-configuration.yaml.erb"
+ owner "jetty"
+ group "jetty"
+ mode "0755"
+ variables({
+ :VNFREPO_IP => node['VnfRepo']['vnfRepoHost'],
+ :VNFREPO_PORT => node['VnfRepo']['vnfRepoPort']
+ })
+end \ No newline at end of file
diff --git a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-vnfrepo-configuration.yaml.erb b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-vnfrepo-configuration.yaml.erb
new file mode 100644
index 0000000000..07e26629f0
--- /dev/null
+++ b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-vnfrepo-configuration.yaml.erb
@@ -0,0 +1,4 @@
+vnfRepoPort: <%= @VNFREPO_PORT %>
+vnfRepoHost: <%= @VNFREPO_IP %>
+getVnfUri: /onapapi/vnfsdk-marketplace/v1/PackageResource/csars
+downloadVnfUri: /onapapi/vnfsdk-marketplace/v1/PackageResource/csars/%s/files \ No newline at end of file
diff --git a/sdc-os-chef/sdc-backend/startup.sh b/sdc-os-chef/sdc-backend/startup.sh
index 8e5926cdc4..4f3d0823d4 100644
--- a/sdc-os-chef/sdc-backend/startup.sh
+++ b/sdc-os-chef/sdc-backend/startup.sh
@@ -6,7 +6,7 @@ cd /root/chef-solo
echo "normal['HOST_IP'] = \"${HOST_IP}\"" > /root/chef-solo/cookbooks/sdc-catalog-be/attributes/default.rb
chef-solo -c solo.rb -E ${CHEFNAME}
-sed -i '/^set -e/aJAVA_OPTIONS=\"-Xdebug -agentlib:jdwp=transport=dt_socket,address=4000,server=y,suspend=n -XX:MaxPermSize=256m -Xmx1500m -Dconfig.home=${JETTY_BASE}\/config -Dlog.home=${JETTY_BASE}\/logs -Dlogback.configurationFile=${JETTY_BASE}\/config\/catalog-be\/logback.xml -Dconfiguration.yaml=${JETTY_BASE}\/config\/catalog-be\/configuration.yaml -Dartifactgenerator.config=${JETTY_BASE}\/config\/catalog-be\/Artifact-Generator.properties\ -Donboarding_configuration.yaml=${JETTY_BASE}\/config\/onboarding-be\/onboarding_configuration.yaml" ' /docker-entrypoint.sh
+sed -i '/^set -e/aJAVA_OPTIONS=\"-Xdebug -agentlib:jdwp=transport=dt_socket,address=4000,server=y,suspend=n -XX:MaxPermSize=256m -Xmx1500m -Dconfig.home=${JETTY_BASE}\/config -Dlog.home=${JETTY_BASE}\/logs -Dlogback.configurationFile=${JETTY_BASE}\/config\/catalog-be\/logback.xml -Dconfiguration.yaml=${JETTY_BASE}\/config\/catalog-be\/configuration.yaml -Dartifactgenerator.config=${JETTY_BASE}\/config\/catalog-be\/Artifact-Generator.properties\ -Donboarding_configuration.yaml=${JETTY_BASE}\/config\/onboarding-be\/onboarding_configuration.yaml -Dconfig.location=${JETTY_BASE}\/config\/onboarding-be\/." ' /docker-entrypoint.sh
sed -i '/^set -e/aTMPDIR=${JETTY_BASE}\/temp' /docker-entrypoint.sh
# executiong the jetty