Increase size of operator to allow building images

This is only implemented for libvirt provider at the moment.

Partially-Implements: blueprint vagrant-improvements
Change-Id: I72a2c32d7b5966a255eefcf687533023e84280da
This commit is contained in:
Martin André 2015-09-14 23:19:21 +09:00
parent 1228cc8365
commit 172103749e
2 changed files with 25 additions and 0 deletions

6
vagrant/Vagrantfile vendored
View File

@ -82,6 +82,12 @@ Vagrant.configure(2) do |config|
admin.vm.synced_folder ".", "/home/vagrant/sync", disabled: true
admin.vm.provider PROVIDER do |vm|
vm.memory = MULTINODE ? 1024 : 4096
if PROVIDER == 'libvirt'
# This only works with libvirt provider.
# We should be able to do something similar for virtualbox
# http://askubuntu.com/questions/317338/how-can-i-increase-disk-size-on-a-vagrant-vm
vm.machine_virtual_size = 40
end
end
admin.hostmanager.aliases = "operator"
end

View File

@ -61,6 +61,24 @@ EOF
usermod -aG docker vagrant
}
function resize_partition {
fdisk /dev/vda <<EOF
n
p
t
8e
w
EOF
partprobe
pvcreate /dev/vda4
vgextend VolGroup00 /dev/vda4
lvextend /dev/VolGroup00/LogVol00 /dev/vda4
resize2fs /dev/VolGroup00/LogVol00
}
# Configure the operator node and install some additional packages.
function configure_operator {
yum install -y git mariadb && yum clean all
@ -127,5 +145,6 @@ prep_work
install_docker
if [ "$1" = "operator" ]; then
resize_partition
configure_operator
fi