summaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
Diffstat (limited to 'deploy')
-rw-r--r--deploy/adapters/ansible/roles/open-contrail/tasks/ext-net.yml47
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/main.yml3
-rw-r--r--deploy/conf/hardware_environment/huawei-us-deploy-bare-1/network_ocl.yml90
-rw-r--r--deploy/conf/hardware_environment/huawei-us-deploy-bare-2/network_ocl.yml90
-rw-r--r--deploy/conf/hardware_environment/intel-pod8/network_ocl.yml90
-rw-r--r--deploy/conf/network_cfg_ocl.yaml90
-rw-r--r--deploy/conf/vm_environment/huawei-us-deploy-vm-1/network_ocl.yml90
-rw-r--r--deploy/conf/vm_environment/huawei-us-deploy-vm-2/network_ocl.yml90
-rw-r--r--deploy/conf/vm_environment/huawei-us-deploy-vm-3/network_ocl.yml90
-rw-r--r--deploy/conf/vm_environment/huawei-us-deploy-vm-4/network_ocl.yml90
-rwxr-xr-xdeploy/launch.sh5
11 files changed, 775 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/ext-net.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/ext-net.yml
new file mode 100644
index 00000000..3ef327ee
--- /dev/null
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/ext-net.yml
@@ -0,0 +1,47 @@
+---
+- name: add ext-network router of vgw on controller for open-contrail
+ shell: >
+ ip route add {{ public_net_info.floating_ip_cidr }} via {{ ip_settings[groups['compute'][0]]['br-prv']['ip'] }} dev {{ network_cfg.public_vip.interface }} ;
+ echo "ip route add {{ public_net_info.floating_ip_cidr }} via {{ ip_settings[groups['compute'][0]]['br-prv']['ip'] }} dev {{ network_cfg.public_vip.interface }}" >> /opt/contrail/bin/if-vhost0 ;
+ when: inventory_hostname in groups['opencontrail']
+
+
+- name: create vgw for open-contrail
+ shell: >
+ echo "lsof -ni :9090 ; while [ $? -ne 0 ]; do sleep 10; lsof -ni :9090; done" >> /etc/init.d/net_init;
+ echo "sleep 10" >> /etc/init.d/net_init;
+ echo "python /opt/contrail/utils/provision_vgw_interface.py --oper create --interface vgw1 --subnets {{ public_net_info.floating_ip_cidr }} --routes 0.0.0.0/0 --vrf default-domain:admin:{{ public_net_info.network }}:{{ public_net_info.network }}" >> /etc/init.d/net_init;
+ when: groups['opencontrail']|length !=0 and inventory_hostname == groups['compute'][0]
+
+
+- name: add vgw router on compute(without vgw) for open-contrail
+ shell: echo "ip route add {{ public_net_info.floating_ip_cidr }} via {{ ip_settings[groups['compute'][0]]['br-prv']['ip'] }} dev vhost0" >> /etc/init.d/net_init
+ when: groups['opencontrail']|length !=0 and inventory_hostname not in groups['opencontrail'] and inventory_hostname != groups['compute'][0]
+
+
+
+
+
+# create a file with vgw ip on CompassCore, so that Jumper Host could access this to get vgw ip
+- name: add vgw file on compass
+ local_action: file path=/home/opencontrail1.rc state=touch mode=0777
+ run_once: True
+ when: groups['opencontrail']|length !=0
+
+- name: update vgw file
+ local_action: lineinfile dest=/home/opencontrail1.rc line={{ ip_settings[groups['compute'][0]]['br-prv']['ip'] }}
+ run_once: True
+ when: groups['opencontrail']|length !=0
+
+- name: add vgw file on compass
+ local_action: file path=/home/opencontrail2.rc state=touch mode=0777
+ run_once: True
+ when: groups['opencontrail']|length !=0
+
+- name: update vgw file
+ local_action: lineinfile dest=/home/opencontrail2.rc line={{ public_net_info.floating_ip_cidr }}
+ run_once: True
+ when: groups['opencontrail']|length !=0
+
+
+
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/main.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/main.yml
index 16ca4e91..7d0f1a9e 100755
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/main.yml
@@ -121,6 +121,9 @@
include: uninstall-openvswitch.yml
when: groups['opencontrail']|length !=0 and inventory_hostname not in groups['opencontrail']
+- name: Config ext-net network
+ include: ext-net.yml
+
- name: Enable Service Daemon
shell: if [ -f “\/opt\/service.bak” ] ; then mv /opt/service.bak /opt/service ; fi
when: groups['opencontrail']|length !=0
diff --git a/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/network_ocl.yml b/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/network_ocl.yml
new file mode 100644
index 00000000..78dafd99
--- /dev/null
+++ b/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/network_ocl.yml
@@ -0,0 +1,90 @@
+nic_mappings: []
+bond_mappings: []
+
+provider_net_mappings:
+ - name: br-prv
+ network: physnet
+ interface: eth1
+ type: ovs
+ role:
+ - controller
+ - compute
+
+sys_intf_mappings:
+ - name: mgmt
+ interface: eth1
+ vlan_tag: 101
+ type: vlan
+ role:
+ - controller
+ - compute
+
+ - name: storage
+ interface: eth1
+ vlan_tag: 102
+ type: vlan
+ role:
+ - controller
+ - compute
+
+ - name: external
+ interface: br-prv
+ type: ovs
+ role:
+ - controller
+ - compute
+
+ip_settings:
+ - name: mgmt
+ ip_ranges:
+ - - "172.16.1.1"
+ - "172.16.1.254"
+ cidr: "172.16.1.0/24"
+ role:
+ - controller
+ - compute
+
+ - name: storage
+ ip_ranges:
+ - - "172.16.2.1"
+ - "172.16.2.254"
+ cidr: "172.16.2.0/24"
+ role:
+ - controller
+ - compute
+
+ - name: external
+ ip_ranges:
+ - - "192.168.10.10"
+ - "192.168.10.50"
+ cidr: "192.168.10.0/24"
+ gw: "192.168.10.1"
+ role:
+ - controller
+ - compute
+
+internal_vip:
+ ip: 172.16.1.222
+ netmask: "24"
+ interface: mgmt
+
+public_vip:
+ ip: 192.168.10.51
+ netmask: "24"
+ interface: external
+
+onos_nic: eth2
+public_net_info:
+ enable: True
+ network: ext-net
+ type: flat
+ segment_id: 10
+ subnet: ext-subnet
+ provider_network: physnet
+ router: router-ext
+ enable_dhcp: False
+ no_gateway: False
+ external_gw: "100.100.100.1"
+ floating_ip_cidr: "100.100.100.0/24"
+ floating_ip_start: "100.100.100.30"
+ floating_ip_end: "100.100.100.120"
diff --git a/deploy/conf/hardware_environment/huawei-us-deploy-bare-2/network_ocl.yml b/deploy/conf/hardware_environment/huawei-us-deploy-bare-2/network_ocl.yml
new file mode 100644
index 00000000..26319ec4
--- /dev/null
+++ b/deploy/conf/hardware_environment/huawei-us-deploy-bare-2/network_ocl.yml
@@ -0,0 +1,90 @@
+nic_mappings: []
+bond_mappings: []
+
+provider_net_mappings:
+ - name: br-prv
+ network: physnet
+ interface: eth1
+ type: ovs
+ role:
+ - controller
+ - compute
+
+sys_intf_mappings:
+ - name: mgmt
+ interface: eth1
+ vlan_tag: 101
+ type: vlan
+ role:
+ - controller
+ - compute
+
+ - name: storage
+ interface: eth1
+ vlan_tag: 102
+ type: vlan
+ role:
+ - controller
+ - compute
+
+ - name: external
+ interface: br-prv
+ type: ovs
+ role:
+ - controller
+ - compute
+
+ip_settings:
+ - name: mgmt
+ ip_ranges:
+ - - "172.16.1.1"
+ - "172.16.1.254"
+ cidr: "172.16.1.0/24"
+ role:
+ - controller
+ - compute
+
+ - name: storage
+ ip_ranges:
+ - - "172.16.2.1"
+ - "172.16.2.254"
+ cidr: "172.16.2.0/24"
+ role:
+ - controller
+ - compute
+
+ - name: external
+ ip_ranges:
+ - - "192.168.11.10"
+ - "192.168.11.15"
+ cidr: "192.168.11.0/24"
+ gw: "192.168.11.1"
+ role:
+ - controller
+ - compute
+
+internal_vip:
+ ip: 172.16.1.222
+ netmask: "24"
+ interface: mgmt
+
+public_vip:
+ ip: 192.168.11.18
+ netmask: "24"
+ interface: external
+
+onos_nic: eth2
+public_net_info:
+ enable: True
+ network: ext-net
+ type: flat
+ segment_id: 1000
+ subnet: ext-subnet
+ provider_network: physnet
+ router: router-ext
+ enable_dhcp: False
+ no_gateway: False
+ external_gw: "100.100.100.1"
+ floating_ip_cidr: "100.100.100.0/24"
+ floating_ip_start: "100.100.100.30"
+ floating_ip_end: "100.100.100.120"
diff --git a/deploy/conf/hardware_environment/intel-pod8/network_ocl.yml b/deploy/conf/hardware_environment/intel-pod8/network_ocl.yml
new file mode 100644
index 00000000..23a8da3d
--- /dev/null
+++ b/deploy/conf/hardware_environment/intel-pod8/network_ocl.yml
@@ -0,0 +1,90 @@
+nic_mappings: []
+bond_mappings: []
+
+provider_net_mappings:
+ - name: br-prv
+ network: physnet
+ interface: eth3
+ type: ovs
+ role:
+ - controller
+ - compute
+
+sys_intf_mappings:
+ - name: mgmt
+ interface: eth2
+ vlan_tag: 804
+ type: vlan
+ role:
+ - controller
+ - compute
+
+ - name: storage
+ interface: eth2
+ vlan_tag: 802
+ type: vlan
+ role:
+ - controller
+ - compute
+
+ - name: external
+ interface: br-prv
+ vlan_tag: 805
+ type: vlan
+ role:
+ - controller
+ - compute
+
+ip_settings:
+ - name: mgmt
+ ip_ranges:
+ - - "10.8.14.10"
+ - "10.8.14.30"
+ cidr: "10.8.14.0/24"
+ role:
+ - controller
+ - compute
+
+ - name: storage
+ ip_ranges:
+ - - "10.8.12.10"
+ - "10.8.12.30"
+ cidr: "10.8.12.0/24"
+ role:
+ - controller
+ - compute
+
+ - name: external
+ ip_ranges:
+ - - "10.8.15.10"
+ - "10.8.15.30"
+ cidr: "10.8.15.0/24"
+ role:
+ - controller
+ - compute
+
+internal_vip:
+ ip: 10.8.14.222
+ netmask: "24"
+ interface: mgmt
+
+public_vip:
+ ip: 10.8.15.222
+ netmask: "24"
+ interface: external
+
+onos_nic: eth4
+public_net_info:
+ enable: True
+ network: ext-net
+ type: flat
+ segment_id: 10
+ subnet: ext-subnet
+ provider_network: physnet
+ router: router-ext
+ enable_dhcp: False
+ no_gateway: False
+ external_gw: "100.100.100.1"
+ floating_ip_cidr: "100.100.100.0/24"
+ floating_ip_start: "100.100.100.30"
+ floating_ip_end: "100.100.100.120"
diff --git a/deploy/conf/network_cfg_ocl.yaml b/deploy/conf/network_cfg_ocl.yaml
new file mode 100644
index 00000000..3a124a92
--- /dev/null
+++ b/deploy/conf/network_cfg_ocl.yaml
@@ -0,0 +1,90 @@
+nic_mappings: []
+bond_mappings: []
+
+provider_net_mappings:
+ - name: br-prv
+ network: physnet
+ interface: eth1
+ type: ovs
+ role:
+ - controller
+ - compute
+
+sys_intf_mappings:
+ - name: mgmt
+ interface: eth1
+ vlan_tag: 101
+ type: vlan
+ role:
+ - controller
+ - compute
+
+ - name: storage
+ interface: eth1
+ vlan_tag: 102
+ type: vlan
+ role:
+ - controller
+ - compute
+
+ - name: external
+ interface: br-prv
+ type: ovs
+ role:
+ - controller
+ - compute
+
+ip_settings:
+ - name: mgmt
+ ip_ranges:
+ - - "172.16.1.1"
+ - "172.16.1.254"
+ cidr: "172.16.1.0/24"
+ role:
+ - controller
+ - compute
+
+ - name: storage
+ ip_ranges:
+ - - "172.16.2.1"
+ - "172.16.2.254"
+ cidr: "172.16.2.0/24"
+ role:
+ - controller
+ - compute
+
+ - name: external
+ ip_ranges:
+ - - "192.168.50.210"
+ - "192.168.50.220"
+ cidr: "192.168.50.0/24"
+ gw: "192.168.50.1"
+ role:
+ - controller
+ - compute
+
+internal_vip:
+ ip: 172.16.1.222
+ netmask: "24"
+ interface: mgmt
+
+public_vip:
+ ip: 192.168.50.240
+ netmask: "24"
+ interface: external
+
+onos_nic: eth2
+public_net_info:
+ enable: True
+ network: ext-net
+ type: flat
+ segment_id: 1000
+ subnet: ext-subnet
+ provider_network: physnet
+ router: router-ext
+ enable_dhcp: False
+ no_gateway: False
+ external_gw: "100.100.100.1"
+ floating_ip_cidr: "100.100.100.0/24"
+ floating_ip_start: "100.100.100.30"
+ floating_ip_end: "100.100.100.120"
diff --git a/deploy/conf/vm_environment/huawei-us-deploy-vm-1/network_ocl.yml b/deploy/conf/vm_environment/huawei-us-deploy-vm-1/network_ocl.yml
new file mode 100644
index 00000000..80b97656
--- /dev/null
+++ b/deploy/conf/vm_environment/huawei-us-deploy-vm-1/network_ocl.yml
@@ -0,0 +1,90 @@
+nic_mappings: []
+bond_mappings: []
+
+provider_net_mappings:
+ - name: br-prv
+ network: physnet
+ interface: eth1
+ type: ovs
+ role:
+ - controller
+ - compute
+
+sys_intf_mappings:
+ - name: mgmt
+ interface: eth1
+ vlan_tag: 101
+ type: vlan
+ role:
+ - controller
+ - compute
+
+ - name: storage
+ interface: eth1
+ vlan_tag: 102
+ type: vlan
+ role:
+ - controller
+ - compute
+
+ - name: external
+ interface: br-prv
+ type: ovs
+ role:
+ - controller
+ - compute
+
+ip_settings:
+ - name: mgmt
+ ip_ranges:
+ - - "172.16.1.1"
+ - "172.16.1.254"
+ cidr: "172.16.1.0/24"
+ role:
+ - controller
+ - compute
+
+ - name: storage
+ ip_ranges:
+ - - "172.16.2.1"
+ - "172.16.2.254"
+ cidr: "172.16.2.0/24"
+ role:
+ - controller
+ - compute
+
+ - name: external
+ ip_ranges:
+ - - "192.168.107.210"
+ - "192.168.107.220"
+ cidr: "192.168.107.0/24"
+ gw: "192.168.107.1"
+ role:
+ - controller
+ - compute
+
+internal_vip:
+ ip: 172.16.1.222
+ netmask: "24"
+ interface: mgmt
+
+public_vip:
+ ip: 192.168.107.222
+ netmask: "24"
+ interface: external
+
+onos_nic: eth2
+public_net_info:
+ enable: True
+ network: ext-net
+ type: flat
+ segment_id: 1000
+ subnet: ext-subnet
+ provider_network: physnet
+ router: router-ext
+ enable_dhcp: False
+ no_gateway: False
+ external_gw: "100.100.100.1"
+ floating_ip_cidr: "100.100.100.0/24"
+ floating_ip_start: "100.100.100.30"
+ floating_ip_end: "100.100.100.120"
diff --git a/deploy/conf/vm_environment/huawei-us-deploy-vm-2/network_ocl.yml b/deploy/conf/vm_environment/huawei-us-deploy-vm-2/network_ocl.yml
new file mode 100644
index 00000000..743317c5
--- /dev/null
+++ b/deploy/conf/vm_environment/huawei-us-deploy-vm-2/network_ocl.yml
@@ -0,0 +1,90 @@
+nic_mappings: []
+bond_mappings: []
+
+provider_net_mappings:
+ - name: br-prv
+ network: physnet
+ interface: eth1
+ type: ovs
+ role:
+ - controller
+ - compute
+
+sys_intf_mappings:
+ - name: mgmt
+ interface: eth1
+ vlan_tag: 101
+ type: vlan
+ role:
+ - controller
+ - compute
+
+ - name: storage
+ interface: eth1
+ vlan_tag: 102
+ type: vlan
+ role:
+ - controller
+ - compute
+
+ - name: external
+ interface: br-prv
+ type: ovs
+ role:
+ - controller
+ - compute
+
+ip_settings:
+ - name: mgmt
+ ip_ranges:
+ - - "172.16.1.1"
+ - "172.16.1.254"
+ cidr: "172.16.1.0/24"
+ role:
+ - controller
+ - compute
+
+ - name: storage
+ ip_ranges:
+ - - "172.16.2.1"
+ - "172.16.2.254"
+ cidr: "172.16.2.0/24"
+ role:
+ - controller
+ - compute
+
+ - name: external
+ ip_ranges:
+ - - "192.168.106.210"
+ - "192.168.106.220"
+ cidr: "192.168.106.0/24"
+ gw: "192.168.106.1"
+ role:
+ - controller
+ - compute
+
+internal_vip:
+ ip: 172.16.1.222
+ netmask: "24"
+ interface: mgmt
+
+public_vip:
+ ip: 192.168.106.222
+ netmask: "24"
+ interface: external
+
+onos_nic: eth2
+public_net_info:
+ enable: True
+ network: ext-net
+ type: flat
+ segment_id: 1000
+ subnet: ext-subnet
+ provider_network: physnet
+ router: router-ext
+ enable_dhcp: False
+ no_gateway: False
+ external_gw: "100.100.100.1"
+ floating_ip_cidr: "100.100.100.0/24"
+ floating_ip_start: "100.100.100.30"
+ floating_ip_end: "100.100.100.120"
diff --git a/deploy/conf/vm_environment/huawei-us-deploy-vm-3/network_ocl.yml b/deploy/conf/vm_environment/huawei-us-deploy-vm-3/network_ocl.yml
new file mode 100644
index 00000000..9cccf9ba
--- /dev/null
+++ b/deploy/conf/vm_environment/huawei-us-deploy-vm-3/network_ocl.yml
@@ -0,0 +1,90 @@
+nic_mappings: []
+bond_mappings: []
+
+provider_net_mappings:
+ - name: br-prv
+ network: physnet
+ interface: eth1
+ type: ovs
+ role:
+ - controller
+ - compute
+
+sys_intf_mappings:
+ - name: mgmt
+ interface: eth1
+ vlan_tag: 101
+ type: vlan
+ role:
+ - controller
+ - compute
+
+ - name: storage
+ interface: eth1
+ vlan_tag: 102
+ type: vlan
+ role:
+ - controller
+ - compute
+
+ - name: external
+ interface: br-prv
+ type: ovs
+ role:
+ - controller
+ - compute
+
+ip_settings:
+ - name: mgmt
+ ip_ranges:
+ - - "172.16.1.1"
+ - "172.16.1.254"
+ cidr: "172.16.1.0/24"
+ role:
+ - controller
+ - compute
+
+ - name: storage
+ ip_ranges:
+ - - "172.16.2.1"
+ - "172.16.2.254"
+ cidr: "172.16.2.0/24"
+ role:
+ - controller
+ - compute
+
+ - name: external
+ ip_ranges:
+ - - "192.168.101.210"
+ - "192.168.101.220"
+ cidr: "192.168.101.0/24"
+ gw: "192.168.101.1"
+ role:
+ - controller
+ - compute
+
+internal_vip:
+ ip: 172.16.1.222
+ netmask: "24"
+ interface: mgmt
+
+public_vip:
+ ip: 192.168.101.222
+ netmask: "24"
+ interface: external
+
+onos_nic: eth2
+public_net_info:
+ enable: True
+ network: ext-net
+ type: flat
+ segment_id: 1000
+ subnet: ext-subnet
+ provider_network: physnet
+ router: router-ext
+ enable_dhcp: False
+ no_gateway: False
+ external_gw: "100.100.100.1"
+ floating_ip_cidr: "100.100.100.0/24"
+ floating_ip_start: "100.100.100.30"
+ floating_ip_end: "100.100.100.120"
diff --git a/deploy/conf/vm_environment/huawei-us-deploy-vm-4/network_ocl.yml b/deploy/conf/vm_environment/huawei-us-deploy-vm-4/network_ocl.yml
new file mode 100644
index 00000000..1e9b7f4d
--- /dev/null
+++ b/deploy/conf/vm_environment/huawei-us-deploy-vm-4/network_ocl.yml
@@ -0,0 +1,90 @@
+nic_mappings: []
+bond_mappings: []
+
+provider_net_mappings:
+ - name: br-prv
+ network: physnet
+ interface: eth1
+ type: ovs
+ role:
+ - controller
+ - compute
+
+sys_intf_mappings:
+ - name: mgmt
+ interface: eth1
+ vlan_tag: 101
+ type: vlan
+ role:
+ - controller
+ - compute
+
+ - name: storage
+ interface: eth1
+ vlan_tag: 102
+ type: vlan
+ role:
+ - controller
+ - compute
+
+ - name: external
+ interface: br-prv
+ type: ovs
+ role:
+ - controller
+ - compute
+
+ip_settings:
+ - name: mgmt
+ ip_ranges:
+ - - "172.16.1.1"
+ - "172.16.1.254"
+ cidr: "172.16.1.0/24"
+ role:
+ - controller
+ - compute
+
+ - name: storage
+ ip_ranges:
+ - - "172.16.2.1"
+ - "172.16.2.254"
+ cidr: "172.16.2.0/24"
+ role:
+ - controller
+ - compute
+
+ - name: external
+ ip_ranges:
+ - - "192.168.103.210"
+ - "192.168.103.220"
+ cidr: "192.168.103.0/24"
+ gw: "192.168.103.1"
+ role:
+ - controller
+ - compute
+
+internal_vip:
+ ip: 172.16.1.222
+ netmask: "24"
+ interface: mgmt
+
+public_vip:
+ ip: 192.168.103.222
+ netmask: "24"
+ interface: external
+
+onos_nic: eth2
+public_net_info:
+ enable: True
+ network: ext-net
+ type: flat
+ segment_id: 1000
+ subnet: ext-subnet
+ provider_network: physnet
+ router: router-ext
+ enable_dhcp: False
+ no_gateway: False
+ external_gw: "100.100.100.1"
+ floating_ip_cidr: "100.100.100.0/24"
+ floating_ip_start: "100.100.100.30"
+ floating_ip_end: "100.100.100.120"
diff --git a/deploy/launch.sh b/deploy/launch.sh
index f9d915bf..fbffc98c 100755
--- a/deploy/launch.sh
+++ b/deploy/launch.sh
@@ -82,6 +82,11 @@ if [[ "$DEPLOY_HOST" == "true" || $REDEPLOY_HOST == "true" ]]; then
echo $TYPE
echo $DHA
if [[ `echo $HOST_ROLES | grep opencontrail` ]]; then
+ ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
+ installer_ip="192.168.200.2"
+ vgw_ip=$(sshpass -p 'root' ssh $ssh_options root@$installer_ip 'cat /home/opencontrail1.rc')
+ externet_cidr=$(sshpass -p 'root' ssh $ssh_options root@$installer_ip 'cat /home/opencontrail2.rc')
+ sudo ip route add $externet_cidr via $vgw_ip dev br-external 2>/dev/null
sleep 60
python ${COMPASS_DIR}/deploy/reset_compute.py $TYPE $DHA
sleep 600