summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Sullivan <bryan.sullivan@att.com>2017-11-02 07:07:43 -0700
committerBryan Sullivan <bryan.sullivan@att.com>2017-11-02 07:07:43 -0700
commita1b5833e2911fe48e9fa4a5233c7e6a480777fd6 (patch)
tree836c881abdffb6fe72d2284f786a1f843ae357aa
parentf12b3492df08a12b55d7e7e559de628c1df6a4dc (diff)
Avoid server key warnings
JIRA: MODELS-23 Change-Id: Ic32cf8290c916cd3f6d740fd44733405df72c6b0 Signed-off-by: Bryan Sullivan <bryan.sullivan@att.com>
-rw-r--r--tools/docker/demo_deploy.sh4
-rw-r--r--tools/docker/docker-cluster.sh8
-rw-r--r--tools/kubernetes/ceph-baremetal.sh4
-rw-r--r--tools/kubernetes/demo_deploy.sh16
-rw-r--r--tools/rancher/demo_deploy.sh6
5 files changed, 19 insertions, 19 deletions
diff --git a/tools/docker/demo_deploy.sh b/tools/docker/demo_deploy.sh
index e25b19c..7943d18 100644
--- a/tools/docker/demo_deploy.sh
+++ b/tools/docker/demo_deploy.sh
@@ -50,11 +50,11 @@ bash ~/models/tools/docker/docker-cluster.sh all $master "$workers"
# 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 UserKnownHostsFile=/dev/null -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
+ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$admin_ip <<EOF
exec ssh-agent bash
ssh-add $key
cd models/tools/prometheus
diff --git a/tools/docker/docker-cluster.sh b/tools/docker/docker-cluster.sh
index ce2701d..3d0a34b 100644
--- a/tools/docker/docker-cluster.sh
+++ b/tools/docker/docker-cluster.sh
@@ -76,10 +76,10 @@ EOF
# jq is used for parsing API reponses
sudo apt-get install -y jq
scp -o StrictHostKeyChecking=no /tmp/prereqs.sh ubuntu@$master:/home/ubuntu/prereqs.sh
- ssh -x -o StrictHostKeyChecking=no ubuntu@$master bash /home/ubuntu/prereqs.sh
+ ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$master bash /home/ubuntu/prereqs.sh
# activate docker API
# Per https://www.ivankrizsan.se/2016/05/18/enabling-docker-remote-api-on-ubuntu-16-04/
- ssh -x -o StrictHostKeyChecking=no ubuntu@$master <<EOF
+ ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$master <<EOF
sudo sed -i -- 's~fd://~fd:// -H tcp://0.0.0.0:4243~' /lib/systemd/system/docker.service
sudo systemctl daemon-reload
sudo service docker restart
@@ -98,8 +98,8 @@ EOF
for worker in $workers; do
log "setting up worker at $worker"
scp -o StrictHostKeyChecking=no /tmp/prereqs.sh ubuntu@$worker:/home/ubuntu/.
- ssh -x -o StrictHostKeyChecking=no ubuntu@$worker bash /home/ubuntu/prereqs.sh
- ssh -x -o StrictHostKeyChecking=no ubuntu@$worker sudo $token
+ ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$worker bash /home/ubuntu/prereqs.sh
+ ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$worker sudo $token
done
log "testing service creation"
diff --git a/tools/kubernetes/ceph-baremetal.sh b/tools/kubernetes/ceph-baremetal.sh
index d806178..e1feee7 100644
--- a/tools/kubernetes/ceph-baremetal.sh
+++ b/tools/kubernetes/ceph-baremetal.sh
@@ -51,7 +51,7 @@ function setup_ceph() {
# Note this loop may be partially redundant with the ceph-deploy steps below
for node_ip in $all_nodes; do
log "Install ntp and ceph on $node_ip"
- ssh -x -o StrictHostKeyChecking=no ubuntu@$node_ip <<EOF
+ ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$node_ip <<EOF
sudo timedatectl set-ntp no
wget -q -O- 'https://download.ceph.com/keys/release.asc' | sudo apt-key add -
echo deb https://download.ceph.com/debian/ $(lsb_release -sc) main | sudo tee /etc/apt/sources.list.d/ceph.list
@@ -87,7 +87,7 @@ EOF
log "Prepare ceph OSD on node $node_ip"
echo "$node_ip ceph-osd$n" | sudo tee -a /etc/hosts
# Using ceph-osd$n here avoids need for manual acceptance of the new server hash
- ssh -x -o StrictHostKeyChecking=no ubuntu@ceph-osd$n <<EOF
+ ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@ceph-osd$n <<EOF
echo "$node_ip ceph-osd$n" | sudo tee -a /etc/hosts
sudo mkdir /ceph && sudo chown -R ceph:ceph /ceph
EOF
diff --git a/tools/kubernetes/demo_deploy.sh b/tools/kubernetes/demo_deploy.sh
index 6aa45dc..3ddd01d 100644
--- a/tools/kubernetes/demo_deploy.sh
+++ b/tools/kubernetes/demo_deploy.sh
@@ -59,7 +59,7 @@ scp -o StrictHostKeyChecking=no $key ubuntu@$master:/home/ubuntu/$key
echo "$0 $(date): Setting up kubernetes..."
scp -r -o StrictHostKeyChecking=no ~/models/tools/kubernetes/* \
ubuntu@$master:/home/ubuntu/.
-ssh -x -o StrictHostKeyChecking=no ubuntu@$master <<EOF
+ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$master <<EOF
exec ssh-agent bash
ssh-add $key
bash k8s-cluster.sh all "$workers" $priv_net $pub_net $ceph_mode $ceph_dev
@@ -68,11 +68,11 @@ EOF
# 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@$master mkdir -p \
+ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$master mkdir -p \
/home/ubuntu/models/tools/prometheus
scp -r -o StrictHostKeyChecking=no ~/models/tools/prometheus/* \
ubuntu@$master:/home/ubuntu/models/tools/prometheus
-ssh -x -o StrictHostKeyChecking=no ubuntu@$master <<EOF
+ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$master <<EOF
exec ssh-agent bash
ssh-add $key
cd models/tools/prometheus
@@ -81,16 +81,16 @@ EOF
echo "$0 $(date): Setting up cloudify..."
scp -r -o StrictHostKeyChecking=no ~/models/tools/cloudify \
ubuntu@$master:/home/ubuntu/.
-ssh -x -o StrictHostKeyChecking=no ubuntu@$master \
+ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$master \
bash cloudify/k8s-cloudify.sh prereqs
-ssh -x -o StrictHostKeyChecking=no ubuntu@$master \
+ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$master \
bash cloudify/k8s-cloudify.sh setup
-ssh -x -o StrictHostKeyChecking=no ubuntu@$master \
+ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$master \
bash cloudify/k8s-cloudify.sh demo
echo "$0 $(date): All done!"
-export NODE_PORT=$(ssh -x -o StrictHostKeyChecking=no ubuntu@$master kubectl get --namespace default -o jsonpath="{.spec.ports[0].nodePort}" services dw-dokuwiki)
-export NODE_IP=$(ssh -x -o StrictHostKeyChecking=no ubuntu@$master kubectl get nodes --namespace default -o jsonpath="{.items[0].status.addresses[0].address}")
+export NODE_PORT=$(ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$master kubectl get --namespace default -o jsonpath="{.spec.ports[0].nodePort}" services dw-dokuwiki)
+export NODE_IP=$(ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$master kubectl get nodes --namespace default -o jsonpath="{.items[0].status.addresses[0].address}")
echo "Helm chart demo app dokuwiki is available at http://$NODE_IP:$NODE_PORT/"
# TODO update Cloudify demo app to have public exposed service address
echo "Cloudify-deployed demo app nginx is available at TBD"
diff --git a/tools/rancher/demo_deploy.sh b/tools/rancher/demo_deploy.sh
index 3054baf..1ee980d 100644
--- a/tools/rancher/demo_deploy.sh
+++ b/tools/rancher/demo_deploy.sh
@@ -49,7 +49,7 @@ scp -o StrictHostKeyChecking=no $key ubuntu@$master:/home/ubuntu/$key
scp -o StrictHostKeyChecking=no ~/models/tools/rancher/rancher-cluster.sh \
ubuntu@$master:/home/ubuntu/.
echo "Setting up Rancher..."
-ssh -x -o StrictHostKeyChecking=no ubuntu@$master <<EOF
+ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$master <<EOF
exec ssh-agent bash
ssh-add $key
bash rancher-cluster.sh all "$workers"
@@ -58,11 +58,11 @@ EOF
# 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@$master mkdir -p \
+ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$master mkdir -p \
/home/ubuntu/models/tools/prometheus
scp -r -o StrictHostKeyChecking=no ~/models/tools/prometheus/* \
ubuntu@$master:/home/ubuntu/models/tools/prometheus
-ssh -x -o StrictHostKeyChecking=no ubuntu@$master <<EOF
+ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$master <<EOF
exec ssh-agent bash
ssh-add $key
cd models/tools/prometheus