mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-07 08:51:50 +00:00
Merge Dave's changes: Use boot-partition for c-i seed on RPi
Configure cloud-init to look for its seed in the vFAT boot partition on raspberry pi images; the corresponding gadget is configured to place the user-data, meta-data, and network-config files there. Source: ~waveform/ubuntu/+source/livecd-rootfs:cloud-init-boot
This commit is contained in:
parent
44f91a2784
commit
d830cfccee
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
|||||||
|
livecd-rootfs (2.593) eoan; urgency=medium
|
||||||
|
|
||||||
|
* Use boot-partition for cloud-init seed on RPi
|
||||||
|
|
||||||
|
-- Dave Jones <dave.jones@canonical.com> Thu, 06 Jun 2019 08:29:57 +0000
|
||||||
|
|
||||||
livecd-rootfs (2.592) eoan; urgency=medium
|
livecd-rootfs (2.592) eoan; urgency=medium
|
||||||
|
|
||||||
* Drop trying to mount removed maas squashfs.
|
* Drop trying to mount removed maas squashfs.
|
||||||
|
@ -24,28 +24,13 @@ arch=$(_xchroot "${rootd}" dpkg --print-architecture)
|
|||||||
|
|
||||||
fake_cloud_init() {
|
fake_cloud_init() {
|
||||||
# If the cloud does not provide a meta-data service this should be run
|
# If the cloud does not provide a meta-data service this should be run
|
||||||
# This will setup a nocloud datasource.
|
# This will setup a nocloud datasource on the boot partition.
|
||||||
|
cat << EOF > ${rootd}/etc/cloud/cloud.cfg.d/99-fake_cloud.cfg
|
||||||
seed_d="${rootd}/var/lib/cloud/seed/nocloud-net"
|
|
||||||
mkdir -p "${seed_d}"
|
|
||||||
|
|
||||||
# fake instance-id
|
|
||||||
cat << EOF > "${seed_d}/meta-data"
|
|
||||||
instance_id: cloud-image
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# fake user-data to create the default user/password
|
|
||||||
cat << EOF > "${seed_d}/user-data"
|
|
||||||
#cloud-config
|
|
||||||
password: ubuntu
|
|
||||||
chpasswd: ubuntu
|
|
||||||
ssh_pwauth: True
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# tell cloud-init not to look for meta-data sources
|
|
||||||
cat << EOF > ${rootd}/etc/cloud/cloud.cfg.d/99-fake_cloud.cfg
|
|
||||||
# configure cloud-init for NoCloud
|
# configure cloud-init for NoCloud
|
||||||
datasource_list: [ NoCloud, None ]
|
datasource_list: [ NoCloud, None ]
|
||||||
|
datasource:
|
||||||
|
NoCloud:
|
||||||
|
fs_label: system-boot
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user