This patch introduces a new structure of the it/dep repo.
[it/dep.git] / ric-platform / 50-RIC-Platform / bin / uninstall
similarity index 68%
rename from ricplt/prepull.sh
rename to ric-platform/50-RIC-Platform/bin/uninstall
index 0f3c7d0..b5937b1 100755 (executable)
 #   limitations under the License.                                             #
 ################################################################################
 
-# usage:   echo "{{YOUR_DOCKER_PASSWORD}}" | sh ./prepull.sh
 
-DOCKER_REGISTRY="${__RUNRICENV_DOCKER_HOST__}:${__RUNRICENV_DOCKER_PORT__}"
-IMAGE_LIST="xapp-manager:latest rtmgr:0.0.2 redis-standalone:latest e2mgr:1.0.0 e2:1.0.0"
 
-docker login -u ${__RUNRICENV_DOCKER_USER__} --password-stdin ${DOCKER_REGISTRY}
-for IMAGE in ${IMAGE_LIST}; do
-  docker pull ${DOCKER_REGISTRY}/${IMAGE}
-done
 
-docker logout ${DOCKER_REGISTRY}
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
+
+
+source $DIR/../etc/ric.conf
+
+if [ -z "$RICPLT_RELEASE_NAME" ];then
+   RELEASE_NAME=$helm_release_name
+else
+   RELEASE_NAME=$RICPLT_RELEASE_NAME
+fi
+if [ -z "$RICPLT_NAMESPACE" ];then
+   NAMESPACE=$namespace
+else
+   NAMESPACE=$RICPLT_NAMESPACE
+fi
+
+
+RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term"
+
+echo "Undeploying RIC Platform components [$RICPLT_COMPONENTS]"
+echo "Platform Namespace: $NAMESPACE"
+echo "Helm Release Name: $RELEASE_NAME"
+
+
+
+
+for component in $RICPLT_COMPONENTS; do
+  helm delete --purge "${RELEASE_NAME}-$component"
+done