summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/config-compute
diff options
context:
space:
mode:
authorYifei Xue <xueyifei@huawei.com>2017-11-01 11:46:18 +0800
committerYifei Xue <xueyifei@huawei.com>2017-11-28 21:39:19 +0800
commit10361fd56fac5f7aebba44402bf9a501854d00c3 (patch)
tree205b76c0831e272e71dbef64c3c10ea332f13eea /deploy/adapters/ansible/roles/config-compute
parent9a76ddb1075479c891389a0c9303d80ead9895a0 (diff)
Upgrade OpenStack version from Ocata to Pike
JIRA: COMPASS-565 For OPNFV F release, it's going to use OpenStack Pike as the NFVI component. This task is created to monitor the upgrade work of OpenStack Pike. Subtasks as follow: - Add Pike related configurations to compass_conf - Upgrade ubuntu os to ubuntu 16.04.3 - Upgrade centos os to centos 7.4 - Upgrade openstack-ansible from ocata to pike - Upgrade openstack repos from ocata to pike Change-Id: I2202e8e3ae23dae8e575c89170c9e5e057757870 Signed-off-by: Yifei Xue <xueyifei@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/config-compute')
-rw-r--r--deploy/adapters/ansible/roles/config-compute/tasks/RedHat.yml32
-rw-r--r--deploy/adapters/ansible/roles/config-compute/templates/ifcfg-br-external11
-rw-r--r--deploy/adapters/ansible/roles/config-compute/templates/ifcfg-br-mgmt2
-rw-r--r--deploy/adapters/ansible/roles/config-compute/templates/ifcfg-br-tenant8
-rw-r--r--deploy/adapters/ansible/roles/config-compute/templates/ifcfg-if.storage2
-rw-r--r--deploy/adapters/ansible/roles/config-compute/templates/ifcfg-if.tenant4
6 files changed, 41 insertions, 18 deletions
diff --git a/deploy/adapters/ansible/roles/config-compute/tasks/RedHat.yml b/deploy/adapters/ansible/roles/config-compute/tasks/RedHat.yml
index 4c6d2465..3ec1659f 100644
--- a/deploy/adapters/ansible/roles/config-compute/tasks/RedHat.yml
+++ b/deploy/adapters/ansible/roles/config-compute/tasks/RedHat.yml
@@ -15,20 +15,20 @@
echo 'nfs 2049/udp' >> /etc/services"
# yamllint disable rule:line-length
-- name: generate ifcfg-if.vxlan
+- name: generate ifcfg-if.tenant
template:
- src: ifcfg-if.vxlan
- dest: /etc/sysconfig/network-scripts/ifcfg-{{sys_intf_mappings["mgmt"]["interface"]}}.{{sys_intf_mappings["mgmt"]["vlan_tag"]}}
+ src: ifcfg-if.tenant
+ dest: /etc/sysconfig/network-scripts/ifcfg-{{compu_sys_mappings["tenant"]["interface"]}}.{{compu_sys_mappings["tenant"]["vlan_tag"]}}
- name: generate ifcfg-if.storage
template:
src: ifcfg-if.storage
- dest: /etc/sysconfig/network-scripts/ifcfg-{{sys_intf_mappings["storage"]["interface"]}}.{{sys_intf_mappings["storage"]["vlan_tag"]}}
+ dest: /etc/sysconfig/network-scripts/ifcfg-{{compu_sys_mappings["storage"]["interface"]}}.{{compu_sys_mappings["storage"]["vlan_tag"]}}
-- name: add br-vlan to interface script
+- name: add br-external to interface script
lineinfile:
- dest: /etc/sysconfig/network-scripts/ifcfg-{{ network_cfg["provider_net_mappings"][0]["interface"] }}
- line: "BRIDGE=br-vlan"
+ dest: /etc/sysconfig/network-scripts/ifcfg-{{compu_sys_mappings["external"]["interface"]}}
+ line: "BRIDGE=br-external"
- name: remove eth0 ip addresss
lineinfile:
@@ -49,13 +49,13 @@
- name: add br-vlan to interface script
lineinfile:
- dest: /etc/sysconfig/network-scripts/ifcfg-{{sys_intf_mappings["storage"]["interface"]}}.{{sys_intf_mappings["storage"]["vlan_tag"]}}
+ dest: /etc/sysconfig/network-scripts/ifcfg-{{compu_sys_mappings["storage"]["interface"]}}.{{compu_sys_mappings["storage"]["vlan_tag"]}}
line: "BRIDGE=br-storage"
-- name: add br-vxlan to interface script
+- name: add br-tenant to interface script
lineinfile:
- dest: /etc/sysconfig/network-scripts/ifcfg-{{sys_intf_mappings["mgmt"]["interface"]}}.{{sys_intf_mappings["mgmt"]["vlan_tag"]}}
- line: "BRIDGE=br-vxlan"
+ dest: /etc/sysconfig/network-scripts/ifcfg-{{compu_sys_mappings["tenant"]["interface"]}}.{{compu_sys_mappings["tenant"]["vlan_tag"]}}
+ line: "BRIDGE=br-tenant"
# yamllint enable rule:line-length
- name: generate ifcfg-br-mgmt script
@@ -63,9 +63,9 @@
src: ifcfg-br-mgmt
dest: /etc/sysconfig/network-scripts/
-- name: generate ifcfg-br-vlan script
+- name: generate ifcfg-br-external script
template:
- src: ifcfg-br-vlan
+ src: ifcfg-br-external
dest: /etc/sysconfig/network-scripts/
- name: generate ifcfg-br-storage script
@@ -73,15 +73,15 @@
src: ifcfg-br-storage
dest: /etc/sysconfig/network-scripts/
-- name: generate ifcfg-br-vxlan script
+- name: generate ifcfg-br-tenant script
template:
- src: ifcfg-br-vxlan
+ src: ifcfg-br-tenant
dest: /etc/sysconfig/network-scripts/
- name: restart the network
shell: systemctl restart network
-- name: Install apt packages
+- name: Install yum packages
yum:
pkg: "{{item}}"
state: "present"
diff --git a/deploy/adapters/ansible/roles/config-compute/templates/ifcfg-br-external b/deploy/adapters/ansible/roles/config-compute/templates/ifcfg-br-external
new file mode 100644
index 00000000..511c0db8
--- /dev/null
+++ b/deploy/adapters/ansible/roles/config-compute/templates/ifcfg-br-external
@@ -0,0 +1,11 @@
+DEVICE=br-external
+TYPE=Bridge
+IPADDR={{ ip_settings[inventory_hostname]["external"]["ip"] }}
+PREFIX=24
+GATEWAY={{ ip_settings[inventory_hostname]["external"]["gw"] }}
+BOOTPROTO=none
+ONBOOT=yes
+DELAY=0
+DEFROUTE="yes"
+DNS1=8.8.8.8
+DNS2=8.8.4.4
diff --git a/deploy/adapters/ansible/roles/config-compute/templates/ifcfg-br-mgmt b/deploy/adapters/ansible/roles/config-compute/templates/ifcfg-br-mgmt
index 7f1931c8..2e958cc7 100644
--- a/deploy/adapters/ansible/roles/config-compute/templates/ifcfg-br-mgmt
+++ b/deploy/adapters/ansible/roles/config-compute/templates/ifcfg-br-mgmt
@@ -1,6 +1,6 @@
DEVICE=br-mgmt
TYPE=Bridge
-IPADDR={{host_info[inventory_hostname].MGMT_IP}}
+IPADDR={{ip_settings[inventory_hostname]["mgmt"]["ip"]}}
PREFIX=24
BOOTPROTO=none
ONBOOT=yes
diff --git a/deploy/adapters/ansible/roles/config-compute/templates/ifcfg-br-tenant b/deploy/adapters/ansible/roles/config-compute/templates/ifcfg-br-tenant
new file mode 100644
index 00000000..96aeb9c1
--- /dev/null
+++ b/deploy/adapters/ansible/roles/config-compute/templates/ifcfg-br-tenant
@@ -0,0 +1,8 @@
+DEVICE=br-tenant
+TYPE=Bridge
+IPADDR={{ip_settings[inventory_hostname]["tenant"]["ip"]}}
+NETMASK=255.255.252.0
+BOOTPROTO=none
+DEFROUTE="no"
+ONBOOT=yes
+DELAY=0
diff --git a/deploy/adapters/ansible/roles/config-compute/templates/ifcfg-if.storage b/deploy/adapters/ansible/roles/config-compute/templates/ifcfg-if.storage
index 96afb1bd..2e409205 100644
--- a/deploy/adapters/ansible/roles/config-compute/templates/ifcfg-if.storage
+++ b/deploy/adapters/ansible/roles/config-compute/templates/ifcfg-if.storage
@@ -1,4 +1,4 @@
-DEVICE={{sys_intf_mappings["storage"]["interface"]}}.{{sys_intf_mappings["storage"]["vlan_tag"]}}
+DEVICE={{compu_sys_mappings["storage"]["interface"]}}.{{compu_sys_mappings["storage"]["vlan_tag"]}}
BOOTPROTO=none
ONBOOT=yes
VLAN=yes
diff --git a/deploy/adapters/ansible/roles/config-compute/templates/ifcfg-if.tenant b/deploy/adapters/ansible/roles/config-compute/templates/ifcfg-if.tenant
new file mode 100644
index 00000000..2a114f7c
--- /dev/null
+++ b/deploy/adapters/ansible/roles/config-compute/templates/ifcfg-if.tenant
@@ -0,0 +1,4 @@
+DEVICE={{compu_sys_mappings["tenant"]["interface"]}}.{{compu_sys_mappings["tenant"]["vlan_tag"]}}
+BOOTPROTO=none
+ONBOOT=yes
+VLAN=yes