ReleaseEngineering/PuppetAgain/Base Images: Difference between revisions

→‎CentOS 6.2 on Ganeti KVM: let's not do ganeti anymore
(→‎CentOS 6.2 on Ganeti KVM: let's not do ganeti anymore)
Line 68: Line 68:


<b>This will reboot the system into the netboot image with the Deploy Studio runtime where Deploy Studio workflow will handle installing puppetize.sh and org.mozilla.puppetize.plist to be launched on first boot</b>
<b>This will reboot the system into the netboot image with the Deploy Studio runtime where Deploy Studio workflow will handle installing puppetize.sh and org.mozilla.puppetize.plist to be launched on first boot</b>
= CentOS 6.2 on Ganeti KVM =
== Installed image ==
Install a minimal config with CentOS-6.2 install media:
First, create a new OS type if necessary - add
IMAGE_NAME="centos-62"
ARCH=x86_64
IMAGE_TYPE=dump
CDINSTALL=no
to <tt>/etc/ganeti/instance-image/variants/centos-62.conf</tt>, and add it to <tt>/etc/ganeti/instance-image/variants.list</tt>.
Send it everywhere:
gnt-cluster copyfile /etc/ganeti/instance-image/variants/centos-62.conf
gnt-cluster copyfile /etc/ganeti/instance-image/variants.list
modify your test VM to use this new image type:
gnt-instance modify -o image+centos-62 relabs-buildbot-master
and then start the install.  I'm using a CD:
gnt-instance modify -H boot_order=cdrom,cdrom_image_path=/tmp/CentOS-6.2-x86_64-netinstall.iso relabs-buildbot-master
gnt-instance reboot relabs-buildbot-master
A few hints: /dev/vda1 = boot, /dev/vda2 = swap, /dev/vda3 = root; use ext3/4; *no* LVM!  Do a minimal install.
Halt this and dump it:
/usr/lib/ganeti/os/image/tools/make-dump relabs-buildbot-master
This is your installed image - it's just CentOS.
== Base Image ==
Now, to create the base image that automatically puppetizes.
reinstall, to get the ganeti-instance-image networking, console, etc. set up
gnt-instance reinstall relabs-buildbot-master
On another system, run 'make' in the setup subdirectory of http://hg.mozilla.org/build/puppet, to get a copy of base-image-centos6.sh.  Copy this and paste it into /root/base-image-centos6.sh on the destination machine:
<pre>
cat >base-image-centos6.sh <<'PASTE'
[[paste it here]]
PASTE
sh base-image-centos6.sh
</pre>
After some action, and after asking for the deploy password, the system halts, ready to be imaged.
gnt-instance modify -o image+releng-base-centos-62 relabs-buildbot-master
/usr/lib/ganeti/os/image/tools/make-dump relabs-buildbot-master
canmove, Confirmed users
1,394

edits