This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| visiesrv2_lxc_containers [2018/04/04 13:13] jpe | visiesrv2_lxc_containers [2018/06/15 14:15] (current) 143.169.49.96 | ||
|---|---|---|---|
| Line 54: | Line 54: | ||
| snap5 (taken at 2018/03/30 13:52 UTC) (stateless) | snap5 (taken at 2018/03/30 13:52 UTC) (stateless) | ||
| snap6 (taken at 2018/04/04 06:58 UTC) (stateless) | snap6 (taken at 2018/04/04 06:58 UTC) (stateless) | ||
| + |  | ||
| + | #lxc copy visielab-test/snap6 visielab-test2 | ||
| + | root@visionsrv2:/etc/apache2/sites-available# lxc list | ||
| + | +----------------+---------+----------------------+------+------------+-----------+ | ||
| + | | NAME | STATE | IPV4  | IPV6 | TYPE | SNAPSHOTS | | ||
| + | +----------------+---------+----------------------+------+------------+-----------+ | ||
| + | | nextcloud  | RUNNING | 10.27.117.84 (eth0)  | | PERSISTENT | 6 | | ||
| + | +----------------+---------+----------------------+------+------------+-----------+ | ||
| + | | openaudit  | RUNNING | 10.27.117.9 (eth0)  |  | PERSISTENT | 2 | | ||
| + | +----------------+---------+----------------------+------+------------+-----------+ | ||
| + | | visielab  | STOPPED | | | PERSISTENT | 3 | | ||
| + | +----------------+---------+----------------------+------+------------+-----------+ | ||
| + | | visielab-test  | RUNNING | 10.27.117.155 (eth0) | | PERSISTENT | 7 | | ||
| + | +----------------+---------+----------------------+------+------------+-----------+ | ||
| + | | visielab-test2 | STOPPED | | | PERSISTENT | 0 | | ||
| + | +----------------+---------+----------------------+------+------------+-----------+ | ||
| + | | visielab-wiki  | RUNNING | 10.27.117.55 (eth0)  | | PERSISTENT | 0 | | ||
| + | +----------------+---------+----------------------+------+------------+-----------+ | ||
| + | |||
| + | #lxc start visielab-test2 | ||
| + | #lxc start visielab-test2 | ||
| + | root@visionsrv2:/etc/apache2/sites-available# lxc list | ||
| + | +----------------+---------+----------------------+------+------------+-----------+ | ||
| + | | NAME | STATE | IPV4  | IPV6 | TYPE | SNAPSHOTS | | ||
| + | +----------------+---------+----------------------+------+------------+-----------+ | ||
| + | | nextcloud  | RUNNING | 10.27.117.84 (eth0)  | | PERSISTENT | 6 | | ||
| + | +----------------+---------+----------------------+------+------------+-----------+ | ||
| + | | openaudit  | RUNNING | 10.27.117.9 (eth0)  |  | PERSISTENT | 2 | | ||
| + | +----------------+---------+----------------------+------+------------+-----------+ | ||
| + | | visielab  | STOPPED | | | PERSISTENT | 3 | | ||
| + | +----------------+---------+----------------------+------+------------+-----------+ | ||
| + | | visielab-test  | RUNNING | 10.27.117.155 (eth0) | | PERSISTENT | 7 | | ||
| + | +----------------+---------+----------------------+------+------------+-----------+ | ||
| + | | visielab-test2 | RUNNING | 10.27.117.250 (eth0) | | PERSISTENT | 0 | | ||
| + | +----------------+---------+----------------------+------+------------+-----------+ | ||
| + | | visielab-wiki  | RUNNING | 10.27.117.55 (eth0)  | | PERSISTENT | 0 | | ||
| + | +----------------+---------+----------------------+------+------------+-----------+ | ||
| + | |||
| </code> | </code> | ||
| ===== networking of the LXC containers ===== | ===== networking of the LXC containers ===== | ||
| - | We defined all networking in /etc/lxd_bridge.conf .To use dnsmasq with this data, the correct variable must be defined in /etc/default/lxd-bridge -> LXD_CONFILE="/etc/lxd_bridge.conf" | + | We defined all networking in /etc/lxd_bridge.conf .To use dnsmasq with this data, the correct variable must be defined in /etc/default/lxd-bridge -> LXD_CONFILE="/etc/lxd_bridge.conf". If you modify something in this file, you have to stop dnsmasq manually (kill) and restart it afterwards. dnsmasq doesn't seem to run as a service. the process and it's parameters can be copied from here : | 
| + | <code> | ||
| + | dnsmasq --conf-file=/etc/lxd_bridge.conf -s ua.ac.be -S /ua.ac.be/ -u lxd --strict-order --bind-interfaces --pid-file=/run/lxd-bridge//dnsmasq.pid --dhcp-no-override --except-interface=lo --interface=lxdbr0 --dhcp-leasefile=/var/lib/lxd-bridge//dnsmasq.lxdbr0.leases --dhcp-authoritative --listen-address 10.27.117.1 --dhcp-range 10.27.117.2,10.27.117.254 --dhcp-lease-max=252 | ||
| + | </code> | ||
| <code> | <code> | ||
| Line 71: | Line 112: | ||
| ===== reverse proxying via apache ===== | ===== reverse proxying via apache ===== | ||
| - | to address the different websites in the lxc containers, we use reverse proxying with apache2.  | + | to address the different websites in the lxc containers, we use reverse proxying with apache2. We define the lxc backends and there ip addresses in **/etc/hosts** (lso check that the ip addresses match with the above lxd_bridge.conf definitions): | 
| + | <code> | ||
| + | 127.0.0.1  localhost | ||
| + | 127.0.1.1  visionsrv2.ua.ac.be  visionsrv2 | ||
| + | 10.27.117.84  nextcloud_be | ||
| + | 10.27.117.9  openaudit_be | ||
| + | 10.27.117.144  visielab_be | ||
| + | 10.27.117.155  visielab-test_be | ||
| + | 10.27.117.250  visielab-test2_be | ||
| + | 10.27.117.55  visielab_wiki_be | ||
| + | </code> | ||
| + | |||
| + | For apache the following sites are available : | ||
| + | ^ site config ^ DNS ^ domain ^ LXC backend ^ description ^ | ||
| + | | visieinv | visieinv | ua.ac.be | openaudit_be | for inventory of the PC's at visionlab | | ||
| + | | visielab-pc | visielab-pc | ua.ac.be \\ uantwerpen.be | nextcloud_be | private cloud for visionlab , secured with a SSL certificate | | ||
| + | | visielab-ssl | visielab | ua.ac.be \\ uantwerpen.be | visielab-test_be | visielab's website, secured with a SSL certificate | | ||
| + | | visielab | visielab | ua.ac.be \\ uantwerpen.be | visielab-test_be | redirect of http to https | | ||
| + | | visielab-test | visielab-test | ua.ac.be | visielab-test2_be | visielab test website , to test things out | | ||
| + | | visielab-wiki | visiedoc | ua.ac.be | visielab_wiki_be | the dokuwiki website of visionlab | | ||