Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for LXC #16

Open
cmrd-senya opened this issue Apr 3, 2016 · 0 comments
Open

Support for LXC #16

cmrd-senya opened this issue Apr 3, 2016 · 0 comments

Comments

@cmrd-senya
Copy link
Contributor

I personally find LXC containers more convinient for certain purposes than VirtualBox ones, e.g. for development.

To make diaspora-replica employ LXC is not hard, just a matter of these changes:

diff --git a/Vagrantfile b/Vagrantfile
index aadded2..2008ae7 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -8,7 +8,7 @@ Vagrant.configure("2") do |config|
   end

   # Ubuntu Server 14.04 LTS
-  config.vm.box = "puppetlabs/ubuntu-14.04-64-puppet"
+  config.vm.box = "fgrehm/trusty64-lxc"
   config.vm.provision :shell, inline: "apt-get update -y --fix-missing"

   # Ubuntu Server 12.04 LTS
@@ -30,11 +30,8 @@ Vagrant.configure("2") do |config|

   config.vm.define "development" do |dev|
     dev.vm.hostname = "development.diaspora.local"
-    dev.vm.network :private_network, ip: "192.168.11.2"
-    dev.vm.synced_folder "src/", "/home/vagrant/diaspora_src/", create: true, type: "nfs"
-    dev.vm.provider "virtualbox" do |vb|
-      vb.memory = 2048
-    end
+    dev.vm.synced_folder "src/", "/home/vagrant/diaspora_src/", create: true
+    dev.vm.network :private_network, ip: "192.168.11.2", lxc__bridge_name: "vlxcbr1"
   end

   config.vm.define "production" do |prod|

However, I wonder, if it is possible to write a Vagrant file in a way, so it contain all the required data to properly determine the required configuration depending on the launch options like
vagrant up development --provider=lxc or vagrant up development --provider=virtualbox with virtualbox as a default.

Is LXC support worthy for the diaspora-replica upstream?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant