Skip to content

Commit

Permalink
put comments for custom_ami in Vagrantfiles.
Browse files Browse the repository at this point in the history
It seems that vagrant-aws plugin can't override `aws.ami` when we set vagrant box which supports was provider.
  • Loading branch information
everpeace committed Sep 16, 2014
1 parent 59a1bdf commit 19c7c6d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions multinodes/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ ninfos = gen_node_infos(conf)
# vagrant-aws, vagrant-berkshelf, vagrant-omnibus, vagrant-hosts, vagrant-cachier
Vagrant.configure("2") do |config|
# https://vagrantcloud.com/everpeace/boxes/mesos
# If you set custom_ami in aws_config.yaml, please comment out this.
config.vm.box = "everpeace/mesos"

# enable plugins
Expand Down Expand Up @@ -49,6 +50,9 @@ Vagrant.configure("2") do |config|
end

cfg.vm.provider :aws do |aws, override|
# If you set custom_ami in aws_config.yaml, please activate this.
# override.vm.box = "dummy"
# override.vm.box_url = "https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box"

aws.access_key_id = conf["access_key_id"]
aws.secret_access_key = conf["secret_access_key"]
Expand Down Expand Up @@ -189,6 +193,10 @@ SCRIPT
end
end
cfg.vm.provider :aws do |aws, override|
# If you set custom_ami in aws_config.yaml, please activate this.
# override.vm.box = "dummy"
# override.vm.box_url = "https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box"

aws.access_key_id = conf["access_key_id"]
aws.secret_access_key = conf["secret_access_key"]

Expand Down
3 changes: 3 additions & 0 deletions multinodes/cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ security_groups: ["EDIT_HERE"] # array of VPN security groups. e.g. ['sg***
keypair_name: EDIT_HERE
ssh_private_key_path: EDIT_HERE
region: EDIT_HERE

# set a custom AMI to use if you need something other than the defaults
# If you set this, you will have to comment out config.vm.box
# and activate all override.vm.box and override.vm.box_url in Vagrnatfile.
#custom_ami: EDIT_HERE

# see http://aws.amazon.com/ec2/instance-types/#selecting-instance-types
Expand Down
5 changes: 5 additions & 0 deletions standalone/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ mesos_version = "0.20.0"

Vagrant.configure("2") do |config|
# https://vagrantcloud.com/everpeace/boxes/mesos
# If you set custom_ami in aws_config.yaml, please comment out this.
config.vm.box = "everpeace/mesos"

# enable plugins
Expand Down Expand Up @@ -50,6 +51,10 @@ Vagrant.configure("2") do |config|

conf = YAML.load_file('aws_config.yaml')
config.vm.provider :aws do |aws, override|
# If you set custom_ami in aws_config.yaml, please activate this.
# override.vm.box = "dummy"
# override.vm.box_url = "https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box"

aws.access_key_id = conf["access_key_id"]
aws.secret_access_key = conf["secret_access_key"]

Expand Down
3 changes: 3 additions & 0 deletions standalone/aws_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ secret_access_key: EDIT_HERE
# ["ap-northeast-1", "ap-southeast-1", "eu-west-1", "sa-east-1", "us-east-1",
# "us-west-1", "ap-southeast-2", "us-west-2"]
region: us-east-1

# set a custom AMI to use if you need something other than the defaults
# If you set this, you will have to comment out config.vm.box
# and activate override.vm.box and override.vm.box_url in Vagrnatfile.
#custom_ami: EDIT_HERE

# array of security groups. e.g. ['sg*** ']
Expand Down

0 comments on commit 19c7c6d

Please sign in to comment.