#Below function will mark the interfaces in Auto mode to enbled by MAAS
enableautomode() {
listofnodes=`maas maas nodes list | grep system_id | cut -d '"' -f 4`
-
for nodes in $listofnodes
do
maas maas interface link-subnet $nodes $1 mode=$2 subnet=$3
done
}
+#Below function will mark the interfaces in Auto mode to enbled by MAAS
+# using hostname of the node added into MAAS
+
+enableautomodebyname() {
+ if [ ! -z "$4" ]; then
+ for i in `seq 1 7`;
+ do
+ listofnodes=`maas maas nodes list hostname=node$i-$4 | grep system_id | cut -d '"' -f 4`
+ if [ ! -z "$listofnodes" ]; then
+ maas maas interface link-subnet $nodes $1 mode=$2 subnet=$3
+ fi
+ done
+ fi
+}
+
#Below function will create vlan and update interface with the new vlan
# will return the vlan id created
crvlanupdsubnet() {
crvlanupdsubnet vlan724 2 "PublicNetwork" 724 3 || true
crnodevlanint $vlan721 || true
crnodevlanint $vlan724 || true
- enableautomode eth2.721 AUTO "10.4.9.0/24" || true
+ enableautomodebyname eth1.721 AUTO "10.4.9.0/24" compute || true
+ enableautomodebyname eth1.721 AUTO "10.4.9.0/24" control || true
;;
'intelpod6' )
- enableautomode eth1 AUTO "10.4.9.0/24" || true
+ maas refresh
+ enableautomodebyname eth1 AUTO "10.4.9.0/24" compute || true
+ enableautomodebyname eth1 AUTO "10.4.9.0/24" control || true
;;
'orangepod2' )
+ maas refresh
+ enableautomodebyname eth4 AUTO "192.168.22.0/24" compute || true
+ enableautomodebyname eth5 AUTO "192.168.12.0/24" compute || true
+ enableautomodebyname eth2 AUTO "192.168.22.0/24" control || true
+ enableautomodebyname eth3 AUTO "192.168.12.0/24" control || true
;;
'attvirpod1' )
;;
case "$3" in
'orangepod2' )
- cp maas/orange/pod2/control-interfaces.host trusty/ubuntu-nodes-controller/network/interfaces.host
- cp maas/orange/pod2/lxc-add-more-interfaces trusty/ubuntu-nodes-controller/lxc/add-more-interfaces
- cp maas/orange/pod2/compute-interfaces.host trusty/ubuntu-nodes-compute/network/interfaces.host
- cp maas/orange/pod2/lxc-add-more-interfaces trusty/ubuntu-nodes-compute/lxc/add-more-interfaces
# As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
sed -i -- 's/10.4.1.1/192.168.2.2/g' ./bundles.yaml
# choose the correct interface to use for data network
sed -i -- 's/# "ext-port": "eth1"/ "ext-port": "eth1"/g' ./bundles.yaml
;;
'intelpod6' )
- # As environment does not need special treatment for interfaces for MAAS 1.9
- sed -i -- 's/local:trusty\/ubuntu-nodes-controller/cs:trusty\/ubuntu/g' ./bundles.yaml
- sed -i -- 's/local:trusty\/ubuntu-nodes-compute/cs:trusty\/ubuntu/g' ./bundles.yaml
# As per your lab vip address list be deafult uses 10.4.1.21 - 10.4.1.29
sed -i -- 's/10.4.1.1/10.4.1.2/g' ./bundles.yaml
# choose the correct interface to use for data network
sed -i -- 's/# "ext-port": "eth1"/ "ext-port": "eth2"/g' ./bundles.yaml
;;
'intelpod5' )
- # As environment does not need special treatment for interfaces for MAAS 1.9
- sed -i -- 's/local:trusty\/ubuntu-nodes-controller/cs:trusty\/ubuntu/g' ./bundles.yaml
- sed -i -- 's/local:trusty\/ubuntu-nodes-compute/cs:trusty\/ubuntu/g' ./bundles.yaml
# As per your lab vip address list be deafult uses 10.4.1.21 - 10.4.1.29
sed -i -- 's/10.4.1.1/10.4.1.2/g' ./bundles.yaml
# choose the correct interface to use for data network
sed -i -- 's/# "ext-port": "eth1"/ "ext-port": "eth2.724"/g' ./bundles.yaml
;;
'attvirpod1' )
- # As virtual environment does not need special treatment for interfaces.
- sed -i -- 's/local:trusty\/ubuntu-nodes-controller/cs:trusty\/ubuntu/g' ./bundles.yaml
- sed -i -- 's/local:trusty\/ubuntu-nodes-compute/cs:trusty\/ubuntu/g' ./bundles.yaml
# As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
sed -i -- 's/10.4.1.1/192.168.10.1/g' ./bundles.yaml
# Choose the external port to go out from gateway to use.
sed -i -- 's/# "ext-port": "eth1"/ "ext-port": "eth1"/g' ./bundles.yaml
;;
'default' )
- sed -i -- 's/local:trusty\/ubuntu-nodes-controller/cs:trusty\/ubuntu/g' ./bundles.yaml
- sed -i -- 's/local:trusty\/ubuntu-nodes-compute/cs:trusty\/ubuntu/g' ./bundles.yaml
sed -i -- 's/10.4.1.1/192.168.122.1/g' ./bundles.yaml
sed -i -- 's/# "ext-port": "eth1"/ "ext-port": "eth1"/g' ./bundles.yaml
;;
series: trusty
services:
nodes-api:
- charm: "local:trusty/ubuntu-nodes-controller"
+ charm: "cs:trusty/ubuntu"
num_units: 3
constraints: tags=control
nodes-compute:
- charm: "local:trusty/ubuntu-nodes-compute"
+ charm: "cs:trusty/ubuntu"
num_units: 2
constraints: tags=compute
"ntp":
- "nodes-api=2"
ceph-radosgw:
charm: cs:trusty/ceph-radosgw
- num_units: 3
+ num_units: 1
options:
use-embedded-webserver: true
to:
- "lxc:nodes-api=0"
- - "lxc:nodes-api=1"
- - "lxc:nodes-api=2"
cinder:
charm: cs:trusty/cinder
num_units: 3
series: trusty
services:
nodes-api:
- charm: "local:trusty/ubuntu-nodes-controller"
+ charm: "cs:trusty/ubuntu"
num_units: 1
constraints: tags=control
nodes-compute:
- charm: "local:trusty/ubuntu-nodes-compute"
+ charm: "cs:trusty/ubuntu"
num_units: 1
constraints: tags=compute
"ntp":
series: trusty
services:
nodes-api:
- charm: "local:trusty/ubuntu-nodes-controller"
+ charm: "cs:trusty/ubuntu"
num_units: 1
constraints: tags=control
nodes-compute:
- charm: "local:trusty/ubuntu-nodes-compute"
+ charm: "cs:trusty/ubuntu"
num_units: 1
constraints: tags=compute
"ntp":
case "$3" in
'orangepod2' )
- cp maas/orange/pod2/control-interfaces.host trusty/ubuntu-nodes-controller/network/interfaces.host
- cp maas/orange/pod2/lxc-add-more-interfaces trusty/ubuntu-nodes-controller/lxc/add-more-interfaces
- cp maas/orange/pod2/compute-interfaces.host trusty/ubuntu-nodes-compute/network/interfaces.host
- cp maas/orange/pod2/lxc-add-more-interfaces trusty/ubuntu-nodes-compute/lxc/add-more-interfaces
# As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
sed -i -- 's/10.4.1.1/192.168.2.2/g' ./bundles.yaml
# choose the correct interface to use for data network
sed -i -- 's/# "ext-port": "eth1"/ "ext-port": "eth1"/g' ./bundles.yaml
;;
'intelpod6' )
- # As environment does not need special treatment for interfaces for MAAS 1.9
- sed -i -- 's/local:trusty\/ubuntu-nodes-controller/cs:trusty\/ubuntu/g' ./bundles.yaml
- sed -i -- 's/local:trusty\/ubuntu-nodes-compute/cs:trusty\/ubuntu/g' ./bundles.yaml
# As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
sed -i -- 's/10.4.1.1/10.4.1.2/g' ./bundles.yaml
# choose the correct interface to use for data network
sed -i -- 's/# "ext-port": "eth1"/ "ext-port": "eth2"/g' ./bundles.yaml
;;
'intelpod5' )
- # As environment does not need special treatment for interfaces for MAAS 1.9
- sed -i -- 's/local:trusty\/ubuntu-nodes-controller/cs:trusty\/ubuntu/g' ./bundles.yaml
- sed -i -- 's/local:trusty\/ubuntu-nodes-compute/cs:trusty\/ubuntu/g' ./bundles.yaml
# As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
sed -i -- 's/10.4.1.1/10.4.1.2/g' ./bundles.yaml
# choose the correct interface to use for data network
sed -i -- 's/# "ext-port": "eth1"/ "ext-port": "eth2.724"/g' ./bundles.yaml
;;
'attvirpod1' )
- # As virtual environment does not need special treatment for interfaces.
- sed -i -- 's/local:trusty\/ubuntu-nodes-controller/cs:trusty\/ubuntu/g' ./bundles.yaml
- sed -i -- 's/local:trusty\/ubuntu-nodes-compute/cs:trusty\/ubuntu/g' ./bundles.yaml
# As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
sed -i -- 's/10.4.1.1/192.168.10.1/g' ./bundles.yaml
# Choose the external port to go out from gateway to use.
sed -i -- 's/# "ext-port": "eth1"/ "ext-port": "eth1"/g' ./bundles.yaml
;;
'default' )
- sed -i -- 's/local:trusty\/ubuntu-nodes-controller/cs:trusty\/ubuntu/g' ./bundles.yaml
- sed -i -- 's/local:trusty\/ubuntu-nodes-compute/cs:trusty\/ubuntu/g' ./bundles.yaml
sed -i -- 's/10.4.1.1/192.168.122.1/g' ./bundles.yaml
sed -i -- 's/# "ext-port": "eth1"/ "ext-port": "eth1"/g' ./bundles.yaml
;;
series: trusty
services:
nodes-api:
- charm: "local:trusty/ubuntu-nodes-controller"
+ charm: "cs:trusty/ubuntu"
num_units: 3
constraints: tags=control
nodes-compute:
- charm: "local:trusty/ubuntu-nodes-compute"
+ charm: "cs:trusty/ubuntu"
num_units: 2
constraints: tags=compute
"ntp":
series: trusty
services:
nodes-api:
- charm: "local:trusty/ubuntu-nodes-controller"
+ charm: "cs:trusty/ubuntu"
num_units: 1
constraints: tags=control
nodes-compute:
- charm: "local:trusty/ubuntu-nodes-compute"
+ charm: "cs:trusty/ubuntu"
num_units: 1
constraints: tags=compute
"ntp":
series: trusty
services:
nodes-api:
- charm: "local:trusty/ubuntu-nodes-controller"
+ charm: "cs:trusty/ubuntu"
num_units: 1
constraints: tags=control
nodes-compute:
- charm: "local:trusty/ubuntu-nodes-compute"
+ charm: "cs:trusty/ubuntu"
num_units: 1
constraints: tags=compute
"ntp":
case "$3" in
'orangepod2' )
- cp maas/orange/pod2/control-interfaces.host trusty/ubuntu-nodes-controller/network/interfaces.host
- cp maas/orange/pod2/lxc-add-more-interfaces trusty/ubuntu-nodes-controller/lxc/add-more-interfaces
- cp maas/orange/pod2/compute-interfaces.host trusty/ubuntu-nodes-compute/network/interfaces.host
- cp maas/orange/pod2/lxc-add-more-interfaces trusty/ubuntu-nodes-compute/lxc/add-more-interfaces
# As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
sed -i -- 's/10.4.1.1/192.168.2.2/g' ./bundles.yaml
# choose the correct interface to use for data network
sed -i -- 's/# "ext-port": "eth1"/ "ext-port": "eth1"/g' ./bundles.yaml
;;
'intelpod6' )
- cp maas/intel/pod6/interfaces.host trusty/ubuntu-nodes-controller/network/interfaces.host
- cp maas/intel/pod6/lxc-add-more-interfaces trusty/ubuntu-nodes-controller/lxc/add-more-interfaces
- cp maas/intel/pod6/interfaces.host trusty/ubuntu-nodes-compute/network/interfaces.host
- cp maas/intel/pod6/lxc-add-more-interfaces trusty/ubuntu-nodes-compute/lxc/add-more-interfaces
# As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
sed -i -- 's/10.4.1.1/10.4.1.2/g' ./bundles.yaml
# choose the correct interface to use for data network
sed -i -- 's/# "ext-port": "eth1"/ "ext-port": "brPublic"/g' ./bundles.yaml
;;
'intelpod5' )
- cp maas/intel/pod5/interfaces.host trusty/ubuntu-nodes-controller/network/interfaces.host
- cp maas/intel/pod5/lxc-add-more-interfaces trusty/ubuntu-nodes-controller/lxc/add-more-interfaces
- cp maas/intel/pod5/interfaces.host trusty/ubuntu-nodes-compute/network/interfaces.host
- cp maas/intel/pod5/lxc-add-more-interfaces trusty/ubuntu-nodes-compute/lxc/add-more-interfaces
# As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
sed -i -- 's/10.4.1.1/10.4.1.2/g' ./bundles.yaml
# choose the correct interface to use for data network
sed -i -- 's/# "ext-port": "eth1"/ "ext-port": "brPublic"/g' ./bundles.yaml
;;
'attvirpod1' )
- cp maas/att/virpod1/interfaces.host trusty/ubuntu-nodes-controller/network/interfaces.host
- cp maas/att/virpod1/interfaces.host trusty/ubuntu-nodes-compute/network/interfaces.host
- cp maas/att/virpod1/lxc-add-more-interfaces trusty/ubuntu-nodes-controller/lxc/add-more-interfaces
- cp maas/att/virpod1/lxc-add-more-interfaces trusty/ubuntu-nodes-compute/lxc/add-more-interfaces
- # As virtual environment does not need special treatment for interfaces.
- sed -i -- 's/local:trusty\/ubuntu-nodes-controller/cs:trusty\/ubuntu/g' ./bundles.yaml
- sed -i -- 's/local:trusty\/ubuntu-nodes-compute/cs:trusty\/ubuntu/g' ./bundles.yaml
# As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
sed -i -- 's/10.4.1.1/192.168.10.1/g' ./bundles.yaml
# Choose the external port to go out from gateway to use.
sed -i -- 's/# "ext-port": "eth1"/ "ext-port": "eth1"/g' ./bundles.yaml
;;
'default' )
- sed -i -- 's/local:trusty\/ubuntu-nodes-controller/cs:trusty\/ubuntu/g' ./bundles.yaml
- sed -i -- 's/local:trusty\/ubuntu-nodes-compute/cs:trusty\/ubuntu/g' ./bundles.yaml
sed -i -- 's/10.4.1.1/192.168.122.1/g' ./bundles.yaml
# sed -i -- 's/# "ext-port": "eth1"/ "ext-port": "eth1"/g' ./bundles.yaml
;;
series: trusty
services:
nodes-api:
- charm: "local:trusty/ubuntu-nodes-controller"
+ charm: "cs:trusty/ubuntu"
num_units: 3
constraints: tags=control
nodes-compute:
- charm: "local:trusty/ubuntu-nodes-compute"
+ charm: "cs:trusty/ubuntu"
num_units: 2
constraints: tags=compute
"ntp":
series: trusty
services:
nodes-api:
- charm: "local:trusty/ubuntu-nodes-controller"
+ charm: "cs:trusty/ubuntu"
num_units: 1
constraints: tags=control
nodes-compute:
- charm: "local:trusty/ubuntu-nodes-compute"
+ charm: "cs:trusty/ubuntu"
num_units: 1
constraints: tags=compute
"ntp":
series: trusty
services:
nodes-api:
- charm: "local:trusty/ubuntu-nodes-controller"
+ charm: "cs:trusty/ubuntu"
num_units: 1
constraints: tags=control
nodes-compute:
- charm: "local:trusty/ubuntu-nodes-compute"
+ charm: "cs:trusty/ubuntu"
num_units: 1
constraints: tags=compute
"ntp":
case "$3" in
'orangepod2' )
- cp maas/orange/pod2/control-interfaces.host trusty/ubuntu-nodes-controller/network/interfaces.host
- cp maas/orange/pod2/lxc-add-more-interfaces trusty/ubuntu-nodes-controller/lxc/add-more-interfaces
- cp maas/orange/pod2/compute-interfaces.host trusty/ubuntu-nodes-compute/network/interfaces.host
- cp maas/orange/pod2/lxc-add-more-interfaces trusty/ubuntu-nodes-compute/lxc/add-more-interfaces
# As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
sed -i -- 's/10.4.1.1/192.168.2.2/g' ./bundles.yaml
# choose the correct interface to use for data network
sed -i -- 's/# "ext-port": "eth1"/ "ext-port": "eth1"/g' ./bundles.yaml
;;
'intelpod6' )
- # As environment does not need special treatment for interfaces for MAAS 1.9
- sed -i -- 's/local:trusty\/ubuntu-nodes-controller/cs:trusty\/ubuntu/g' ./bundles.yaml
- sed -i -- 's/local:trusty\/ubuntu-nodes-compute/cs:trusty\/ubuntu/g' ./bundles.yaml
# As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
sed -i -- 's/10.4.1.1/10.4.1.2/g' ./bundles.yaml
# choose the correct interface to use for data network
sed -i -- 's/# "ext-port": "eth1"/ "ext-port": "eth2"/g' ./bundles.yaml
;;
'intelpod5' )
- # As environment does not need special treatment for interfaces for MAAS 1.9
- sed -i -- 's/local:trusty\/ubuntu-nodes-controller/cs:trusty\/ubuntu/g' ./bundles.yaml
- sed -i -- 's/local:trusty\/ubuntu-nodes-compute/cs:trusty\/ubuntu/g' ./bundles.yaml
# As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
sed -i -- 's/10.4.1.1/10.4.1.2/g' ./bundles.yaml
# choose the correct interface to use for data network
sed -i -- 's/# "ext-port": "eth1"/ "ext-port": "eth2.724"/g' ./bundles.yaml
;;
'attvirpod1' )
- # As virtual environment does not need special treatment for interfaces.
- sed -i -- 's/local:trusty\/ubuntu-nodes-controller/cs:trusty\/ubuntu/g' ./bundles.yaml
- sed -i -- 's/local:trusty\/ubuntu-nodes-compute/cs:trusty\/ubuntu/g' ./bundles.yaml
# As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
sed -i -- 's/10.4.1.1/192.168.10.1/g' ./bundles.yaml
# Choose the external port to go out from gateway to use.
sed -i -- 's/# "ext-port": "eth1"/ "ext-port": "eth1"/g' ./bundles.yaml
;;
'default' )
- sed -i -- 's/local:trusty\/ubuntu-nodes-controller/cs:trusty\/ubuntu/g' ./bundles.yaml
- sed -i -- 's/local:trusty\/ubuntu-nodes-compute/cs:trusty\/ubuntu/g' ./bundles.yaml
sed -i -- 's/10.4.1.1/192.168.122.1/g' ./bundles.yaml
sed -i -- 's/# "ext-port": "eth1"/ "ext-port": "eth1"/g' ./bundles.yaml
;;
series: trusty
services:
nodes-api:
- charm: "local:trusty/ubuntu-nodes-controller"
+ charm: "cs:trusty/ubuntu"
num_units: 3
constraints: tags=control
nodes-compute:
- charm: "local:trusty/ubuntu-nodes-compute"
+ charm: "cs:trusty/ubuntu"
num_units: 2
constraints: tags=compute
"ntp":
series: trusty
services:
nodes-api:
- charm: "local:trusty/ubuntu-nodes-controller"
+ charm: "cs:trusty/ubuntu"
num_units: 1
constraints: tags=control
nodes-compute:
- charm: "local:trusty/ubuntu-nodes-compute"
+ charm: "cs:trusty/ubuntu"
num_units: 1
constraints: tags=compute
"ntp":
series: trusty
services:
nodes-api:
- charm: "local:trusty/ubuntu-nodes-controller"
+ charm: "cs:trusty/ubuntu"
num_units: 1
constraints: tags=control
nodes-compute:
- charm: "local:trusty/ubuntu-nodes-compute"
+ charm: "cs:trusty/ubuntu"
num_units: 1
constraints: tags=compute
"ntp":