Skip to content

Instantly share code, notes, and snippets.

@dcai
Last active December 10, 2018 11:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dcai/5eb9518eccf9e73cf4bc6bb68dab4529 to your computer and use it in GitHub Desktop.
Save dcai/5eb9518eccf9e73cf4bc6bb68dab4529 to your computer and use it in GitHub Desktop.
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.box_check_update = false
config.vm.network "forwarded_port", guest: 9001, host: 9001
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
config.vm.network "public_network"
#config.vm.synced_folder ".", "/home/ubuntu/vagrant"
config.vm.synced_folder "D:\\Dropbox", "/home/ubuntu/Dropbox"
#config.vm.synced_folder "D:\\src", "/src"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
config.vm.provider "virtualbox" do |vb|
# vb.gui = true
vb.memory = "4096"
end
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end
# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
export VBOXGUESTISOVERSION="5.0.22"
cd /tmp
wget --quiet "http://download.virtualbox.org/virtualbox/${VBOXGUESTISOVERSION}/VBoxGuestAdditions_${VBOXGUESTISOVERSION}.iso"
mkdir /tmp/iso
mount -o loop "VBoxGuestAdditions_${VBOXGUESTISOVERSION}.iso" /tmp/iso
cd /tmp/iso
sh VBoxLinuxAdditions.run --nox11
# java 8
#add-apt-repository -y ppa:webupd8team/java
#echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections
# nodejs
curl -sL https://deb.nodesource.com/setup_7.x | bash -
# jenkins
#wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
#sh -c 'echo deb http://pkg.jenkins-ci.org/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
# sbt
#echo "deb https://dl.bintray.com/sbt/debian /" | tee -a /etc/apt/sources.list.d/sbt.list
#apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 642AC823
apt-add-repository ppa:fish-shell/release-2
apt-get update
# build libs
apt-get install libncurses5 libncurses5-dev build-essential python-dev
# programming language
apt-get install nodejs ruby python3 python3-pip python python-pip
# utils
apt-get install -y aptitude htop vim tmux git tig cmake \
tree silversearcher-ag jq colordiff fish pv ncdu \
aria2 ispell exuberant-ctags
# php stack
apt-get install nginx php-fpm php7.0-mbstring php7.0-xml php7.0-curl \
php7.0-zip php7.0-gd php7.0-intl php7.0-soap php7.0-xmlrpc
# db
apt-get install mariadb-client mariadb-server
# linuxbrew
# brew install vim
# pip install -U mycli pgcli
# gem install --user tmuxinator
# apt-get install oracle-java8-installer
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment