Showing
1 changed file
with
45 additions
and
18 deletions
| 1 | -# Vagrant::Lxd | 1 | +# vagrant-lxc |
| 2 | 2 | ||
| 3 | -Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/vagrant/lxd`. To experiment with that code, run `bin/console` for an interactive prompt. | 3 | +[LXD](https://www.ubuntu.com/containers/lxd) provider for |
| 4 | +[Vagrant](http://www.vagrantup.com/) 1.9.3 | ||
| 4 | 5 | ||
| 5 | -TODO: Delete this and the text above, and describe your gem | 6 | +This is a Vagrant plugin that allows it to control and provision Linux |
| 7 | +Containers as an alternative to the built in VirtualBox provider for Linux | ||
| 8 | +hosts. | ||
| 9 | + | ||
| 10 | +## Features | ||
| 11 | + | ||
| 12 | +* Start and stop LXD managed container. | ||
| 13 | +* No port forwarding right now. | ||
| 14 | +* Uses LXD managed bridge network. | ||
| 15 | + | ||
| 16 | +## Requirements | ||
| 17 | + | ||
| 18 | +* [Vagrant](http://www.vagrantup.com/downloads.html) (tested with 1.9.3) | ||
| 19 | +* lxd (tested with 2.11) | ||
| 20 | +* All lxd dependencies (especially dnsmasq for LXD managed networking) | ||
| 21 | + | ||
| 22 | +I tested the plugin on gentoo, installed via `vagrant plugin install`. | ||
| 6 | 23 | ||
| 7 | ## Installation | 24 | ## Installation |
| 8 | 25 | ||
| 9 | -Add this line to your application's Gemfile: | 26 | +As long as is not publicly available at rubygems pleace clone the repo, |
| 27 | +Change to the checked out directory ad do: | ||
| 10 | 28 | ||
| 11 | -```ruby | ||
| 12 | -gem 'vagrant-lxd' | 29 | +``` |
| 30 | +rake build | ||
| 31 | +vagrant plugin install pkg/vagrant-lxd-0.0.1.gem | ||
| 13 | ``` | 32 | ``` |
| 14 | 33 | ||
| 15 | -And then execute: | ||
| 16 | - | ||
| 17 | - $ bundle | 34 | +## Boxes |
| 18 | 35 | ||
| 19 | -Or install it yourself as: | 36 | +Some example boxes are provided within the example_box directory. |
| 20 | 37 | ||
| 21 | - $ gem install vagrant-lxd | 38 | +## Configuration |
| 22 | 39 | ||
| 23 | -## Usage | 40 | +Currently the provider knows only one config option. |
| 24 | 41 | ||
| 25 | -TODO: Write usage instructions here | 42 | +```ruby |
| 43 | +Vagrant.configure("2") do |config| | ||
| 44 | + config.vm.provider :lxd do |lxd| | ||
| 45 | + lxd.privileged = true | ||
| 46 | + end | ||
| 47 | +end | ||
| 48 | +``` | ||
| 26 | 49 | ||
| 27 | -## Development | 50 | +This will create a privileged instead of an unprivileged container. |
| 28 | 51 | ||
| 29 | -After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment. | 52 | +### Container naming |
| 30 | 53 | ||
| 31 | -To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). | 54 | +The defined VM name will be prefixed with vagrant. At the moment there is |
| 55 | +no logic to make them uniqe. | ||
| 32 | 56 | ||
| 33 | ## Contributing | 57 | ## Contributing |
| 34 | 58 | ||
| 35 | -Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/vagrant-lxd. | ||
| 36 | - | 59 | +1. Fork it |
| 60 | +2. Create your feature branch (`git checkout -b my-new-feature`) | ||
| 61 | +3. Commit your changes (`git commit -am 'Add some feature'`) | ||
| 62 | +4. Push to the branch (`git push origin my-new-feature`) | ||
| 63 | +5. Create new Pull Request |
Please
register
or
login
to post a comment