summaryrefslogtreecommitdiffstats
path: root/ci/maas/intel/pod6
diff options
context:
space:
mode:
Diffstat (limited to 'ci/maas/intel/pod6')
-rwxr-xr-xci/maas/intel/pod6/deployment.yaml54
-rw-r--r--ci/maas/intel/pod6/interfaces.host33
-rwxr-xr-xci/maas/intel/pod6/lxc-add-more-interfaces52
3 files changed, 113 insertions, 26 deletions
diff --git a/ci/maas/intel/pod6/deployment.yaml b/ci/maas/intel/pod6/deployment.yaml
index 74c1a004..523f3dd3 100755
--- a/ci/maas/intel/pod6/deployment.yaml
+++ b/ci/maas/intel/pod6/deployment.yaml
@@ -13,7 +13,7 @@ demo-maas:
name: opnfv-maas-intel
interfaces: ['bridge=brAdm,model=virtio', 'bridge=brData,model=virtio', 'bridge=brPublic,model=virtio']
memory: 4096
- vcpus: 2
+ vcpus: 4
arch: amd64
pool: default
disk_size: 160G
@@ -79,10 +79,10 @@ demo-maas:
address 10.4.9.2
netmask 255.255.248.0
-# auto eth2
-# iface eth2 inet static
-# address 10.2.66.3
-# netmask 255.255.255.0
+ auto eth2
+ iface eth2 inet static
+ address 10.2.66.3
+ netmask 255.255.255.0
#auto lo
#iface lo inet loopback
@@ -114,26 +114,28 @@ demo-maas:
dynamic_range:
low: 10.4.1.50
high: 10.4.1.254
-# - device: eth1
-# ip: 10.4.9.2
-# subnet_mask: 255.255.248.0
-# broadcast_ip: 10.4.15.255
-# static_range:
-# low: 10.4.9.20
-# high: 10.4.9.150
-# dynamic_range:
-# low: 10.4.9.151
-# high: 10.4.9.200
-# - device: eth2
-# ip: 10.2.66.3
-# subnet_mask: 255.255.255.0
-# broadcast_ip: 10.2.66.255
-# static_range:
-# low: 10.2.66.20
-# high: 10.2.66.150
-# dynamic_range:
-# low: 10.2.66.151
-# high: 10.2.66.200
+ - device: eth1
+ ip: 10.4.9.2
+ subnet_mask: 255.255.255.0
+ broadcast_ip: 10.4.9.255
+ management: 1
+ static_range:
+ low: 10.4.9.20
+ high: 10.4.9.150
+ dynamic_range:
+ low: 10.4.9.151
+ high: 10.4.9.200
+ - device: eth2
+ ip: 10.2.66.3
+ subnet_mask: 255.255.255.0
+ broadcast_ip: 10.2.66.255
+ management: 1
+ static_range:
+ low: 10.2.66.20
+ high: 10.2.66.150
+ dynamic_range:
+ low: 10.2.66.151
+ high: 10.2.66.200
# Defines the physical nodes which are added to the MAAS cluster
# controller upon startup of the node.
@@ -243,7 +245,7 @@ demo-maas:
name: bootstrap
interfaces: ['bridge=brAdm,model=virtio', 'bridge=brData,model=virtio', 'bridge=brPublic,model=virtio']
memory: 4096
- vcpus: 2
+ vcpus: 4
arch: amd64
pool: default
disk_size: 120G
diff --git a/ci/maas/intel/pod6/interfaces.host b/ci/maas/intel/pod6/interfaces.host
new file mode 100644
index 00000000..86cdd056
--- /dev/null
+++ b/ci/maas/intel/pod6/interfaces.host
@@ -0,0 +1,33 @@
+#### original juju generated part ####
+auto lo
+
+# Primary interface (defining the default route)
+iface eth0 inet manual
+
+# Bridge to use for LXC/KVM containers
+auto juju-br0
+iface juju-br0 inet dhcp
+ bridge_ports eth0
+######################################
+
+auto eth1
+iface eth1 inet manual
+
+auto brData
+iface brData inet dhcp
+ bridge_ports eth1
+ bridge_stp off
+ bridge_fd 0
+ bridge_maxwait 0
+
+# The public network interface
+auto eth2
+iface eth2 inet manual
+
+auto brPublic
+iface brPublic inet dhcp
+ bridge_ports eth2
+ bridge_stp off
+ bridge_fd 0
+ bridge_maxwait 0
+
diff --git a/ci/maas/intel/pod6/lxc-add-more-interfaces b/ci/maas/intel/pod6/lxc-add-more-interfaces
new file mode 100755
index 00000000..c9bca9fd
--- /dev/null
+++ b/ci/maas/intel/pod6/lxc-add-more-interfaces
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+set -e
+set -u
+
+cat <<EOF >> "$LXC_CONFIG_FILE"
+
+## added by juju charm
+lxc.network.type = veth
+lxc.network.flags = up
+lxc.network.link = brData
+lxc.network.name = eth1
+lxc.network.hwaddr = 00:16:3e:$(openssl rand -hex 3| sed 's/\(..\)/\1:/g; s/.$//')
+
+lxc.network.type = veth
+lxc.network.flags = up
+lxc.network.link = brPublic
+lxc.network.name = eth2
+lxc.network.hwaddr = 00:16:3e:$(openssl rand -hex 3| sed 's/\(..\)/\1:/g; s/.$//')
+EOF
+
+USERDATA="$LXC_ROOTFS_PATH/var/lib/cloud/seed/nocloud-net/user-data"
+
+additional_interfaces="
+- |
+ cat <<EOF >> /etc/network/interfaces.d/additional-interfaces
+ ## added by juju charm
+ ## those interfaces will be brought up by the upstart job as /etc/init/additional-interfaces.conf
+ ## LP: #1483932
+ auto eth1
+ iface eth1 inet dhcp
+
+ auto eth2
+ iface eth2 inet dhcp
+ EOF
+- machine_agent=\$(hostname | sed -e 's/^juju-/jujud-/')
+- |
+ cat <<EOF > /etc/init/additional-interfaces.conf
+ ## added by juju charm
+ ## LP: #1483932
+ start on started \${machine_agent}
+
+ script
+ sleep 10
+ ifup -a -i /etc/network/interfaces.d/additional-interfaces
+ end script
+ EOF
+"
+additional_interfaces=$(echo "$additional_interfaces" | sed -e 's/$/\\n/' | tr -d '\n')
+
+sed -i.orig -e "s@^runcmd:@\0$additional_interfaces@" \
+ "$USERDATA"