Last active
August 29, 2015 14:21
-
-
Save Ramblurr/1c8517e60de73dff4303 to your computer and use it in GitHub Desktop.
Build Custom Fedora Atomic images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://git.fedorahosted.org/git/fedora-atomic.git | |
cd fedora-atomic | |
git checkout -b f22 origin/f22 | |
sudo -s | |
mkdir -p /srv/rpm-ostree/repo | |
pushd /srv/rpm-ostree/ | |
ostree --repo=repo init --mode=archive-z2 | |
popd | |
rpm-ostree compose tree --repo=/srv/rpm-ostree/repo fedora-atomic-docker-host.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
export VER=22 | |
yum update -y && yum install -y git pykickstart rpm-ostree-toolbox | |
systemctl enable libvirtd.service | |
# REBOOT | |
# virsh net-start default | |
mkdir fedora-atomic | |
cd fedora-atomic | |
mkdir "f${VER}" && cd "f${VER}" | |
wget "https://git.fedorahosted.org/cgit/fedora-atomic.git/plain/fedora-atomic-${VER}.tdl?h=f${VER}" -O fedora-atomic-${VER}.tdl | |
wget "https://git.fedorahosted.org/cgit/spin-kickstarts.git/plain/fedora-cloud-atomic.ks?h=f${VER}" -O fedora-cloud-atomic-${VER}.ks | |
tempfile=$(mktemp --suffix=.ks) | |
ksflatten -v F${VER} -c fedora-cloud-atomic-cloudstack-${VER}.ks > ${tempfile} | |
imagefactory --debug base_image --parameter generate_icicle false --file-parameter install_script ${tempfile} tdl-x86_64.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this to the .ks file for cloudstack cloud-init support | |
# ----- | |
# CloudStack uses its own metadata service that isn't compatible with | |
# EC2's. Here we force the use of the CloudStack datasource | |
# to prevent long boot times while cloud-init tries to bootstrap | |
# from the non-existent EC2 metadata source. | |
cat << EOF > /etc/cloud/cloud.cfg.d/90_datasource.cfg | |
datasource_list: [ NoCloud, CloudStack, None ] | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment