Last active
August 29, 2015 14:06
-
-
Save maccman/a2f52d067572dcb71dd3 to your computer and use it in GitHub Desktop.
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
Vagrant::configure('2') do |config| | |
config.vm.define :box1, autostart: false do |box| | |
box.vm.box = 'raring' | |
box.vm.box_url = 'https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box' | |
box.vm.hostname = 'example.com' | |
box.vm.provider :aws do |aws, override| | |
aws.access_key_id = ENV['AWS_ACCESS_KEY_ID'] | |
aws.secret_access_key = ENV['AWS_SECRET_ACCESS_KEY'] | |
aws.keypair_name = 'aws' | |
aws.ami = 'ami-864d84ee' | |
aws.instance_type = 'm3.xlarge' | |
# Customize this to the security group you're using | |
aws.security_groups = 'production' | |
# To mount EBS volumes | |
aws.block_device_mapping = [ | |
{ | |
:DeviceName => "/dev/sdb", | |
:VirtualName => "ephemeral0" | |
}, | |
{ | |
:DeviceName => "/dev/sdc", | |
:VirtualName => "ephemeral1" | |
} | |
] | |
override.ssh.username = 'ubuntu' | |
# Customize this to your AWS keypair path | |
override.ssh.private_key_path = '~/.ssh/aws.pem' | |
end | |
# To make sure we use EBS for our tmp files | |
box.vm.provision "shell" do |s| | |
s.privileged = true | |
s.inline = %{ | |
mkdir -m 1777 /mnt/tmp | |
echo 'export TMPDIR=/mnt/tmp' > /etc/profile.d/tmpdir.sh | |
} | |
end | |
# To make sure packages are up to date | |
box.vm.provision "shell" do |s| | |
s.privileged = true | |
s.inline = %{ | |
export DEBIAN_FRONTEND=noninteractive | |
apt-get update | |
apt-get --yes --force-yes upgrade | |
} | |
end | |
# Install dokku-alt | |
box.vm.provision "shell" do |s| | |
s.privileged = true | |
s.inline = %{ | |
export DEBIAN_FRONTEND=noninteractive | |
echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list | |
echo deb https://dokku-alt.github.io/dokku-alt / > /etc/apt/sources.list.d/dokku-alt.list | |
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
apt-key adv --keyserver pgp.mit.edu --recv-keys EAD883AF | |
apt-get update -y | |
apt-get install -y dokku-alt | |
} | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment