Tive que fazer duas alterações em relação ao exercício da aula 6 para subir a máquina na AWS:
- incluí uma tag ws.region = 'us-west-2' que não constava no roteiro
- usei uma máquina Ubuntu 16.04 LTS 64 bits, pois não havia 32 bits disponível
Com isso a máquina subiu, porém a pasta /vagrant não está aparecendo na VM.
Mensagem que aparece quando faço um vagrant up --provider=aws:
$ vagrant up --provider=aws
Bringing machine 'web' up with 'aws' provider...
==> web: Warning! The AWS provider doesn't support any of the Vagrant
==> web: high-level network configurations (`config.vm.network`). They
==> web: will be silently ignored.
==> web: Launching an instance with the following settings...
==> web: -- Type: m3.medium
==> web: -- AMI: ami-db710fa3
==> web: -- Region: us-west-2
==> web: -- Keypair: devops
==> web: -- Security Groups: ["devops"]
==> web: -- Block Device Mapping: []
==> web: -- Terminate On Shutdown: false
==> web: -- Monitoring: false
==> web: -- EBS optimized: false
==> web: -- Source Destination check:
==> web: -- Assigning a public IP address in a VPC: false
==> web: -- VPC tenancy specification: default
==> web: Waiting for instance to become "ready"...
==> web: Waiting for SSH to become available...
==> web: Machine is booted and ready for use!
No host IP was given to the Vagrant core NFS helper. This is
an internal error that should be reported as a bug.
Este é meu Vagrantfile:
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu_aws"
config.vm.box_url = "https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box"
config.vm.provider :aws do |aws, override|
aws.access_key_id = "(omiti)"
aws.secret_access_key = "(omiti)"
aws.region = 'us-west-2'
aws.keypair_name = "devops"
aws.ami = "ami-db710fa3"
aws.security_groups = ['devops']
override.ssh.username = "ubuntu"
override.ssh.private_key_path = "devops.pem"
end
config.vm.define :web do |web_config|
web_config.vm.network "private_network", ip: "192.168.50.10"
web_config.vm.provider :aws do |aws|
aws.tags = { 'Name' => 'MusicJungle (vagrant)'}
end
web_config.vm.provision "puppet" do |puppet|
puppet.manifest_file = "web.pp"
end
end
end