2015-05-08 22:37:55 +00:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
# vi: set ft=ruby :
|
|
|
|
|
|
|
|
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
|
|
|
|
VAGRANTFILE_API_VERSION = "2"
|
|
|
|
|
|
|
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
|
|
|
2015-05-13 23:08:42 +00:00
|
|
|
config.vm.define "please" do |node|
|
|
|
|
|
|
|
|
# Every Vagrant virtual environment requires a box to build off of.
|
|
|
|
node.vm.box = "precise64"
|
|
|
|
|
|
|
|
# node.vm.network "forwarded_port", guest: 80, host: 8080
|
|
|
|
node.vm.network "private_network", ip: "192.168.33.10"
|
|
|
|
node.ssh.forward_agent = true
|
|
|
|
#node.vm.network "private_network", type: "dhcp"
|
|
|
|
|
|
|
|
#node.vm.synced_folder "data", "vagrant_data"
|
|
|
|
|
2015-05-08 22:37:55 +00:00
|
|
|
node.vm.provision 'ansible' do |ansible|
|
2015-05-26 21:09:58 +00:00
|
|
|
ansible.playbook = 'please.yml'
|
2015-05-08 22:37:55 +00:00
|
|
|
end
|
|
|
|
|
2015-05-13 23:08:42 +00:00
|
|
|
|
|
|
|
# 512MB not enough for compiling lxml: http://stackoverflow.com/a/25916353/7782
|
|
|
|
# http://stackoverflow.com/a/26468913/7782 --> for how to get to this setting
|
|
|
|
node.vm.provider "virtualbox" do |v|
|
|
|
|
v.memory = 1024
|
|
|
|
v.cpus = 2
|
|
|
|
end
|
|
|
|
|
|
|
|
node.vm.provider :aws do |aws, override|
|
|
|
|
aws.access_key_id = ENV['AWS_ACCESS_KEY_ID']
|
|
|
|
aws.secret_access_key = ENV['AWS_SECRET_ACCESS_KEY']
|
2015-05-08 22:37:55 +00:00
|
|
|
|
2015-05-13 23:08:42 +00:00
|
|
|
aws.keypair_name = "ry-laptop"
|
|
|
|
|
|
|
|
# Ubuntu 12.04 LTS Precise / PV EBS-SSD boot
|
|
|
|
# alestic 2015.05.05
|
|
|
|
|
|
|
|
aws.instance_type="t1.micro"
|
|
|
|
|
|
|
|
aws.region = "us-east-1"
|
|
|
|
aws.availability_zone = "us-east-1c"
|
|
|
|
aws.ami = "ami-d8132bb0"
|
2015-05-16 18:38:35 +00:00
|
|
|
# put into just security group
|
2015-05-26 21:09:58 +00:00
|
|
|
aws.security_groups = ["just"]
|
2015-05-13 23:08:42 +00:00
|
|
|
|
|
|
|
aws.tags = {
|
|
|
|
'Name' => 'please_vagrant'
|
|
|
|
}
|
|
|
|
|
|
|
|
override.vm.box = "dummy"
|
|
|
|
override.ssh.username = "ubuntu"
|
|
|
|
override.ssh.private_key_path = "/Users/raymondyee/.ssh/id_rsa"
|
|
|
|
end
|
2015-05-08 22:37:55 +00:00
|
|
|
|
2015-05-13 23:08:42 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
config.vm.define "just" do |node|
|
|
|
|
|
|
|
|
node.vm.box = "ubuntu/trusty64"
|
|
|
|
node.vm.network "private_network", type: "dhcp"
|
|
|
|
#node.vm.network "private_network", ip: "192.168.33.10"
|
2015-05-08 22:37:55 +00:00
|
|
|
|
2015-05-13 23:08:42 +00:00
|
|
|
node.ssh.forward_agent = true
|
2015-05-08 22:37:55 +00:00
|
|
|
|
2015-05-13 23:08:42 +00:00
|
|
|
node.vm.provision 'ansible' do |ansible|
|
2015-05-15 18:03:29 +00:00
|
|
|
ansible.playbook = 'just.yml'
|
2015-05-13 23:08:42 +00:00
|
|
|
end
|
2015-05-08 22:37:55 +00:00
|
|
|
|
2015-05-16 18:38:35 +00:00
|
|
|
node.vm.provider "virtualbox" do |v|
|
|
|
|
v.memory = 1024
|
|
|
|
v.cpus = 2
|
|
|
|
end
|
2015-05-15 18:03:29 +00:00
|
|
|
|
|
|
|
node.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 = "ry-laptop"
|
|
|
|
|
|
|
|
# Ubuntu 12.04 LTS Precise / PV EBS-SSD boot
|
|
|
|
# alestic 2015.05.05
|
|
|
|
|
|
|
|
aws.instance_type="m1.small"
|
|
|
|
|
|
|
|
aws.region = "us-east-1"
|
|
|
|
aws.availability_zone = "us-east-1c"
|
|
|
|
aws.ami = "ami-d8132bb0"
|
2015-05-16 18:38:35 +00:00
|
|
|
aws.security_groups = ["just"]
|
2015-05-15 18:03:29 +00:00
|
|
|
|
|
|
|
aws.tags = {
|
|
|
|
'Name' => 'just_vagrant'
|
|
|
|
}
|
|
|
|
|
|
|
|
override.vm.box = "dummy"
|
|
|
|
override.ssh.username = "ubuntu"
|
|
|
|
override.ssh.private_key_path = "/Users/raymondyee/.ssh/id_rsa"
|
|
|
|
end
|
|
|
|
|
2015-05-08 22:37:55 +00:00
|
|
|
end
|
|
|
|
|
2015-05-26 17:44:35 +00:00
|
|
|
|
|
|
|
config.vm.define "localvm" do |node|
|
|
|
|
|
2015-05-27 06:04:17 +00:00
|
|
|
node.vm.box = "precise64"
|
2015-05-26 22:10:04 +00:00
|
|
|
#node.vm.network "private_network", type: "dhcp"
|
2015-07-06 23:44:55 +00:00
|
|
|
node.vm.network "private_network", ip: "192.168.33.10" #https://192.168.33.10.xip.io
|
2015-05-26 17:44:35 +00:00
|
|
|
|
|
|
|
node.ssh.forward_agent = true
|
|
|
|
|
|
|
|
node.vm.provider "virtualbox" do |v, override|
|
|
|
|
v.memory = 1024
|
|
|
|
v.cpus = 2
|
|
|
|
|
|
|
|
# trying to mimic https://github.com/mozilla/fxa-dev/blob/b9b6f347c786428b347b82d38fb67e2c2fd1b827/vagrant/Vagrantfile
|
|
|
|
# but this doesn't work
|
|
|
|
override.vm.provision "ansible" do |ansible|
|
2015-07-06 23:44:55 +00:00
|
|
|
ansible.playbook = 'localvm.yml'
|
2015-05-27 05:38:14 +00:00
|
|
|
#ansible.start_at_task = 'remove all default enabled sites'
|
2015-05-26 17:44:35 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2015-05-08 22:37:55 +00:00
|
|
|
end
|
2015-05-26 22:40:02 +00:00
|
|
|
|
|
|
|
|