From 68950cfed4850a7b1089ee2956f106ecd8ff132e Mon Sep 17 00:00:00 2001 From: Bryan Sullivan Date: Tue, 17 Oct 2017 13:33:32 -0700 Subject: 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 --- tools/docker/docker-cluster.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tools/docker/docker-cluster.sh') 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 "" #. Installs and starts master and worker nodes. #. $ bash docker_cluster.sh create -#. : Demo service name to start. +#. : Demo service name to start. #. Currently supported: nginx #. $ bash docker_cluster.sh delete #. : Service name to delete. #. $ bash docker_cluster.sh clean [] -#. : optional IP address of node to clean. +#. : 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" -- cgit 1.2.3-korg