Skip to content

Commit 2dbf78c

Browse files
committed
bootc cloud-init updates
cloud-init cloud-config updates: - Set passwords for root and cloud-admin users - gateway4 key is deprecated, use routes instead Also changes the script to run genisoimage every time instead of checking if it already exists. It's not an expensive operation, and since the cloud-init files are already overwritten every time, the iso should be rebuilt every time as well to avoid confusion. Signed-off-by: James Slagle <[email protected]>
1 parent b989130 commit 2dbf78c

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

devsetup/scripts/gen-edpm-node-bootc.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ export SSH_PUBLIC_KEY_CONTENTS="$(cat ${SSH_PUBLIC_KEY})"
3131

3232
cat > ${EDPM_BOOTC_OUTPUT_DIR}/user-data <<EOF
3333
#cloud-config
34+
chpasswd:
35+
users:
36+
- {name: root, password: "12345678", type: text}
37+
- {name: cloud-admin, password: "12345678", type: text}
38+
expire: False
3439
hostname: ${EDPM_COMPUTE_NAME}
3540
fqdn: ${EDPM_COMPUTE_NAME}.${EDPM_COMPUTE_DOMAIN}
3641
create_hostname_file: true
@@ -66,17 +71,17 @@ network:
6671
enp2s0:
6772
match:
6873
name: enp2s0
69-
gateway4: 192.168.122.1
74+
routes:
75+
- to: 0.0.0.0/0
76+
via: 192.168.122.1
7077
addresses:
7178
- ${IP}/${PREFIX}
7279
nameservers:
7380
addresses:
7481
- ${DATAPLANE_DNS_SERVER}
7582
EOF
7683

77-
if [ ! -f ${EDPM_BOOTC_OUTPUT_DIR}/cidata.iso ]; then
78-
genisoimage -output ${EDPM_BOOTC_OUTPUT_DIR}/cidata.iso -V CIDATA -r -J ${EDPM_BOOTC_OUTPUT_DIR}/user-data ${EDPM_BOOTC_OUTPUT_DIR}/meta-data ${EDPM_BOOTC_OUTPUT_DIR}/network-config
79-
fi
84+
genisoimage -output ${EDPM_BOOTC_OUTPUT_DIR}/cidata.iso -V CIDATA -r -J ${EDPM_BOOTC_OUTPUT_DIR}/user-data ${EDPM_BOOTC_OUTPUT_DIR}/meta-data ${EDPM_BOOTC_OUTPUT_DIR}/network-config
8085

8186
sudo podman run --rm -it --privileged \
8287
-v ${OUTPUT_DIR}:/target:z \

0 commit comments

Comments
 (0)