summaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
Diffstat (limited to 'deploy')
-rw-r--r--deploy/adapters/ansible/roles/database/templates/replica.js2
-rw-r--r--deploy/adapters/ansible/roles/ha/templates/haproxy.cfg2
-rw-r--r--deploy/adapters/ansible/roles/neutron-network/tasks/main.yml7
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-config.yml2
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-webui.yml4
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/vars/main.yml2
-rw-r--r--deploy/conf/hardware_environment/huawei_us_lab/pod1/dha.yml29
-rw-r--r--deploy/conf/hardware_environment/huawei_us_lab/pod1/network.yml28
-rwxr-xr-xdeploy/network.sh2
-rw-r--r--deploy/setup_vnic.py12
10 files changed, 54 insertions, 36 deletions
diff --git a/deploy/adapters/ansible/roles/database/templates/replica.js b/deploy/adapters/ansible/roles/database/templates/replica.js
index d19db50d..dd5fc575 100644
--- a/deploy/adapters/ansible/roles/database/templates/replica.js
+++ b/deploy/adapters/ansible/roles/database/templates/replica.js
@@ -1,7 +1,7 @@
config = { _id:"compass", members:[
{% for host in haproxy_hosts.values() %}
{% set pair = '%s:27017' % host %}
- {_id:{{ loop.index0 }},host:"{{ pair }}",priority:{{ haproxy_hosts|length - loop.index0 }}},
+ {_id:{{ loop.index0 }},host:"{{ pair }}",priority:{{ host_index[inventory_hostname] + 1 }}},
{% endfor %}
]
};
diff --git a/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg b/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
index 5f0679ff..1bca5e39 100644
--- a/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
+++ b/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
@@ -34,7 +34,7 @@ listen proxy-mysql
{% if loop.index == 1 %}
server {{ host }} {{ ip }}:3306 weight 1 check inter 2000 rise 2 fall 5
{% else %}
- server {{ host }} {{ ip }}:3306 weight 1 check inter 2000 rise 2 fall 5
+ server {{ host }} {{ ip }}:3306 weight 1 check inter 2000 rise 2 fall 5 backup
{% endif %}
{% endfor %}
diff --git a/deploy/adapters/ansible/roles/neutron-network/tasks/main.yml b/deploy/adapters/ansible/roles/neutron-network/tasks/main.yml
index a3a62b11..bb6b952b 100644
--- a/deploy/adapters/ansible/roles/neutron-network/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/neutron-network/tasks/main.yml
@@ -65,6 +65,13 @@
template: src=templates/neutron.conf
dest=/etc/neutron/neutron.conf backup=yes
+- name: force mtu to 1450 for vxlan
+ lineinfile:
+ dest: /etc/neutron/dnsmasq-neutron.conf
+ regexp: '^dhcp-option-force'
+ line: 'dhcp-option-force=26,1450'
+ when: "'vxlan' in {{ NEUTRON_TUNNEL_TYPES }}"
+
- include: firewall.yml
when: enable_fwaas == True
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-config.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-config.yml
index 1e8c7abd..7a75528a 100755
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-config.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-config.yml
@@ -194,7 +194,7 @@
# - { section: "DEFAULT", option: "auth_strategy", value: "keystone" }
# - { section: "DEFAULT", option: "allow_overlapping_ips", value: "True" }
- { section: "DEFAULT", option: "core_plugin", value: "neutron_plugin_contrail.plugins.opencontrail.contrail_plugin.NeutronPluginContrailCoreV2" }
- - { section: "DEFAULT", option: "api_extensions_path", value: "extensions:/usr/lib/python2.7/dist-packages/neutron_plugin_contrail/extensions" }
+ - { section: "DEFAULT", option: "api_extensions_path", value: "/usr/lib/python2.7/dist-packages/neutron_plugin_contrail/extensions" }
# - { section: "DEFAULT", option: "rabbit_host", value: "{{ contrail_haproxy_address }}" }
# - { section: "DEFAULT", option: "rabbit_port", value: "5673" }
# - { section: "DEFAULT", option: "service_plugins", value: "neutron_plugin_contrail.plugins.opencontrail.loadbalancer.plugin.LoadBalancerPlugin" }
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-webui.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-webui.yml
index 515b10e9..6758b8e7 100755
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-webui.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-webui.yml
@@ -17,14 +17,14 @@
- name: "set first cassandra host address"
set_fact:
# cassandra_addrs: "'{{ hostvars[item.1]['contrail_address'] }}'"
- cassandra_addrs: "'{{ haproxy_hosts[item] }}'"
+ cassandra_addrs: "'{{ haproxy_hosts[item.1] }}'"
with_indexed_items: groups['opencontrail_database']
when: item.0 == 0
- name: "set second or more cassandra host addresses"
set_fact:
# cassandra_addrs: "{{ cassandra_addrs }}, '{{ hostvars[item.1]['contrail_address'] }}'"
- cassandra_addrs: "{{ cassandra_addrs }}, '{{ haproxy_hosts[item] }}'"
+ cassandra_addrs: "{{ cassandra_addrs }}, '{{ haproxy_hosts[item.1] }}'"
with_indexed_items: groups['opencontrail_database']
when: item.0 > 0
diff --git a/deploy/adapters/ansible/roles/open-contrail/vars/main.yml b/deploy/adapters/ansible/roles/open-contrail/vars/main.yml
index 83eea5a3..4c8b73a7 100755
--- a/deploy/adapters/ansible/roles/open-contrail/vars/main.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/vars/main.yml
@@ -31,7 +31,7 @@ contrail_router_asn: "64512"
### Modify when need openstack provisioning
keystone_provision: no
install_nova: no
-rabbit_password: {{ RABBIT_PASS }}
+#rabbit_password: {{ RABBIT_PASS }}
contrail_tor_agents:
- name: "test01"
diff --git a/deploy/conf/hardware_environment/huawei_us_lab/pod1/dha.yml b/deploy/conf/hardware_environment/huawei_us_lab/pod1/dha.yml
index b1f914dc..c7e93354 100644
--- a/deploy/conf/hardware_environment/huawei_us_lab/pod1/dha.yml
+++ b/deploy/conf/hardware_environment/huawei_us_lab/pod1/dha.yml
@@ -4,32 +4,43 @@ FLAVOR: cluster
POWER_TOOL: ipmitool
ipmiUser: root
-ipmiPass: root
ipmiVer: '2.0'
hosts:
- name: host1
- mac: '80:FB:06:35:8C:84'
- ipmiIp: 10.145.140.201
+ mac: '70:7B:E8:77:7B:5F'
+ ipmiIp: 172.16.130.27
+ ipmiPass: huawei@123
roles:
- controller
- ha
- name: host2
- mac: '4C:B1:6C:90:57:CF'
- ipmiIp: 10.145.140.202
+ mac: 'E0:24:7F:02:15:A3'
+ ipmiIp: 172.16.130.28
+ ipmiPass: huawei@123
roles:
- controller
- ha
+ - name: host3
+ mac: 'D8:49:0B:DA:2A:28'
+ ipmiIp: 172.16.130.29
+ ipmiPass: Huawei@123
+ roles:
+ - compute
+
- name: host4
- mac: '4C:B1:6C:90:57:D8'
- ipmiIp: 10.145.140.204
+ mac: 'D8:49:0B:DA:5B:5D'
+ ipmiIp: 172.16.130.30
+ ipmiPass: Huawei@123
roles:
- compute
- name: host5
- mac: '4C:B1:6C:90:57:D2'
- ipmiIp: 10.145.140.205
+ mac: 'D8:49:0B:DA:56:85'
+ ipmiIp: 172.16.130.31
+ ipmiPass: Huawei@123
roles:
- compute
+
diff --git a/deploy/conf/hardware_environment/huawei_us_lab/pod1/network.yml b/deploy/conf/hardware_environment/huawei_us_lab/pod1/network.yml
index 4ca8176f..154f4150 100644
--- a/deploy/conf/hardware_environment/huawei_us_lab/pod1/network.yml
+++ b/deploy/conf/hardware_environment/huawei_us_lab/pod1/network.yml
@@ -29,8 +29,7 @@ sys_intf_mappings:
- name: external
interface: br-prv
- vlan_tag: 1411
- type: vlan
+ type: ovs
role:
- controller
- compute
@@ -56,10 +55,10 @@ ip_settings:
- name: external
ip_ranges:
- - - "10.145.140.100"
- - "10.145.140.110"
- cidr: "10.145.140.0/23"
- gw: "10.145.140.1"
+ - - "192.168.10.10"
+ - "192.168.10.50"
+ cidr: "192.168.10.0/24"
+ gw: "192.168.10.1"
role:
- controller
- compute
@@ -70,21 +69,22 @@ internal_vip:
interface: mgmt
public_vip:
- ip: 10.145.140.111
- netmask: "23"
+ ip: 192.168.10.51
+ netmask: "24"
interface: external
+onos_nic: eth2
public_net_info:
enable: True
network: ext-net
- type: vlan
- segment_id: 1411
+ type: flat
+ segment_id: 10
subnet: ext-subnet
provider_network: physnet
router: router-ext
enable_dhcp: False
no_gateway: False
- external_gw: "10.145.140.1"
- floating_ip_cidr: "10.145.140.0/24"
- floating_ip_start: "10.145.140.121"
- floating_ip_end: "10.145.140.231"
+ external_gw: "192.168.10.1"
+ floating_ip_cidr: "192.168.10.0/24"
+ floating_ip_start: "192.168.10.100"
+ floating_ip_end: "192.168.10.200"
diff --git a/deploy/network.sh b/deploy/network.sh
index e76fd926..9e0cfa8c 100755
--- a/deploy/network.sh
+++ b/deploy/network.sh
@@ -58,7 +58,7 @@ function setup_bridge_external()
sudo virsh net-define $WORK_DIR/network/external.xml
sudo virsh net-start external
- sudo python $COMPASS_DIR/deploy/setup_vnic.py
+ python $COMPASS_DIR/deploy/setup_vnic.py
}
function setup_nat_net() {
diff --git a/deploy/setup_vnic.py b/deploy/setup_vnic.py
index 39623031..8e14765f 100644
--- a/deploy/setup_vnic.py
+++ b/deploy/setup_vnic.py
@@ -3,17 +3,17 @@ import os
import yaml
if __name__ == "__main__":
- network_config_file = "/home/carey/nfv/compass4nfv/deploy/conf/network_cfg.yaml"#os.environ["NETWORK"]
+ network_config_file = os.environ["NETWORK"]
network_config = yaml.load(open(network_config_file, "r"))
- os.system("ovs-vsctl --may-exist add-port br-external mgmt_vnic -- set Interface mgmt_vnic type=internal")
- os.system("ip addr flush mgmt_vnic")
- os.system("ip link set mgmt_vnic up")
+ os.system("sudo ovs-vsctl --may-exist add-port br-external mgmt_vnic -- set Interface mgmt_vnic type=internal")
+ os.system("sudo ip addr flush mgmt_vnic")
+ os.system("sudo ip link set mgmt_vnic up")
for sys_intf in network_config["sys_intf_mappings"]:
if sys_intf["name"] == "mgmt" and sys_intf.get("vlan_tag"):
- os.system("ovs-vsctl set port mgmt_vnic tag=%s" % sys_intf["vlan_tag"])
+ os.system("sudo ovs-vsctl set port mgmt_vnic tag=%s" % sys_intf["vlan_tag"])
for net_info in network_config["ip_settings"]:
if net_info["name"] == "mgmt":
mgmt_ip_range_end= net_info["ip_ranges"][0][1]
mgmt_netmask = net_info["cidr"].split('/')[1]
- os.system(r"ip addr add %s/%s dev mgmt_vnic" % (mgmt_ip_range_end, mgmt_netmask))
+ os.system(r"sudo ip addr add %s/%s dev mgmt_vnic" % (mgmt_ip_range_end, mgmt_netmask))