undercloud-setup: Add SSH arguments to multinode vxlan subnode setup

This commit adds SSH arguments to the toci_vxlan_networking_multinode
script so that it can connect to the subnodes having the benefit of
using specific keys, retry logic, and without KnownHosts conflicts.

Change-Id: Id89578140d195e4549ce5b221749b13372eea85b
This commit is contained in:
Ben Kero 2017-01-06 00:31:19 +08:00
parent 209c788830
commit ecfe2c01b0
3 changed files with 32 additions and 31 deletions

View File

@ -1,29 +0,0 @@
#!/usr/bin/env bash
set -eux
### --start_docs
## Set up vxlan networking on subnodes listed in /etc/nodepool/sub_nodes_private
## =============================================================================
## * Create the WORKSPACE variable if it didn't exist already
export WORKSPACE=${WORKSPACE:-$HOME}
while read sub; do
## * Create the expected directories and symlinks
## ::
ssh $sub mkdir -p $WORKSPACE/tripleo
ssh $sub ln -sf $WORKSPACE/tripleo $WORKSPACE/tripleo/new
## * Clone the appropriate repositories in the expected locations
## ::
ssh $sub git clone https://git.openstack.org/openstack-infra/tripleo-ci $WORKSPACE/tripleo/tripleo-ci
ssh $sub git clone https://git.openstack.org/openstack-dev/devstack $WORKSPACE/tripleo/devstack
ssh $sub git clone https://git.openstack.org/openstack-infra/devstack-gate $WORKSPACE/tripleo/devstack-gate
done < /etc/nodepool/sub_nodes_private
### --stop_docs

View File

@ -1,8 +1,8 @@
---
- name: Install the TripleO-CI VXLAN networking script on subnodes
copy:
src: toci_vxlan_networking_multinode.sh
template:
src: toci_vxlan_networking_multinode.sh.j2
dest: "{{ working_dir }}/toci_vxlan_networking_multinode.sh"
mode: 0755
when: toci_vxlan_networking_multinode|bool

View File

@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -eux
### --start_docs
## Set up vxlan networking on subnodes listed in /etc/nodepool/sub_nodes_private
## =============================================================================
## * Create the WORKSPACE variable if it didn't exist already
export WORKSPACE=${WORKSPACE:-$HOME}
export SSH_ARGS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=Verbose -o PasswordAuthentication=no -o ConnectionAttempts=32 -v -t -l {{ ansible_user }}"
while read sub; do
## * Create the expected directories and symlinks
## ::
ssh $SSH_ARGS $sub mkdir -p $WORKSPACE/tripleo
ssh $SSH_ARGS $sub ln -sf $WORKSPACE/tripleo $WORKSPACE/tripleo/new
## * Clone the appropriate repositories in the expected locations
## ::
ssh $SSH_ARGS $sub git clone https://git.openstack.org/openstack-infra/tripleo-ci $WORKSPACE/tripleo/tripleo-ci
ssh $SSH_ARGS $sub git clone https://git.openstack.org/openstack-dev/devstack $WORKSPACE/tripleo/devstack
ssh $SSH_ARGS $sub git clone https://git.openstack.org/openstack-infra/devstack-gate $WORKSPACE/tripleo/devstack-gate
done < /etc/nodepool/sub_nodes_private
### --stop_docs