💣 Vagrant 1.0 support for development
This commit is contained in:
parent
84f79869d5
commit
b227d1b7cb
5 changed files with 7 additions and 50 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -26,4 +26,3 @@ doc/
|
|||
/boxes/**/*.tar.gz
|
||||
/boxes/quantal64/rootfs-amd64/
|
||||
/boxes/output/
|
||||
/development/Vagrantfile
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
## 0.1.1 (unreleased)
|
||||
|
||||
- Removed support for development under Vagrant < 1.1
|
||||
|
||||
## 0.1.0
|
||||
|
||||
- Support for chef added to base quantal64 box
|
||||
|
|
14
README.md
14
README.md
|
@ -109,7 +109,6 @@ sudo apt-get install apparmor-utils
|
|||
sudo aa-complain /usr/bin/lxc-start
|
||||
bundle install
|
||||
cd development
|
||||
ln -s Vagrantfile.1.1 Vagrantfile
|
||||
bundle exec vagrant up lxc --provider=lxc
|
||||
bundle exec vagrant ssh lxc
|
||||
```
|
||||
|
@ -120,26 +119,15 @@ Keep in mind that you'll probably need to run `sudo aa-complain /usr/bin/lxc-sta
|
|||
on the host whenever you want to hack on it, otherwise you won't be able to
|
||||
start nested containers there to try things out.
|
||||
|
||||
### Using VirtualBox and Vagrant 1.1 for development
|
||||
### Using VirtualBox for development
|
||||
|
||||
```
|
||||
cd development
|
||||
ln -s Vagrantfile.1.1 Vagrantfile
|
||||
bundle exec vagrant up vbox
|
||||
bundle exec vagrant reload vbox
|
||||
bundle exec vagrant ssh vbox
|
||||
```
|
||||
|
||||
### Using VirtualBox and Vagrant 1.0 for development
|
||||
|
||||
```
|
||||
cd development
|
||||
ln -s Vagrantfile.1.0 Vagrantfile
|
||||
vagrant up
|
||||
vagrant reload
|
||||
vagrant ssh
|
||||
```
|
||||
|
||||
|
||||
## Protips
|
||||
|
||||
|
|
|
@ -50,6 +50,8 @@ Vagrant.configure("2") do |config|
|
|||
|
||||
config.vm.define :lxc do |lxc_config|
|
||||
lxc_config.vm.hostname = 'lxc-dev-box'
|
||||
# Uncomment to test boxes built locally:
|
||||
# lxc_config.vm.box_url = '../boxes/output/lxc-quantal64.box'
|
||||
lxc_config.vm.box_url = 'http://dl.dropbox.com/u/13510779/lxc-quantal64-2013-03-26.box'
|
||||
|
||||
lxc_config.vm.provider :lxc do |lxc|
|
|
@ -1,36 +0,0 @@
|
|||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
def local_cache(box_name)
|
||||
cache_dir = File.join(File.expand_path(Vagrant::Environment::DEFAULT_HOME),
|
||||
'cache',
|
||||
'apt',
|
||||
box_name)
|
||||
partial_dir = File.join(cache_dir, 'partial')
|
||||
FileUtils.mkdir_p(partial_dir) unless File.exists? partial_dir
|
||||
cache_dir
|
||||
end
|
||||
|
||||
Vagrant::Config.run do |config|
|
||||
config.vm.box = "quantal64"
|
||||
config.vm.box_url = "https://github.com/downloads/roderik/VagrantQuantal64Box/quantal64.box"
|
||||
config.vm.host_name = 'lxc-dev-box'
|
||||
|
||||
cache_dir = local_cache(config.vm.box)
|
||||
config.vm.share_folder "v-root", "/vagrant", "../"
|
||||
config.vm.share_folder "v-cache", "/var/cache/apt/archives", cache_dir
|
||||
|
||||
if defined? VagrantVbguest::Config
|
||||
config.vbguest.auto_update = false
|
||||
config.vbguest.no_remote = true
|
||||
end
|
||||
|
||||
config.vm.provision :shell, :path => 'shell-provisioning/upgrade-kernel'
|
||||
|
||||
config.vm.provision :puppet do |puppet|
|
||||
puppet.manifests_path = "."
|
||||
puppet.manifest_file = "site.pp"
|
||||
# Pass DEBUG=1 to vagrant commands if you want to make some debugging noise
|
||||
puppet.options << [ "--verbose", "--debug" ] if ENV["DEBUG"] == '1'
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue