diff options
author | 2017-10-17 13:33:32 -0700 | |
---|---|---|
committer | 2017-10-17 14:05:47 -0700 | |
commit | 68950cfed4850a7b1089ee2956f106ecd8ff132e (patch) | |
tree | 6fa2384ce59ddade3a53819314927269c54ca68a /tools/docker/docker-cluster.sh | |
parent | b2c252cd8913ef15a00d63a391da1c8a8a17d739 (diff) |
Testing merged cloud-native models code
JIRA: MODELS-23
Cleaned trailing whitespace.
Fixed bugs with Rancher etc setup:
- ssh -o where needed in demo_deploy.sh
- Comment out Rancher-managed Grafana deploy
- Pull dashboards direct from clone
Change-Id: I02707488563a1db4262ebcdf735331707e36fa61
Signed-off-by: Bryan Sullivan <bryan.sullivan@att.com>
Diffstat (limited to 'tools/docker/docker-cluster.sh')
-rw-r--r-- | tools/docker/docker-cluster.sh | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/docker/docker-cluster.sh b/tools/docker/docker-cluster.sh index 8c0aa69..7404e4a 100644 --- a/tools/docker/docker-cluster.sh +++ b/tools/docker/docker-cluster.sh @@ -1,20 +1,20 @@ #!/bin/bash # Copyright 2017 AT&T Intellectual Property, Inc -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # -#. What this is: Deployment script for a mult-node docker-ce cluster. -#. Prerequisites: +#. What this is: Deployment script for a mult-node docker-ce cluster. +#. Prerequisites: #. - Ubuntu server for master and worker nodes #. Usage: #. $ git clone https://gerrit.opnfv.org/gerrit/models ~/models @@ -28,12 +28,12 @@ #. $ bash docker_cluster.sh setup <master> "<workers>" #. Installs and starts master and worker nodes. #. $ bash docker_cluster.sh create <service> -#. <service>: Demo service name to start. +#. <service>: Demo service name to start. #. Currently supported: nginx #. $ bash docker_cluster.sh delete <service> #. <service>: Service name to delete. #. $ bash docker_cluster.sh clean [<node>] -#. <node>: optional IP address of node to clean. +#. <node>: optional IP address of node to clean. #. By default, cleans the entire cluster. #. @@ -113,7 +113,7 @@ function create_service() { ;; *) echo "${FUNCNAME[0]}: service $1 not setup for use with this script" - esac + esac if ! curl -X POST http://$master:4243/services/create -d @$1.json ; then echo "${FUNCNAME[0]}: service creation failed" @@ -142,8 +142,8 @@ function check_service() { echo "${FUNCNAME[0]}: service is not yet active, waiting 10 seconds" sleep 10 done - curl -s -o /tmp/resp http://$node:$port - if [[ $(grep -c "$match" /tmp/resp) == 0 ]]; then + curl -s -o /tmp/resp http://$node:$port + if [[ $(grep -c "$match" /tmp/resp) == 0 ]]; then not="NOT" fi echo "$service service is $not active at address http://$node:$port" |