Created
February 3, 2015 14:15
-
-
Save kitplummer/1d3dcaba93d7b483252b to your computer and use it in GitHub Desktop.
Vagrantfile base for Packer null build
This file contains hidden or 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
| { | |
| "variables": { | |
| "aws_access_key": "", | |
| "aws_secret_key": "" | |
| }, | |
| "builders": [ | |
| { | |
| "type": "null", | |
| "host": "machine.vagrant.dev", | |
| "ssh_username": "vagrant", | |
| "ssh_private_key_file": ".vagrant/machines/lew/virtualbox/private_key" | |
| }, | |
| { | |
| "type": "amazon-ebs", | |
| "access_key": "{{user `aws_access_key`}}", | |
| "secret_key": "{{user `aws_secret_key`}}", | |
| "region": "us-east-1", | |
| "source_ami": "ami-9a562df2", | |
| "instance_type": "t2.micro", | |
| "ssh_username": "ubuntu", | |
| "ami_name": "lew-{{timestamp}}" | |
| } | |
| ], | |
| "provisioners": [ | |
| { | |
| "type": "shell", | |
| "inline": ["curl -sSL https://get.docker.com/ubuntu/ | sudo sh"] | |
| }, | |
| { | |
| "type": "shell", | |
| "inline": [ | |
| "sudo docker run -p 80:8080 -d --restart=always somedockerrepo/somedockerproj" | |
| ] | |
| } | |
| ] | |
| } |
This file contains hidden or 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
| # -*- 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| | |
| # Requires the vagrant-landrush plugin | |
| if Vagrant.has_plugin?('landrush') | |
| config.landrush.enabled = true | |
| config.landrush.tld = 'dev' | |
| config.landrush.guest_redirect_dns = true | |
| end | |
| config.vm.define 'machine' do |base| | |
| base.vm.provider 'virtualbox' do |v| | |
| v.memory = 2048 | |
| v.cpus = 2 | |
| end | |
| base.vm.box = 'ubuntu/trusty64' | |
| base.vm.hostname = 'machine.vagrant.dev' | |
| base.vm.network 'private_network', type: 'dhcp' | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment