Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Commit

Permalink
Issue #649: Add docs on how to use vagrant-lxc [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
oxyc committed Jan 26, 2017
1 parent 3566b31 commit b48609a
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
41 changes: 41 additions & 0 deletions docs/other/vagrant-lxc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[`vagrant-lxc` is a Vagrant plugin](https://github.com/fgrehm/vagrant-lxc) that provisions Linux Containers (LXC) rather than VM's such as VirtualBox or VMWare. Although LXC has much better performance, it only works on Linux hosts, and it isn't as well supported or tested by Drupal VM.

### Install dependencies

sudo apt-get install lxc bridge-utils
vagrant plugin install vagrant-lxc

### Load required kernel modules

As containers can't load modules, but inherit them from the host, you need to load these on your host machine.

sudo modprobe iptable_filter
sudo modprobe ip6table_filter

To load these automatically when you boot up your system, you should check the guidelines of your specific distribution. Usually you add them to `/etc/modules` or `/etc/modules-load.d/*`

### Create a [`Vagrantfile.local`](overriding-configurations.md#extending-the-vagrantfile-with-vagrantfilelocal)

config.vm.networks[0][1][:lxc__bridge_name] = 'vlxcbr1'
config.vm.provider :lxc do |lxc|
lxc.customize 'cgroup.memory.limit_in_bytes', "#{vconfig['vagrant_memory']}M"
end

Read more about how to configure the container in [`vagrant-lxc`'s README.md](https://github.com/fgrehm/vagrant-lxc#readme).

### Modify your `config.yml`

The following boxes have been tested only minimally, choose which one you want.

# Centos 7
vagrant_box: frensjan/centos-7-64-lxc

# Ubuntu 16.04
vagrant_box: nhinds/xenial64

# Do not interact with the UFW service on Ubuntu.
drupalvm_disable_ufw_firewall: false

### Provision the Container

vagrant up --provider=lxc
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ pages:
- Other Information:
- 'Networking Notes': 'other/networking.md'
- 'Vagrant and VirtualBox': 'other/vagrant-virtualbox.md'
- 'Vagrant LXC provider': 'other/vagrant-lxc.md'
- 'Improving Performance': 'other/performance.md'
- 'BigPipe with Drupal VM': 'other/bigpipe.md'
- 'Drupal multisite': 'deployment/multisite.md'
Expand Down

0 comments on commit b48609a

Please sign in to comment.