From c01e0738034fe01f7dedf07296b9770ea7d6cf01 Mon Sep 17 00:00:00 2001 From: Denis Pynkin Date: Sat, 5 Mar 2016 21:25:12 +0300 Subject: [PATCH] lxc: new feature for linux containers --- features.in/lxc/README | 0 features.in/lxc/config.mk | 11 ++++++ features.in/lxc/stage2/image-scripts.d/30-lxd | 37 +++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 features.in/lxc/README create mode 100644 features.in/lxc/config.mk create mode 100755 features.in/lxc/stage2/image-scripts.d/30-lxd diff --git a/features.in/lxc/README b/features.in/lxc/README new file mode 100644 index 00000000..e69de29b diff --git a/features.in/lxc/config.mk b/features.in/lxc/config.mk new file mode 100644 index 00000000..5923bd6c --- /dev/null +++ b/features.in/lxc/config.mk @@ -0,0 +1,11 @@ +use/lxc: + @$(call add_feature) + @$(call add,CONTROL,fusermount:public) + @$(call add,GROUPS,tun) + +use/lxc/lxd: use/lxc + @$(call add,GROUPS,netadmin lxd) + @$(call add,LIVE_LISTS,lxd) + @$(call add,LIVE_LISTS,openssh) + @$(call add,LIVE_PACKAGES,livecd-net-eth) + @$(call add,LIVE_PACKAGES,udev-rule-generator-net) diff --git a/features.in/lxc/stage2/image-scripts.d/30-lxd b/features.in/lxc/stage2/image-scripts.d/30-lxd new file mode 100755 index 00000000..740f9e1a --- /dev/null +++ b/features.in/lxc/stage2/image-scripts.d/30-lxd @@ -0,0 +1,37 @@ +#!/bin/sh + +echo LXD configuration + +# Setup subordinate ID's for root +usermod -v 1000000-1065535 -w 1000000-1065535 root + +# Configuration of LXD +# By defult bridge provided by lxc-net service is used +# but here we are ready to start own bridge +cat </etc/sysconfig/lxd +# FORCE_IMAGE_SYNC=true + +# lxdbr0 defaults to only setting up the standard IPv6 link-local network +# to enable routable IPv4 and/or IPv6, please edit /etc/sysconfig/lxd + +# The values below are defaults +USE_LXD_BRIDGE="true" +LXD_BRIDGE="lxdbr0" +LXD_CONFILE="/etc/lxd/dnsmasq.conf" +#LXD_DOMAIN="lxd" + +# IPv4 +LXD_IPV4_ADDR="192.168.202.1" +LXD_IPV4_NETMASK="255.255.255.0" +LXD_IPV4_NETWORK="192.168.202.0" +LXD_IPV4_DHCP_RANGE="192.168.202.100,192.168.202.199" +LXD_IPV4_DHCP_MAX="100" +LXD_IPV4_NAT="true" + +# IPv6 +#LXD_IPV6_ADDR="" +#LXD_IPV6_MASK="" +#LXD_IPV6_NETWORK="" +#LXD_IPV6_NAT="false" +LXD_IPV6_PROXY="true" +E_O_F