5
Curtin developers make use of cloud-images and kvm to help develop and test new
11
Install some virtualization and cloud packages to get started.::
13
sudo apt-get -qy install kvm libvirt-bin cloud-utils bzr
18
Curtin will use two cloud images (-disk1.img) is for booting,
19
(-root.tar.gz) is used for installing.::
22
DLDIR=$( cd ~/download && pwd )
25
burl="http://cloud-images.ubuntu.com/$rel/current/"
26
for f in $rel-server-cloudimg-${arch}-root.tar.gz $rel-server-cloudimg-${arch}-disk1.img; do
27
wget "$burl/$f" -O $DLDIR/$f; done
28
( cd $DLDIR && qemu-img convert -O qcow $rel-server-cloudimg-${arch}-disk1.img $rel-server-cloudimg-${arch}-disk1.qcow2)
30
export BOOTIMG="$DLDIR/$rel-server-cloudimg-${arch}-disk1.qcow2"
31
export ROOTTGZ="$DLDIR/$rel-server-cloudimg-${arch}-root.tar.gz"
36
Download curtin source from launchpad via `bzr` command.::
39
bzr init-repo ~/src/curtin
40
( cd ~/src/curtin && bzr branch lp:curtin trunk.dist )
41
( cd ~/src/curtin && bzr branch trunk.dist trunk )
45
Use `launch` to launch a kvm instance with user data to pack up
46
local curtin and run it inside an instance.::
49
./tools/launch $BOOTIMG --publish $ROOTTGZ -- curtin install "PUBURL/${ROOTTGZ##*/}"
55
- launch has --help so you can see that for some info.
56
- `--publish` adds a web server at ${HTTP_PORT:-$RANDOM_PORT}
57
and puts the files you want available there. You can reference
58
this url in config or cmdline with 'PUBURL'. For example
59
`--publish foo.img` will put `foo.img` at PUBURL/foo.img.
60
- launch sets 'ubuntu' user password to 'passw0rd'
61
- launch runs 'kvm -curses'
62
kvm -curses keyboard info:
63
'alt-2' to go to qemu console
64
- launch puts serial console to 'serial.log' (look there for stuff)
66
- you can look at /var/log/cloud-init-output.log
67
- archive should be extracted in /curtin
68
- shell archive should be in /var/lib/cloud/instance/scripts/part-002