Last active
August 29, 2015 14:07
-
-
Save robinwl/8c0a448e479f7c240b4b to your computer and use it in GitHub Desktop.
Vagrant shell provisioner that installs RVM, Ruby, Bundler, Node.js, redis & MongoDB
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
# Set non-interactive mode | |
export DEBIAN_FRONTEND=noninteractive | |
# Update package mirrors and update base system | |
apt-get update | |
apt-get -y dist-upgrade | |
# Install packages | |
apt-get -y install git tree curl | |
# Install RVM, ruby and ruby gems | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3 | |
\curl -sSL https://get.rvm.io | bash -s stable --ruby | |
usermod -a -G rvm vagrant | |
# Oh my zsh | |
apt-get -y install zsh | |
su - vagrant -c "curl -sL http://install.ohmyz.sh | sh" | |
chsh -s `which zsh` vagrant | |
if [ -f "/home/vagrant/.zshrc" ] ; then | |
sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="muse"/g' /home/vagrant/.zshrc | |
grep -q -F 'setopt menu_complete' /home/vagrant/.zshrc || echo 'setopt menu_complete' >> /home/vagrant/.zshrc | |
grep -q -F 'export LC_ALL=en_US.UTF-8' /home/vagrant/.zshrc || echo 'export LC_ALL=en_US.UTF-8' >> /home/vagrant/.zshrc | |
grep -q -F 'export LANG=en_US.UTF-8' /home/vagrant/.zshrc || echo 'export LANG=en_US.UTF-8' >> /home/vagrant/.zshrc | |
fi | |
# Bundler | |
printf "\n\n" | |
echo "Installing bundler via gem.. this can take a minute.." | |
gem install bundler | |
# Install Node.js and varius tools | |
\curl -sL https://deb.nodesource.com/setup | bash - | |
apt-get -y install nodejs | |
npm install gulp -g | |
npm install grunt -g | |
# Redis | |
apt-get -y install redis-server | |
# MongoDB | |
apt-get -y install mongodb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment