Skip to content

Commit

Permalink
Add box from command line
Browse files Browse the repository at this point in the history
As `vm.box_url` doesn’t seem to work for aws
  • Loading branch information
matt-richardson committed Apr 25, 2017
1 parent 1729826 commit c8e925e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions build-aws.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ else {
write-host "chmod not found, skipping setting permissions on pem file"
}

write-host "Adding vagrant box"
vagrant box add OctopusDeploy/dsc-test-server-windows-2012-r2 https://s3-ap-southeast-2.amazonaws.com/octopus-vagrant-boxes/vagrant/json/OctopusDeploy/amazon-ebs/dsc-test-server-windows-2012-r2.json --force

write-host "Ensuring vagrant box is latest"
vagrant box update --box OctopusDeploy/dsc-test-server-windows-2012-r2 --provider aws

write-host "Running 'vagrant up --provider aws'"
vagrant up --provider aws # --debug &> vagrant.log
echo "'vagrant up' exited with exit code $LASTEXITCODE"
Expand Down
3 changes: 1 addition & 2 deletions vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ Vagrant.configure(VAGRANT_FILE_API_VERSION) do |config|
aws.subnet_id = aws_subnet_id
aws.associate_public_ip = true
aws.user_data = File.read("Tests/aws_user_data.ps1")
override.vm.box = "OctopusDeploy/dsc-test-server-windows-2012-r2"
override.vm.box_url = "https://s3-ap-southeast-2.amazonaws.com/octopus-vagrant-boxes/vagrant/json/OctopusDeploy/amazon-ebs/dsc-test-server-windows-2012-r2.json"
override.vm.box = "OctopusDeploy/dsc-test-server-windows-2012-r2" #box added via launcher script
override.ssh.private_key_path = "./#{aws_key_name}.pem"
override.winrm.username = "Administrator"
override.winrm.password = :aws # this uses the vagrant-aws-winrm plugin to get the password from aws
Expand Down

0 comments on commit c8e925e

Please sign in to comment.