Browse Source

Add support for NTP in gate-multinode

This allows configuring NTP pools/servers for nodes
bootstrap-ed by gate-multinode.

Change-Id: I0f29f16d3d7d2a44e0e01732b74032068b03e1a3
changes/06/637606/6
Kaspars Skels 3 months ago
parent
commit
abf676210b

+ 2
- 0
tools/multi_nodes_gate/airship_gate/lib/config.sh View File

@@ -17,6 +17,8 @@ export VIRSH_POOL=${VIRSH_POOL:-airship}
17 17
 export VIRSH_POOL_PATH=${VIRSH_POOL_PATH:-/var/lib/libvirt/airship}
18 18
 export VIRSH_CPU_OPTS=${VIRSH_CPU_OPTS:-host}
19 19
 export UPSTREAM_DNS=${UPSTREAM_DNS:-"8.8.8.8 8.8.4.4"}
20
+export NTP_POOLS=${NTP_POOLS:-"0.ubuntu.pool.ntp.org 1.ubuntu.pool.ntp.org"}
21
+export NTP_SERVERS=${NTP_SERVERS:-""}
20 22
 
21 23
 export SHIPYARD_PASSWORD=${SHIPYARD_OS_PASSWORD:-'password18'}
22 24
 export AIRSHIP_KEYSTONE_URL=${AIRSHIP_KEYSTONE_URL:-'http://keystone.gate.local:80/v3'}

+ 2
- 0
tools/multi_nodes_gate/airship_gate/lib/virsh.sh View File

@@ -42,6 +42,8 @@ iso_gen() {
42 42
     export BR_IP_NODE
43 43
     export NAME
44 44
     export SSH_PUBLIC_KEY
45
+    export NTP_POOLS=$(join_array ',' $NTP_POOLS)
46
+    export NTP_SERVERS=$(join_array ',' $NTP_SERVERS)
45 47
     envsubst < "${TEMPLATE_DIR}/user-data.sub" > user-data
46 48
 
47 49
     if [[ ! -z "${ADDL_USERDATA}" ]]

+ 4
- 0
tools/multi_nodes_gate/airship_gate/templates/user-data.sub View File

@@ -14,3 +14,7 @@ chpasswd:
14 14
   list: |
15 15
     root:password
16 16
   expire: false
17
+
18
+ntp:
19
+  pools: [${NTP_POOLS}]
20
+  servers: [${NTP_SERVERS}]

Loading…
Cancel
Save