summaryrefslogtreecommitdiffstats
path: root/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes
diff options
context:
space:
mode:
authorAvi Ziv <avi.ziv@amdocs.com>2018-03-15 13:21:44 +0200
committerMichael Lando <ml636r@att.com>2018-04-24 07:50:44 +0000
commitc175a0de2f05d37c1c774684318a525eb96bb59b (patch)
tree0c8bd736fdbcb512fefce93ec841fd3537336206 /openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes
parent08d85958f46d1de9aec9cf459632b5be040063be (diff)
Create on boarding docker
Add BE and Cassandra init docker images Change-Id: Id9d767c73fc946819cec821b4634ce650cbb22fd Issue-ID: SDC-781 Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes')
-rw-r--r--openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_1_cleanup_jettydir.rb23
-rw-r--r--openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_2_locate_keystore.rb14
-rw-r--r--openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_3_logback.rb7
-rw-r--r--openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_4_setup_jetty_modules.rb55
-rw-r--r--openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_5_setup_configuration.rb20
-rw-r--r--openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_6_prepareProbeFile.rb9
6 files changed, 128 insertions, 0 deletions
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
new file mode 100644
index 0000000000..2c703f2039
--- /dev/null
+++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_1_cleanup_jettydir.rb
@@ -0,0 +1,23 @@
+directory "tempdir_creation" do
+ path "#{ENV['JETTY_BASE']}/temp"
+ owner 'jetty'
+ group 'jetty'
+ mode '0755'
+ action :create
+end
+
+directory "create_config_dir" do
+ path "#{ENV['JETTY_BASE']}/config"
+ owner 'jetty'
+ group 'jetty'
+ mode '0755'
+ action :create
+end
+
+directory "onboarding-be" do
+ path "#{ENV['JETTY_BASE']}/config/onboarding-be"
+ owner 'jetty'
+ group 'jetty'
+ 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
new file mode 100644
index 0000000000..e838543e7d
--- /dev/null
+++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_2_locate_keystore.rb
@@ -0,0 +1,14 @@
+directory "Jetty_etcdir_creation" do
+ path "#{ENV['JETTY_BASE']}/etc"
+ owner 'jetty'
+ group 'jetty'
+ mode '0755'
+ action :create
+end
+
+cookbook_file "#{ENV['JETTY_BASE']}/etc/keystore" do
+ source "keystore"
+ owner "jetty"
+ group "jetty"
+ 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
new file mode 100644
index 0000000000..823c3cd44e
--- /dev/null
+++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_3_logback.rb
@@ -0,0 +1,7 @@
+cookbook_file "#{ENV['JETTY_BASE']}/config/onboarding-be/logback.xml" do
+ source "logback.xml"
+ mode 0755
+ owner "jetty"
+ group "jetty"
+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
new file mode 100644
index 0000000000..82a066589b
--- /dev/null
+++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_4_setup_jetty_modules.rb
@@ -0,0 +1,55 @@
+#Set the http module option
+if node['disableHttp']
+ http_option = "#--module=http"
+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 --add-to-startd=http,https,logging,setuid
+EOH
+end
+
+
+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['ONBOARDING_BE'][: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['ONBOARDING_BE'][: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['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
new file mode 100644
index 0000000000..90e0802a94
--- /dev/null
+++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_5_setup_configuration.rb
@@ -0,0 +1,20 @@
+template "onboard-be-config" do
+ path "#{ENV['JETTY_BASE']}/config/onboarding-be/onboarding_configuration.yaml"
+ source "configuration.yaml.erb"
+ owner "jetty"
+ group "jetty"
+ 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'],
+ :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment,
+ :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']}"
+ })
+end \ No newline at end of file
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
new file mode 100644
index 0000000000..edc8f9eebf
--- /dev/null
+++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_6_prepareProbeFile.rb
@@ -0,0 +1,9 @@
+template "/var/lib/ready-probe.sh" do
+ source "ready-probe.sh.erb"
+ sensitive true
+ mode 0755
+ variables({
+ :onboard_port => "#{node['ONBOARDING_BE'][:http_port]}",
+ :ssl_port => "#{node['ONBOARDING_BE'][:https_port]}"
+ })
+end