summaryrefslogtreecommitdiffstats
path: root/deployments
diff options
context:
space:
mode:
Diffstat (limited to 'deployments')
-rwxr-xr-xdeployments/_functions.sh11
-rw-r--r--deployments/helm/v2/emco/Chart.yaml2
-rwxr-xr-xdeployments/start.sh1
3 files changed, 13 insertions, 1 deletions
diff --git a/deployments/_functions.sh b/deployments/_functions.sh
index 47074433..c0feed0d 100755
--- a/deployments/_functions.sh
+++ b/deployments/_functions.sh
@@ -34,3 +34,14 @@ EOF
function start_all {
docker-compose up -d
}
+
+function wait_for_service {
+ for try in {0..59}; do
+ echo "$(date +%H:%M:%S) - Waiting for service up"
+ sleep 1
+ if $(curl http://localhost:9015/v1 &>/dev/null); then
+ return 0
+ fi
+ done
+ exit 1
+}
diff --git a/deployments/helm/v2/emco/Chart.yaml b/deployments/helm/v2/emco/Chart.yaml
index 6998dcaa..9c015819 100644
--- a/deployments/helm/v2/emco/Chart.yaml
+++ b/deployments/helm/v2/emco/Chart.yaml
@@ -1,5 +1,5 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
-name: onap4k8s
+name: emco
version: 0.1.0
diff --git a/deployments/start.sh b/deployments/start.sh
index e7ff1334..61af504c 100755
--- a/deployments/start.sh
+++ b/deployments/start.sh
@@ -21,3 +21,4 @@ stop_all
start_mongo
generate_k8sconfig
start_all
+wait_for_service