diff --git a/Vagrantfile b/Vagrantfile index 4d4affa3ec30341113f6c7c10ecb165d3a4c69cd..4df345bd05b8bd500d7dc7795164466a4fc78f06 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -6,8 +6,11 @@ Vagrant.configure('2') do |config| config.vm.network 'private_network', ip: '192.168.33.3', auto_config: false - config.vm.box = 'stackhpc/centos-7' - config.vm.box_version = '0.2.0' + config.vm.box = 'centos/8' + + # The default CentOS box comes with a root disk that is too small to fit a + # deployment on so we need to make it bigger. + config.disksize.size = '20GB' config.vm.provider 'virtualbox' do |vb| vb.memory = '4096' @@ -21,6 +24,18 @@ Vagrant.configure('2') do |config| end config.vm.provision 'shell', inline: <<-SHELL + + # Extend the root disk + sudo parted "/dev/sda" ---pretend-input-tty <<EOF +resizepart +1 +100% +Yes +-0 +quit +EOF + sudo xfs_growfs -d / + echo "cat > /etc/selinux/config << EOF SELINUX=disabled SELINUXTYPE=targeted @@ -40,7 +55,6 @@ BOOTPROTO=none IPADDR=192.168.33.3 NETMASK=255.255.255.0 ONBOOT=yes -NM_CONTROLLED=no EOF sudo ifup eth1 diff --git a/doc/source/development/vagrant.rst b/doc/source/development/vagrant.rst index 5955f69dfa133925d165298a8dcf0c16edf53ab3..d54947da3f12bd4b39b0824c574be47bb7b98220 100644 --- a/doc/source/development/vagrant.rst +++ b/doc/source/development/vagrant.rst @@ -5,23 +5,23 @@ Vagrant ======= Kayobe provides a Vagrantfile that can be used to bring up a virtual machine -for use as a development environment. The VM is based on the `stackhpc/centos-7 -<https://app.vagrantup.com/stackhpc/boxes/centos-7>`_ CentOS 7 image, and +for use as a development environment. The VM is based on the `centos/8 +<https://app.vagrantup.com/centos/boxes/8>`_ CentOS 8 image, and supports the following providers: * VirtualBox * VMWare Fusion -The VM is configured with 4GB RAM. It has a single private network in addition +The VM is configured with 4GB RAM and a 20GB HDD. It has a single private network in addition to the standard Vagrant NAT network. Preparation =========== First, ensure that Vagrant is installed and correctly configured to use -the required provider. Also install the following vagrant plugin:: +the required provider. Also install the following vagrant plugins:: - vagrant plugin install vagrant-reload + vagrant plugin install vagrant-reload vagrant-disksize If using the VirtualBox provider, install the following vagrant plugin::