add extra interface to enable the keepablived plane and the api plane 89/36989/6
authorroot <zhou.ya@zte.com.cn>
Thu, 6 Jul 2017 02:42:50 +0000 (10:42 +0800)
committerroot <zhou.ya@zte.com.cn>
Fri, 7 Jul 2017 04:50:18 +0000 (12:50 +0800)
Change-Id: I0157bf8b6fa9be254c61bb384065f80107ab3dda
Signed-off-by: root <zhou.ya@zte.com.cn>
16 files changed:
ci/deploy/deploy.sh
deploy/config/bm_environment/zte-baremetal1/deploy.yml
deploy/config/bm_environment/zte-baremetal1/network.yml
deploy/config/network.py
deploy/config/vm_environment/zte-virtual1/deploy.yml
deploy/config/vm_environment/zte-virtual1/network.yml
deploy/config/vm_environment/zte-virtual2/deploy.yml
deploy/config/vm_environment/zte-virtual2/network.yml
deploy/environment.py
templates/virtual_environment/networks/external.xml [moved from templates/virtual_environment/networks/os-all_in_one.xml with 100% similarity]
templates/virtual_environment/networks/keepalived.xml [new file with mode: 0644]
templates/virtual_environment/vms/computer01.xml
templates/virtual_environment/vms/computer02.xml
templates/virtual_environment/vms/controller01.xml
templates/virtual_environment/vms/controller02.xml
templates/virtual_environment/vms/controller03.xml

index a67e809..d73a2c9 100755 (executable)
@@ -62,7 +62,7 @@ POD_NAME=''
 TARGET_HOSTS_NUM=0
 DRY_RUN=0
 IS_BARE=1
-VM_MULTINODE=("computer01" "computer02" "computer03" "computer04" "controller01")
+VM_MULTINODE=("computer01" "computer02" "controller02" "controller03" "controller01")
 VALID_DEPLOY_SCENARIO=("os-nosdn-nofeature-noha" "os-nosdn-nofeature-ha" "os-odl_l3-nofeature-noha" "os-odl_l2-nofeature-noha")
 #
 # END of variables to customize
@@ -149,7 +149,8 @@ DEPLOY_PATH=$WORKSPACE/deploy
 CREATE_QCOW2_PATH=$WORKSPACE/tools
 
 VMDELOY_DAISY_SERVER_NET=$WORKSPACE/templates/virtual_environment/networks/daisy.xml
-VMDEPLOY_TARGET_NODE_NET=$WORKSPACE/templates/virtual_environment/networks/os-all_in_one.xml
+VMDEPLOY_TARGET_NODE_NET=$WORKSPACE/templates/virtual_environment/networks/external.xml
+VMDEPLOY_TARGET_KEEPALIVED_NET=$WORKSPACE/templates/virtual_environment/networks/keepalived.xml
 VMDEPLOY_DAISY_SERVER_VM=$WORKSPACE/templates/virtual_environment/vms/daisy.xml
 VMDEPLOY_TARGET_NODE_VM=$WORKSPACE/templates/virtual_environment/vms/all_in_one.xml
 
@@ -336,6 +337,9 @@ if [ $IS_BARE == 0 ];then
         virsh net-define $VMDEPLOY_TARGET_NODE_NET
         virsh net-autostart daisy2
         virsh net-start daisy2
+        virsh net-define $VMDEPLOY_TARGET_KEEPALIVED_NET
+        virsh net-autostart daisy3
+        virsh net-start daisy3
         for ((i=0;i<${#VM_MULTINODE[@]};i++));do
             qemu-img create -f qcow2 ${VM_STORAGE}/${VM_MULTINODE[$i]}.qcow2 120G
             qemu-img create -f qcow2 ${VM_STORAGE}/${VM_MULTINODE[$i]}_data.qcow2 150G
index b858425..d24a956 100644 (file)
@@ -3,6 +3,12 @@ hosts:
 - name: 'controller01'\r
   roles:\r
     - 'CONTROLLER_LB'\r
+- name: 'controller02'\r
+  roles:\r
+    - 'CONTROLLER_LB'\r
+- name: 'controller03'\r
+  roles:\r
+    - 'CONTROLLER_LB'\r
 - name: 'computer01'\r
   roles:\r
     - 'COMPUTER'\r
index b414090..77765df 100644 (file)
@@ -46,12 +46,12 @@ networks:
     'name': 'EXTERNAL'\r
     network_name: 'admin_external'\r
     mapping: 'physnet1'\r
-  - cidr: '10.20.7.0/24'\r
-    gateway: '10.20.7.1'\r
+  - cidr: '192.168.71.0/24'\r
+    gateway: '192.168.71.1'\r
     ip_ranges:\r
-      - 'start': '10.20.7.20'\r
-        'end': '10.20.7.200'\r
-    vlan_id: null\r
+      - 'start': '192.168.71.2'\r
+        'end': '192.168.71.254'\r
+    vlan_id: 171\r
     name: 'PUBLICAPI'\r
   - cidr: '192.168.73.0/24'\r
     gateway: '192.168.73.1'\r
@@ -60,16 +60,25 @@ networks:
         'end': '192.168.73.254'\r
     vlan_id: 1130\r
     name: 'TENANT'\r
+  - cidr: '10.20.7.0/24'\r
+    gateway: '10.20.7.1'\r
+    ip_ranges:\r
+      - 'start': '10.20.7.20'\r
+        'end': '10.20.7.200'\r
+    vlan_id: null\r
+    name: 'HEARTBEAT'\r
 interfaces:\r
   - name: 'EXTERNAL'\r
     interface: 'ens44f1'\r
   - name: 'MANAGEMENT'\r
     interface: 'ens12f0'\r
   - name: 'PUBLICAPI'\r
-    interface: 'ens4f0'\r
+    interface: 'ens12f0'\r
   - name: 'STORAGE'\r
     interface: 'ens12f1'\r
   - name: 'TENANT'\r
     interface: 'ens44f0'\r
+  - name: 'HEARTBEAT'\r
+    interface: 'ens4f0'\r
 internal_vip: '192.168.71.10'\r
 public_vip: '10.20.7.11'\r
index cd38e94..4d877a7 100644 (file)
@@ -18,6 +18,7 @@ class NetworkConfig(object):
         'STORAGE': 'stor',
         'PUBLICAPI': 'pub',
         'TENANT': 'tenant',
+        'HEARTBEAT': 'hbt',
     }
 
     def __init__(self, network_file):
index a85f429..e80d031 100644 (file)
@@ -1,15 +1,31 @@
-adapter: libvirt\r
-hosts:\r
-- name: 'all_in_one'\r
-  roles:\r
-    - 'CONTROLLER_LB'\r
-    - 'COMPUTER'\r
-  template: 'templates/virtual_environment/vms/all_in_one.xml'\r
-disks:\r
-  daisy: 50\r
-  controller: 110\r
-  compute: 110\r
-daisy_passwd: 'r00tme'\r
-daisy_ip: '10.20.11.2'\r
-daisy_gateway: '10.20.11.1'\r
-ceph_disk_name: ''\r
+adapter: libvirt
+hosts:
+- name: 'controller01'
+  roles:
+    - 'CONTROLLER_LB'
+  template: 'templates/virtual_environment/vms/controller.xml'
+- name: 'controller02'
+  roles:
+    - 'CONTROLLER_LB'
+  template: 'templates/virtual_environment/vms/controller.xml'
+- name: 'controller03'
+  roles:
+    - 'CONTROLLER_LB'
+  template: 'templates/virtual_environment/vms/controller.xml'
+- name: 'computer01'
+  roles:
+    - 'COMPUTER'
+  template: 'templates/virtual_environment/vms/computer.xml'
+- name: 'computer02'
+  roles:
+    - 'COMPUTER'
+  template: 'templates/virtual_environment/vms/computer.xml'
+disks:
+  daisy: 50
+  controller: 110
+  compute: 110
+  ceph: 110
+daisy_passwd: 'r00tme'
+daisy_ip: '10.20.11.2'
+daisy_gateway: '10.20.11.1'
+ceph_disk_name: '/dev/sdb'
index 34b466a..b2e8773 100644 (file)
@@ -1,61 +1,69 @@
-##############################################################################\r
-# Copyright (c) 2016 ZTE Coreporation and others.\r
-# hu.zhijiang@zte.com.cn\r
-# sun.jing22@zte.com.cn\r
-# All rights reserved. This program and the accompanying materials\r
-# are made available under the terms of the Apache License, Version 2.0\r
-# which accompanies this distribution, and is available at\r
-# http://www.apache.org/licenses/LICENSE-2.0\r
-##############################################################################\r
-\r
-network-config-metadata:\r
-  title: 'zte-virtual1 network config'\r
-  version: '0.1'\r
-  created: 'Mon Oct 31 2016'\r
-  comment:\r
-networks:\r
-  - cidr: '10.20.11.0/24'\r
-    gateway: '10.20.11.1'\r
-    ip_ranges:\r
-    - start: '10.20.11.3'\r
-      end: '10.20.11.10'\r
-    name: 'MANAGEMENT'\r
-  - cidr: '10.20.11.0/24'\r
-    gateway: '10.20.11.1'\r
-    ip_ranges:\r
-    - start: '10.20.11.3'\r
-      end: '10.20.11.10'\r
-    name: 'STORAGE'\r
-  - cidr: '172.10.101.0/24'\r
-    gateway: '172.10.101.1'\r
-    ip_ranges:\r
-    - start: 172.10.101.2\r
-      end: 172.10.101.20\r
-    name: EXTERNAL\r
-    network_name: admin_external\r
-    mapping: physnet1\r
-  - cidr: '10.20.11.0/24'\r
-    gateway: '10.20.11.1'\r
-    ip_ranges:\r
-    - start: '10.20.11.3'\r
-      end: '10.20.11.10'\r
-    name: 'PUBLICAPI'\r
-  - cidr: '10.20.11.0/24'\r
-    gateway: '10.20.11.1'\r
-    ip_ranges:\r
-    - start: '10.20.11.3'\r
-      end: '10.20.11.10'\r
-    name: 'TENANT'\r
-interfaces:\r
-  - name: 'EXTERNAL'\r
-    interface: 'ens8'\r
-  - name: 'MANAGEMENT'\r
-    interface: 'ens3'\r
-  - name: 'PUBLICAPI'\r
-    interface: 'ens3'\r
-  - name: 'STORAGE'\r
-    interface: 'ens3'\r
-  - name: 'TENANT'\r
-    interface: 'ens3'\r
-internal_vip: '10.20.11.11'\r
-public_vip: '10.20.11.11'\r
+##############################################################################
+# Copyright (c) 2016 ZTE Coreporation and others.
+# hu.zhijiang@zte.com.cn
+# sun.jing22@zte.com.cn
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+network-config-metadata:
+  title: 'zte-virtual1 network config'
+  version: '0.1'
+  created: 'Tue Apr 11 2017'
+  comment: 'five vm node deploy'
+networks:
+  - cidr: '10.20.11.0/24'
+    gateway: '10.20.11.1'
+    ip_ranges:
+    - start: '10.20.11.3'
+      end: '10.20.11.10'
+    name: 'MANAGEMENT'
+  - cidr: '10.20.11.0/24'
+    gateway: '10.20.11.1'
+    ip_ranges:
+    - start: '10.20.11.3'
+      end: '10.20.11.10'
+    name: 'STORAGE'
+  - cidr: '172.10.101.0/24'
+    gateway: '172.10.101.1'
+    ip_ranges:
+    - start: '172.10.101.2'
+      end: '172.10.101.20'
+    name: 'EXTERNAL'
+    network_name: 'admin_external'
+    mapping: 'physnet1'
+  - cidr: '10.20.11.0/24'
+    gateway: '10.20.11.1'
+    ip_ranges:
+    - start: '10.20.11.3'
+      end: '10.20.11.10'
+    name: 'PUBLICAPI'
+  - cidr: '10.20.11.0/24'
+    gateway: '10.20.11.1'
+    ip_ranges:
+    - start: '10.20.11.3'
+      end: '10.20.11.10'
+    name: 'TENANT'
+  - cidr: '100.20.11.0/24'
+    gateway: '100.20.11.1'
+    ip_ranges:
+    - start: '100.20.11.3'
+      end: '100.20.11.10'
+    name: 'HEARTBEAT'
+interfaces:
+  - name: 'EXTERNAL'
+    interface: 'ens8'
+  - name: 'MANAGEMENT'
+    interface: 'ens3'
+  - name: 'PUBLICAPI'
+    interface: 'ens3'
+  - name: 'STORAGE'
+    interface: 'ens3'
+  - name: 'TENANT'
+    interface: 'ens3'
+  - name: 'HEARTBEAT'
+    interface: 'ens9'
+internal_vip: '10.20.11.11'
+public_vip: '10.20.11.11'
index 0202e68..d4c99e9 100644 (file)
@@ -1,31 +1,15 @@
-adapter: libvirt\r
-hosts:\r
-- name: 'controller01'\r
-  roles:\r
-    - 'CONTROLLER_LB'\r
-  template: 'templates/virtual_environment/vms/controller.xml'\r
-- name: 'computer01'\r
-  roles:\r
-    - 'COMPUTER'\r
-  template: 'templates/virtual_environment/vms/computer.xml'\r
-- name: 'computer02'\r
-  roles:\r
-    - 'COMPUTER'\r
-  template: 'templates/virtual_environment/vms/computer.xml'\r
-- name: 'computer03'\r
-  roles:\r
-    - 'COMPUTER'\r
-  template: 'templates/virtual_environment/vms/computer.xml'\r
-- name: 'computer04'\r
-  roles:\r
-    - 'COMPUTER'\r
-  template: 'templates/virtual_environment/vms/computer.xml'\r
-disks:\r
-  daisy: 50\r
-  controller: 110\r
-  compute: 110\r
-  ceph: 110\r
-daisy_passwd: 'r00tme'\r
-daisy_ip: '10.20.11.2'\r
-daisy_gateway: '10.20.11.1'\r
-ceph_disk_name: '/dev/sdb'\r
+adapter: libvirt
+hosts:
+- name: 'all_in_one'
+  roles:
+    - 'CONTROLLER_LB'
+    - 'COMPUTER'
+  template: 'templates/virtual_environment/vms/all_in_one.xml'
+disks:
+  daisy: 50
+  controller: 110
+  compute: 110
+daisy_passwd: 'r00tme'
+daisy_ip: '10.20.11.2'
+daisy_gateway: '10.20.11.1'
+ceph_disk_name: ''
\ No newline at end of file
index 9477ab9..7b4a501 100644 (file)
@@ -1,61 +1,69 @@
-##############################################################################\r
-# Copyright (c) 2016 ZTE Coreporation and others.\r
-# hu.zhijiang@zte.com.cn\r
-# sun.jing22@zte.com.cn\r
-# All rights reserved. This program and the accompanying materials\r
-# are made available under the terms of the Apache License, Version 2.0\r
-# which accompanies this distribution, and is available at\r
-# http://www.apache.org/licenses/LICENSE-2.0\r
-##############################################################################\r
-\r
-network-config-metadata:\r
-  title: 'zte-virtual2 network config'\r
-  version: '0.1'\r
-  created: 'Tue Apr 11 2017'\r
-  comment:\r
-networks:\r
-  - cidr: '10.20.11.0/24'\r
-    gateway: '10.20.11.1'\r
-    ip_ranges:\r
-    - start: '10.20.11.3'\r
-      end: '10.20.11.10'\r
-    name: 'MANAGEMENT'\r
-  - cidr: '10.20.11.0/24'\r
-    gateway: '10.20.11.1'\r
-    ip_ranges:\r
-    - start: '10.20.11.3'\r
-      end: '10.20.11.10'\r
-    name: 'STORAGE'\r
-  - cidr: '172.10.101.0/24'\r
-    gateway: '172.10.101.1'\r
-    ip_ranges:\r
-    - start: 172.10.101.2\r
-      end: 172.10.101.20\r
-    name: EXTERNAL\r
-    network_name: admin_external\r
-    mapping: physnet1\r
-  - cidr: '10.20.11.0/24'\r
-    gateway: '10.20.11.1'\r
-    ip_ranges:\r
-    - start: '10.20.11.3'\r
-      end: '10.20.11.10'\r
-    name: 'PUBLICAPI'\r
-  - cidr: '10.20.11.0/24'\r
-    gateway: '10.20.11.1'\r
-    ip_ranges:\r
-    - start: '10.20.11.3'\r
-      end: '10.20.11.10'\r
-    name: 'TENANT'\r
-interfaces:\r
-  - name: 'EXTERNAL'\r
-    interface: 'ens8'\r
-  - name: 'MANAGEMENT'\r
-    interface: 'ens3'\r
-  - name: 'PUBLICAPI'\r
-    interface: 'ens3'\r
-  - name: 'STORAGE'\r
-    interface: 'ens3'\r
-  - name: 'TENANT'\r
-    interface: 'ens3'\r
-internal_vip: '10.20.11.11'\r
-public_vip: '10.20.11.11'\r
+##############################################################################
+# Copyright (c) 2016 ZTE Coreporation and others.
+# hu.zhijiang@zte.com.cn
+# sun.jing22@zte.com.cn
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+network-config-metadata:
+  title: 'zte-virtual2 network config'
+  version: '0.1'
+  created: 'Tue Apr 11 2017'
+  comment: 'all-in-one vm node deploy'
+networks:
+  - cidr: '10.20.11.0/24'
+    gateway: '10.20.11.1'
+    ip_ranges:
+    - start: '10.20.11.3'
+      end: '10.20.11.10'
+    name: 'MANAGEMENT'
+  - cidr: '10.20.11.0/24'
+    gateway: '10.20.11.1'
+    ip_ranges:
+    - start: '10.20.11.3'
+      end: '10.20.11.10'
+    name: 'STORAGE'
+  - cidr: '172.10.101.0/24'
+    gateway: '172.10.101.1'
+    ip_ranges:
+    - start: '172.10.101.2'
+      end: '172.10.101.20'
+    name: 'EXTERNAL'
+    network_name: 'admin_external'
+    mapping: 'physnet1'
+  - cidr: '10.20.11.0/24'
+    gateway: '10.20.11.1'
+    ip_ranges:
+    - start: '10.20.11.3'
+      end: '10.20.11.10'
+    name: 'PUBLICAPI'
+  - cidr: '10.20.11.0/24'
+    gateway: '10.20.11.1'
+    ip_ranges:
+    - start: '10.20.11.3'
+      end: '10.20.11.10'
+    name: 'TENANT'
+  - cidr: '100.20.11.0/24'
+    gateway: '100.20.11.1'
+    ip_ranges:
+    - start: '100.20.11.3'
+      end: '100.20.11.10'
+    name: 'HEARTBEAT'
+interfaces:
+  - name: 'EXTERNAL'
+    interface: 'ens8'
+  - name: 'MANAGEMENT'
+    interface: 'ens3'
+  - name: 'PUBLICAPI'
+    interface: 'ens3'
+  - name: 'STORAGE'
+    interface: 'ens3'
+  - name: 'TENANT'
+    interface: 'ens3'
+  - name: 'HEARTBEAT'
+    interface: 'ens9'
+internal_vip: '10.20.11.11'
+public_vip: '10.20.11.11'
index 1cd3298..b3024ed 100644 (file)
@@ -40,7 +40,7 @@ from utils import (
 CREATE_QCOW2_PATH = path_join(WORKSPACE, 'tools')
 
 VMDEPLOY_DAISY_SERVER_NET = path_join(WORKSPACE, 'templates/virtual_environment/networks/daisy.xml')
-VMDEPLOY_TARGET_NODE_NET = path_join(WORKSPACE, 'templates/virtual_environment/networks/os-all_in_one.xml')
+VMDEPLOY_TARGET_NODE_NET = path_join(WORKSPACE, 'templates/virtual_environment/networks/external.xml')
 VMDEPLOY_DAISY_SERVER_VM = path_join(WORKSPACE, 'templates/virtual_environment/vms/daisy.xml')
 
 BMDEPLOY_DAISY_SERVER_VM = path_join(WORKSPACE, 'templates/physical_environment/vms/daisy.xml')
diff --git a/templates/virtual_environment/networks/keepalived.xml b/templates/virtual_environment/networks/keepalived.xml
new file mode 100644 (file)
index 0000000..7f13a1c
--- /dev/null
@@ -0,0 +1,12 @@
+<network connections='1'>
+  <name>daisy3</name>
+  <forward mode='nat'>
+    <nat>
+      <port start='1024' end='65535'/>
+    </nat>
+  </forward>
+  <bridge name='daisy3' stp='on' delay='0'/>
+  <domain name='daisy3'/>
+  <ip address='100.20.11.1' netmask='255.255.255.0'>
+  </ip>
+</network>
index 66c54eb..5f7f88b 100644 (file)
       <source network='daisy2' bridge='daisy2'/>
       <model type='rtl8139'/>
     </interface>
+    <interface type='network'>
+      <source network='daisy3' bridge='daisy3'/>
+      <model type='rtl8139'/>
+    </interface>
     <serial type='pty'>
       <source path='/dev/pts/4'/>
       <target port='0'/>
index f176a1e..bad307c 100644 (file)
       <source network='daisy2' bridge='daisy2'/>
       <model type='rtl8139'/>
     </interface>
+    <interface type='network'>
+      <source network='daisy3' bridge='daisy3'/>
+      <model type='rtl8139'/>
+    </interface>
     <serial type='pty'>
       <source path='/dev/pts/4'/>
       <target port='0'/>
index c432c31..e291999 100644 (file)
       <source network='daisy2' bridge='daisy2'/>
       <model type='rtl8139'/>
     </interface>
+    <interface type='network'>
+      <source network='daisy3' bridge='daisy3'/>
+      <model type='rtl8139'/>
+    </interface>
     <serial type='pty'>
       <source path='/dev/pts/4'/>
       <target port='0'/>
index d13d00a..cec3c51 100644 (file)
       <source network='daisy2' bridge='daisy2'/>
       <model type='rtl8139'/>
     </interface>
+    <interface type='network'>
+      <source network='daisy3' bridge='daisy3'/>
+      <model type='rtl8139'/>
+    </interface>
     <serial type='pty'>
       <source path='/dev/pts/4'/>
       <target port='0'/>
index c0622c6..b86f82b 100644 (file)
       <source network='daisy2' bridge='daisy2'/>
       <model type='rtl8139'/>
     </interface>
+    <interface type='network'>
+      <source network='daisy3' bridge='daisy3'/>
+      <model type='rtl8139'/>
+    </interface>
     <serial type='pty'>
       <source path='/dev/pts/4'/>
       <target port='0'/>