Shell scripts for provisioning a Gentoo box as a web server.
This set of scripts are design to run with my Gentoo Vagrant box that you can acquire from https://vagrantcloud.com/cmiles/boxes/gentoo-amd64-minimal.
Use the following line for provisioning the box. But change the args string to suit where you place these scripts (based on where they will appear in the Vagrant box)
config.vm.provision "shell", path: "./provision.sh", args: "/vagrant"
This set of script will attempt to mount a second disk for the MySQL database. For this to work, you need to add the following to your Vagrantfile.
config.vm.provider :virtualbox do |vb|
file_to_disk = File.dirname(__FILE__) + '/vagrant-mysql.vdi'
unless File.exist?(file_to_disk)
vb.customize ['createhd', '--filename', file_to_disk, '--size', 200 * 1024]
end
vb.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end
If you don't want to use a second disk, remove the call to 30-mount-mysql-disk.sh
from provision.sh
.