summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBryan Sullivan <bryan.sullivan@att.com>2017-10-17 17:29:44 -0700
committerBryan Sullivan <bryan.sullivan@att.com>2017-10-17 17:29:44 -0700
commit705e8d9a2f1c13bc82fe8fea3bc5452414fdd56e (patch)
tree2c4aa1adfabba4f6cac0c9fd471bd36b3a365dee /tools
parent4c28ad24081171b55718a247085aecab8f3d16a4 (diff)
Fix deploy to avoid need to clone on admin/master node
JIRA: MODELS-23 Change-Id: Ic0efddbaab960d26920e2c4c2e4d94b773a3d016 Signed-off-by: Bryan Sullivan <bryan.sullivan@att.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/docker/demo_deploy.sh13
-rw-r--r--tools/kubernetes/demo_deploy.sh16
-rw-r--r--tools/rancher/demo_deploy.sh15
3 files changed, 30 insertions, 14 deletions
diff --git a/tools/docker/demo_deploy.sh b/tools/docker/demo_deploy.sh
index 9454c0e..544d9bd 100644
--- a/tools/docker/demo_deploy.sh
+++ b/tools/docker/demo_deploy.sh
@@ -48,13 +48,16 @@ echo "Setting up Docker..."
bash ~/models/tools/docker/docker-cluster.sh all $master "$workers"
# 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
-# (k8s-cluster and prometheus-tools) are in the same ssh session
+# are in the same ssh session
echo "Setting up Prometheus..."
-scp -o StrictHostKeyChecking=no $key ubuntu@$master:/home/ubuntu/$key
-ssh -x -o StrictHostKeyChecking=no ubuntu@$master <<EOF
-git clone https://gerrit.opnfv.org/gerrit/models
+ssh -x -o StrictHostKeyChecking=no ubuntu@$admin_ip 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
exec ssh-agent bash
ssh-add $key
-bash models/tools/prometheus/prometheus-tools.sh all "$master $workers"
+cd models/tools/prometheus
+bash prometheus-tools.sh all "$agent_ips"
EOF
echo "All done!"
diff --git a/tools/kubernetes/demo_deploy.sh b/tools/kubernetes/demo_deploy.sh
index b7935de..19feb91 100644
--- a/tools/kubernetes/demo_deploy.sh
+++ b/tools/kubernetes/demo_deploy.sh
@@ -51,20 +51,26 @@ 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..."
+scp -o StrictHostKeyChecking=no ~/models/tools/kubernetes/k8s-cluster.sh \
+ ubuntu@$admin_ip:/home/ubuntu/.
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
+bash 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
-# (k8s-cluster and prometheus-tools) are in the same ssh session
-echo "Setting up prometheus..."
+# are in the same ssh session
+echo "Setting up Prometheus..."
+ssh -x -o StrictHostKeyChecking=no ubuntu@$admin_ip 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
exec ssh-agent bash
ssh-add $key
-bash models/tools/prometheus/prometheus-tools.sh all "$agent_ips"
+cd models/tools/prometheus
+bash prometheus-tools.sh all "$agent_ips"
EOF
echo "Setting up cloudify..."
scp -o StrictHostKeyChecking=no ~/models/tools/cloudify/k8s-cloudify.sh \
diff --git a/tools/rancher/demo_deploy.sh b/tools/rancher/demo_deploy.sh
index 7daa80e..bdf60ab 100644
--- a/tools/rancher/demo_deploy.sh
+++ b/tools/rancher/demo_deploy.sh
@@ -46,20 +46,27 @@ 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 ~/models/tools/rancher/rancher-cluster.sh \
+ ubuntu@$admin_ip:/home/ubuntu/.
echo "Setting up Rancher..."
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/rancher/rancher-cluster.sh all "$agent_ips"
+bash rancher-cluster.sh all "$agent_ips"
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
-# (k8s-cluster and prometheus-tools) are in the same ssh session
+# are in the same ssh session
echo "Setting up Prometheus..."
+ssh -x -o StrictHostKeyChecking=no ubuntu@$admin_ip 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
exec ssh-agent bash
ssh-add $key
-bash models/tools/prometheus/prometheus-tools.sh all "$agent_ips"
+cd models/tools/prometheus
+bash prometheus-tools.sh all "$agent_ips"
EOF
echo "All done!"
+echo "Rancher server is accessible at http://$admin_ip:8080"