Update Fedora Atomic element from 23 to 24

Fedora Atomic 24 includes:
kernel-4.6.4-301.fc24.x86_64
docker-1.10.3-24.git29066b4.fc24.x86_64
kubernetes-1.2.0-0.24.git4a3f9c5.fc24.x86_64
atomic-1.10.5-1.gitce09e40.fc24.x86_64
rpm-ostree-2016.4-2.fc24.x86_64
flannel-0.5.5-6.fc24.x86_64
etcd-2.2.5-5.fc24.x86_64
cloud-init-0.7.6-8.20150813bzr1137.fc24.noarch

Change-Id: Iae0d0aeb09239c2d16d683442fe6dbfb09dd1bc5
This commit is contained in:
Spyros Trigazis 2016-07-20 13:55:53 +02:00 committed by Vijendar Komalla
parent a3a5817eeb
commit fb7980cf7b
3 changed files with 28 additions and 15 deletions

View File

@ -21,7 +21,8 @@ present:
For Debian/Ubuntu systems, use::
apt-get install python-dev build-essential python-pip kpartx python-lzma qemu-utils yum yum-utils python-yaml
apt-get install python-dev build-essential python-pip kpartx python-lzma \
qemu-utils yum yum-utils python-yaml git curl
For CentOS and Fedora < 22, use::
@ -31,18 +32,24 @@ For Fedora >= 22, use::
dnf install python-devel @development-tools python-pip kpartx python-backports-lzma @virtualization yum yum-utils python-yaml
diskimage-builder can be installed using pip::
pip install diskimage-builder
How to generate Fedora Atomic image
-----------------------------------
To generate an atomic image for Fedora 23 these commands can be
To generate an atomic image for Fedora 24 these commands can be
executed::
export ELEMENTS_PATH=/path/to/diskimage-builder/elements:/path/to/magnum/drivers/driver_name/image
export DIB_RELEASE=23 # this can be switched to the desired version
export DIB_IMAGE_SIZE=2.2 # we need to give a bit more space to loopback device
git clone https://git.openstack.org/openstack/magnum
git clone https://git.openstack.org/openstack/diskimage-builder.git
git clone https://git.openstack.org/openstack/dib-utils.git
export PATH="${PWD}/dib-utils/bin:$PATH"
export PATH="${PWD}/diskimage-builder/bin:$PATH"
export ELEMENTS_PATH="${PWD}/diskimage-builder/elements"
export ELEMENTS_PATH="${ELEMENTS_PATH}:${PWD}/magnum/magnum/drivers/image/image"
export DIB_RELEASE=24 # this can be switched to the desired version
export DIB_IMAGE_SIZE=2.5 # we need to give a bit more space to loopback device
disk-image-create fedora-atomic -o fedora-atomic
This element can consume already published trees, but you can use it
@ -58,10 +65,15 @@ FEDORA_ATOMIC_TREE_URL
:Required: Yes
:Description: Url for the public fedora-atomic tree to use. It can
reference to own published trees.
:Default: `https://kojipkgs.fedoraproject.org/atomic/23/ <https://kojipkgs.fedoraproject.org/atomic/23/>`_
:Default: `https://kojipkgs.fedoraproject.org/atomic/24/ <https://kojipkgs.fedoraproject.org/atomic/24/>`_
FEDORA_ATOMIC_TREE_REF
:Required: Yes
:Description: Reference of the tree to install.
:Default: 954bdbeebebfa87b625d9d7bd78c81400bdd6756fcc3205987970af4b64eb678
:Default: d9c8b8a31238e857f010c6fdc282f5f611d3c8af3e78caa891f7edb85822771b
You can use the defaults or export your url and reference, like following::
export FEDORA_ATOMIC_TREE_URL="https://kojipkgs.fedoraproject.org/atomic/24/"
export FEDORA_ATOMIC_TREE_REF="$(curl https://kojipkgs.fedoraproject.org/atomic/24/refs/heads/fedora-atomic/f24/x86_64/docker-host)"

View File

@ -1,2 +1,2 @@
export FEDORA_ATOMIC_TREE_URL=${FEDORA_ATOMIC_TREE_URL:-https://kojipkgs.fedoraproject.org/atomic/23/}
export FEDORA_ATOMIC_TREE_REF=${FEDORA_ATOMIC_TREE_REF:-954bdbeebebfa87b625d9d7bd78c81400bdd6756fcc3205987970af4b64eb678}
export FEDORA_ATOMIC_TREE_URL=${FEDORA_ATOMIC_TREE_URL:-https://kojipkgs.fedoraproject.org/atomic/24/}
export FEDORA_ATOMIC_TREE_REF=${FEDORA_ATOMIC_TREE_REF:-d9c8b8a31238e857f010c6fdc282f5f611d3c8af3e78caa891f7edb85822771b}

View File

@ -22,17 +22,18 @@ cp /etc/fstab $SYSROOT/etc/
DEPLOYED_DIRECTORY=$(find /boot/ostree -name fedora-atomic-* -type d)
DEPLOYED_ID=${DEPLOYED_DIRECTORY##*-}
INIT_IMAGE=$(find ${DEPLOYED_DIRECTORY} -name initramfs*.img)
VMLINUZ_IMAGE=$(find ${DEPLOYED_DIRECTORY} -name vmlinuz*)
# generate ostree boot
cat > /etc/grub.d/15_ostree <<EOF
cat <<EOL
menuentry 'Fedora 23 (ostree)' --class gnu-linux --class gnu --class os --unrestricted "ostree-0-${DIB_IMAGE_ROOT_FS_UUID}" {
menuentry 'Fedora 24 (ostree)' --class gnu-linux --class gnu --class os --unrestricted "ostree-0-${DIB_IMAGE_ROOT_FS_UUID}" {
set gfxpayload=text
insmod gzio
insmod part_msdos
insmod ext2
search --no-floppy --set=root --label ${DIB_ROOT_LABEL}
linux16 ${DEPLOYED_DIRECTORY}/vmlinuz root=LABEL=${DIB_ROOT_LABEL} ro nofb nomodeset vga=normal console=tty0 console=ttyS0,115200 no_timer_check rd.shell=0 ostree=/ostree/boot.1/fedora-atomic/${DEPLOYED_ID}/0
linux16 ${VMLINUZ_IMAGE} root=LABEL=${DIB_ROOT_LABEL} ro nofb nomodeset vga=normal console=tty0 console=ttyS0,115200 no_timer_check rd.shell=0 ostree=/ostree/boot.1/fedora-atomic/${DEPLOYED_ID}/0
initrd16 ${INIT_IMAGE}
}
EOL