diff options
author | Jack Lucas <jflucas@research.att.com> | 2018-03-27 00:04:46 -0400 |
---|---|---|
committer | Jack Lucas <jflucas@research.att.com> | 2018-03-27 00:05:26 -0400 |
commit | 230ae894c1b2f489e31d6a0d9f7db99cf6b65cbe (patch) | |
tree | 44dd8a41e278a8a3155b9f628515d550636b2248 /k8s-bootstrap-container/bootstrap.sh | |
parent | 649d242623da77f02277c778a55cc51430a809ca (diff) |
Add k8s bootstrap container
Change-Id: Ib21bd80a1e43d1005974527cecf93e99462e94fa
Issue-ID: DCAEGEN2-421
Signed-off-by: Jack Lucas <jflucas@research.att.com>
Diffstat (limited to 'k8s-bootstrap-container/bootstrap.sh')
-rwxr-xr-x | k8s-bootstrap-container/bootstrap.sh | 40 |
1 files changed, 40 insertions, 0 deletions
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 |