diff options
author | Jack Lucas <jflucas@research.att.com> | 2020-03-02 11:07:31 -0500 |
---|---|---|
committer | Jack Lucas <jflucas@research.att.com> | 2020-03-02 22:34:00 -0500 |
commit | a25c92363d1fdb3b3f9fc91203912febc19ed3c0 (patch) | |
tree | dc95b68c792bcfb409d67d7b12e42cd848cf674b /scripts/uninstall.sh | |
parent | 0bc07ad3d16ccc2a6ca032951093866eec5d5d95 (diff) |
Load blueprint into DCAE inventory at boot
Load k8splugin 2.0.0 in addition to 1.7.2
Issue-ID: DCAEGEN2-2049
Issue-ID: DCAEGEN2-1938
Signed-off-by: Jack Lucas <jflucas@research.att.com>
Change-Id: I5306bf54b0c443b83fb6dc5afb60b07e87d741e6
Diffstat (limited to 'scripts/uninstall.sh')
-rwxr-xr-x | scripts/uninstall.sh | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/scripts/uninstall.sh b/scripts/uninstall.sh index 71f8161..30dc2bf 100755 --- a/scripts/uninstall.sh +++ b/scripts/uninstall.sh @@ -20,6 +20,14 @@ set -x set +e +# TLS setup +CACERT="/certs/cacert.pem" +CURLTLS="" +if [ $CMPROTO = "https" ] +then + CURLTLS="--cacert $CACERT" +fi + # Leave the Consul cluster /opt/consul/bin/consul leave @@ -30,7 +38,17 @@ set +e # jq gives us the just the deployment ids (e.g., "config_binding_service"), one per line # # xargs -I lets us run the cfy uninstall command once for each deployment id extracted by jq - -curl -Ss --user admin:$CMPASS -H "Tenant: default_tenant" "$CMADDR/api/v3.1/deployments?_include=id" \ +curl -Ss --user admin:$CMPASS -H "Tenant: default_tenant" ${CURLTLS} "$CMPROTO://$CMADDR:$CMPORT/api/v3.1/deployments?_include=id" \ | /bin/jq .items[].id \ | xargs -I % sh -c 'cfy uninstall %' + +# Delete blueprints (in case the uninstall didn't get them) +curl -Ss --user admin:$CMPASS -H "Tenant: default_tenant" ${CURLTLS} "$CMPROTO://$CMADDR:$CMPORT/api/v3.1/blueprints?_include=id" \ +| /bin/jq .items[].id \ +| xargs -I % sh -c 'cfy blueprints delete %' + +# Delete plugins +curl -Ss --user admin:$CMPASS -H "Tenant: default_tenant" ${CURLTLS} "$CMPROTO://$CMADDR:$CMPORT/api/v3.1/plugins?_include=id" \ +| /bin/jq .items[].id \ +| xargs -I % sh -c 'cfy plugins delete %' + |