Last active
February 4, 2020 22:06
-
-
Save adeoke/dc10c6491a9ad299033e7932efc0f186 to your computer and use it in GitHub Desktop.
Setup a vagrant, virtualbox and virtualbox extensions on macos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Vagrant and virtualbox install script with relatively useful vagrant plugins | |
# and virtualbox extensions pack (this is needed for USB 2.0 and 3.0 device support, webcam, | |
# remote vm support, disk image encryption and Intel PXE Boot ROM support). | |
# NB: Be advised! | |
# The virtual box extensions requires root access, as such this script should be executed with sudo privileges. | |
# You may also want to separately install xcode, and xcode command line tools | |
# (this script has not been tested with the absense of those tools). | |
echo "installing homebrew, unless it's already installed" | |
if test ! $(which brew); then | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
fi | |
echo "check homebrew status on your machine" | |
brew doctor | |
brew update | |
echo "Preparing casks for install." | |
CASKS=( | |
vagrant | |
virtualbox | |
virtualbox-extension-pack | |
) | |
echo "Installing cask applications." | |
for i in "${CASKS[@]}"; do | |
echo "Installing cask app $i" | |
brew cask install "$i" | |
done | |
echo "Check the list of brew installed applications" | |
brew list | |
echo "Preparing commonly used vagrant plugins." | |
VAGRANT_PLUGINS=( | |
vagrant-disksize | |
vagrant-hostsupdater | |
vagrant-timezone | |
vagrant-vbguest | |
) | |
echo "Installing vagrant plugins." | |
for i in "${VAGRANT_PLUGINS[@]}"; do | |
echo "Installing vagrant plugin $i" | |
vagrant plugin install "$i" | |
done | |
echo "list vagrant plugins" | |
vagrant plugin list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment