From c175a0de2f05d37c1c774684318a525eb96bb59b Mon Sep 17 00:00:00 2001 From: Avi Ziv Date: Thu, 15 Mar 2018 13:21:44 +0200 Subject: Create on boarding docker Add BE and Cassandra init docker images Change-Id: Id9d767c73fc946819cec821b4634ce650cbb22fd Issue-ID: SDC-781 Signed-off-by: Michael Lando --- .../sdc-catalog-fe/files/default/FE-logback.xml | 4 ++-- .../recipes/FE_2_setup_configuration.rb | 15 +++++-------- .../templates/default/FE-configuration.yaml.erb | 26 ++++++++++++---------- .../default/FE-onboarding-configuration.yaml.erb | 6 ++--- .../templates/default/ready-probe.sh.erb | 2 +- 5 files changed, 25 insertions(+), 28 deletions(-) (limited to 'catalog-fe/sdc-frontend/chef-repo') diff --git a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/files/default/FE-logback.xml b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/files/default/FE-logback.xml index 2f793f386b..7ae4438959 100644 --- a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/files/default/FE-logback.xml +++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/files/default/FE-logback.xml @@ -1,8 +1,8 @@ - - + + diff --git a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb index abefd28588..2f747c308d 100644 --- a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb +++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb @@ -29,14 +29,9 @@ end template "onboarding-fe-config" do - path "#{ENV['JETTY_BASE']}/config/onboarding-fe/onboarding_configuration.yaml" - source "FE-onboarding-configuration.yaml.erb" - owner "jetty" - group "jetty" - mode "0755" - variables({ - :catalog_ip => node['Nodes']['BE'], - :catalog_port => node['BE'][:http_port], - :ssl_port => node['BE'][:https_port] -}) + path "#{ENV['JETTY_BASE']}/config/onboarding-fe/onboarding_configuration.yaml" + source "FE-onboarding-configuration.yaml.erb" + owner "jetty" + group "jetty" + mode "0755" end \ No newline at end of file diff --git a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/FE-configuration.yaml.erb b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/FE-configuration.yaml.erb index 1a245d24b5..b4368709c4 100644 --- a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/FE-configuration.yaml.erb +++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/FE-configuration.yaml.erb @@ -32,15 +32,23 @@ healthCheckSocketTimeoutInMs: 5000 healthCheckIntervalInSeconds: 5 onboarding: - host: <%= @fe_host_ip %> + hostFe: <%= @fe_host_ip %> <% if node[:disableHttp] -%> - protocol: https - port: <%= node['FE'][:https_port] %> + protocolFe: https + portFe: <%= node['FE'][:https_port] %> <% else %> - protocol: http - port: <%= node['FE'][:http_port] %> + protocolFe: http + portFe: <%= node['FE'][:http_port] %> + <% end -%> + healthCheckUriFe: "/onboarding/v1.0/healthcheck" + hostBe: <%= node['ONBOARDING_BE_VIP'] %> + <% if node[:disableHttp] -%> + protocolBe: https + portBe: <%= node['ONBOARDING_BE'][:https_port] %> + <% else %> + protocolBe: http + portBe: <%= node['ONBOARDING_BE'][:http_port] %> <% end -%> - healthCheckUri: "/onboarding/v1.0/healthcheck" dcae: host: <%= @fe_host_ip %> @@ -53,12 +61,6 @@ dcae: <% end -%> healthCheckUri: "/dcae/healthCheck" -dcae: - protocol: http - host: localhost - port: 8181 - healthCheckUri: "/dcae/healthCheck" - identificationHeaderFields: - - &HTTP_IV_USER HTTP_IV_USER diff --git a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/FE-onboarding-configuration.yaml.erb b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/FE-onboarding-configuration.yaml.erb index 71ed876ee7..beb774b4a9 100644 --- a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/FE-onboarding-configuration.yaml.erb +++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/FE-onboarding-configuration.yaml.erb @@ -1,9 +1,9 @@ notifications: pollingIntervalMsec: 2000 selectionSize: 100 - beHost: <%= @catalog_ip %> + beHost: <%= node['ONBOARDING_BE_VIP'] %> <% if node[:disableHttp] -%> - beHttpPort: <%= node['BE'][:https_port] %> + beHttpPort: <%= node['ONBOARDING_BE'][:https_port] %> <% else %> - beHttpPort: <%= node['BE'][:http_port] %> + beHttpPort: <%= node['ONBOARDING_BE'][:http_port] %> <% end -%> \ No newline at end of file diff --git a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/ready-probe.sh.erb b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/ready-probe.sh.erb index f721f9a694..d09880d825 100644 --- a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/ready-probe.sh.erb +++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/ready-probe.sh.erb @@ -2,7 +2,7 @@ health_Check_http_code=$(curl --max-time 5 -o /dev/null -w '%{http_code}' http://127.0.0.1:8181/sdc1/rest/healthCheck) if [[ "$health_Check_http_code" -eq 200 ]]; then - exit 200 + exit 0 else exit $health_Check_http_code fi \ No newline at end of file -- cgit 1.2.3-korg