summaryrefslogtreecommitdiffstats
path: root/tools/rancher/demo_deploy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/rancher/demo_deploy.sh')
-rw-r--r--tools/rancher/demo_deploy.sh38
1 files changed, 21 insertions, 17 deletions
diff --git a/tools/rancher/demo_deploy.sh b/tools/rancher/demo_deploy.sh
index bdf60ab..3054baf 100644
--- a/tools/rancher/demo_deploy.sh
+++ b/tools/rancher/demo_deploy.sh
@@ -22,51 +22,55 @@
#. Grafana dashboard: http://<master_public_ip>:3000
#.
#. Prerequisites:
-#. - Ubuntu server for Rancher cluster nodes (admin/master and agent nodes)
-#. - MAAS server as cluster admin for Rancher master/agent nodes
+#. - Ubuntu server for Rancher cluster nodes (master and worker nodes)
+#. - MAAS server as cluster admin for Rancher master/worker 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/rancher/demo_deploy.sh <key> "<hosts>" <master_ip>
-#. "<agent ips>" [<extras>]
+#. $ bash ~/models/tools/rancher/demo_deploy.sh <key> "<hosts>" <master>
+#. "<workers>" [<extras>]
#. <key>: name of private key for cluster node ssh (in current folder)
#. <hosts>: space separated list of hostnames managed by MAAS
-#. <master_ip>: IP of cluster admin node
-#. <agent_ips>: space separated list of agent node IPs
+#. <master>: IP of cluster master node
+#. <workers>: space separated list of worker node IPs
#. <extras>: optional name of script for extra setup functions as needed
key=$1
nodes="$2"
-admin_ip=$3
-agent_ips="$4"
+master=$3
+workers="$4"
extras=$5
source ~/models/tools/maas/deploy.sh $1 "$2" $5
eval `ssh-agent`
ssh-add $key
if [[ "x$extras" != "x" ]]; then source $extras; fi
-scp -o StrictHostKeyChecking=no $key ubuntu@$admin_ip:/home/ubuntu/$key
+scp -o StrictHostKeyChecking=no $key ubuntu@$master:/home/ubuntu/$key
scp -o StrictHostKeyChecking=no ~/models/tools/rancher/rancher-cluster.sh \
- ubuntu@$admin_ip:/home/ubuntu/.
+ ubuntu@$master:/home/ubuntu/.
echo "Setting up Rancher..."
-ssh -x -o StrictHostKeyChecking=no ubuntu@$admin_ip <<EOF
+ssh -x -o StrictHostKeyChecking=no ubuntu@$master <<EOF
exec ssh-agent bash
ssh-add $key
-bash rancher-cluster.sh all "$agent_ips"
+bash rancher-cluster.sh all "$workers"
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
# are in the same ssh session
echo "Setting up Prometheus..."
-ssh -x -o StrictHostKeyChecking=no ubuntu@$admin_ip mkdir -p \
+ssh -x -o StrictHostKeyChecking=no ubuntu@$master mkdir -p \
/home/ubuntu/models/tools/prometheus
scp -r -o StrictHostKeyChecking=no ~/models/tools/prometheus/* \
- ubuntu@$admin_ip:/home/ubuntu/models/tools/prometheus
-ssh -x -o StrictHostKeyChecking=no ubuntu@$admin_ip <<EOF
+ ubuntu@$master:/home/ubuntu/models/tools/prometheus
+ssh -x -o StrictHostKeyChecking=no ubuntu@$master <<EOF
exec ssh-agent bash
ssh-add $key
cd models/tools/prometheus
-bash prometheus-tools.sh all "$agent_ips"
+bash prometheus-tools.sh all "$workers"
EOF
+
echo "All done!"
-echo "Rancher server is accessible at http://$admin_ip:8080"
+echo "Rancher UI is accessible at http://$master:8080"
+echo "Prometheus UI is available at http://$master:9090"
+echo "Grafana dashboards are available at http://$master:3000 (login as admin/admin)"
+echo "Grafana API is available at http://admin:admin@$master:3000/api/v1/query?query=<string>"