From 230ae894c1b2f489e31d6a0d9f7db99cf6b65cbe Mon Sep 17 00:00:00 2001 From: Jack Lucas Date: Tue, 27 Mar 2018 00:04:46 -0400 Subject: Add k8s bootstrap container Change-Id: Ib21bd80a1e43d1005974527cecf93e99462e94fa Issue-ID: DCAEGEN2-421 Signed-off-by: Jack Lucas --- k8s-bootstrap-container/bootstrap.sh | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 k8s-bootstrap-container/bootstrap.sh (limited to 'k8s-bootstrap-container/bootstrap.sh') diff --git a/k8s-bootstrap-container/bootstrap.sh b/k8s-bootstrap-container/bootstrap.sh new file mode 100755 index 0000000..38da261 --- /dev/null +++ b/k8s-bootstrap-container/bootstrap.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# Install DCAE via Cloudify Manager +# Expects: +# CM address (IP or DNS) in CMADDR environment variable +# CM password in CMPASS environment variable (assumes user is "admin") +# Plugin wagon files in /wagons + +set -x + +# Deploy components +# $1 -- name (for bp and deployment) +# $2 -- blueprint name +# $3 -- inputs file name +function deploy { + cfy install -b $1 -d $1 -i /inputs/$3 /blueprints/$2 +} +# Set up profile to access CMs +cfy profiles use -u admin -t default_tenant -p "${CMPASS}" "${CMADDR}" + +# Output status, for debugging purposes +cfy status + +# Load plugins onto CM +for wagon in /wagons/*.wgn +do + cfy plugins upload ${wagon} +done + +# Deploy platform components +deploy config_binding_service k8s-config_binding_service.yaml k8s-config_binding_service-inputs.yaml +deploy inventory k8s-inventory.yaml k8s-inventory-inputs.yaml +deploy deployment_handler k8s-deployment_handler.yaml k8s-deployment_handler-inputs.yaml +deploy policy_handler k8s-policy_handler.yaml k8s-policy_handler-inputs.yaml + +# Keep the container running +# Useful to exec into it for debugging and uninstallation +while true +do + sleep 120 +done \ No newline at end of file -- cgit 1.2.3-korg