vagrant-lxc 0.3.4 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c50dc38cceb25885011a091ace53495f0992bb45
4
- data.tar.gz: d9e0c2cb8b70ff4a170d1744f438ffffcdaca199
3
+ metadata.gz: 70552f58b3dff461e6c8f585b581fcbe48eb8e33
4
+ data.tar.gz: 1e83aa6c65f3c3d82f78902db6def724fe13c262
5
5
  SHA512:
6
- metadata.gz: a71590125708f5bdb688a46fc5e6d282e3acb49c9045946becb261a856b7f6a23b29b2bef25370c8d6bc9de23f765cf27f2e3e6a2e6442fe030dde5d8442fc31
7
- data.tar.gz: 380309703b319c8eb6e91be92a8e2e1a09f28164d1076753667253ea9eb1a9b2b36ec11cffec8a1667d886cb32395ef2f5f44eab51c216e3a1e5bb66539cc45f
6
+ metadata.gz: d9c31869f568c381c36b49f5a2653d1479cb4598bb58c8b277afdd7e35b09f7db5613a493fe8eac58761cc23cc4dea52f93286a2883b3917fd59bbaaf8e29ee4
7
+ data.tar.gz: c82b8cb7240620f0d7e23e7969d73f16cf35752ef8044927de2fe3a027cf864cdb0b8819844bb6ace0d9f0afcc70dc07f1598db43b5f3d2707827e9af542e577
data/CHANGELOG.md CHANGED
@@ -1,4 +1,19 @@
1
- ## [0.?.?](https://github.com/fgrehm/vagrant-lxc/compare/v0.3.3...master)
1
+ ## [0.4.0](https://github.com/fgrehm/vagrant-lxc/compare/v0.3.4...master) (unreleased)
2
+
3
+ FEATURES:
4
+
5
+ - New box format [#89](https://github.com/fgrehm/vagrant-lxc/issues/89)
6
+
7
+ BUG FIXES:
8
+
9
+ - Add translation for stopped status [#97](https://github.com/fgrehm/vagrant-lxc/issues/97)
10
+ - Enable retries when fetching container state [#74](https://github.com/fgrehm/vagrant-lxc/issues/74)
11
+ - Fix error when setting Debian boxes hostname from Vagrantfile [#91](https://github.com/fgrehm/vagrant-lxc/issues/91)
12
+ - BTRFS-friendly base boxes [#81](https://github.com/fgrehm/vagrant-lxc/issues/81)
13
+ - Extended templates path lookup [#77](https://github.com/fgrehm/vagrant-lxc/issues/77) (tks to @aries1980)
14
+ - Fix default group for packaged boxes tarballs on the rake task [#82](https://github.com/fgrehm/vagrant-lxc/issues/82) (tks to @cduez)
15
+
16
+ ## [0.3.4](https://github.com/fgrehm/vagrant-lxc/compare/v0.3.3...v0.3.4) (May 08, 2013)
2
17
 
3
18
  FEATURES:
4
19
 
@@ -7,16 +22,21 @@ FEATURES:
7
22
 
8
23
  IMPROVEMENTS:
9
24
 
10
- - Remove `/tmp` files after the machine has been successfully shut down [#68][]
25
+ - Replace `lxc-wait` usage with a "[retry mechanism](https://github.com/fgrehm/vagrant-lxc/commit/3cca16824879731315dac32bc2df1c643f30d461#L2R88)" [#22](https://github.com/fgrehm/vagrant-lxc/issues/22)
26
+ - Remove `/tmp` files after the machine has been successfully shut down [#68](https://github.com/fgrehm/vagrant-lxc/issues/68)
11
27
  - Clean up base boxes files after they've been configured, resulting in smaller packages
12
28
  - Bump development dependency to Vagrant 1.2+ series
13
29
 
30
+ BUG FIXES:
31
+
32
+ - Issue a `lxc-stop` in case the container cannot shutdown gracefully [#72](https://github.com/fgrehm/vagrant-lxc/issues/72)
33
+
14
34
  ## [0.3.3](https://github.com/fgrehm/vagrant-lxc/compare/v0.3.2...v0.3.3) (April 23, 2013)
15
35
 
16
36
  BUG FIXES:
17
37
 
18
- - Properly kill `redir` child processes [#59][]
19
- - Use `uname -m` on base Ubuntu lxc-template [#53][]
38
+ - Properly kill `redir` child processes [#59](https://github.com/fgrehm/vagrant-lxc/issues/59)
39
+ - Use `uname -m` on base Ubuntu lxc-template [#53](https://github.com/fgrehm/vagrant-lxc/issues/53)
20
40
 
21
41
  IMPROVEMENTS:
22
42
 
@@ -39,20 +59,20 @@ BACKWARDS INCOMPATIBILITIES:
39
59
  - `start_opts` config was renamed to `customize`, please check the README for the expected parameters
40
60
  - V1 boxes are no longer supported
41
61
  - `target_rootfs_path` is no longer supported, just symlink `/var/lib/lxc` to the desired folder in case you want to point it to another partition
42
- - Removed support for configuring private networks. It will come back at some point in the future but if you need it you should be able to set using `customize 'network.ipv4', '1.2.3.4'`
62
+ - Removed support for configuring private networks. It will come back at some point in the future but if you need it you should be able to set using `customize 'network.ipv4', '1.2.3.4/24'`
43
63
 
44
64
  IMPROVEMENTS:
45
65
 
46
66
  - lxc templates are removed from lxc template dir after container is created
47
67
  - Treat NFS shared folders as a normal shared folder instead of ignoring it so we can share the same Vagrantfile with VBox environments
48
- - Support for lxc 0.7.5 (tested on Ubuntu 12.04) [#49][]
49
- - Remove `/tmp` files when packaging quantal64 base box [#48][]
50
- - Avoid picking the best mirror on quantal64 base box [#38][]
68
+ - Support for lxc 0.7.5 (tested on Ubuntu 12.04) [#49](https://github.com/fgrehm/vagrant-lxc/issues/49)
69
+ - Remove `/tmp` files when packaging quantal64 base box [#48](https://github.com/fgrehm/vagrant-lxc/issues/48)
70
+ - Avoid picking the best mirror on quantal64 base box [#38](https://github.com/fgrehm/vagrant-lxc/issues/38)
51
71
 
52
72
  BUG FIXES:
53
73
 
54
- - Redirect `redir`'s stderr output to `/dev/null` [#51][]
55
- - Switch from `ifconfig` to `ip` to grab container's IP to avoid localization issues [#50][]
74
+ - Redirect `redir`'s stderr output to `/dev/null` [#51](https://github.com/fgrehm/vagrant-lxc/issues/51)
75
+ - Switch from `ifconfig` to `ip` to grab container's IP to avoid localization issues [#50](https://github.com/fgrehm/vagrant-lxc/issues/50)
56
76
 
57
77
  ## [0.2.0](https://github.com/fgrehm/vagrant-lxc/compare/v0.1.1...v0.2.0) (March 30, 2013)
58
78
 
@@ -61,16 +81,16 @@ BUG FIXES:
61
81
  ## [0.1.1](https://github.com/fgrehm/vagrant-lxc/compare/v0.1.0...v0.1.1) (March 29, 2013)
62
82
 
63
83
  - Removed support for development under Vagrant < 1.1
64
- - Removed rsync from base quantal64 box to speed up containers creation [#40][]
65
- - Containers are now named after project's root dir [#14][]
84
+ - Removed rsync from base quantal64 box to speed up containers creation [#40](https://github.com/fgrehm/vagrant-lxc/issues/40)
85
+ - Containers are now named after project's root dir [#14](https://github.com/fgrehm/vagrant-lxc/issues/14)
66
86
  - Skip Vagrant's built in SSH redirect
67
- - Allow setting rootfs from Vagrantfile [#30][]
87
+ - Allow setting rootfs from Vagrantfile [#30](https://github.com/fgrehm/vagrant-lxc/issues/30)
68
88
 
69
89
  ## [0.1.0](https://github.com/fgrehm/vagrant-lxc/compare/v0.0.3...v0.1.0) (March 27, 2013)
70
90
 
71
91
  - Support for chef added to base quantal64 box
72
92
  - Puppet upgraded to 3.1.1 on base quantal64 box
73
- - Port forwarding support added [#6][]
93
+ - Port forwarding support added [#6](https://github.com/fgrehm/vagrant-lxc/issues/6)
74
94
 
75
95
  ## Previous
76
96
 
data/Gemfile CHANGED
@@ -3,9 +3,10 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  group :development do
6
- # TODO: Lock to 1.2.3 once it is out with this fix: https://github.com/mitchellh/vagrant/pull/1685
7
- gem 'vagrant', git: 'https://github.com/mitchellh/vagrant.git'
8
- gem 'vagrant-cachier'
6
+ gem 'vagrant', github: 'mitchellh/vagrant'
7
+ gem 'vagrant-cachier', github: 'fgrehm/vagrant-cachier'
8
+ gem 'vagrant-pristine', github: 'fgrehm/vagrant-pristine'
9
+ gem 'vagrant-omnibus'
9
10
  gem 'guard'
10
11
  gem 'guard-rspec'
11
12
  gem 'rb-inotify'
@@ -14,7 +15,7 @@ end
14
15
 
15
16
  group :development, :test do
16
17
  gem 'rake'
17
- gem 'rspec'
18
+ gem 'rspec', '~> 2.13.0'
18
19
  gem 'rspec-fire', require: 'rspec/fire'
19
20
  gem 'rspec-spies', require: false
20
21
  gem 'coveralls', require: false
data/Gemfile.lock CHANGED
@@ -1,12 +1,23 @@
1
1
  GIT
2
- remote: https://github.com/mitchellh/vagrant.git
3
- revision: ccfd321ef98dc5c12b180cc3a26f12d870c0eff5
2
+ remote: git://github.com/fgrehm/vagrant-cachier.git
3
+ revision: ae6cb5bcfbdbb2157867d77ded8f2b6f430c0f6c
4
4
  specs:
5
- vagrant (1.2.3.dev)
5
+ vagrant-cachier (0.2.0)
6
+
7
+ GIT
8
+ remote: git://github.com/fgrehm/vagrant-pristine.git
9
+ revision: 45a8d75f048bd611e337583496eb2b48b6998bbd
10
+ specs:
11
+ vagrant-pristine (0.1.0)
12
+
13
+ GIT
14
+ remote: git://github.com/mitchellh/vagrant.git
15
+ revision: 6d26c86c4c3f65e2e59f4dda6bca9cd9235de704
16
+ specs:
17
+ vagrant (1.2.4.dev)
6
18
  childprocess (~> 0.3.7)
7
19
  erubis (~> 2.7.0)
8
20
  i18n (~> 0.6.0)
9
- json (>= 1.5.1, < 1.8.0)
10
21
  log4r (~> 1.1.9)
11
22
  net-scp (~> 1.1.0)
12
23
  net-ssh (~> 2.6.6)
@@ -14,7 +25,7 @@ GIT
14
25
  PATH
15
26
  remote: .
16
27
  specs:
17
- vagrant-lxc (0.3.4)
28
+ vagrant-lxc (0.4.0)
18
29
 
19
30
  GEM
20
31
  remote: https://rubygems.org/
@@ -31,36 +42,35 @@ GEM
31
42
  thor
32
43
  diff-lcs (1.2.4)
33
44
  erubis (2.7.0)
34
- ffi (1.8.1)
45
+ ffi (1.9.0)
35
46
  formatador (0.2.4)
36
- guard (1.8.0)
47
+ guard (1.8.1)
37
48
  formatador (>= 0.2.4)
38
49
  listen (>= 1.0.0)
39
50
  lumberjack (>= 1.0.2)
40
51
  pry (>= 0.9.10)
41
52
  thor (>= 0.14.6)
42
- guard-rspec (2.6.0)
53
+ guard-rspec (3.0.2)
43
54
  guard (>= 1.8)
44
55
  rspec (~> 2.13)
45
56
  i18n (0.6.4)
46
- json (1.7.7)
47
- listen (1.0.3)
57
+ listen (1.2.2)
48
58
  rb-fsevent (>= 0.9.3)
49
59
  rb-inotify (>= 0.9)
50
60
  rb-kqueue (>= 0.2)
51
61
  log4r (1.1.10)
52
- lumberjack (1.0.3)
62
+ lumberjack (1.0.4)
53
63
  method_source (0.8.1)
54
64
  mime-types (1.23)
55
- multi_json (1.7.3)
56
- net-scp (1.1.0)
65
+ multi_json (1.7.7)
66
+ net-scp (1.1.2)
57
67
  net-ssh (>= 2.6.5)
58
- net-ssh (2.6.7)
59
- pry (0.9.12.1)
68
+ net-ssh (2.6.8)
69
+ pry (0.9.12.2)
60
70
  coderay (~> 1.0.5)
61
71
  method_source (~> 0.8)
62
72
  slop (~> 3.4)
63
- rake (10.0.4)
73
+ rake (10.1.0)
64
74
  rb-fsevent (0.9.3)
65
75
  rb-inotify (0.9.0)
66
76
  ffi (>= 0.5.0)
@@ -75,7 +85,7 @@ GEM
75
85
  rspec-core (2.13.1)
76
86
  rspec-expectations (2.13.0)
77
87
  diff-lcs (>= 1.1.3, < 2.0)
78
- rspec-fire (1.1.3)
88
+ rspec-fire (1.2.0)
79
89
  rspec (~> 2.11)
80
90
  rspec-mocks (2.13.1)
81
91
  rspec-spies (2.1.4)
@@ -84,9 +94,9 @@ GEM
84
94
  multi_json (~> 1.0)
85
95
  simplecov-html (~> 0.7.1)
86
96
  simplecov-html (0.7.1)
87
- slop (3.4.4)
97
+ slop (3.4.5)
88
98
  thor (0.18.1)
89
- vagrant-cachier (0.0.2)
99
+ vagrant-omnibus (1.1.0)
90
100
 
91
101
  PLATFORMS
92
102
  ruby
@@ -97,9 +107,11 @@ DEPENDENCIES
97
107
  guard-rspec
98
108
  rake
99
109
  rb-inotify
100
- rspec
110
+ rspec (~> 2.13.0)
101
111
  rspec-fire
102
112
  rspec-spies
103
113
  vagrant!
104
- vagrant-cachier
114
+ vagrant-cachier!
105
115
  vagrant-lxc!
116
+ vagrant-omnibus
117
+ vagrant-pristine!
data/Guardfile CHANGED
@@ -1,18 +1,7 @@
1
- guard 'bundler' do
2
- watch('Gemfile')
3
- watch(/^.+\.gemspec/)
4
- end
5
-
6
- guard 'ctags-bundler', :src_path => ["lib"] do
7
- watch(/^(lib|spec\/support)\/.*\.rb$/)
8
- watch('Gemfile.lock')
9
- end
10
-
11
- guard 'rspec' do
12
- watch(%r{^spec/.+_spec\.rb$})
1
+ guard 'rspec', :spec_paths => ["spec/unit"] do
2
+ watch(%r{^spec/unit/.+_spec\.rb$})
13
3
  watch(%r{^lib/vagrant-lxc/(.+)\.rb$}) { |m| "spec/unit/#{m[1]}_spec.rb" }
14
4
  watch('spec/unit_helper.rb') { "spec/unit" }
15
- watch('spec/acceptance_helper.rb') { "spec/acceptance" }
16
- watch('spec/spec_helper.rb') { "spec/" }
17
- watch(%r{^spec/support/(.+)\.rb$}) { "spec/" }
5
+ watch('spec/spec_helper.rb') { "spec/unit" }
6
+ watch(%r{^spec/support/(.+)\.rb$}) { "spec/unit" }
18
7
  end
data/README.md CHANGED
@@ -1,26 +1,46 @@
1
- # vagrant-lxc [![Build Status](https://travis-ci.org/fgrehm/vagrant-lxc.png?branch=master)](https://travis-ci.org/fgrehm/vagrant-lxc) [![Gem Version](https://badge.fury.io/rb/vagrant-lxc.png)](http://badge.fury.io/rb/vagrant-lxc) [![Code Climate](https://codeclimate.com/github/fgrehm/vagrant-lxc.png)](https://codeclimate.com/github/fgrehm/vagrant-lxc) [![Coverage Status](https://coveralls.io/repos/fgrehm/vagrant-lxc/badge.png?branch=master)](https://coveralls.io/r/fgrehm/vagrant-lxc)
1
+ # vagrant-lxc
2
2
 
3
- Linux Containers support for Vagrant 1.1+
3
+ [![Build Status](https://travis-ci.org/fgrehm/vagrant-lxc.png?branch=master)](https://travis-ci.org/fgrehm/vagrant-lxc) [![Gem Version](https://badge.fury.io/rb/vagrant-lxc.png)](http://badge.fury.io/rb/vagrant-lxc) [![Code Climate](https://codeclimate.com/github/fgrehm/vagrant-lxc.png)](https://codeclimate.com/github/fgrehm/vagrant-lxc) [![Coverage Status](https://coveralls.io/repos/fgrehm/vagrant-lxc/badge.png?branch=master)](https://coveralls.io/r/fgrehm/vagrant-lxc)
4
+
5
+ [LXC](http://lxc.sourceforge.net/) provider for [Vagrant](http://www.vagrantup.com/) 1.1+
6
+
7
+ This is a Vagrant plugin that allows it to control and provision Linux Containers
8
+ as an alternative to the built in Vagrant VirtualBox provider for Linux hosts.
4
9
 
5
10
  Check out this [blog post](http://fabiorehm.com/blog/2013/04/28/lxc-provider-for-vagrant)
6
11
  to see the plugin in action and find out more about it.
7
12
 
8
- ## Dependencies
13
+ ## Features
14
+
15
+ * Vagrant's `up`, `halt`, `reload`, `destroy`, `ssh`, `provision` and `package`
16
+ * Shared folders
17
+ * Provisioning with any built-in Vagrant provisioner
18
+ * Port forwarding
19
+ * Setting container's host name
20
+
21
+ *Please refer to the [closed issues](https://github.com/fgrehm/vagrant-lxc/issues?labels=&milestone=&page=1&state=closed)
22
+ and the [changelog](CHANGELOG.md) for most up to date information.*
9
23
 
10
- * Vagrant 1.1+ (1.1.3+ recommended)
11
- * lxc 0.7.5+ (0.8.0-rc1+ recommended)
24
+
25
+ ## Requirements
26
+
27
+ * [Vagrant 1.1+](http://downloads.vagrantup.com/)
28
+ * lxc 0.7.5+
12
29
  * redir (if you are planning to use port forwarding)
13
- * A Kernel [higher than 3.5.0-17.28](#help-im-unable-to-restart-containers)
30
+ * A [bug-free](#help-im-unable-to-restart-containers) kernel
14
31
 
15
- On a clean Ubuntu 12.10 machine it means something like:
32
+ The plugin is known to work better and pretty much out of the box on Ubuntu 12.04+
33
+ hosts and installing the dependencies on it basically means a `apt-get install lxc redir`
34
+ and a `apt-get update && apt-get dist-upgrade` to upgrade the kernel.
16
35
 
17
- ```
18
- sudo apt-get update && sudo apt-get dist-upgrade
19
- sudo apt-get install lxc redir
20
- # Downloads and install Vagrant 1.1.5
21
- wget "http://files.vagrantup.com/packages/64e360814c3ad960d810456add977fd4c7d47ce6/vagrant_`uname -m`.deb" -O /tmp/vagrant.deb
22
- sudo dpkg -i /tmp/vagrant.deb
23
- ```
36
+ Some manual steps are required to set up a Linode machine prior to using this
37
+ plugin, please check https://github.com/fgrehm/vagrant-lxc/wiki/Usage-on-Linode
38
+ for more information. The same applies to Debian hosts and documentation will be
39
+ provided soon.
40
+
41
+ If you are on a Mac or Windows machine, you might want to have a look at this
42
+ blog post for some ideas on how to set things up: http://the.taoofmac.com/space/HOWTO/Vagrant
43
+ or use use the same [Ubuntu 12.10 VirtualBox machine I use for development](https://github.com/fgrehm/vagrant-lxc/wiki/Development#using-virtualbox-for-development).
24
44
 
25
45
 
26
46
  ## Installation
@@ -32,185 +52,82 @@ vagrant plugin install vagrant-lxc
32
52
 
33
53
  ## Usage
34
54
 
35
- After installing, add a [base box](#available-boxes) using any name you want, for example:
55
+ After installing, add a [base box](#base-boxes) using any name you want, for example:
36
56
 
37
57
  ```
38
- vagrant box add lxc-quantal64 http://dl.dropbox.com/u/13510779/lxc-quantal-amd64-2013-05-06.box
58
+ vagrant box add quantal64 http://dl.dropbox.com/u/13510779/lxc-quantal-amd64-2013-07-12.box
39
59
  ```
40
60
 
41
- Make a Vagrantfile that looks like the following, filling in your information where necessary:
61
+ Then create a Vagrantfile that looks like the following, changing the box name
62
+ to the one you've just added:
42
63
 
43
64
  ```ruby
44
65
  Vagrant.configure("2") do |config|
45
- # Change it to the name of the box you have just added
46
- config.vm.box = "lxc-quantal64"
47
-
48
- # You can omit this block if you don't need to override any container setting
49
- config.vm.provider :lxc do |lxc|
50
- # OPTIONAL: Same effect as as 'customize ["modifyvm", :id, "--memory", "1024"]' for VirtualBox
51
- lxc.customize 'cgroup.memory.limit_in_bytes', '1024M'
52
- # OPTIONAL: Limits swap size
53
- lxc.customize 'cgroup.memory.memsw.limit_in_bytes', '512M'
54
- end
66
+ config.vm.box = "quantal64"
55
67
  end
56
68
  ```
57
69
 
58
- And finally run `vagrant up --provider=lxc`. If you are using Vagrant 1.2+ you can
59
- also set `VAGRANT_DEFAULT_PROVIDER` environmental variable to `lxc`.
60
-
61
- If you are on a mac or window host and still want to try this plugin out, you
62
- can use the [same Vagrant VirtualBox machine I use for development](#using-virtualbox-for-development).
70
+ And finally run `vagrant up --provider=lxc`.
63
71
 
64
- ### Available boxes
72
+ If you are using Vagrant 1.2+ you can also set `VAGRANT_DEFAULT_PROVIDER`
73
+ environmental variable to `lxc` in order to avoid typing `--provider=lxc` all
74
+ the time.
65
75
 
66
- | LINK | DESCRIPTION |
67
- | --- | --- |
68
- | [lxc-raring-amd64-2013-05-08.box](http://dl.dropbox.com/u/13510779/lxc-raring-amd64-2013-05-08.box) | Ubuntu 13.04 Raring x86_64 (Puppet 3.1.1) |
69
- | [lxc-quantal-amd64-2013-05-08.box](http://dl.dropbox.com/u/13510779/lxc-quantal-amd64-2013-05-08.box) | Ubuntu 12.10 Quantal x86_64 (Puppet 3.1.1 & Chef 11.4.0) |
70
- | [lxc-precise-amd64-2013-05-08.box](http://dl.dropbox.com/u/13510779/lxc-precise-amd64-2013-05-08.box) | Ubuntu 12.04 Precise x86_64 (Puppet 3.1.1 & Chef 11.4.0) |
71
- | [lxc-sid-amd64-2013-05-08.box](http://dl.dropbox.com/u/13510779/lxc-sid-amd64-2013-05-08.box) | Debian Sid (Puppet 3.1.1) |
72
- | [lxc-wheezy-amd64-2013-05-08.box](http://dl.dropbox.com/u/13510779/lxc-wheezy-amd64-2013-05-08.box) | Debian Wheezy (Puppet 3.1.1) |
73
- | [lxc-squeeze-amd64-2013-05-08.box](http://dl.dropbox.com/u/13510779/lxc-squeeze-amd64-2013-05-08.box) | Debian Squeeze (Puppet 3.1.1) |
74
76
 
75
- *Please note that I'm currently using only the quantal x86_64 on a daily basis,
76
- and I've only done some basic testing with the others*
77
+ ### Advanced configuration
77
78
 
78
- There is a set of [rake tasks](tasks/boxes.rake) that you can use to build base
79
- boxes as needed. By default it won't include any provisioning tool and you can
80
- pick the one you want by providing some environment variables.
79
+ If you want, you can modify container configurations from within your Vagrantfile
80
+ using the [provider block](http://docs.vagrantup.com/v2/providers/configuration.html):
81
81
 
82
- For example:
83
-
84
- ```
85
- CHEF=1 rake boxes:ubuntu:build:precise64
82
+ ```ruby
83
+ Vagrant.configure("2") do |config|
84
+ config.vm.box = "quantal64"
85
+ config.vm.provider :lxc do |lxc|
86
+ # Same effect as as 'customize ["modifyvm", :id, "--memory", "1024"]' for VirtualBox
87
+ lxc.customize 'cgroup.memory.limit_in_bytes', '1024M'
88
+ end
89
+ end
86
90
  ```
87
91
 
88
- Will build a Ubuntu Precise x86_64 box with chef pre-installed.
89
-
90
- ### Storing container's rootfs on a separate partition
91
-
92
- Before the 0.3.0 version of this plugin, there used to be a support for specifying
93
- the container's rootfs path from the `Vagrantfile`, on 0.3.0 this was removed as you
94
- can achieve the same effect by symlinking or mounting `/var/lib/lxc` on a separate
95
- partition.
92
+ This will make vagrant-lxc pass in `-s lxc.cgroup.memory.limit_in_bytes=1024M`
93
+ to `lxc-start` when booting containers. This will override any previously value
94
+ set from container's configuration file that is usually kept under
95
+ `/var/lib/lxc/<container-name>/config`.
96
96
 
97
- ### NFS shared folders
97
+ For other configuration options, please check [lxc.conf manpages](http://manpages.ubuntu.com/manpages/quantal/man5/lxc.conf.5.html).
98
98
 
99
- NFS shared folders are not supported and will behave as a "normal" shared folder
100
- so we can share the same Vagrantfile with VBox environments.
101
99
 
100
+ ### Base boxes
102
101
 
103
- ## What is currently supported?
104
-
105
- Pretty much everything you need from Vagrant:
106
-
107
- * Vagrant's `up`, `halt`, `reload`, `destroy`, `ssh` and `package` commands (box packaging is kind of experimental)
108
- * Shared folders
109
- * Provisioning
110
- * Setting container's host name
111
- * Port forwarding
112
-
113
- *Please refer to the [closed issues](https://github.com/fgrehm/vagrant-lxc/issues?labels=&milestone=&page=1&state=closed)
114
- and the [changelog](CHANGELOG.md) for most up to date information.*
102
+ Please check [the wiki](https://github.com/fgrehm/vagrant-lxc/wiki/Base-boxes)
103
+ for a list of [pre built](https://github.com/fgrehm/vagrant-lxc/wiki/Base-boxes#available-boxes)
104
+ base boxes and information on [how to build your own](https://github.com/fgrehm/vagrant-lxc/wiki/Base-boxes#building-your-own).
115
105
 
116
106
 
117
107
  ## Current limitations
118
108
 
119
- * Does not detect forwarded ports collision, right now you are responsible for taking care of that
120
- * A hell lot of `sudo`s (this will probably be like this until [user namespaces](http://s3hh.wordpress.com/2013/02/12/user-namespaces-lxc-meeting/) are supported)
109
+ * The plugin does not detect forwarded ports collision, right now you are
110
+ responsible for taking care of that.
111
+ * There is a hell lot of `sudo`s involved and this will probably be around until
112
+ [user namespaces](https://wiki.ubuntu.com/LxcSecurity) are supported or I'm able to handle [#90](https://github.com/fgrehm/vagrant-lxc/issues/90)
121
113
  * [Does not tell you if dependencies are not met](https://github.com/fgrehm/vagrant-lxc/issues/11)
122
114
  (will probably just throw up some random error)
123
115
  * + bunch of other [core features](https://github.com/fgrehm/vagrant-lxc/issues?labels=core&milestone=&page=1&state=open)
124
116
  and some known [bugs](https://github.com/fgrehm/vagrant-lxc/issues?labels=bug&page=1&state=open)
125
117
 
126
118
 
127
- ## Development
128
-
129
- If want to develop from your physical machine, just sing that same old song:
130
-
131
- ```
132
- git clone git://github.com/fgrehm/vagrant-lxc.git
133
- cd vagrant-lxc
134
- bundle install
135
- bundle exec rake # to run unit specs
136
- ```
137
-
138
- To run acceptance specs, you'll have to ssh into one of the [development boxes](development/Vagrantfile) and run:
139
-
140
- ```
141
- bundle exec rake spec:acceptance
142
- ```
143
-
144
- To build the provided quantal64 box:
145
-
146
- ```
147
- bundle exec rake boxes:quantal64:build
148
- vagrant box add quantal64 boxes/output/lxc-quantal64.box
149
- ```
150
-
151
- ### Using `vagrant-lxc` to develop itself
152
-
153
- Yes! The gem has been [bootstrapped](http://en.wikipedia.org/wiki/Bootstrapping_(compilers)
154
- and since you can boot a container from within another, after cloning the
155
- project you can run the commands below from the host machine to get a container
156
- ready for development:
157
-
158
- ```sh
159
- # Required in order to allow nested containers to be started
160
- sudo apt-get install apparmor-utils
161
- sudo aa-complain /usr/bin/lxc-start
162
- bundle install
163
- cd development
164
- bundle exec vagrant up lxc --provider=lxc
165
- bundle exec vagrant ssh lxc
166
- ```
167
-
168
- That should result in a container ready to be `bundle exec vagrant ssh`ed.
169
- Once you've SSH into the guest container, you'll be already on the project's root.
170
- Keep in mind that you'll probably need to run `sudo aa-complain /usr/bin/lxc-start`
171
- on the host whenever you want to hack on it, otherwise you won't be able to
172
- start nested containers there to try things out.
173
-
174
- ### Using VirtualBox for development
175
-
176
- ```
177
- cd development
178
- bundle exec vagrant up vbox
179
- # A reload is needed to ensure the updated kernel gets loaded
180
- bundle exec vagrant reload vbox
181
- bundle exec vagrant ssh vbox
182
- ```
183
-
184
-
185
- ## Protips
186
-
187
- If you want to find out more about what's going on under the hood on vagrant,
188
- prepend `VAGRANT_LOG=debug` to your `vagrant` commands. For `lxc-start`s
189
- debugging set `LXC_START_LOG_FILE`:
190
-
191
- ```
192
- LXC_START_LOG_FILE=/tmp/lxc-start.log VAGRANT_LOG=debug vagrant up
193
- ```
194
-
195
- This will output A LOT of information on your terminal and some useful information
196
- about `lxc-start` to `/tmp/lxc-start.log`.
119
+ ## More information
197
120
 
121
+ Please refer the [wiki](https://github.com/fgrehm/vagrant-lxc/wiki) for more
122
+ information.
198
123
 
199
- ## Help! I'm unable to restart containers!
200
124
 
201
- It happened to me quite a few times in the past and it seems that it is related
202
- to a bug on linux kernel, so make sure you are using a bug-free kernel
203
- (>= 3.5.0-17.28). More information can be found on:
125
+ ## Problems / ideas?
204
126
 
205
- * https://bugzilla.kernel.org/show_bug.cgi?id=47181
206
- * https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1021471
207
- * https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1065434
208
-
209
- Sometimes the dev boxes I'm using are not able to `lxc-start` containers
210
- anymore. Most of the times it was an issue with the arguments I provided
211
- to it for customization (or a *buggy* kernel). If you run into that, rollback your changes
212
- and try to `vagrant reload` the dev box. If it still doesn't work,
213
- please file a bug at the [issue tracker](https://github.com/fgrehm/vagrant-lxc/issues).
127
+ Please review the [Troubleshooting](https://github.com/fgrehm/vagrant-lxc/wiki/Troubleshooting)
128
+ wiki page + [known bugs](https://github.com/fgrehm/vagrant-lxc/issues?labels=bug&page=1&state=open)
129
+ list if you have a problem and feel free to use the [issue tracker](https://github.com/fgrehm/vagrant-lxc/issues)
130
+ to ask questions, propose new functionality and / or report bugs.
214
131
 
215
132
 
216
133
  ## Similar projects
@@ -218,6 +135,7 @@ please file a bug at the [issue tracker](https://github.com/fgrehm/vagrant-lxc/i
218
135
  * [vagabond](https://github.com/chrisroberts/vagabond) - "a tool integrated with Chef to build local nodes easily"
219
136
  * [vagueant](https://github.com/neerolyte/vagueant) - "vaguely like Vagrant for linux containers (lxc)"
220
137
 
138
+
221
139
  ## Contributing
222
140
 
223
141
  1. Fork it