Last active
August 29, 2015 14:11
-
-
Save artfaal/e42e95ede70fcdd951d0 to your computer and use it in GitHub Desktop.
Vagrant for VirtualBox and Digital Ocean
This file contains hidden or 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 | |
# Start template for Russia/Moscow | |
echo "Update all" | |
apt-get update > /dev/null | |
echo "Upgrade all" | |
sudo apt-get upgrade -y > /dev/null | |
echo "Change timezone to Moscow" | |
sudo /bin/ln -fs /usr/share/zoneinfo/Europe/Moscow /etc/localtime > /dev/null | |
echo "Add Russian Pack" | |
sudo apt-get install -y language-pack-ru > /dev/null |
This file contains hidden or 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 | |
# Userful thing for install. | |
#PYTHON | |
#Install Pip | |
apt-get install -y python-pip python-dev build-essential | |
#Support Pillow | |
apt-get install -y python-dev libjpeg-dev libjpeg8-dev libpng3 libfreetype6-dev | |
ln -s /usr/lib/i386-linux-gnu/libfreetype.so /usr/lib | |
ln -s /usr/lib/i386-linux-gnu/libjpeg.so /usr/lib | |
ln -s /usr/lib/i386-linux-gnu/libz.so /usr/lib | |
pip install PIL --allow-unverified PIL --allow-all-external | |
# ----------------------- | |
#Install Mongo | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list | |
sudo apt-get update | |
sudo apt-get install -y mongodb-org | |
#Restore DB | |
#mongorestore PATH | |
# ----------------------- |
This file contains hidden or 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
# -*- mode: ruby -*- | |
# Vagrant makefile for VirtualBox | |
box = 'Ubuntu/trusty64' | |
hostname = '' | |
ram = '512' | |
Vagrant.configure(2) do |config| | |
config.vm.box = box | |
config.vm.host_name = hostname | |
config.vm.network "forwarded_port", guest: 5000, host: 5000 | |
config.vm.provision "shell", path: "bootstrap.sh" | |
config.vm.provider "virtualbox" do |vb| | |
vb.memory = ram | |
vb.name = hostname | |
end | |
end |
This file contains hidden or 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
# -*- mode: ruby -*- | |
# Vagrant makefile for Digital Ocean | |
DO_TOKEN ='' # Important! | |
hostname = '' # Name of the host and VM | |
ram = '512' | |
SSH_KEY_NAME = '' | |
DISTR = 'ubuntu-14-10-x64' # vagrant digitalocean-list images TOKEN | |
REGION = 'lon1' | |
Vagrant.configure(2) do |config| | |
config.vm.host_name = hostname | |
config.vm.network "forwarded_port", guest: 6400, host: 6400, | |
auto_correct: true | |
config.vm.provision "shell", path: "bootstrap.sh" | |
config.vm.synced_folder "./www/", "/var/www", create: true, group: "www-data", owner: "www-data" | |
config.vm.provider :digital_ocean do |provider, override| | |
override.ssh.private_key_path = '~/.ssh/id_rsa' | |
override.vm.box = 'digital_ocean' | |
override.vm.box_url = "https://github.com/smdahlen/vagrant-digitalocean/raw/master/box/digital_ocean.box" | |
provider.ssh_key_name = SSH_KEY_NAME | |
provider.token = DO_TOKEN | |
provider.image = DISTR | |
provider.region = REGION | |
provider.size = ram + 'mb' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment