github.com/axw/juju@v0.0.0-20161005053422-4bd6544d08d4/scripts/setup-lxd.sh (about) 1 #!/bin/sh 2 # Copyright 2016 Canonical Ltd. 3 # Licensed under the AGPLv3, see LICENCE file for details. 4 set -ex 5 6 # Do the manual steps a user has to run on a fresh system to get an lxd 7 # bridge so the juju lxd provider can function. Taken from changes made 8 # to cloud-init to do approximately this. 9 10 debconf-communicate << EOF 11 set lxd/setup-bridge true 12 set lxd/bridge-domain lxd 13 set lxd/bridge-name lxdbr0 14 set lxd/bridge-ipv4 true 15 set lxd/bridge-ipv4-address 10.0.8.1 16 set lxd/bridge-ipv4-dhcp-first 10.0.8.2 17 set lxd/bridge-ipv4-dhcp-last 10.0.8.254 18 set lxd/bridge-ipv4-dhcp-leases 252 19 set lxd/bridge-ipv4-netmask 24 20 set lxd/bridge-ipv4-nat true 21 set lxd/bridge-ipv6 false 22 EOF 23 24 rm -rf /etc/default/lxd-bridge 25 26 dpkg-reconfigure lxd --frontend=noninteractive 27 28 # Must run a command for systemd socket activation to start the service 29 lxc finger