Skip to content

Commit 81f17ed

Browse files
Merge pull request #997 from slagle/bootc-cloud-init-updates
bootc cloud-init updates
2 parents e26d99f + 2dbf78c commit 81f17ed

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)