GuestI ( Guest Installer ) - a cloud machine image build automation tool. The main idea is to facilate the fact that majority of operating systems nowdays have their distribution and installer on the internet. So, to create a machine template all we need - is to boot and perform a scripted install of a selected OS directly from the internet. Cloud supported:
- C2 - Croc Cloud platform
- OS - OpenStack cloud platform
To boot a installer guest of the internet this tool needs iPXE loader, specifically configured to read boot commands from the cloud metadata URL.
After configuring your cloud environment (see below), you can spawn and snapshot an installer instance with:
$ U=http://mirror.yandex.ru/scientificlinux/6/x86_64/os
$ guesti {os|c2} install \
--template-name "Scientific Linux 6" \
--initrd $U/images/pxeboot/initrd.img \
--kernel "$U/images/pxeboot/vmlinuz repo=$U ks=http://storage.cloud.croc.ru/kss/ScientificLinux-6"
There are more examples in the examples/launchers/ directory. You can use them to create machine templates in your cloud. For example to create some images in OpenStack run:
guesti-os-install-centos-6
guesti-os-install-debian-7
guesti-os-install-debian-unstable
guesti-os-install-fedora-17
guesti-os-install-fedora-18
guesti-os-install-fedora-19
guesti-os-install-fedora-20
guesti-os-install-opensuse-factory
guesti-os-install-scientificlinux-6
In fedora:
yumdownloader --source ipx
rpm -i ipxe*.src.rpm
cp examples/custom-ipxe-build/SOURCES/script0.ipxe ~/rpmbuild/SOURCES/
(cd ~/rpmbuild/SPEC; patch) < examples/custom-ipxe-build/SPEC/ipxe.spec.patch
rpmbuild -bs ~/rpmbuild/SPEC/ipxe.spec
mock ~/rpmbuild/SRPMS/ipxe-*.src.rpm
- Get ipxe.iso from resulting rpm package.
- Get your c2rc file from the web console
- Build custom iPXE iso (see above).
- Source rc file into current shell.
- Upload custom iPXE iso file to c2fs. You can use command "guesti c2 upload_loader" or web UI. Please note snapshot ID.
- Specify ID of install loader snapshot. You can add them to your rc file for convinience:
export IPXE_SNAPSHOT_ID=snap-1F3FXXXX
. - Run one of the example launcher, like
guesti-os-install-centos-6
. See if it will succeed with the installation. - Run other tested examples for CrocCloud (e.g.
guesti-c2-*
) to create images for Debian, Fedora and so on. - Customize examples or make your own scripted install in the cloud using guesti.
- Get your OpenStack RC File from the web console
- Add
export OS_IMAGE_URL={your-glance-api-endpoint}
to rc file. - Build custom iPXE iso. (see above).
- Source rc file into current shell.
- Upload custom iPXE iso file. You can use command "guesti os upload_loader" or web UI.
- Specify IDs of install loader image, install flavor and install network. You can add them to your rc file for convinience:
export INSTALL_NETWORK_ID=bf083625-07b6-4d72-97a4-845d63945aa7
export INSTALL_FLAVOR_ID=c9f81043-ca2e-4fab-b5b9-c4380e0beb3a
export IPXE_IMAGE_ID=0cea4ad5-accf-4d1e-b0db-f3de0e6ceff6
- Run one of the example launcher, like
guesti-os-install-centos-6
. See if it succeed with the installation. - Run other tested examples for OpenStack (e.g.
guesti-os-*
) to create images for Debian, Fedora and so on. - Customize examples or make your own scripted install in the cloud using guesti.
- boto
- novaclient
- glanceclient
- keystoneclient
git clone git://github.com/YKonovalov/guesti
cd guesti
You can build and install guesti with setuptools:
python setup.py install
Or build RPM package:
make srpm
mock {src.rpm file}
yum install {noarch.rpm file}
This library tested on Linux. Should work on UNIXes as well once you'll have all dependencies in place.
Please file bug reports at https://github.com/YKonovalov/guesti
GPLv3+ Copyright © 2013 Yury Konovalov YKonovalov@gmail.com