From 2c285722c35d8ee7fd6c9085c8e60f0fa87d5761 Mon Sep 17 00:00:00 2001 From: Idan Amit Date: Fri, 29 Dec 2017 09:40:43 +0200 Subject: SDC Designers Integration - Part 1 Finished first part of designers integration Added templated configuration file Added tests Change-Id: I76e8b413063b939e1eb58da4a5502c4b526168f2 Issue-ID: SDC-687 Signed-off-by: Idan Amit --- sdc-os-chef/environments/Template.json | 14 ++++++++++++++ .../sdc-catalog-fe/recipes/FE_2_setup_configuration.rb | 18 ++++++++++++++++++ .../default/FE-designers-configuration.yaml.erb | 13 +++++++++++++ sdc-os-chef/sdc-frontend/startup.sh | 2 +- 4 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/FE-designers-configuration.yaml.erb (limited to 'sdc-os-chef') diff --git a/sdc-os-chef/environments/Template.json b/sdc-os-chef/environments/Template.json index 2109d71a16..fd3b683058 100644 --- a/sdc-os-chef/environments/Template.json +++ b/sdc-os-chef/environments/Template.json @@ -39,6 +39,20 @@ "FE": "yyy", "ES": "yyy", "KB": "yyy" + }, + "Designers": { + "DCAE": { + "dcae_host": "yyy", + "dcae_port": "yyy", + "dcae_path": "yyy", + "dcae_protocol": "yyy" + }, + "WORKFLOW": { + "workflow_host": "yyy", + "workflow_port": "yyy", + "workflow_path": "yyy", + "workflow_protocol": "yyy" + } } }, "override_attributes": { diff --git a/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb b/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb index 006eed8831..7dcf260d31 100644 --- a/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb +++ b/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb @@ -16,6 +16,24 @@ template "catalog-fe-config" do }) end +template "designers-fe-config" do + path "#{jetty_base}/config/catalog-fe/designers-configuration.yaml" + source "FE-designers-configuration.yaml.erb" + owner "jetty" + group "jetty" + mode "0755" + variables({ + :dcae_host => node['Designers']['DCAE']['dcae_host'], + :dcae_port => node['Designers']['DCAE']['dcae_port'], + :dcae_path => node['Designers']['DCAE']['dcae_path'], + :dcae_protocol => node['Designers']['DCAE']['dcae_protocol'], + :workflow_host => node['Designers']['WORKFLOW']['workflow_host'], + :workflow_port => node['Designers']['WORKFLOW']['workflow_port'], + :workflow_path => node['Designers']['WORKFLOW']['workflow_path'], + :workflow_protocol => node['Designers']['WORKFLOW']['workflow_protocol'] + }) +end + template "onboarding-fe-config" do path "#{jetty_base}/config/onboarding-fe/onboarding_configuration.yaml" diff --git a/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/FE-designers-configuration.yaml.erb b/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/FE-designers-configuration.yaml.erb new file mode 100644 index 0000000000..b5092728ba --- /dev/null +++ b/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/FE-designers-configuration.yaml.erb @@ -0,0 +1,13 @@ +designersList: + DCAE: + displayName: DCAE + designerHost: <%= @dcae_host %> + designerPort: <%= @dcae_port %> + designerPath: <%= @dcae_path %> + designerProtocol: <%= @dcae_protocol %> + WORKFLOW: + displayName: WORKFLOW + designerHost: <%= @workflow_host %> + designerPort: <%= @workflow_port %> + designerPath: <%= @workflow_path %> + designerProtocol: <%= @workflow_protocol %> \ No newline at end of file diff --git a/sdc-os-chef/sdc-frontend/startup.sh b/sdc-os-chef/sdc-frontend/startup.sh index 4b000c984f..82aef0b352 100644 --- a/sdc-os-chef/sdc-frontend/startup.sh +++ b/sdc-os-chef/sdc-frontend/startup.sh @@ -5,7 +5,7 @@ cd /root/chef-solo echo "normal['HOST_IP'] = \"${HOST_IP}\"" > /root/chef-solo/cookbooks/sdc-catalog-fe/attributes/default.rb chef-solo -c solo.rb -E ${CHEFNAME} -sed -i '/^set -e/aJAVA_OPTIONS=\"-XX:MaxPermSize=256m -Xmx512m -Dconfig.home=${JETTY_BASE}\/config -Dlog.home=${JETTY_BASE}\/logs -Dlogback.configurationFile=${JETTY_BASE}\/config\/catalog-fe\/logback.xml -Dconfiguration.yaml=${JETTY_BASE}\/config\/catalog-fe\/configuration.yaml -Donboarding_configuration.yaml=${JETTY_BASE}\/config\/onboarding-fe\/onboarding_configuration.yaml\"' /docker-entrypoint.sh +sed -i '/^set -e/aJAVA_OPTIONS=\" -Xdebug -agentlib:jdwp=transport=dt_socket,address=6000,server=y,suspend=n -XX:MaxPermSize=256m -Xmx512m -Dconfig.home=${JETTY_BASE}\/config -Dlog.home=${JETTY_BASE}\/logs -Dlogback.configurationFile=${JETTY_BASE}\/config\/catalog-fe\/logback.xml -Dconfiguration.yaml=${JETTY_BASE}\/config\/catalog-fe\/configuration.yaml -Donboarding_configuration.yaml=${JETTY_BASE}\/config\/onboarding-fe\/onboarding_configuration.yaml\"' /docker-entrypoint.sh sed -i '/^set -e/aTMPDIR=${JETTY_BASE}\/temp' /docker-entrypoint.sh cd /var/lib/jetty -- cgit 1.2.3-korg