-
Notifications
You must be signed in to change notification settings - Fork 20
/
maas-profile
105 lines (105 loc) · 2.45 KB
/
maas-profile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
config:
raw.lxc: |-
lxc.cgroup.devices.allow = c 10:237 rwm
lxc.apparmor.profile = unconfined
lxc.cgroup.devices.allow = b 7:* rwm
security.privileged: "true"
user.network-config: |
version: 1
config:
- type: physical
name: eth0
subnets:
- type: dhcp
- type: physical
name: eth1
- type: bridge
name: br0
bridge_interfaces:
- eth1
subnets:
- type: dhcp
user.user-data: |
#cloud-config
bootcmd:
- ln -s /dev/null /etc/systemd/system/avahi-daemon.service
apt:
sources:
# https://bugs.launchpad.net/maas/+bug/1740935
# maas-dev:
# source: "ppa:maas/next"
# maas-stable:
# source: "ppa:maas/stable"
package_upgrade: true
packages:
- bridge-utils
- maas
- qemu-kvm
- libvirt-bin
- virtinst
write_files:
- content: |
<network>
<name>maas</name>
<forward mode="bridge"/>
<bridge name="br0"/>
</network>
path: /var/lib/libvirt/qemu/network.xml
runcmd:
- [systemctl, restart, networking.service]
- [maas, createadmin, --username=admin, --password=admin, --email=admin]
- [adduser, maas, libvirt]
- [systemctl, restart, maas-rackd]
- [systemctl, restart, maas-regiond]
- [virsh, net-define, /var/lib/libvirt/qemu/network.xml]
- [virsh, net-autostart, maas]
- [virsh, net-start, maas]
- [virsh, net-destroy, default]
- [virsh, net-undefine, default]
- [virsh, pool-define-as, default, dir, --target, /var/lib/libvirt/images/]
- [virsh, pool-autostart, default]
- [virsh, pool-start, default]
description: Setus up a bridge in the LXD
devices:
eth0:
name: eth0
nictype: bridged
parent: lxdbr0
type: nic
eth1:
name: eth1
nictype: bridged
parent: lxdbr0
type: nic
kvm:
path: /dev/kvm
type: unix-char
vhost-net:
path: /dev/vhost-net
type: unix-char
loop0:
path: /dev/loop0
type: unix-block
loop1:
path: /dev/loop1
type: unix-block
loop2:
path: /dev/loop2
type: unix-block
loop3:
path: /dev/loop3
type: unix-block
loop4:
path: /dev/loop4
type: unix-block
loop5:
path: /dev/loop5
type: unix-block
loop6:
path: /dev/loop6
type: unix-block
loop7:
path: /dev/loop7
type: unix-block
name: maas-profile
used_by: []