From 77f085712a8a7ab2cb42411f457ee87675cdf676 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 6 Jul 2017 10:42:50 +0800 Subject: add extra interface to enable the keepablived plane and the api plane Change-Id: I0157bf8b6fa9be254c61bb384065f80107ab3dda Signed-off-by: root --- ci/deploy/deploy.sh | 8 +- .../bm_environment/zte-baremetal1/deploy.yml | 6 + .../bm_environment/zte-baremetal1/network.yml | 21 +++- deploy/config/network.py | 1 + .../config/vm_environment/zte-virtual1/deploy.yml | 46 +++++--- .../config/vm_environment/zte-virtual1/network.yml | 130 +++++++++++---------- .../config/vm_environment/zte-virtual2/deploy.yml | 46 +++----- .../config/vm_environment/zte-virtual2/network.yml | 130 +++++++++++---------- deploy/environment.py | 2 +- .../virtual_environment/networks/external.xml | 12 ++ .../virtual_environment/networks/keepalived.xml | 12 ++ .../virtual_environment/networks/os-all_in_one.xml | 12 -- templates/virtual_environment/vms/computer01.xml | 4 + templates/virtual_environment/vms/computer02.xml | 4 + templates/virtual_environment/vms/controller01.xml | 4 + templates/virtual_environment/vms/controller02.xml | 4 + templates/virtual_environment/vms/controller03.xml | 4 + 17 files changed, 257 insertions(+), 189 deletions(-) create mode 100644 templates/virtual_environment/networks/external.xml create mode 100644 templates/virtual_environment/networks/keepalived.xml delete mode 100644 templates/virtual_environment/networks/os-all_in_one.xml diff --git a/ci/deploy/deploy.sh b/ci/deploy/deploy.sh index a67e809c..d73a2c9d 100755 --- a/ci/deploy/deploy.sh +++ b/ci/deploy/deploy.sh @@ -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 diff --git a/deploy/config/bm_environment/zte-baremetal1/deploy.yml b/deploy/config/bm_environment/zte-baremetal1/deploy.yml index b8584251..d24a9569 100644 --- a/deploy/config/bm_environment/zte-baremetal1/deploy.yml +++ b/deploy/config/bm_environment/zte-baremetal1/deploy.yml @@ -3,6 +3,12 @@ hosts: - name: 'controller01' roles: - 'CONTROLLER_LB' +- name: 'controller02' + roles: + - 'CONTROLLER_LB' +- name: 'controller03' + roles: + - 'CONTROLLER_LB' - name: 'computer01' roles: - 'COMPUTER' diff --git a/deploy/config/bm_environment/zte-baremetal1/network.yml b/deploy/config/bm_environment/zte-baremetal1/network.yml index b4140903..77765df8 100644 --- a/deploy/config/bm_environment/zte-baremetal1/network.yml +++ b/deploy/config/bm_environment/zte-baremetal1/network.yml @@ -46,12 +46,12 @@ networks: 'name': 'EXTERNAL' network_name: 'admin_external' mapping: 'physnet1' - - cidr: '10.20.7.0/24' - gateway: '10.20.7.1' + - cidr: '192.168.71.0/24' + gateway: '192.168.71.1' ip_ranges: - - 'start': '10.20.7.20' - 'end': '10.20.7.200' - vlan_id: null + - 'start': '192.168.71.2' + 'end': '192.168.71.254' + vlan_id: 171 name: 'PUBLICAPI' - cidr: '192.168.73.0/24' gateway: '192.168.73.1' @@ -60,16 +60,25 @@ networks: 'end': '192.168.73.254' vlan_id: 1130 name: 'TENANT' + - cidr: '10.20.7.0/24' + gateway: '10.20.7.1' + ip_ranges: + - 'start': '10.20.7.20' + 'end': '10.20.7.200' + vlan_id: null + name: 'HEARTBEAT' interfaces: - name: 'EXTERNAL' interface: 'ens44f1' - name: 'MANAGEMENT' interface: 'ens12f0' - name: 'PUBLICAPI' - interface: 'ens4f0' + interface: 'ens12f0' - name: 'STORAGE' interface: 'ens12f1' - name: 'TENANT' interface: 'ens44f0' + - name: 'HEARTBEAT' + interface: 'ens4f0' internal_vip: '192.168.71.10' public_vip: '10.20.7.11' diff --git a/deploy/config/network.py b/deploy/config/network.py index cd38e94d..4d877a75 100644 --- a/deploy/config/network.py +++ b/deploy/config/network.py @@ -18,6 +18,7 @@ class NetworkConfig(object): 'STORAGE': 'stor', 'PUBLICAPI': 'pub', 'TENANT': 'tenant', + 'HEARTBEAT': 'hbt', } def __init__(self, network_file): diff --git a/deploy/config/vm_environment/zte-virtual1/deploy.yml b/deploy/config/vm_environment/zte-virtual1/deploy.yml index a85f429f..e80d0310 100644 --- a/deploy/config/vm_environment/zte-virtual1/deploy.yml +++ b/deploy/config/vm_environment/zte-virtual1/deploy.yml @@ -1,15 +1,31 @@ -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: '' +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' diff --git a/deploy/config/vm_environment/zte-virtual1/network.yml b/deploy/config/vm_environment/zte-virtual1/network.yml index 34b466a2..b2e87735 100644 --- a/deploy/config/vm_environment/zte-virtual1/network.yml +++ b/deploy/config/vm_environment/zte-virtual1/network.yml @@ -1,61 +1,69 @@ -############################################################################## -# 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: 'Mon Oct 31 2016' - comment: -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' -interfaces: - - name: 'EXTERNAL' - interface: 'ens8' - - name: 'MANAGEMENT' - interface: 'ens3' - - name: 'PUBLICAPI' - interface: 'ens3' - - name: 'STORAGE' - interface: 'ens3' - - name: 'TENANT' - interface: 'ens3' -internal_vip: '10.20.11.11' -public_vip: '10.20.11.11' +############################################################################## +# 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' diff --git a/deploy/config/vm_environment/zte-virtual2/deploy.yml b/deploy/config/vm_environment/zte-virtual2/deploy.yml index 0202e684..d4c99e97 100644 --- a/deploy/config/vm_environment/zte-virtual2/deploy.yml +++ b/deploy/config/vm_environment/zte-virtual2/deploy.yml @@ -1,31 +1,15 @@ -adapter: libvirt -hosts: -- name: 'controller01' - 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' -- name: 'computer03' - roles: - - 'COMPUTER' - template: 'templates/virtual_environment/vms/computer.xml' -- name: 'computer04' - 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' +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 diff --git a/deploy/config/vm_environment/zte-virtual2/network.yml b/deploy/config/vm_environment/zte-virtual2/network.yml index 9477ab9c..7b4a501c 100644 --- a/deploy/config/vm_environment/zte-virtual2/network.yml +++ b/deploy/config/vm_environment/zte-virtual2/network.yml @@ -1,61 +1,69 @@ -############################################################################## -# 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: -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' -interfaces: - - name: 'EXTERNAL' - interface: 'ens8' - - name: 'MANAGEMENT' - interface: 'ens3' - - name: 'PUBLICAPI' - interface: 'ens3' - - name: 'STORAGE' - interface: 'ens3' - - name: 'TENANT' - interface: 'ens3' -internal_vip: '10.20.11.11' -public_vip: '10.20.11.11' +############################################################################## +# 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' diff --git a/deploy/environment.py b/deploy/environment.py index 1cd32980..b3024ed5 100644 --- a/deploy/environment.py +++ b/deploy/environment.py @@ -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/external.xml b/templates/virtual_environment/networks/external.xml new file mode 100644 index 00000000..f8e86830 --- /dev/null +++ b/templates/virtual_environment/networks/external.xml @@ -0,0 +1,12 @@ + + daisy2 + + + + + + + + + + diff --git a/templates/virtual_environment/networks/keepalived.xml b/templates/virtual_environment/networks/keepalived.xml new file mode 100644 index 00000000..7f13a1c6 --- /dev/null +++ b/templates/virtual_environment/networks/keepalived.xml @@ -0,0 +1,12 @@ + + daisy3 + + + + + + + + + + diff --git a/templates/virtual_environment/networks/os-all_in_one.xml b/templates/virtual_environment/networks/os-all_in_one.xml deleted file mode 100644 index f8e86830..00000000 --- a/templates/virtual_environment/networks/os-all_in_one.xml +++ /dev/null @@ -1,12 +0,0 @@ - - daisy2 - - - - - - - - - - diff --git a/templates/virtual_environment/vms/computer01.xml b/templates/virtual_environment/vms/computer01.xml index 66c54eb7..5f7f88ba 100644 --- a/templates/virtual_environment/vms/computer01.xml +++ b/templates/virtual_environment/vms/computer01.xml @@ -84,6 +84,10 @@ + + + + diff --git a/templates/virtual_environment/vms/computer02.xml b/templates/virtual_environment/vms/computer02.xml index f176a1e4..bad307cf 100644 --- a/templates/virtual_environment/vms/computer02.xml +++ b/templates/virtual_environment/vms/computer02.xml @@ -84,6 +84,10 @@ + + + + diff --git a/templates/virtual_environment/vms/controller01.xml b/templates/virtual_environment/vms/controller01.xml index c432c310..e2919996 100644 --- a/templates/virtual_environment/vms/controller01.xml +++ b/templates/virtual_environment/vms/controller01.xml @@ -84,6 +84,10 @@ + + + + diff --git a/templates/virtual_environment/vms/controller02.xml b/templates/virtual_environment/vms/controller02.xml index d13d00a9..cec3c517 100644 --- a/templates/virtual_environment/vms/controller02.xml +++ b/templates/virtual_environment/vms/controller02.xml @@ -84,6 +84,10 @@ + + + + diff --git a/templates/virtual_environment/vms/controller03.xml b/templates/virtual_environment/vms/controller03.xml index c0622c62..b86f82b9 100644 --- a/templates/virtual_environment/vms/controller03.xml +++ b/templates/virtual_environment/vms/controller03.xml @@ -84,6 +84,10 @@ + + + + -- cgit 1.2.3-korg