| commit | ba5bc5a9c55b12a96d9f14444e686d5088c2df4d | [log] [tgz] |
|---|---|---|
| author | Vasyl Saienko <vsaienko@mirantis.com> | Thu Nov 22 15:02:49 2018 +0200 |
| committer | Vasyl Saienko <vsaienko@mirantis.com> | Tue Dec 04 13:08:42 2018 +0000 |
| tree | 34d607468ec72421649a53d9176cf5cd30efcd6b | |
| parent | 393dc8e6f9fbfdc973cf6bc6d69fc62d0163ba4a [diff] |
Switch VCP to LVM based partitions
This patch switches qcow builder to build VCP with lvm based
partition inside. The disk split to 3 partitions:
1. 1MB partition needed for GPT
2. 1Gb boot partition
3. LVM partition
On LVM the following list of partitions is created:
* /
* /home
* /tmp
* /var/tmp
* /var/log
* /var/log/audit
Important: this will break default growroot cloudinit functionality.
To grow LVM automatically the foolowing data should be added to
cloudinit user-data.cfg
user_data:
growpart:
mode: auto
devices: ['/dev/vda3']
ignore_growroot_disabled: false
runcmd:
- [ 'pvresize', '/dev/vda3' ]
The name of LVM partition might be changed depending on the disk
model specified in VCP, by default is virtio.
Further partitioning size tuning should be done via linux formula.
Related-Prod: PROD-24537
Change-Id: Ie7699a747e73fd75b71ce8232b51fe97a310de64
Packer templates are used to:
PACKER_URL="https://dl.bintray.com/mitchellh/packer/packer_0.8.2_linux_amd64.zip" PACKER_ZIP=$(basename ${PACKER_URL}) PACKER_ZIP_MD5="bc37abe5e183a11bd8c1b2efc385059b" mkdir -p ~/bin/packer cd ~/bin/packer export PATH="${PATH}:~/bin/packer" wget -O ${PACKER_ZIP} ${PACKER_URL} echo "${PACKER_ZIP_MD5} ${PACKER_ZIP}" >> md5sum md5sum -c --status md5sum unzip ${PACKER_ZIP}
Enter build directory by selecting OS type and version. You should see file template.json.
Start building some images:
packer build -only=virtualbox-iso template.json
Directory http/ contains OS installer config files (preseed/kickstart/..)
Directory scripts/ contains set of scripts for provision after image build.