vagrant-lxc 0.8.0 → 1.0.0.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/BOXES.md +13 -21
- data/CHANGELOG.md +49 -0
- data/CONTRIBUTING.md +5 -2
- data/Gemfile +12 -13
- data/Gemfile.lock +66 -51
- data/README.md +39 -25
- data/development/Vagrantfile +0 -2
- data/lib/vagrant-backports/README.md +12 -0
- data/lib/vagrant-backports/action/handle_box.rb +1 -0
- data/lib/vagrant-backports/action/is_state.rb +34 -0
- data/lib/vagrant-backports/action/message.rb +20 -0
- data/lib/{vagrant-lxc → vagrant-backports}/action/wait_for_communicator.rb +6 -5
- data/lib/vagrant-backports/ui.rb +12 -0
- data/lib/vagrant-backports/utils.rb +27 -0
- data/lib/vagrant-lxc.rb +8 -0
- data/lib/vagrant-lxc/action.rb +81 -48
- data/lib/vagrant-lxc/action/boot.rb +2 -1
- data/lib/vagrant-lxc/action/fetch_ip_from_dnsmasq_leases.rb +1 -0
- data/lib/vagrant-lxc/action/handle_box_metadata.rb +36 -14
- data/lib/vagrant-lxc/action/message.rb +0 -23
- data/lib/vagrant-lxc/action/prepare_nfs_settings.rb +64 -0
- data/lib/vagrant-lxc/action/prepare_nfs_valid_ids.rb +19 -0
- data/lib/vagrant-lxc/action/setup_package_files.rb +6 -2
- data/lib/vagrant-lxc/{action → backports/action}/share_folders.rb +0 -0
- data/lib/vagrant-lxc/command/root.rb +58 -0
- data/lib/vagrant-lxc/command/sudoers.rb +87 -0
- data/lib/vagrant-lxc/driver.rb +21 -11
- data/lib/vagrant-lxc/plugin.rb +23 -5
- data/lib/vagrant-lxc/provider/cap/public_address.rb +17 -0
- data/lib/vagrant-lxc/synced_folder.rb +42 -0
- data/lib/vagrant-lxc/version.rb +1 -1
- data/locales/en.yml +6 -5
- data/scripts/lxc-template +165 -0
- data/spec/spec_helper.rb +9 -13
- data/spec/unit/action/clear_forwarded_ports_spec.rb +3 -3
- data/spec/unit/action/compress_rootfs_spec.rb +7 -5
- data/spec/unit/action/forward_ports_spec.rb +8 -8
- data/spec/unit/action/handle_box_metadata_spec.rb +71 -15
- data/spec/unit/action/setup_package_files_spec.rb +32 -8
- data/spec/unit/driver/cli_spec.rb +31 -30
- data/spec/unit/driver_spec.rb +35 -27
- data/spec/unit/support/unit_example_group.rb +6 -6
- data/spec/unit_helper.rb +4 -2
- data/tasks/spec.rake +18 -11
- data/vagrant-lxc.gemspec +7 -0
- data/vagrant-spec.config.rb +24 -0
- metadata +24 -36
- data/boxes/build-all.sh +0 -22
- data/boxes/build-debian-box.sh +0 -167
- data/boxes/build-openmandriva-box.sh +0 -159
- data/boxes/build-ubuntu-box.sh +0 -151
- data/boxes/common/cleanup +0 -7
- data/boxes/common/install-babushka +0 -16
- data/boxes/common/install-chef +0 -15
- data/boxes/common/install-puppet +0 -13
- data/boxes/common/install-salt +0 -12
- data/boxes/common/install-salt-debian +0 -28
- data/boxes/common/lxc-template +0 -226
- data/boxes/common/lxc-template-openmandriva +0 -225
- data/boxes/common/lxc.conf +0 -49
- data/boxes/common/metadata.json +0 -5
- data/lib/vagrant-lxc/action/check_created.rb +0 -21
- data/lib/vagrant-lxc/action/check_running.rb +0 -21
- data/lib/vagrant-lxc/action/created.rb +0 -20
- data/lib/vagrant-lxc/action/disconnect.rb +0 -18
- data/lib/vagrant-lxc/action/is_running.rb +0 -19
- data/spec/acceptance/sanity_check_spec.rb +0 -111
- data/spec/acceptance/support/acceptance_example_group.rb +0 -76
- data/spec/acceptance/support/machine_ext.rb +0 -12
- data/spec/acceptance/support/test_ui.rb +0 -22
- data/spec/acceptance_helper.rb +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51c1ffd96f522003bc67e527711bbb7c3e47581e
|
4
|
+
data.tar.gz: 13fe22e65136a8409f05bf321202d05952d185c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4910e182e07740f92222861344cd4f87bd092361dde180639e59aaae37762d314ff24402d268d03359db9519ccc5b465dc4c0b5d570d8bc4e4793b50fa57c662
|
7
|
+
data.tar.gz: 81d2ace93c821bf408730e76d06efa94dcf7e8358d794a72324d42a9d90d791dd4549531923662cfa10df13b6fc9d5cf8333460352009e2dee158a99e2d797ec
|
data/.travis.yml
CHANGED
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
|
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
|
-
| `
|
32
|
-
| `rootfs.tar.gz` | Compressed container rootfs tarball (need to remeber to pass in `--numeric-owner` when creating it) |
|
33
|
-
| `lxc
|
34
|
-
| `
|
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": "
|
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
|
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
|
12
|
+
using the `vagrant` / `lxc` tag on it so that I get notified :)
|
10
13
|
|
11
|
-
* Please do a
|
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',
|
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
|
-
|
19
|
-
|
20
|
-
gem '
|
21
|
-
|
22
|
-
|
23
|
-
|
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:
|
3
|
-
revision:
|
2
|
+
remote: https://github.com/fgrehm/vagrant-cachier.git
|
3
|
+
revision: 2df1e319408a7e6f1c6e75d48e36591199e98527
|
4
4
|
specs:
|
5
|
-
vagrant-cachier (0.
|
5
|
+
vagrant-cachier (0.6.1.dev)
|
6
6
|
|
7
7
|
GIT
|
8
|
-
remote:
|
9
|
-
revision:
|
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:
|
15
|
-
revision:
|
14
|
+
remote: https://github.com/mitchellh/vagrant-spec.git
|
15
|
+
revision: aae28ee57071cdd121ca782c6e0709a5c650a4be
|
16
16
|
specs:
|
17
|
-
vagrant (
|
18
|
-
childprocess (~> 0.
|
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
|
-
|
33
|
+
listen (~> 2.4.0)
|
34
|
+
log4r (~> 1.1.9, < 1.1.11)
|
22
35
|
net-scp (~> 1.1.0)
|
23
|
-
net-ssh (
|
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.
|
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.
|
50
|
+
childprocess (0.5.1)
|
36
51
|
ffi (~> 1.0, >= 1.0.11)
|
37
|
-
coderay (1.0
|
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.
|
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 (
|
55
|
-
guard (
|
56
|
-
rspec (
|
57
|
-
i18n (0.6.
|
58
|
-
listen (2.
|
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.
|
66
|
-
multi_json (1.
|
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.
|
70
|
-
pry (0.9.12.
|
71
|
-
coderay (~> 1.0
|
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.
|
75
|
-
rb-fsevent (0.9.
|
76
|
-
rb-inotify (0.9.
|
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.
|
81
|
-
rspec-core (
|
82
|
-
rspec-expectations (
|
83
|
-
rspec-mocks (
|
84
|
-
rspec-core (2.
|
85
|
-
rspec-expectations (2.
|
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-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
simplecov (0.
|
93
|
-
|
94
|
-
|
95
|
-
|
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.
|
102
|
-
vagrant-omnibus (1.1
|
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 (
|
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
|
-
##
|
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://
|
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
|
-
##
|
64
|
+
## Quick start
|
54
65
|
|
55
|
-
|
66
|
+
On Vagrant 1.5+:
|
56
67
|
|
57
68
|
```
|
58
|
-
vagrant
|
69
|
+
vagrant init fgrehm/precise64-lxc
|
70
|
+
vagrant up --provider=lxc
|
59
71
|
```
|
60
72
|
|
61
|
-
|
62
|
-
to the one you've just added:
|
73
|
+
On Vagrant < 1.5:
|
63
74
|
|
64
|
-
```
|
65
|
-
|
66
|
-
|
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
|
-
|
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/
|
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.
|
121
|
-
|
122
|
-
|
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
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
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
|