Merge "[#45] Switch cloud-init to network_data.json"
This commit is contained in:
commit
61b2843829
@ -24,19 +24,16 @@ LABEL org.opencontainers.image.authors='airship-discuss@lists.airshipit.org, irc
|
||||
org.opencontainers.image.licenses='Apache-2.0'
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl\
|
||||
debootstrap \
|
||||
grub-efi-amd64-bin \
|
||||
grub-pc-bin \
|
||||
mtools \
|
||||
squashfs-tools \
|
||||
xorriso \
|
||||
curl\
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY ./files/build.sh /builder/
|
||||
COPY ./files/functions.sh /builder/
|
||||
COPY ./files/grub.conf /builder/
|
||||
COPY ./files/packages_install.sh /builder/
|
||||
COPY files/ /builder/
|
||||
|
||||
RUN curl -L https://github.com/mikefarah/yq/releases/download/2.4.0/yq_linux_amd64 -o /bin/yq \
|
||||
&& chmod +x /bin/yq
|
||||
|
@ -25,9 +25,11 @@ _debootstrap
|
||||
|
||||
chroot "${CHROOT}" < "${BASEDIR}/packages_install.sh"
|
||||
|
||||
cat "${NET_CONFIG}" >> "${CHROOT}/etc/cloud/cloud.cfg.d/network-config.cfg"
|
||||
cat "${USER_DATA}" >> "${CHROOT}/etc/cloud/cloud.cfg.d/user-data.cfg"
|
||||
echo "datasource_list: [ NoCloud, None ]" > \
|
||||
mkdir -p "${CLOUD_DATA_LATEST}"
|
||||
cp "${BASEDIR}/meta_data.json" "${CLOUD_DATA_LATEST}"
|
||||
cp "${USER_DATA}" "${CLOUD_DATA_LATEST}/user_data"
|
||||
cp "${NET_CONFIG}" "${CLOUD_DATA_LATEST}/network_data.json"
|
||||
echo "datasource_list: [ ConfigDrive, None ]" > \
|
||||
"${CHROOT}/etc/cloud/cloud.cfg.d/95_no_cloud_ds.cfg"
|
||||
|
||||
_make_kernel
|
||||
|
@ -60,7 +60,7 @@ function _make_iso(){
|
||||
-as mkisofs \
|
||||
-iso-level 3 \
|
||||
-full-iso9660-filenames \
|
||||
-volid "DEBIAN_CUSTOM" \
|
||||
-volid "config-2" \
|
||||
--grub2-boot-info \
|
||||
--grub2-mbr /usr/lib/grub/i386-pc/boot_hybrid.img \
|
||||
-eltorito-boot \
|
||||
@ -82,6 +82,7 @@ function _make_metadata(){
|
||||
function _check_input_data_set_vars(){
|
||||
CHROOT="${HOME}/LIVE_BOOT/chroot"
|
||||
export CHROOT
|
||||
export CLOUD_DATA_LATEST="${HOME}/LIVE_BOOT/image/openstack/latest"
|
||||
echo "${BUILDER_CONFIG:?}"
|
||||
if [ ! -f "${BUILDER_CONFIG}" ]
|
||||
then
|
||||
|
5
debian-isogen/files/meta_data.json
Normal file
5
debian-isogen/files/meta_data.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"hostname": "ephemeral",
|
||||
"name": "ephemeral",
|
||||
"uuid": "83679162-1378-4288-a2d4-70e13ec132aa"
|
||||
}
|
@ -25,7 +25,8 @@ apt-get update && apt-get install -y --no-install-recommends \
|
||||
curl \
|
||||
gnupg \
|
||||
iptables
|
||||
echo "deb http://ftp.debian.org/debian unstable main" >> /etc/apt/sources.list
|
||||
UNSTABLE_REPO="deb http://ftp.debian.org/debian unstable main"
|
||||
echo "${UNSTABLE_REPO}" >> /etc/apt/sources.list.d/unstable.list
|
||||
apt-get update && apt-get install -y --no-install-recommends \
|
||||
cloud-init
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
rm -rf /etc/apt/sources.list.d/unstable.list /var/lib/apt/lists/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user