summaryrefslogtreecommitdiffstats
path: root/tools/kubernetes/demo_deploy.sh
diff options
context:
space:
mode:
authorBryan Sullivan <bryan.sullivan@att.com>2017-10-17 13:33:32 -0700
committerBryan Sullivan <bryan.sullivan@att.com>2017-10-17 14:05:47 -0700
commit68950cfed4850a7b1089ee2956f106ecd8ff132e (patch)
tree6fa2384ce59ddade3a53819314927269c54ca68a /tools/kubernetes/demo_deploy.sh
parentb2c252cd8913ef15a00d63a391da1c8a8a17d739 (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/kubernetes/demo_deploy.sh')
-rw-r--r--tools/kubernetes/demo_deploy.sh25
1 files changed, 13 insertions, 12 deletions
diff --git a/tools/kubernetes/demo_deploy.sh b/tools/kubernetes/demo_deploy.sh
index b3d165b..b7935de 100644
--- a/tools/kubernetes/demo_deploy.sh
+++ b/tools/kubernetes/demo_deploy.sh
@@ -1,12 +1,12 @@
#!/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.
@@ -22,14 +22,14 @@
#. will be setup with:
#. Prometheus dashboard: http://<admin_public_ip>:9090
#. Grafana dashboard: http://<admin_public_ip>:3000
-#.
+#.
#. Prerequisites:
#. - Ubuntu server for kubernetes cluster nodes (admin/master and agent nodes)
#. - MAAS server as cluster admin for kubernetes master/agent nodes
#. - Password-less ssh key provided for node setup
#. Usage: on the MAAS server
#. $ git clone https://gerrit.opnfv.org/gerrit/models ~/models
-#. $ bash ~/models/tools/kubernetes/demo_deploy.sh <key> "<hosts>" <admin ip>
+#. $ bash ~/models/tools/kubernetes/demo_deploy.sh <key> "<hosts>" <admin ip>
#. "<agent ips>" <pub-net> <priv-net> [<extras>]
#. <key>: name of private key for cluster node ssh (in current folder)
#. <hosts>: space separated list of hostnames managed by MAAS
@@ -51,24 +51,25 @@ ssh-add $key
if [[ "x$extras" != "x" ]]; then source $extras; fi
scp -o StrictHostKeyChecking=no $key ubuntu@$admin_ip:/home/ubuntu/$key
echo "Setting up kubernetes..."
-ssh -x ubuntu@$admin_ip <<EOF
+ssh -x -o StrictHostKeyChecking=no ubuntu@$admin_ip <<EOF
exec ssh-agent bash
ssh-add $key
git clone https://gerrit.opnfv.org/gerrit/models
bash models/tools/kubernetes/k8s-cluster.sh all "$agent_ips" $priv_net $pub_net
EOF
# TODO: Figure this out... Have to break the setup into two steps as something
-# causes the ssh session to end before the prometheus setup, if both scripts
+# causes the ssh session to end before the prometheus setup, if both scripts
# (k8s-cluster and prometheus-tools) are in the same ssh session
echo "Setting up prometheus..."
-ssh -x ubuntu@$admin_ip <<EOF
+ssh -x -o StrictHostKeyChecking=no ubuntu@$admin_ip <<EOF
exec ssh-agent bash
ssh-add $key
bash models/tools/prometheus/prometheus-tools.sh all "$agent_ips"
EOF
echo "Setting up cloudify..."
-scp models/tools/cloudify/k8s-cloudify.sh ubuntu@$admin_ip:/home/ubuntu/.
-ssh -x ubuntu@$admin_ip bash k8s-cloudify.sh prereqs
-ssh -x ubuntu@$admin_ip bash k8s-cloudify.sh setup
-ssh -x ubuntu@$admin_ip bash k8s-cloudify.sh demo
+scp -o StrictHostKeyChecking=no ~/models/tools/cloudify/k8s-cloudify.sh \
+ ubuntu@$admin_ip:/home/ubuntu/.
+ssh -x -o StrictHostKeyChecking=no ubuntu@$admin_ip bash k8s-cloudify.sh prereqs
+ssh -x -o StrictHostKeyChecking=no ubuntu@$admin_ip bash k8s-cloudify.sh setup
+ssh -x -o StrictHostKeyChecking=no ubuntu@$admin_ip bash k8s-cloudify.sh demo
echo "All done!"