vagrant-lxc 0.8.0 → 1.0.0.alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -2
  3. data/BOXES.md +13 -21
  4. data/CHANGELOG.md +49 -0
  5. data/CONTRIBUTING.md +5 -2
  6. data/Gemfile +12 -13
  7. data/Gemfile.lock +66 -51
  8. data/README.md +39 -25
  9. data/development/Vagrantfile +0 -2
  10. data/lib/vagrant-backports/README.md +12 -0
  11. data/lib/vagrant-backports/action/handle_box.rb +1 -0
  12. data/lib/vagrant-backports/action/is_state.rb +34 -0
  13. data/lib/vagrant-backports/action/message.rb +20 -0
  14. data/lib/{vagrant-lxc → vagrant-backports}/action/wait_for_communicator.rb +6 -5
  15. data/lib/vagrant-backports/ui.rb +12 -0
  16. data/lib/vagrant-backports/utils.rb +27 -0
  17. data/lib/vagrant-lxc.rb +8 -0
  18. data/lib/vagrant-lxc/action.rb +81 -48
  19. data/lib/vagrant-lxc/action/boot.rb +2 -1
  20. data/lib/vagrant-lxc/action/fetch_ip_from_dnsmasq_leases.rb +1 -0
  21. data/lib/vagrant-lxc/action/handle_box_metadata.rb +36 -14
  22. data/lib/vagrant-lxc/action/message.rb +0 -23
  23. data/lib/vagrant-lxc/action/prepare_nfs_settings.rb +64 -0
  24. data/lib/vagrant-lxc/action/prepare_nfs_valid_ids.rb +19 -0
  25. data/lib/vagrant-lxc/action/setup_package_files.rb +6 -2
  26. data/lib/vagrant-lxc/{action → backports/action}/share_folders.rb +0 -0
  27. data/lib/vagrant-lxc/command/root.rb +58 -0
  28. data/lib/vagrant-lxc/command/sudoers.rb +87 -0
  29. data/lib/vagrant-lxc/driver.rb +21 -11
  30. data/lib/vagrant-lxc/plugin.rb +23 -5
  31. data/lib/vagrant-lxc/provider/cap/public_address.rb +17 -0
  32. data/lib/vagrant-lxc/synced_folder.rb +42 -0
  33. data/lib/vagrant-lxc/version.rb +1 -1
  34. data/locales/en.yml +6 -5
  35. data/scripts/lxc-template +165 -0
  36. data/spec/spec_helper.rb +9 -13
  37. data/spec/unit/action/clear_forwarded_ports_spec.rb +3 -3
  38. data/spec/unit/action/compress_rootfs_spec.rb +7 -5
  39. data/spec/unit/action/forward_ports_spec.rb +8 -8
  40. data/spec/unit/action/handle_box_metadata_spec.rb +71 -15
  41. data/spec/unit/action/setup_package_files_spec.rb +32 -8
  42. data/spec/unit/driver/cli_spec.rb +31 -30
  43. data/spec/unit/driver_spec.rb +35 -27
  44. data/spec/unit/support/unit_example_group.rb +6 -6
  45. data/spec/unit_helper.rb +4 -2
  46. data/tasks/spec.rake +18 -11
  47. data/vagrant-lxc.gemspec +7 -0
  48. data/vagrant-spec.config.rb +24 -0
  49. metadata +24 -36
  50. data/boxes/build-all.sh +0 -22
  51. data/boxes/build-debian-box.sh +0 -167
  52. data/boxes/build-openmandriva-box.sh +0 -159
  53. data/boxes/build-ubuntu-box.sh +0 -151
  54. data/boxes/common/cleanup +0 -7
  55. data/boxes/common/install-babushka +0 -16
  56. data/boxes/common/install-chef +0 -15
  57. data/boxes/common/install-puppet +0 -13
  58. data/boxes/common/install-salt +0 -12
  59. data/boxes/common/install-salt-debian +0 -28
  60. data/boxes/common/lxc-template +0 -226
  61. data/boxes/common/lxc-template-openmandriva +0 -225
  62. data/boxes/common/lxc.conf +0 -49
  63. data/boxes/common/metadata.json +0 -5
  64. data/lib/vagrant-lxc/action/check_created.rb +0 -21
  65. data/lib/vagrant-lxc/action/check_running.rb +0 -21
  66. data/lib/vagrant-lxc/action/created.rb +0 -20
  67. data/lib/vagrant-lxc/action/disconnect.rb +0 -18
  68. data/lib/vagrant-lxc/action/is_running.rb +0 -19
  69. data/spec/acceptance/sanity_check_spec.rb +0 -111
  70. data/spec/acceptance/support/acceptance_example_group.rb +0 -76
  71. data/spec/acceptance/support/machine_ext.rb +0 -12
  72. data/spec/acceptance/support/test_ui.rb +0 -22
  73. data/spec/acceptance_helper.rb +0 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee93b037eb8ad8145d874a64f28a585bba51ab3f
4
- data.tar.gz: 41040fa650a3be3ec3bf59c9f8eed18a9a84cdfa
3
+ metadata.gz: 51c1ffd96f522003bc67e527711bbb7c3e47581e
4
+ data.tar.gz: 13fe22e65136a8409f05bf321202d05952d185c8
5
5
  SHA512:
6
- metadata.gz: 48855758f0ed808c6caa4a5c48852811c128e0ab223204f2b01b5091695475e541d15283a3588d1202b795460e1d02086d1c622a2148d4a9adddfdde252460a0
7
- data.tar.gz: 25e57b7957bec28488416a534313cf431147c88cf131549b163b37ec823f427f00beef8ffa716d7f1f01ffaf477035c219e925b8f5b3ca12f9a8e8be6d5eff24
6
+ metadata.gz: 4910e182e07740f92222861344cd4f87bd092361dde180639e59aaae37762d314ff24402d268d03359db9519ccc5b465dc4c0b5d570d8bc4e4793b50fa57c662
7
+ data.tar.gz: 81d2ace93c821bf408730e76d06efa94dcf7e8358d794a72324d42a9d90d791dd4549531923662cfa10df13b6fc9d5cf8333460352009e2dee158a99e2d797ec
data/.travis.yml CHANGED
@@ -1,8 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
3
  - 2.0.0
4
+ - 2.1.1
5
5
  matrix:
6
6
  allow_failures:
7
- - rvm: 2.0.0
7
+ - rvm: 2.1.1
8
8
  script: "bundle exec rake ci"
data/BOXES.md CHANGED
@@ -4,20 +4,11 @@ Although the official documentation says it is only supported for VirtualBox
4
4
  environments, you can use the [`vagrant package`](http://docs.vagrantup.com/v2/cli/package.html)
5
5
  command to export a `.box` file from an existing vagrant-lxc container.
6
6
 
7
- There is also a set of [bash scripts](https://github.com/fgrehm/vagrant-lxc/tree/master/boxes)
7
+ There is also a set of [bash scripts](https://github.com/fgrehm/vagrant-lxc-base-boxes)
8
8
  that you can use to build base boxes as needed. By default it won't include any
9
9
  provisioning tool and you can pick the ones you want by providing some environment
10
- variables.
11
-
12
- For example:
13
-
14
- ```
15
- git clone https://github.com/fgrehm/vagrant-lxc.git
16
- cd vagrant-lxc/boxes
17
- PUPPET=1 CHEF=1 sudo -E ./build-ubuntu-box.sh precise amd64
18
- ```
19
-
20
- Will build a Ubuntu Precise x86_64 box with latest Puppet and Chef pre-installed, please refer to the scripts for more information.
10
+ variables. Please refer to the [base boxes repository](https://github.com/fgrehm/vagrant-lxc-base-boxes)
11
+ for more information.
21
12
 
22
13
  ## "Anatomy" of a box
23
14
 
@@ -26,19 +17,20 @@ on knowing what makes a base box for vagrant-lxc, here's what's needed:
26
17
 
27
18
  ### Expected `.box` contents
28
19
 
29
- | FILE | DESCRIPTION |
30
- | --- | --- |
31
- | `lxc-template` | Script responsible for creating and setting up the container (used with `lxc-create`), a ["generic script"]() is provided along with project's source. |
32
- | `rootfs.tar.gz` | Compressed container rootfs tarball (need to remeber to pass in `--numeric-owner` when creating it) |
33
- | `lxc.conf` | |
34
- | `metadata.json` | |
20
+ | FILE | REQUIRED? | DESCRIPTION |
21
+ | --- | --- | --- |
22
+ | `metadata.json` | Yes | Required by Vagrant |
23
+ | `rootfs.tar.gz` | Yes | Compressed container rootfs tarball (need to remeber to pass in `--numeric-owner` when creating it) |
24
+ | `lxc-template` | No, a ["generic script"](scripts/lxc-template) is provided by the plugin if it doesn't exist on the base box | Script responsible for creating and setting up the container (used with `lxc-create`). |
25
+ | `lxc-config` | No | Box specific configuration to be _appended_ to the system's generated container config file |
26
+ | `lxc.conf` | No | File passed in to `lxc-create -f` |
35
27
 
36
28
  ### metadata.json
37
29
 
38
30
  ```json
39
31
  {
40
32
  "provider": "lxc",
41
- "version": "3",
33
+ "version": "1.0.0",
42
34
  "built-on": "Sat Sep 21 21:10:00 UTC 2013",
43
35
  "template-opts": {
44
36
  "--arch": "amd64",
@@ -51,5 +43,5 @@ on knowing what makes a base box for vagrant-lxc, here's what's needed:
51
43
  | --- | --- | --- |
52
44
  | `provider` | Yes | Required by Vagrant |
53
45
  | `version` | Yes | Tracks backward incompatibilities |
54
- | `built-on` | No | Date / time when the box was packaged |
55
- | `template-opts` | No | Extra options to be passed to the `lxc-template` script provided with the .box package |
46
+ | `built-on` | No | Date / time when the box was packaged for the first time |
47
+ | `template-opts` | No | Extra options to be passed to the `lxc-template` script |
data/CHANGELOG.md CHANGED
@@ -1,3 +1,52 @@
1
+ ## [1.0.0.alpha.1](https://github.com/fgrehm/vagrant-lxc/compare/v0.8.0...v1.0.0.alpha.1) (Mar 04, 2014)
2
+
3
+ DEPRECATIONS:
4
+
5
+ - Support to **all Vagrant versions prior to 1.5 are now deprecated**, there is a
6
+ [small layer](lib/vagrant-backports) that ensures compatibility with versions
7
+ starting with 1.1.5 but there is no guarantee that it will stick for too long.
8
+ - Boxes released prior to this version are now deprecated and won't be available
9
+ after the final 1.0.0 release.
10
+ - `--auth-key` argument is no longer provided to `lxc-template`. This will cause
11
+ all official base boxes prior to 09/28/2013 to break.
12
+
13
+ FEATURES:
14
+
15
+ - New `vagrant lxc sudoers` command for creating a policy for users in order to
16
+ avoid `sudo` passwords [[GH-237]] / [[GH-257]]
17
+ - Support for NFS and rsync synced folders.
18
+ - Support for synced folder mount options allowing for using read only synced
19
+ folders [[GH-193]]
20
+
21
+ [GH-237]: https://github.com/fgrehm/vagrant-lxc/issues/237
22
+ [GH-257]: https://github.com/fgrehm/vagrant-lxc/pull/257
23
+ [GH-193]: https://github.com/fgrehm/vagrant-lxc/issues/193
24
+
25
+ IMPROVEMENTS:
26
+
27
+ - `lxc-template` is now optional for base boxes and are bundled with the plugin,
28
+ allowing us to roll out updates without the need to rebuild boxes [[GH-254]]
29
+ - Set container's `utsname` to `config.vm.hostname` by default [[GH-253]]
30
+ - Added libvirt dnsmasq leases file to the lookup paths [[GH-251]]
31
+ - Improved compatibility with Vagrant 1.4 / 1.5 including the ability
32
+ to use `rsync` and `nfs` shared folders to work around synced folders
33
+ permission problems. More information can be found on the following
34
+ issues: [[GH-151]] [[GH-191]] [[GH-241]] [[GH-242]]
35
+ - Warn in case `:group` or `:owner` are specified for synced folders [[GH-196]]
36
+ - Acceptance specs are now powered by `vagrant-spec` [[GH-213]]
37
+ - Base boxes creation scripts were moved out to https://github.com/fgrehm/vagrant-lxc-base-boxes.
38
+
39
+ [GH-254]: https://github.com/fgrehm/vagrant-lxc/issues/254
40
+ [GH-196]: https://github.com/fgrehm/vagrant-lxc/issues/196
41
+ [GH-251]: https://github.com/fgrehm/vagrant-lxc/pull/251
42
+ [GH-253]: https://github.com/fgrehm/vagrant-lxc/pull/253
43
+ [GH-151]: https://github.com/fgrehm/vagrant-lxc/issues/151
44
+ [GH-213]: https://github.com/fgrehm/vagrant-lxc/issues/213
45
+ [GH-191]: https://github.com/fgrehm/vagrant-lxc/issues/191
46
+ [GH-241]: https://github.com/fgrehm/vagrant-lxc/issues/241
47
+ [GH-242]: https://github.com/fgrehm/vagrant-lxc/issues/242
48
+
49
+
1
50
  ## [0.8.0](https://github.com/fgrehm/vagrant-lxc/compare/v0.7.0...v0.8.0) (Feb 26, 2014)
2
51
 
3
52
  FEATURES:
data/CONTRIBUTING.md CHANGED
@@ -1,14 +1,17 @@
1
1
  ### Please read before contributing
2
2
 
3
+ * If you have an issue with base boxes, please create it on https://github.com/fgrehm/vagrant-lxc-base-boxes,
4
+ this repository is for the Vagrant plugin only.
5
+
3
6
  * Try not to post questions in the issues tracker. I will probably answer you
4
7
  but I'll most likely close the issue right away and will continue the discussion
5
8
  with the issue closed. If you have any questions about the plugin, make sure
6
9
  you go through the [Wiki](https://github.com/fgrehm/vagrant-lxc/wiki) pages
7
10
  first (specially the [Troubleshooting Section](https://github.com/fgrehm/vagrant-lxc/wiki/Troubleshooting))
8
11
  and if you still need answers please ask a question on [Stack Overflow](http://stackoverflow.com/questions/tagged/vagrant-lxc)
9
- using the `vagrant-lxc` tag on it so that I get notified :)
12
+ using the `vagrant` / `lxc` tag on it so that I get notified :)
10
13
 
11
- * Please do a small search on the issues tracker before submitting your issue to
14
+ * Please do a search on the issues tracker before submitting your issue to
12
15
  check if it was already reported / fixed.
13
16
 
14
17
  * When reporting a bug, please include **all** information that you can get
data/Gemfile CHANGED
@@ -1,24 +1,23 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gemspec
4
-
5
3
  group :development do
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'
4
+ gem 'vagrant', git: 'https://github.com/mitchellh/vagrant.git', tag: 'v1.5.1'
10
5
  gem 'guard'
11
6
  gem 'guard-rspec'
12
7
  gem 'rb-inotify'
13
8
  end
14
9
 
15
-
16
10
  group :development, :test do
17
11
  gem 'rake'
18
- # Update https://github.com/fgrehm/vagrant-lxc/issues/111 once we are able to
19
- # upgrade to a newer release
20
- gem 'rspec', '~> 2.13.0'
21
- gem 'rspec-fire', require: 'rspec/fire'
22
- gem 'rspec-spies', require: false
23
- gem 'coveralls', require: false
12
+ gem 'rspec', '2.99.0.beta2'
13
+ gem 'coveralls', require: (ENV['COVERAGE'] == 'true')
14
+ gem 'vagrant-spec', git: 'https://github.com/mitchellh/vagrant-spec.git'
15
+ end
16
+
17
+ group :plugins do
18
+ acceptance = (ENV['ACCEPTANCE'] == 'true')
19
+ gem 'vagrant-cachier', git: 'https://github.com/fgrehm/vagrant-cachier.git', require: !acceptance
20
+ gem 'vagrant-pristine', git: 'https://github.com/fgrehm/vagrant-pristine.git', require: !acceptance
21
+ gem 'vagrant-omnibus', require: !acceptance
22
+ gemspec
24
23
  end
data/Gemfile.lock CHANGED
@@ -1,40 +1,55 @@
1
1
  GIT
2
- remote: git://github.com/fgrehm/vagrant-cachier.git
3
- revision: a9f41c5f01297773f209c0525400e22704b40c93
2
+ remote: https://github.com/fgrehm/vagrant-cachier.git
3
+ revision: 2df1e319408a7e6f1c6e75d48e36591199e98527
4
4
  specs:
5
- vagrant-cachier (0.5.0)
5
+ vagrant-cachier (0.6.1.dev)
6
6
 
7
7
  GIT
8
- remote: git://github.com/fgrehm/vagrant-pristine.git
9
- revision: 4638491786943bfbf6f115b1fc379f069963fe46
8
+ remote: https://github.com/fgrehm/vagrant-pristine.git
9
+ revision: 503dbc47848c81d0fbfa6840491856f518d244a1
10
10
  specs:
11
11
  vagrant-pristine (0.3.0)
12
12
 
13
13
  GIT
14
- remote: git://github.com/mitchellh/vagrant.git
15
- revision: a92e03cf4ce936243d3959b7b5603262a234a58d
14
+ remote: https://github.com/mitchellh/vagrant-spec.git
15
+ revision: aae28ee57071cdd121ca782c6e0709a5c650a4be
16
16
  specs:
17
- vagrant (1.3.6.dev)
18
- childprocess (~> 0.3.7)
17
+ vagrant-spec (0.0.1)
18
+ childprocess (~> 0.5.0)
19
+ log4r (~> 1.1.9)
20
+ rspec (~> 2.14)
21
+ thor (~> 0.18.1)
22
+
23
+ GIT
24
+ remote: https://github.com/mitchellh/vagrant.git
25
+ revision: 6977e93ba98fd19112b1fed74dafb8619f581984
26
+ tag: v1.5.1
27
+ specs:
28
+ vagrant (1.5.1)
29
+ bundler (~> 1.5.2)
30
+ childprocess (~> 0.5.0)
19
31
  erubis (~> 2.7.0)
20
32
  i18n (~> 0.6.0)
21
- log4r (~> 1.1.9)
33
+ listen (~> 2.4.0)
34
+ log4r (~> 1.1.9, < 1.1.11)
22
35
  net-scp (~> 1.1.0)
23
- net-ssh (~> 2.6.6)
36
+ net-ssh (>= 2.6.6, < 2.8.0)
37
+ rb-kqueue (~> 0.2.0)
38
+ wdm (~> 0.1.0)
24
39
 
25
40
  PATH
26
41
  remote: .
27
42
  specs:
28
- vagrant-lxc (0.8.0)
43
+ vagrant-lxc (1.0.0.alpha.1)
29
44
 
30
45
  GEM
31
46
  remote: https://rubygems.org/
32
47
  specs:
33
48
  celluloid (0.15.2)
34
49
  timers (~> 1.1.0)
35
- childprocess (0.3.9)
50
+ childprocess (0.5.1)
36
51
  ffi (~> 1.0, >= 1.0.11)
37
- coderay (1.0.9)
52
+ coderay (1.1.0)
38
53
  coveralls (0.7.0)
39
54
  multi_json (~> 1.3)
40
55
  rest-client
@@ -42,64 +57,65 @@ GEM
42
57
  term-ansicolor
43
58
  thor
44
59
  diff-lcs (1.2.5)
60
+ docile (1.1.3)
45
61
  erubis (2.7.0)
46
62
  ffi (1.9.3)
47
63
  formatador (0.2.4)
48
- guard (2.2.3)
64
+ guard (2.4.0)
49
65
  formatador (>= 0.2.4)
50
66
  listen (~> 2.1)
51
67
  lumberjack (~> 1.0)
52
68
  pry (>= 0.9.12)
53
69
  thor (>= 0.18.1)
54
- guard-rspec (3.1.0)
55
- guard (>= 1.8)
56
- rspec (~> 2.13)
57
- i18n (0.6.5)
58
- listen (2.2.0)
70
+ guard-rspec (4.2.8)
71
+ guard (~> 2.1)
72
+ rspec (>= 2.14, < 4.0)
73
+ i18n (0.6.9)
74
+ listen (2.4.1)
59
75
  celluloid (>= 0.15.2)
60
76
  rb-fsevent (>= 0.9.3)
61
77
  rb-inotify (>= 0.9)
62
78
  log4r (1.1.10)
63
79
  lumberjack (1.0.4)
64
80
  method_source (0.8.2)
65
- mime-types (2.0)
66
- multi_json (1.8.2)
81
+ mime-types (2.1)
82
+ multi_json (1.9.0)
67
83
  net-scp (1.1.2)
68
84
  net-ssh (>= 2.6.5)
69
- net-ssh (2.6.8)
70
- pry (0.9.12.2)
71
- coderay (~> 1.0.5)
85
+ net-ssh (2.7.0)
86
+ pry (0.9.12.6)
87
+ coderay (~> 1.0)
72
88
  method_source (~> 0.8)
73
89
  slop (~> 3.4)
74
- rake (10.1.0)
75
- rb-fsevent (0.9.3)
76
- rb-inotify (0.9.2)
90
+ rake (10.1.1)
91
+ rb-fsevent (0.9.4)
92
+ rb-inotify (0.9.3)
93
+ ffi (>= 0.5.0)
94
+ rb-kqueue (0.2.2)
77
95
  ffi (>= 0.5.0)
78
96
  rest-client (1.6.7)
79
97
  mime-types (>= 1.16)
80
- rspec (2.13.0)
81
- rspec-core (~> 2.13.0)
82
- rspec-expectations (~> 2.13.0)
83
- rspec-mocks (~> 2.13.0)
84
- rspec-core (2.13.1)
85
- rspec-expectations (2.13.0)
98
+ rspec (2.99.0.beta2)
99
+ rspec-core (= 2.99.0.beta2)
100
+ rspec-expectations (= 2.99.0.beta2)
101
+ rspec-mocks (= 2.99.0.beta2)
102
+ rspec-core (2.99.0.beta2)
103
+ rspec-expectations (2.99.0.beta2)
86
104
  diff-lcs (>= 1.1.3, < 2.0)
87
- rspec-fire (1.3.0)
88
- rspec (>= 2.11, < 4)
89
- rspec-mocks (2.13.1)
90
- rspec-spies (2.1.4)
91
- rspec (~> 2.0)
92
- simplecov (0.7.1)
93
- multi_json (~> 1.0)
94
- simplecov-html (~> 0.7.1)
95
- simplecov-html (0.7.1)
96
- slop (3.4.6)
97
- term-ansicolor (1.2.2)
98
- tins (~> 0.8)
105
+ rspec-mocks (2.99.0.beta2)
106
+ simplecov (0.8.2)
107
+ docile (~> 1.1.0)
108
+ multi_json
109
+ simplecov-html (~> 0.8.0)
110
+ simplecov-html (0.8.0)
111
+ slop (3.5.0)
112
+ term-ansicolor (1.3.0)
113
+ tins (~> 1.0)
99
114
  thor (0.18.1)
100
115
  timers (1.1.0)
101
- tins (0.13.0)
102
- vagrant-omnibus (1.1.2)
116
+ tins (1.0.0)
117
+ vagrant-omnibus (1.3.1)
118
+ wdm (0.1.0)
103
119
 
104
120
  PLATFORMS
105
121
  ruby
@@ -110,11 +126,10 @@ DEPENDENCIES
110
126
  guard-rspec
111
127
  rake
112
128
  rb-inotify
113
- rspec (~> 2.13.0)
114
- rspec-fire
115
- rspec-spies
129
+ rspec (= 2.99.0.beta2)
116
130
  vagrant!
117
131
  vagrant-cachier!
118
132
  vagrant-lxc!
119
133
  vagrant-omnibus
120
134
  vagrant-pristine!
135
+ vagrant-spec!
data/README.md CHANGED
@@ -9,20 +9,31 @@ as an alternative to the built in VirtualBox provider for Linux hosts. Check out
9
9
  [this blog post](http://fabiorehm.com/blog/2013/04/28/lxc-provider-for-vagrant/)
10
10
  to see it in action.
11
11
 
12
+ **NOTICE:** The master branch is targetting an initial beta for 1.0.0, for the
13
+ latest stable version of the plugin, please check the [0.8-stable](https://github.com/fgrehm/vagrant-lxc/tree/0.8-stable)
14
+ branch.
12
15
 
13
- ## Features / Limitations
16
+ ## Usage with Vagrant 1.5
17
+
18
+ Usage with the recently released Vagrant 1.5 is only possible by [building the
19
+ plugin from sources](https://github.com/fgrehm/vagrant-lxc/wiki/Development#wiki-installing-the-plugin-from-source).
20
+ The 1.0.0.beta1 version of the plugin that will ship with the changes required
21
+ is expected to be released by April, 2014.
22
+
23
+
24
+ ## Features
14
25
 
15
26
  * Provides the same workflow as the Vagrant VirtualBox provider
16
27
  * Port forwarding via [`redir`](http://linux.die.net/man/1/redir)
17
- * Does not support public / private networks
18
- * Assumes you have a `lxcbr0` bridge configured on your host similar to [Ubuntu's built-in](https://help.ubuntu.com/lts/serverguide/lxc.html#lxcbr0)
19
28
 
29
+ As of now, it does not support public / private networks, but [private networks](https://github.com/fgrehm/vagrant-lxc/issues/120)
30
+ will be coming along _soon_.
20
31
 
21
32
  ## Requirements
22
33
 
23
- * [Vagrant 1.1+](http://downloads.vagrantup.com/)
34
+ * [Vagrant 1.1+](http://www.vagrantup.com/downloads.html)
24
35
  * lxc 0.7.5+
25
- * redir (if you are planning to use port forwarding)
36
+ * `redir` (if you are planning to use port forwarding)
26
37
  * A [kernel != 3.5.0-17.28](https://github.com/fgrehm/vagrant-lxc/wiki/Troubleshooting#wiki-im-unable-to-restart-containers)
27
38
 
28
39
  The plugin is known to work better and pretty much out of the box on Ubuntu 12.04+
@@ -50,26 +61,23 @@ vagrant plugin install vagrant-lxc
50
61
  ```
51
62
 
52
63
 
53
- ## Usage
64
+ ## Quick start
54
65
 
55
- After installing, add a [base box](#base-boxes) using any name you want, for example:
66
+ On Vagrant 1.5+:
56
67
 
57
68
  ```
58
- vagrant box add quantal64 http://bit.ly/vagrant-lxc-quantal64-2013-10-23
69
+ vagrant init fgrehm/precise64-lxc
70
+ vagrant up --provider=lxc
59
71
  ```
60
72
 
61
- Then create a Vagrantfile that looks like the following, changing the box name
62
- to the one you've just added:
73
+ On Vagrant < 1.5:
63
74
 
64
- ```ruby
65
- Vagrant.configure("2") do |config|
66
- config.vm.box = "quantal64"
67
- end
75
+ ```
76
+ vagrant init precise64 http://bit.ly/vagrant-lxc-precise64-2013-10-23
77
+ vagrant up --provider=lxc
68
78
  ```
69
79
 
70
- And finally run `vagrant up --provider=lxc`.
71
-
72
- If you are using Vagrant 1.2+ you can also set `VAGRANT_DEFAULT_PROVIDER`
80
+ If you are using Vagrant 1.2+ you can also set the `VAGRANT_DEFAULT_PROVIDER`
73
81
  environmental variable to `lxc` in order to avoid typing `--provider=lxc` all
74
82
  the time.
75
83
 
@@ -93,7 +101,7 @@ vagrant-lxc will then write out `lxc.cgroup.memory.limit_in_bytes='1024M'` to th
93
101
  container config file (usually kept under `/var/lib/lxc/<container>/config`)
94
102
  prior to starting it.
95
103
 
96
- For other configuration options, please check the [lxc.conf manpages](http://manpages.ubuntu.com/manpages/quantal/man5/lxc.conf.5.html).
104
+ For other configuration options, please check the [lxc.conf manpages](http://manpages.ubuntu.com/manpages/precise/man5/lxc.conf.5.html).
97
105
 
98
106
  ### Container naming
99
107
 
@@ -117,16 +125,22 @@ end
117
125
  ### Avoiding `sudo` passwords
118
126
 
119
127
  This plugin requires **a lot** of `sudo`ing since [user namespaces](https://wiki.ubuntu.com/UserNamespace)
120
- are not supported on mainstream kernels. Have a look at the [Wiki](https://github.com/fgrehm/vagrant-lxc/wiki/Avoiding-'sudo'-passwords)
121
- to find out how to work around that specially if you are running an OS with `sudo`
122
- < 1.8.4 (like Ubuntu 12.04) as you might be affected by a bug.
128
+ are not supported on mainstream kernels. To work around that, you can use the
129
+ `vagrant lxc sudoers` command which will create a file under `/etc/sudoers.d/vagrant-lxc-<USER>`
130
+ whitelisting all commands required by `vagrant-lxc` to run.
131
+
132
+ If you are interested on what will be generated by that command, please check
133
+ [this code](lib/vagrant-lxc/commands/sudoers.rb#L58-L81).
134
+
135
+ _vagrant-lxc < 1.0.0 users, please check this [Wiki page](https://github.com/fgrehm/vagrant-lxc/wiki/Avoiding-%27sudo%27-passwords)_
123
136
 
124
137
  ### Base boxes
125
138
 
126
- Please check [the wiki](https://github.com/fgrehm/vagrant-lxc/wiki/Base-boxes)
127
- for a list of [pre built](https://github.com/fgrehm/vagrant-lxc/wiki/Base-boxes#available-boxes)
128
- base boxes and have a look at [`BOXES.md`](https://github.com/fgrehm/vagrant-lxc/tree/master/BOXES.md)
129
- for more information on building your own.
139
+ Base boxes can be found on [VagrantCloud](https://vagrantcloud.com/search?provider=lxc)
140
+ and some scripts to build your own are available at [fgrehm/vagrant-lxc-base-boxes](https://github.com/fgrehm/vagrant-lxc-base-boxes).
141
+
142
+ If you want to build your own boxes, please have a look at [`BOXES.md`](https://github.com/fgrehm/vagrant-lxc/tree/master/BOXES.md)
143
+ for more information.
130
144
 
131
145
 
132
146
  ## More information