summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaspars Skels <kaspars.skels@gmail.com>2019-02-18 13:10:28 -0600
committerKaspars Skels <kaspars.skels@gmail.com>2019-02-18 13:24:43 -0600
commitabf676210b4c7cb55f27071b5b81019f15f09867 (patch)
treef04116097c257af2e19d8b9343301be8d42f842a
parente6586077b9f56a319fa43be3cfde6713d02942cb (diff)
Add support for NTP in gate-multinode
This allows configuring NTP pools/servers for nodes bootstrap-ed by gate-multinode. Change-Id: I0f29f16d3d7d2a44e0e01732b74032068b03e1a3
Notes
Notes (review): Code-Review+1: Arijit Bose <imarijitbose@gmail.com> Code-Review+2: Craig Anderson <craig.anderson@att.com> Code-Review+2: Scott Hussey <sthussey@att.com> Workflow+1: Scott Hussey <sthussey@att.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 19 Feb 2019 16:10:59 +0000 Reviewed-on: https://review.openstack.org/637606 Project: openstack/airship-in-a-bottle Branch: refs/heads/master
-rw-r--r--tools/multi_nodes_gate/airship_gate/lib/config.sh2
-rw-r--r--tools/multi_nodes_gate/airship_gate/lib/virsh.sh2
-rw-r--r--tools/multi_nodes_gate/airship_gate/templates/user-data.sub4
3 files changed, 8 insertions, 0 deletions
diff --git a/tools/multi_nodes_gate/airship_gate/lib/config.sh b/tools/multi_nodes_gate/airship_gate/lib/config.sh
index 98f6dcc..ae7296a 100644
--- a/tools/multi_nodes_gate/airship_gate/lib/config.sh
+++ b/tools/multi_nodes_gate/airship_gate/lib/config.sh
@@ -17,6 +17,8 @@ export VIRSH_POOL=${VIRSH_POOL:-airship}
17export VIRSH_POOL_PATH=${VIRSH_POOL_PATH:-/var/lib/libvirt/airship} 17export VIRSH_POOL_PATH=${VIRSH_POOL_PATH:-/var/lib/libvirt/airship}
18export VIRSH_CPU_OPTS=${VIRSH_CPU_OPTS:-host} 18export VIRSH_CPU_OPTS=${VIRSH_CPU_OPTS:-host}
19export UPSTREAM_DNS=${UPSTREAM_DNS:-"8.8.8.8 8.8.4.4"} 19export UPSTREAM_DNS=${UPSTREAM_DNS:-"8.8.8.8 8.8.4.4"}
20export NTP_POOLS=${NTP_POOLS:-"0.ubuntu.pool.ntp.org 1.ubuntu.pool.ntp.org"}
21export NTP_SERVERS=${NTP_SERVERS:-""}
20 22
21export SHIPYARD_PASSWORD=${SHIPYARD_OS_PASSWORD:-'password18'} 23export SHIPYARD_PASSWORD=${SHIPYARD_OS_PASSWORD:-'password18'}
22export AIRSHIP_KEYSTONE_URL=${AIRSHIP_KEYSTONE_URL:-'http://keystone.gate.local:80/v3'} 24export AIRSHIP_KEYSTONE_URL=${AIRSHIP_KEYSTONE_URL:-'http://keystone.gate.local:80/v3'}
diff --git a/tools/multi_nodes_gate/airship_gate/lib/virsh.sh b/tools/multi_nodes_gate/airship_gate/lib/virsh.sh
index eec96b8..8a8d767 100644
--- a/tools/multi_nodes_gate/airship_gate/lib/virsh.sh
+++ b/tools/multi_nodes_gate/airship_gate/lib/virsh.sh
@@ -42,6 +42,8 @@ iso_gen() {
42 export BR_IP_NODE 42 export BR_IP_NODE
43 export NAME 43 export NAME
44 export SSH_PUBLIC_KEY 44 export SSH_PUBLIC_KEY
45 export NTP_POOLS=$(join_array ',' $NTP_POOLS)
46 export NTP_SERVERS=$(join_array ',' $NTP_SERVERS)
45 envsubst < "${TEMPLATE_DIR}/user-data.sub" > user-data 47 envsubst < "${TEMPLATE_DIR}/user-data.sub" > user-data
46 48
47 if [[ ! -z "${ADDL_USERDATA}" ]] 49 if [[ ! -z "${ADDL_USERDATA}" ]]
diff --git a/tools/multi_nodes_gate/airship_gate/templates/user-data.sub b/tools/multi_nodes_gate/airship_gate/templates/user-data.sub
index dd29de4..9780784 100644
--- a/tools/multi_nodes_gate/airship_gate/templates/user-data.sub
+++ b/tools/multi_nodes_gate/airship_gate/templates/user-data.sub
@@ -14,3 +14,7 @@ chpasswd:
14 list: | 14 list: |
15 root:password 15 root:password
16 expire: false 16 expire: false
17
18ntp:
19 pools: [${NTP_POOLS}]
20 servers: [${NTP_SERVERS}]