1 .TH build\-openstack\-debian\-image 1
3 build\-openstack\-debian\-image \- build a Debian image to be used with OpenStack
5 .B build\-openstack\-debian\-image
6 .B \-\-release|\-r <jessie|wheezy>
12 .I build\-openstack\-debian\-image
13 shell script will build a Debian image which can be used in an OpenStack IaaS
14 cloud. The resulting (Qcow2 and raw images) contains initramfs\-growroot so
15 that the root partition will be resized (during the initramfs phase, before
16 mouting anything) to match the flavor selected when using "nova boot". Later on
17 during the boot process, cloud\-init will resize the root partition on the fly
18 (resize is performed when the partition is already mounted read\-write, since
19 recent kernel allow that for ext3).
21 Cloud\-init is setup to use an Ec2 metadata server, which is what OpenStack is
22 compatible with. A "debian" user will be used to receive the ssh key from the
23 user data blob. This user is setup without a password (eg: adduser
24 \-\-disabled\-password). Once logged as this "debian" user in your new virtual
25 machine, you can "sudo" to root from that user, without needing a password. The
26 root password is "password" by default, and ssh into the root user without
27 using an ssh keypair is disabled by default (PermitRootLogin without-password
28 is set in /etc/ssh/sshd_config).
39 name to be installed. Currently only 2 values a possible:
47 .B \-\-extra\-packages|\-e
48 .I PACKAGE,PACKAGE,...
53 you want to add to the image
54 .I default is: bash-completion,joe,most,screen,less,vim,bzip2
55 Note that this list of extra packages isn't used if you use the
60 .B \-\-debootstrap\-url|\-u
61 .I <debootstrap\-debian\-mirror>
66 of the Debian mirror to use to perform the debootstrap. For example:
67 .I http://ftp.fr.debian.org/debian
70 .B \-\-sources.list\-mirror|\-s
71 .I <source\-list\-mirror>
74 URL to use when building the sources.list inside the chroot. If this
75 option is ommited, then the global http.debian.net redirector is used.
76 For example, you can use:
77 .I http://ftp.fr.debian.org/debian
83 Without this option, the following packages will also be installed:
84 bash\-completion (and /etc/bash.bashrc will be setup to use bash\-completion),
85 joe (the text editor), most, GNU screen, less and vim. If you believe that
86 more things should be added in the non\-minimal image, suggestions are
90 .B \-\-image-size|\-is
94 Select the image size (default to 1 GBytes if this option is ommited). Only
95 useful if you need to use a custom script hook (see below).
98 .B \-\-automatic-resize|\-ar
101 Reduce the image to the minimum HDD size possible. The partition of the
102 image will be first shrinked with resize2fs \-M, then the space it takes will
103 be used to do a 2nd resize2fs adding a bit of extra space for the operating
104 system to write runtime data (see below). Since this option takes a lot of
105 time, it is disabled by default.
108 .B \-\-automatic\-resize\-space|\-ars
109 .I <suplementary-space>
112 Size of the suplementary space added to the partition after it is resized
113 to the minimum. If this option is ommited, then 50G is used. If
114 .B \-\-automatic-resize
115 isn't used, then it is useless to set this option, which will be ignored.
122 Defines a default root password for your image. This option is dangerous,
123 first because it will show the root password to the user of the computer
124 building the image if using "ps", then also because it is best to not set
125 a default root password at all if possible. However, this option is still
126 there, because sometimes, you need to be able to debug your image, and
127 login through the web console of horizon. In a production environment, do
131 .B \-\-hook\-script|\-hs
135 If you wish to further customize the generated cloud image, you can use a
136 hook script. When called, build-openstack-debian-image will fill up some
137 BODI_* environment variable for the hook script to use as per below:
140 path where the image is mounted
143 name of the Debian release that is being bootstraped
149 Here is an example with the short parameter names:
152 .I build\-openstack\-debian\-image \-u http://ftp.fr.debian.org/debian \-s \
153 http://ftp.fr.debian.org/debian \-is 5 \-e libapache2\-mod\-php5 \-hs \
154 ~/customize\-my\-image \-ar \-ars 100
157 And the same but with long names for options:
160 .I build-openstack-debian-image \-\-debootstrap\-url http://ftp.fr.debian.org/debian \
161 \-\-sources.list\-mirror http://ftp.fr.debian.org/debian \-\-image-size 5 \
162 \-\-extra\-packages libapache2-mod-php5 \-\-hook\-script ~/customize\-my\-image \
163 \-\-automatic-resize \-\-automatic\-resize\-space 100
167 build\-openstack\-debian\-image has been written by Thomas Goirand
168 <zigo@debian.org>, with contributions from Mehdi Abaakouk