summaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
Diffstat (limited to 'deploy')
-rw-r--r--deploy/adapters/ansible/openstack_pike/README.md1
-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
-rw-r--r--deploy/adapters/ansible/roles/config-controller/tasks/RedHat.yml30
-rw-r--r--deploy/adapters/ansible/roles/config-controller/tasks/main.yml4
-rw-r--r--deploy/adapters/ansible/roles/config-controller/templates/ifcfg-br-external11
-rw-r--r--deploy/adapters/ansible/roles/config-controller/templates/ifcfg-br-mgmt2
-rw-r--r--deploy/adapters/ansible/roles/config-controller/templates/ifcfg-br-tenant6
-rw-r--r--deploy/adapters/ansible/roles/config-controller/templates/ifcfg-if.storage2
-rw-r--r--deploy/adapters/ansible/roles/config-controller/templates/ifcfg-if.tenant4
-rw-r--r--deploy/adapters/ansible/roles/config-osa/files/haproxy.yml263
-rwxr-xr-xdeploy/adapters/ansible/roles/config-osa/tasks/main.yml23
-rw-r--r--deploy/adapters/ansible/roles/config-osa/tasks/meters.yml8
-rw-r--r--deploy/adapters/ansible/roles/config-osa/templates/user_variables.yml.j24
-rw-r--r--deploy/adapters/ansible/roles/post-osa/tasks/RedHat.yml79
-rw-r--r--deploy/adapters/ansible/roles/post-osa/tasks/main.yml16
-rw-r--r--deploy/adapters/ansible/roles/post-osa/templates/ifcfg-external.j27
-rw-r--r--deploy/adapters/ansible/roles/post-osa/templates/ifcfg-storage.j27
-rw-r--r--deploy/adapters/ansible/roles/post-osa/templates/ifcfg-tenant.j27
-rw-r--r--deploy/adapters/ansible/roles/setup-host/tasks/main.yml6
-rw-r--r--deploy/adapters/ansible/roles/setup-infrastructure/tasks/main.yml11
-rw-r--r--deploy/adapters/ansible/roles/setup-openstack/tasks/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/setup-openvswitch/tasks/compute.yml9
-rw-r--r--deploy/adapters/ansible/roles/setup-openvswitch/tasks/controller.yml9
-rw-r--r--deploy/adapters/ansible/roles/setup-openvswitch/vars/Debian.yml3
-rw-r--r--deploy/adapters/ansible/roles/setup-openvswitch/vars/RedHat.yml3
-rw-r--r--deploy/adapters/ansible/roles/storage/tasks/ceph.yml18
-rw-r--r--deploy/adapters/ansible/roles/storage/vars/Debian.yml3
-rw-r--r--deploy/adapters/ansible/roles/storage/vars/RedHat.yml3
-rw-r--r--deploy/adapters/ansible/roles/storage/vars/main.yml1
-rwxr-xr-xdeploy/compass_conf/adapter/ansible_openstack_pike.conf7
-rwxr-xr-xdeploy/compass_conf/flavor/openstack_pike.conf32
-rwxr-xr-xdeploy/compass_conf/flavor_mapping/HA-ansible-multinodes-pike.conf124
-rwxr-xr-xdeploy/compass_conf/flavor_metadata/HA-ansible-multinodes-pike.conf19
-rwxr-xr-xdeploy/compass_conf/os/centos7.4.conf3
-rwxr-xr-xdeploy/compass_conf/os/ubuntu16.04.3.conf3
-rwxr-xr-xdeploy/compass_conf/package_installer/ansible-pike.conf15
-rwxr-xr-xdeploy/compass_conf/role/openstack_pike_ansible.conf125
-rwxr-xr-xdeploy/compass_conf/templates/ansible_installer/openstack_pike/ansible_cfg/HA-ansible-multinodes.tmpl11
-rwxr-xr-xdeploy/compass_conf/templates/ansible_installer/openstack_pike/ansible_cfg/allinone.tmpl6
-rwxr-xr-xdeploy/compass_conf/templates/ansible_installer/openstack_pike/ansible_cfg/multinodes.tmpl6
-rwxr-xr-xdeploy/compass_conf/templates/ansible_installer/openstack_pike/ansible_cfg/single-controller.tmpl6
-rwxr-xr-xdeploy/compass_conf/templates/ansible_installer/openstack_pike/hosts/HA-ansible-multinodes.tmpl31
-rwxr-xr-xdeploy/compass_conf/templates/ansible_installer/openstack_pike/hosts/allinone.tmpl10
-rwxr-xr-xdeploy/compass_conf/templates/ansible_installer/openstack_pike/hosts/multinodes.tmpl110
-rwxr-xr-xdeploy/compass_conf/templates/ansible_installer/openstack_pike/hosts/single-controller.tmpl40
-rwxr-xr-xdeploy/compass_conf/templates/ansible_installer/openstack_pike/inventories/HA-ansible-multinodes.tmpl74
-rwxr-xr-xdeploy/compass_conf/templates/ansible_installer/openstack_pike/inventories/allinone.tmpl47
-rwxr-xr-xdeploy/compass_conf/templates/ansible_installer/openstack_pike/inventories/multinodes.tmpl123
-rwxr-xr-xdeploy/compass_conf/templates/ansible_installer/openstack_pike/inventories/single-controller.tmpl67
-rwxr-xr-xdeploy/compass_conf/templates/ansible_installer/openstack_pike/vars/HA-ansible-multinodes.tmpl275
-rwxr-xr-xdeploy/compass_conf/templates/ansible_installer/openstack_pike/vars/allinone.tmpl96
-rwxr-xr-xdeploy/compass_conf/templates/ansible_installer/openstack_pike/vars/multinodes.tmpl165
-rwxr-xr-xdeploy/compass_conf/templates/ansible_installer/openstack_pike/vars/single-controller.tmpl108
-rwxr-xr-xdeploy/compass_conf/templates/cobbler/CentOS-7-Minimal-1708-x86_64/profile.tmpl (renamed from deploy/compass_conf/templates/cobbler/ubuntu-16.04-server-x86_64/profile.tmpl)0
-rwxr-xr-xdeploy/compass_conf/templates/cobbler/CentOS-7-Minimal-1708-x86_64/system.tmpl76
-rwxr-xr-xdeploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64/profile.tmpl3
-rwxr-xr-xdeploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64/system.tmpl (renamed from deploy/compass_conf/templates/cobbler/ubuntu-16.04-server-x86_64/system.tmpl)0
-rw-r--r--deploy/conf/cluster.conf8
-rw-r--r--deploy/conf/compass.conf6
-rwxr-xr-xdeploy/prepare.sh2
65 files changed, 2124 insertions, 75 deletions
diff --git a/deploy/adapters/ansible/openstack_pike/README.md b/deploy/adapters/ansible/openstack_pike/README.md
new file mode 100644
index 00000000..7682d325
--- /dev/null
+++ b/deploy/adapters/ansible/openstack_pike/README.md
@@ -0,0 +1 @@
+# keep for openstack pike
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
diff --git a/deploy/adapters/ansible/roles/config-controller/tasks/RedHat.yml b/deploy/adapters/ansible/roles/config-controller/tasks/RedHat.yml
index 728dc559..cc14347a 100644
--- a/deploy/adapters/ansible/roles/config-controller/tasks/RedHat.yml
+++ b/deploy/adapters/ansible/roles/config-controller/tasks/RedHat.yml
@@ -8,30 +8,30 @@
##############################################################################
---
# yamllint disable rule:line-length
-- name: generate vxlan vlan ifcfg-if script
+- name: generate tenant vlan ifcfg-if script
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-{{contr_sys_mappings["tenant"]["interface"]}}.{{contr_sys_mappings["tenant"]["vlan_tag"]}}
- name: generate storage vlan ifcfg-if script
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-{{contr_sys_mappings["storage"]["interface"]}}.{{contr_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-{{contr_sys_mappings["external"]["interface"]}}
+ line: "BRIDGE=br-external"
- name: add br-storage 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-{{contr_sys_mappings["storage"]["interface"]}}.{{contr_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-{{contr_sys_mappings["tenant"]["interface"]}}.{{contr_sys_mappings["tenant"]["vlan_tag"]}}
+ line: "BRIDGE=br-tenant"
# yamllint enable rule:line-length
- name: remove eth0 ip addresss
@@ -56,9 +56,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-storag script
@@ -66,9 +66,9 @@
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
diff --git a/deploy/adapters/ansible/roles/config-controller/tasks/main.yml b/deploy/adapters/ansible/roles/config-controller/tasks/main.yml
index 674c80cc..9f390307 100644
--- a/deploy/adapters/ansible/roles/config-controller/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/config-controller/tasks/main.yml
@@ -12,3 +12,7 @@
- include: "{{ ansible_os_family }}.yml"
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version == '7'
+
+- name: set fact for local mirror
+ set_fact:
+ local_mirror: "{{ ansible_distribution }}"
diff --git a/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-br-external b/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-br-external
new file mode 100644
index 00000000..adf29127
--- /dev/null
+++ b/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-br-external
@@ -0,0 +1,11 @@
+DEVICE=br-external
+TYPE=Bridge
+IPADDR={{ ip_settings[inventory_hostname]["external"]["ip"] }}
+PREFIX=24
+BOOTPROTO=none
+ONBOOT=yes
+DELAY=0
+DEFROUTE="yes"
+GATEWAY={{ ip_settings[inventory_hostname]["external"]["gw"] }}
+DNS1=8.8.8.8
+DNS2=8.8.4.4
diff --git a/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-br-mgmt b/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-br-mgmt
index 7f1931c8..2e958cc7 100644
--- a/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-br-mgmt
+++ b/deploy/adapters/ansible/roles/config-controller/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-controller/templates/ifcfg-br-tenant b/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-br-tenant
new file mode 100644
index 00000000..1f8344e6
--- /dev/null
+++ b/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-br-tenant
@@ -0,0 +1,6 @@
+DEVICE=br-tenant
+TYPE=Bridge
+BOOTPROTO=none
+DEFROUTE="no"
+ONBOOT=yes
+DELAY=0
diff --git a/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-if.storage b/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-if.storage
index 96afb1bd..b71a80cf 100644
--- a/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-if.storage
+++ b/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-if.storage
@@ -1,4 +1,4 @@
-DEVICE={{sys_intf_mappings["storage"]["interface"]}}.{{sys_intf_mappings["storage"]["vlan_tag"]}}
+DEVICE={{contr_sys_mappings["storage"]["interface"]}}.{{contr_sys_mappings["storage"]["vlan_tag"]}}
BOOTPROTO=none
ONBOOT=yes
VLAN=yes
diff --git a/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-if.tenant b/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-if.tenant
new file mode 100644
index 00000000..bc9f2a57
--- /dev/null
+++ b/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-if.tenant
@@ -0,0 +1,4 @@
+DEVICE={{contr_sys_mappings["tenant"]["interface"]}}.{{contr_sys_mappings["tenant"]["vlan_tag"]}}
+BOOTPROTO=none
+ONBOOT=yes
+VLAN=yes
diff --git a/deploy/adapters/ansible/roles/config-osa/files/haproxy.yml b/deploy/adapters/ansible/roles/config-osa/files/haproxy.yml
new file mode 100644
index 00000000..3085f6aa
--- /dev/null
+++ b/deploy/adapters/ansible/roles/config-osa/files/haproxy.yml
@@ -0,0 +1,263 @@
+---
+haproxy_default_services:
+ - service:
+ haproxy_service_name: galera
+ haproxy_backend_nodes: "{{ [groups['galera_all'][0]] | default([]) }}" # list expected
+ haproxy_backup_nodes: "{{ groups['galera_all'][1:] | default([]) }}"
+ haproxy_bind: "{{ [internal_lb_vip_address] }}"
+ haproxy_port: 3306
+ haproxy_balance_type: tcp
+ haproxy_timeout_client: 5000s
+ haproxy_timeout_server: 5000s
+ haproxy_backend_options:
+ - "mysql-check user {{ galera_monitoring_user }}"
+ haproxy_whitelist_networks: "{{ haproxy_galera_whitelist_networks }}"
+ - service:
+ haproxy_service_name: repo_git
+ haproxy_backend_nodes: "{{ groups['repo_all'] | default([]) }}"
+ haproxy_bind: "{{ [internal_lb_vip_address] }}"
+ haproxy_port: 9418
+ haproxy_balance_type: tcp
+ haproxy_backend_options:
+ - tcp-check
+ haproxy_whitelist_networks: "{{ haproxy_repo_git_whitelist_networks }}"
+ - service:
+ haproxy_service_name: repo_all
+ haproxy_backend_nodes: "{{ groups['repo_all'] | default([]) }}"
+ haproxy_bind: "{{ [internal_lb_vip_address] }}"
+ haproxy_port: 8181
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk HEAD /"
+ - service:
+ haproxy_service_name: repo_cache
+ haproxy_backend_nodes: "{{ [groups['repo_all'][0]] | default([]) }}" # list expected
+ haproxy_backup_nodes: "{{ groups['repo_all'][1:] | default([]) }}"
+ haproxy_bind: "{{ [internal_lb_vip_address] }}"
+ haproxy_port: "{{ repo_pkg_cache_port }}"
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk HEAD /acng-report.html"
+ haproxy_whitelist_networks: "{{ haproxy_repo_cache_whitelist_networks }}"
+ - service:
+ haproxy_service_name: glance_api
+ haproxy_backend_nodes: "{{ groups['glance_api'] | default([]) }}"
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_port: 9292
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk /healthcheck"
+ - service:
+ haproxy_service_name: glance_registry
+ haproxy_backend_nodes: "{{ groups['glance_registry'] | default([]) }}"
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_port: 9191
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk /healthcheck"
+ haproxy_whitelist_networks: "{{ haproxy_glance_registry_whitelist_networks }}"
+ - service:
+ haproxy_service_name: gnocchi
+ haproxy_backend_nodes: "{{ groups['gnocchi_all'] | default([]) }}"
+ haproxy_port: 8041
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk /healthcheck"
+ - service:
+ haproxy_service_name: heat_api_cfn
+ haproxy_backend_nodes: "{{ groups['heat_api_cfn'] | default([]) }}"
+ haproxy_port: 8000
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk HEAD /"
+ - service:
+ haproxy_service_name: heat_api_cloudwatch
+ haproxy_backend_nodes: "{{ groups['heat_api_cloudwatch'] | default([]) }}"
+ haproxy_port: 8003
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk HEAD /"
+ - service:
+ haproxy_service_name: heat_api
+ haproxy_backend_nodes: "{{ groups['heat_api'] | default([]) }}"
+ haproxy_port: 8004
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk HEAD /"
+ - service:
+ haproxy_service_name: keystone_service
+ haproxy_backend_nodes: "{{ groups['keystone_all'] | default([]) }}"
+ haproxy_port: 5000
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_balance_type: "http"
+ haproxy_backend_options:
+ - "httpchk HEAD /"
+ - service:
+ haproxy_service_name: keystone_admin
+ haproxy_backend_nodes: "{{ groups['keystone_all'] | default([]) }}"
+ haproxy_port: 35357
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_balance_type: "http"
+ haproxy_backend_options:
+ - "httpchk HEAD /"
+ haproxy_whitelist_networks: "{{ haproxy_keystone_admin_whitelist_networks }}"
+ - service:
+ haproxy_service_name: neutron_server
+ haproxy_backend_nodes: "{{ groups['neutron_server'] | default([]) }}"
+ haproxy_port: 9696
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk GET /"
+ - service:
+ haproxy_service_name: nova_api_metadata
+ haproxy_backend_nodes: "{{ groups['nova_api_metadata'] | default([]) }}"
+ haproxy_port: 8775
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk HEAD /"
+ haproxy_whitelist_networks: "{{ haproxy_nova_metadata_whitelist_networks }}"
+ - service:
+ haproxy_service_name: nova_api_os_compute
+ haproxy_backend_nodes: "{{ groups['nova_api_os_compute'] | default([]) }}"
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_port: 8774
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk HEAD /"
+ - service:
+ haproxy_service_name: nova_api_placement
+ haproxy_backend_nodes: "{{ groups['nova_api_placement'] | default([]) }}"
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_port: 8780
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk HEAD /"
+ haproxy_backend_httpcheck_options:
+ - "expect status 401"
+ - service:
+ haproxy_service_name: nova_console
+ haproxy_backend_nodes: "{{ groups['nova_console'] | default([]) }}"
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_port: "{{ nova_console_port }}"
+ haproxy_balance_type: http
+ haproxy_timeout_client: 60m
+ haproxy_timeout_server: 60m
+ haproxy_balance_alg: source
+ haproxy_backend_options:
+ - "httpchk HEAD /"
+ haproxy_backend_httpcheck_options:
+ - "expect status 404"
+ - service:
+ haproxy_service_name: cinder_api
+ haproxy_backend_nodes: "{{ groups['cinder_api'] | default([]) }}"
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_port: 8776
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk HEAD /"
+ - service:
+ haproxy_service_name: horizon
+ haproxy_backend_nodes: "{{ groups['horizon_all'] | default([]) }}"
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_ssl_all_vips: true
+ haproxy_port: "{{ haproxy_ssl | ternary(443,80) }}"
+ haproxy_backend_port: 80
+ haproxy_redirect_http_port: 80
+ haproxy_balance_type: http
+ haproxy_balance_alg: source
+ haproxy_backend_options:
+ - "httpchk HEAD /"
+ - service:
+ haproxy_service_name: sahara_api
+ haproxy_backend_nodes: "{{ groups['sahara_api'] | default([]) }}"
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_balance_alg: source
+ haproxy_port: 8386
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk /healthcheck"
+ - service:
+ haproxy_service_name: swift_proxy
+ haproxy_backend_nodes: "{{ groups['swift_proxy'] | default([]) }}"
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_balance_alg: source
+ haproxy_port: 8080
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk /healthcheck"
+ - service:
+ haproxy_service_name: aodh_api
+ haproxy_backend_nodes: "{{ groups['aodh_api'] | default([]) }}"
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_port: 8042
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk HEAD /"
+ haproxy_backend_httpcheck_options:
+ - "expect status 200"
+ - service:
+ haproxy_service_name: ironic_api
+ haproxy_backend_nodes: "{{ groups['ironic_api'] | default([]) }}"
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_port: 6385
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk GET /"
+ - service:
+ haproxy_service_name: rabbitmq_mgmt
+ haproxy_backend_nodes: "{{ groups['rabbitmq'] | default([]) }}"
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_port: 15672
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk HEAD /"
+ haproxy_whitelist_networks: "{{ haproxy_rabbitmq_management_whitelist_networks }}"
+ - service:
+ haproxy_service_name: magnum
+ haproxy_backend_nodes: "{{ groups['magnum_all'] | default([]) }}"
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_port: 9511
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk GET /"
+ - service:
+ haproxy_service_name: trove
+ haproxy_backend_nodes: "{{ groups['trove_api'] | default([]) }}"
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_port: 8779
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk HEAD /"
+ - service:
+ haproxy_service_name: barbican
+ haproxy_backend_nodes: "{{ groups['barbican_api'] | default([]) }}"
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_port: 9311
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk GET /"
+ - service:
+ haproxy_service_name: designate_api
+ haproxy_backend_nodes: "{{ groups['designate_api'] | default([]) }}"
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_port: 9001
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "forwardfor"
+ - "httpchk /versions"
+ - "httplog"
+ - service:
+ haproxy_service_name: octavia
+ haproxy_backend_nodes: "{{ groups['octavia_all'] | default([]) }}"
+ haproxy_ssl: "{{ haproxy_ssl }}"
+ haproxy_port: 9876
+ haproxy_balance_type: http
+ haproxy_backend_options:
+ - "httpchk GET /"
+ haproxy_whitelist_networks: "{{ haproxy_octavia_whitelist_networks }}"
diff --git a/deploy/adapters/ansible/roles/config-osa/tasks/main.yml b/deploy/adapters/ansible/roles/config-osa/tasks/main.yml
index d96a83da..2f6186fc 100755
--- a/deploy/adapters/ansible/roles/config-osa/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/config-osa/tasks/main.yml
@@ -34,6 +34,7 @@
register: checkresult
ignore_errors: "true"
+# yamllint disable rule:line-length
- name: add mariadb local repository
blockinfile:
dest: /etc/openstack_deploy/user_variables.yml
@@ -44,8 +45,8 @@
when:
- checkresult.rc == 0
- offline_deployment is defined and offline_deployment == "Disable"
+ - hostvars[hostvars[inventory_hostname]['groups']['controller'][0]]['local_mirror'] == 'Ubuntu'
-# yamllint disable rule:line-length
- name: add mariadb local repository
blockinfile:
dest: /etc/openstack_deploy/user_variables.yml
@@ -96,7 +97,7 @@
- name: remove repo_build_pip_no_binary
lineinfile:
- dest: /opt/openstack-ansible/playbooks/inventory/group_vars/repo_all.yml
+ dest: /opt/openstack-ansible/group_vars/repo_all.yml
state: absent
regexp: "{{ item }}"
with_items: ['^repo_build_pip_no_binary:', '^ - libvirt-python']
@@ -139,10 +140,10 @@
when: offline_deployment is defined and offline_deployment == "Enable"
# This is a bug in ocata, will be removed in the future
-- name: limit the version of networking-sfc in os_tacker
- shell: |
- sed -i 's/networking-sfc$/networking-sfc=={{ networking_sfc_version }}/g' \
- /etc/ansible/roles/os_tacker/defaults/main.yml
+# - name: limit the version of networking-sfc in os_tacker
+# shell: |
+# sed -i 's/networking-sfc$/networking-sfc=={{ networking_sfc_version }}/g' \
+# /etc/ansible/roles/os_tacker/defaults/main.yml
- name: add rally and tempest to requirement.txt
blockinfile:
@@ -270,10 +271,10 @@
src: repo_fix_pandas.yml
dest: /etc/ansible/roles/repo_build/tasks/repo_fix_pandas.yml
-- name: change repore build
- lineinfile:
- dest: /etc/ansible/roles/repo_build/tasks/main.yml
- insertafter: "^- include: repo_post_build.yml"
- line: "- include: repo_fix_pandas.yml"
+# - name: change repore build
+# lineinfile:
+# dest: /etc/ansible/roles/repo_build/tasks/main.yml
+# insertafter: "^- include: repo_post_build.yml"
+# line: "- include: repo_fix_pandas.yml"
- include: meters.yml
diff --git a/deploy/adapters/ansible/roles/config-osa/tasks/meters.yml b/deploy/adapters/ansible/roles/config-osa/tasks/meters.yml
index 163fc69d..8f06a884 100644
--- a/deploy/adapters/ansible/roles/config-osa/tasks/meters.yml
+++ b/deploy/adapters/ansible/roles/config-osa/tasks/meters.yml
@@ -8,10 +8,10 @@
# #############################################################################
---
- name: modify the aodh haproxy config
- replace:
- dest: /opt/openstack-ansible/playbooks/vars/configs/haproxy_config.yml
- regexp: '- "expect status 401"'
- replace: '- "expect status 200"'
+ copy:
+ dest: /opt/openstack-ansible/group_vars/all/haproxy.yml
+ src: haproxy.yml
+ mode: 0664
- name: add OS_AUTH_TYPE in openrc
lineinfile:
diff --git a/deploy/adapters/ansible/roles/config-osa/templates/user_variables.yml.j2 b/deploy/adapters/ansible/roles/config-osa/templates/user_variables.yml.j2
index ebd8ff09..a6e69683 100644
--- a/deploy/adapters/ansible/roles/config-osa/templates/user_variables.yml.j2
+++ b/deploy/adapters/ansible/roles/config-osa/templates/user_variables.yml.j2
@@ -38,7 +38,7 @@ nfs_file_gw: False
%}
openstack_host_specific_kernel_modules:
- name: "openvswitch"
- pattern: "CONFIG_OPENVSWITCH="
+ pattern: "CONFIG_OPENVSWITCH"
group: "network_hosts"
neutron_plugin_type: ml2.ovs
@@ -61,3 +61,5 @@ neutron_provider_networks:
{% endfor %}
network_mappings: "{{ ','.join(controller_mappings) }}"
{% endif %}
+
+security_sshd_permit_root_login: no
diff --git a/deploy/adapters/ansible/roles/post-osa/tasks/RedHat.yml b/deploy/adapters/ansible/roles/post-osa/tasks/RedHat.yml
new file mode 100644
index 00000000..ecfd0680
--- /dev/null
+++ b/deploy/adapters/ansible/roles/post-osa/tasks/RedHat.yml
@@ -0,0 +1,79 @@
+##############################################################################
+# Copyright (c) 2017 HUAWEI TECHNOLOGIES CO.,LTD and others.
+#
+# 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
+##############################################################################
+---
+
+# yamllint disable rule:line-length
+- name: add eth0 ip addresss
+ lineinfile:
+ dest: /etc/sysconfig/network-scripts/ifcfg-eth0
+ line: "IPADDR={{ ip_settings[inventory_hostname][\"mgmt\"][\"ip\"] }}"
+
+- name: add eth0 netmask
+ lineinfile:
+ dest: /etc/sysconfig/network-scripts/ifcfg-eth0
+ line: "NETMASK=255.255.255.0"
+
+- name: Disable default gw in eth0
+ lineinfile:
+ dest: /etc/sysconfig/network-scripts/ifcfg-eth0
+ line: "DEFROUTE=\"no\""
+
+- name: generate ifcfg-external
+ template:
+ src: ifcfg-external.j2
+ dest: /etc/sysconfig/network-scripts/ifcfg-{{compu_sys_mappings["external"]["interface"]}}
+
+- name: generate ifcfg-storage
+ template:
+ src: ifcfg-storage.j2
+ dest: /etc/sysconfig/network-scripts/ifcfg-{{compu_sys_mappings["storage"]["interface"]}}.{{compu_sys_mappings["storage"]["vlan_tag"]}}
+
+- name: generate ifcfg-tenant
+ template:
+ src: ifcfg-tenant.j2
+ dest: /etc/sysconfig/network-scripts/ifcfg-{{compu_sys_mappings["tenant"]["interface"]}}.{{compu_sys_mappings["tenant"]["vlan_tag"]}}
+
+# yamllint enable rule:line-length
+
+- name: remove ifcfg-br-mgmt script
+ file:
+ path: /etc/sysconfig/network-scripts/ifcfg-br-mgmt
+ state: absent
+
+- name: remove ifcfg-br-external script
+ file:
+ path: /etc/sysconfig/network-scripts/ifcfg-br-external
+ state: absent
+
+- name: remove ifcfg-br-storage script
+ file:
+ path: /etc/sysconfig/network-scripts/ifcfg-br-storage
+ state: absent
+
+- name: remove ifcfg-br-tenant script
+ file:
+ path: /etc/sysconfig/network-scripts/ifcfg-br-tenant
+ state: absent
+
+- name: restart the network
+ shell: systemctl restart network
+
+- name: fix mapping in compute
+ shell: |
+ {% set compute_mappings = [] %}
+ {% for key, value in compu_prv_mappings.iteritems() %}
+ {% set mapping = key + ":" + value["bridge"] %}
+ {% set _ = compute_mappings.append(mapping) %}
+ {% endfor %}
+ {% if compute_mappings | length != 0 %}
+ sed -i "s/^\(bridge_mappings\).*/\1 = {{ ','.join(compute_mappings) }}/g" \
+ /etc/neutron/plugins/ml2/openvswitch_agent.ini
+ {% else %}
+ sed -i "/bridge_mappings/d" /etc/neutron/plugins/ml2/openvswitch_agent.ini
+ {% endif %}
diff --git a/deploy/adapters/ansible/roles/post-osa/tasks/main.yml b/deploy/adapters/ansible/roles/post-osa/tasks/main.yml
index f7f7a6cc..bd83b50f 100644
--- a/deploy/adapters/ansible/roles/post-osa/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/post-osa/tasks/main.yml
@@ -8,10 +8,18 @@
##############################################################################
---
- include: "{{ ansible_distribution }}.yml"
- when: inventory_hostname in groups['compute']
+ when:
+ - inventory_hostname in groups['compute']
+ - ansible_distribution == 'Ubuntu'
# install networking-sfc for non odl scenarios
-- include: install_networking_sfc.yml
+# - include: install_networking_sfc.yml
+# when:
+# - odl_sfc is not defined or odl_sfc == "Disable"
+# - inventory_hostname not in groups['compute']
+# when: ansible_distribution == 'Ubuntu'
+
+- include: "{{ ansible_os_family }}.yml"
when:
- - odl_sfc is not defined or odl_sfc == "Disable"
- - inventory_hostname not in groups['compute']
+ - ansible_os_family == 'RedHat' and ansible_distribution_major_version == '7'
+ - inventory_hostname in groups['compute']
diff --git a/deploy/adapters/ansible/roles/post-osa/templates/ifcfg-external.j2 b/deploy/adapters/ansible/roles/post-osa/templates/ifcfg-external.j2
new file mode 100644
index 00000000..0154b944
--- /dev/null
+++ b/deploy/adapters/ansible/roles/post-osa/templates/ifcfg-external.j2
@@ -0,0 +1,7 @@
+DEVICE={{compu_sys_mappings["external"]["interface"]}}
+ONBOOT=yes
+BOOTPROTO=static
+TYPE=Ethernet
+IPADDR={{ ip_settings[inventory_hostname]["external"]["ip"] }}
+GATEWAY={{ ip_settings[inventory_hostname]["external"]["gw"] }}
+NETMASK=255.255.255.0
diff --git a/deploy/adapters/ansible/roles/post-osa/templates/ifcfg-storage.j2 b/deploy/adapters/ansible/roles/post-osa/templates/ifcfg-storage.j2
new file mode 100644
index 00000000..338da8c4
--- /dev/null
+++ b/deploy/adapters/ansible/roles/post-osa/templates/ifcfg-storage.j2
@@ -0,0 +1,7 @@
+DEVICE={{compu_sys_mappings["storage"]["interface"]}}.{{compu_sys_mappings["storage"]["vlan_tag"]}}
+BOOTPROTO=none
+ONBOOT=yes
+VLAN=yes
+IPADDR={{ ip_settings[inventory_hostname]["storage"]["ip"] }}
+NETMASK=255.255.255.0
+DEFROUTE="no"
diff --git a/deploy/adapters/ansible/roles/post-osa/templates/ifcfg-tenant.j2 b/deploy/adapters/ansible/roles/post-osa/templates/ifcfg-tenant.j2
new file mode 100644
index 00000000..15230c96
--- /dev/null
+++ b/deploy/adapters/ansible/roles/post-osa/templates/ifcfg-tenant.j2
@@ -0,0 +1,7 @@
+DEVICE={{compu_sys_mappings["tenant"]["interface"]}}.{{compu_sys_mappings["tenant"]["vlan_tag"]}}
+BOOTPROTO=none
+ONBOOT=yes
+VLAN=yes
+IPADDR={{ ip_settings[inventory_hostname]["tenant"]["ip"] }}
+NETMASK=255.255.255.0
+DEFROUTE="no"
diff --git a/deploy/adapters/ansible/roles/setup-host/tasks/main.yml b/deploy/adapters/ansible/roles/setup-host/tasks/main.yml
index 73f572ea..cc943830 100644
--- a/deploy/adapters/ansible/roles/setup-host/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/setup-host/tasks/main.yml
@@ -8,7 +8,7 @@
# #############################################################################
---
- name: setup hosts
- shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_ocata-opnfv2/ansible.log; \
+ shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_pike-opnfv2/ansible.log; \
export ANSIBLE_SCP_IF_SSH=y; \
cd /opt/openstack-ansible/playbooks; \
openstack-ansible setup-hosts.yml \
@@ -19,7 +19,7 @@
register: failed_container
- name: destroy the failed_container
- shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_ocata-opnfv2/ansible.log; \
+ shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_pike-opnfv2/ansible.log; \
export ANSIBLE_SCP_IF_SSH=y; \
cd /opt/openstack-ansible/playbooks; \
openstack-ansible lxc-containers-destroy.yml \
@@ -30,7 +30,7 @@
ignore_errors: "True"
- name: retry to setup failed_container
- shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_ocata-opnfv2/ansible.log; \
+ shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_pike-opnfv2/ansible.log; \
export ANSIBLE_SCP_IF_SSH=y; \
cd /opt/openstack-ansible/playbooks; \
openstack-ansible setup-hosts.yml --limit {{item}} \
diff --git a/deploy/adapters/ansible/roles/setup-infrastructure/tasks/main.yml b/deploy/adapters/ansible/roles/setup-infrastructure/tasks/main.yml
index 478c4d48..7cf5c86f 100644
--- a/deploy/adapters/ansible/roles/setup-infrastructure/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/setup-infrastructure/tasks/main.yml
@@ -8,7 +8,7 @@
##############################################################################
---
- name: setup infrastructure
- shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_ocata-opnfv2/ansible.log; \
+ shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_pike-opnfv2/ansible.log; \
export ANSIBLE_SCP_IF_SSH=y; \
cd /opt/openstack-ansible/playbooks; \
openstack-ansible setup-infrastructure.yml \
@@ -19,10 +19,9 @@
register: setup_infrastructure_result
- fail:
- msg: "there are some task failed when setup infrastructure."
- when: setup_infrastructure_result.stdout.find('failed={{item}}') != -1
- with_sequence: start=1 end={{ max_failed_times }} stride=1
-
-- fail:
msg: "some host are unreachable."
when: setup_infrastructure_result.stdout.find('unreachable=1') != -1
+
+- fail:
+ msg: "there are some task failed when setup infrastructure."
+ when: setup_infrastructure_result.stdout.find('Mark setup-infrastructure completed') == -1
diff --git a/deploy/adapters/ansible/roles/setup-openstack/tasks/main.yml b/deploy/adapters/ansible/roles/setup-openstack/tasks/main.yml
index b71612f7..a55b1a01 100644
--- a/deploy/adapters/ansible/roles/setup-openstack/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/setup-openstack/tasks/main.yml
@@ -8,7 +8,7 @@
##############################################################################
---
- name: setup openstack
- shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_ocata-opnfv2/ansible.log; \
+ shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_pike-opnfv2/ansible.log; \
export ANSIBLE_SCP_IF_SSH=y; \
cd /opt/openstack-ansible/playbooks; \
openstack-ansible setup-openstack.yml \
diff --git a/deploy/adapters/ansible/roles/setup-openvswitch/tasks/compute.yml b/deploy/adapters/ansible/roles/setup-openvswitch/tasks/compute.yml
index b7a8fbcb..43c6689f 100644
--- a/deploy/adapters/ansible/roles/setup-openvswitch/tasks/compute.yml
+++ b/deploy/adapters/ansible/roles/setup-openvswitch/tasks/compute.yml
@@ -7,11 +7,18 @@
# http://www.apache.org/licenses/LICENSE-2.0
#############################################################################
---
+- include_vars: "{{ ansible_os_family }}.yml"
+
- name: stop neutron-openvswitch-agent
service:
name: neutron-openvswitch-agent
state: stopped
+- name: restart openvswitch service
+ service:
+ name: "{{ ovs_service }}"
+ state: restarted
+
- name: remove tunnel_types when vlan
lineinfile:
dest: /etc/neutron/plugins/ml2/openvswitch_agent.ini
@@ -43,7 +50,7 @@
when:
- compute in item["role"]
-- name: stop neutron-openvswitch-agent
+- name: start neutron-openvswitch-agent
service:
name: neutron-openvswitch-agent
state: started
diff --git a/deploy/adapters/ansible/roles/setup-openvswitch/tasks/controller.yml b/deploy/adapters/ansible/roles/setup-openvswitch/tasks/controller.yml
index 258a39e2..3637d1db 100644
--- a/deploy/adapters/ansible/roles/setup-openvswitch/tasks/controller.yml
+++ b/deploy/adapters/ansible/roles/setup-openvswitch/tasks/controller.yml
@@ -7,11 +7,18 @@
# http://www.apache.org/licenses/LICENSE-2.0
#############################################################################
---
+- include_vars: "{{ ansible_os_family }}.yml"
+
- name: stop neutron-openvswitch-agent
service:
name: neutron-openvswitch-agent
state: stopped
+- name: restart openvswitch service
+ service:
+ name: "{{ ovs_service }}"
+ state: restarted
+
- name: remove tunnel_types when vlan
lineinfile:
dest: /etc/neutron/plugins/ml2/openvswitch_agent.ini
@@ -43,7 +50,7 @@
when:
- controller in item["role"]
-- name: stop neutron-openvswitch-agent
+- name: start neutron-openvswitch-agent
service:
name: neutron-openvswitch-agent
state: started
diff --git a/deploy/adapters/ansible/roles/setup-openvswitch/vars/Debian.yml b/deploy/adapters/ansible/roles/setup-openvswitch/vars/Debian.yml
new file mode 100644
index 00000000..b6bd95a8
--- /dev/null
+++ b/deploy/adapters/ansible/roles/setup-openvswitch/vars/Debian.yml
@@ -0,0 +1,3 @@
+---
+
+ovs_service: openvswitch-switch
diff --git a/deploy/adapters/ansible/roles/setup-openvswitch/vars/RedHat.yml b/deploy/adapters/ansible/roles/setup-openvswitch/vars/RedHat.yml
new file mode 100644
index 00000000..c6a9e43b
--- /dev/null
+++ b/deploy/adapters/ansible/roles/setup-openvswitch/vars/RedHat.yml
@@ -0,0 +1,3 @@
+---
+
+ovs_service: openvswitch
diff --git a/deploy/adapters/ansible/roles/storage/tasks/ceph.yml b/deploy/adapters/ansible/roles/storage/tasks/ceph.yml
index 50476c7b..0fc7c80b 100644
--- a/deploy/adapters/ansible/roles/storage/tasks/ceph.yml
+++ b/deploy/adapters/ansible/roles/storage/tasks/ceph.yml
@@ -12,6 +12,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+- include_vars: "{{ ansible_os_family }}.yml"
+
- name: Create sparse ceph OSD files
command: truncate -s {{ host_loopback_ceph_size }} /var/{{ item }}.img
args:
@@ -43,6 +45,7 @@
line: "losetup -f /var/{{ item }}.img"
insertbefore: "{{ rc_local_insert_before }}"
with_items: "{{ ceph_osd_images }}"
+ when: ansible_os_family == 'Debian'
- name: Create ceph partitions at boot time
lineinfile:
@@ -50,3 +53,18 @@
line: "partprobe -s {{ item }}"
insertbefore: "{{ rc_local_insert_before }}"
with_items: "{{ ceph_loopback.results | map(attribute='stdout') | list }}"
+ when: ansible_os_family == 'Debian'
+
+- name: Create ceph loopback at boot time
+ lineinfile:
+ dest: "{{ rc_local }}"
+ line: "losetup -f /var/{{ item }}.img"
+ with_items: "{{ ceph_osd_images }}"
+ when: ansible_os_family == 'RedHat'
+
+- name: Create ceph partitions at boot time
+ lineinfile:
+ dest: "{{ rc_local }}"
+ line: "partprobe -s {{ item }}"
+ with_items: "{{ ceph_loopback.results | map(attribute='stdout') | list }}"
+ when: ansible_os_family == 'RedHat'
diff --git a/deploy/adapters/ansible/roles/storage/vars/Debian.yml b/deploy/adapters/ansible/roles/storage/vars/Debian.yml
new file mode 100644
index 00000000..c1141f7b
--- /dev/null
+++ b/deploy/adapters/ansible/roles/storage/vars/Debian.yml
@@ -0,0 +1,3 @@
+---
+
+rc_local: /etc/rc.local
diff --git a/deploy/adapters/ansible/roles/storage/vars/RedHat.yml b/deploy/adapters/ansible/roles/storage/vars/RedHat.yml
new file mode 100644
index 00000000..ef59e1b4
--- /dev/null
+++ b/deploy/adapters/ansible/roles/storage/vars/RedHat.yml
@@ -0,0 +1,3 @@
+---
+
+rc_local: /etc/rc.d/rc.local
diff --git a/deploy/adapters/ansible/roles/storage/vars/main.yml b/deploy/adapters/ansible/roles/storage/vars/main.yml
index 28e2ad06..cbee9c1e 100644
--- a/deploy/adapters/ansible/roles/storage/vars/main.yml
+++ b/deploy/adapters/ansible/roles/storage/vars/main.yml
@@ -8,7 +8,6 @@
##############################################################################
---
host_loopback_ceph_size: "100G"
-rc_local: /etc/rc.local
rc_local_insert_before: "^exit 0$"
bootstrap_host_data_disk_device: null
bootstrap_host_data_disk_device_force: "no"
diff --git a/deploy/compass_conf/adapter/ansible_openstack_pike.conf b/deploy/compass_conf/adapter/ansible_openstack_pike.conf
new file mode 100755
index 00000000..07c8a95e
--- /dev/null
+++ b/deploy/compass_conf/adapter/ansible_openstack_pike.conf
@@ -0,0 +1,7 @@
+NAME = 'openstack_pike'
+DISPLAY_NAME = 'Openstack Pike'
+PARENT = 'openstack'
+PACKAGE_INSTALLER = 'ansible_installer_pike'
+OS_INSTALLER = 'cobbler'
+SUPPORTED_OS_PATTERNS = ['(?i)ubuntu-16\.04\.3', '(?i)CentOS-7.*17.*']
+DEPLOYABLE = True
diff --git a/deploy/compass_conf/flavor/openstack_pike.conf b/deploy/compass_conf/flavor/openstack_pike.conf
new file mode 100755
index 00000000..6c959adf
--- /dev/null
+++ b/deploy/compass_conf/flavor/openstack_pike.conf
@@ -0,0 +1,32 @@
+ADAPTER_NAME = 'openstack_pike'
+FLAVORS = [{
+ 'flavor': 'allinone',
+ 'display_name': 'All-In-One',
+ 'template': 'allinone.tmpl',
+ 'roles': ['allinone-compute'],
+}, {
+ 'flavor': 'single-controller',
+ 'display_name': 'Single Controller',
+ 'template': 'single-controller.tmpl',
+ 'roles': [
+ 'controller', 'compute', 'network', 'storage', 'odl', 'onos'
+ ],
+}, {
+ 'flavor': 'multinodes',
+ 'display_name': 'Multi-nodes',
+ 'template': 'multinodes.tmpl',
+ 'roles': [
+ 'compute-controller', 'compute-worker', 'network-server',
+ 'network-worker', 'database', 'messaging', 'image', 'odl',
+ 'dashboard', 'identity', 'storage-controller', 'storage-volume'
+ ],
+}, {
+ 'flavor': 'HA-ansible-multinodes-pike',
+ 'display_name': 'HA-ansible-multinodes-pike',
+ 'template': 'HA-ansible-multinodes.tmpl',
+ 'roles': [
+ 'controller', 'compute', 'ha', 'odl', 'onos', 'opencontrail', 'ceph', 'ceph-adm', 'ceph-mon', 'ceph-osd', 'ceph-osd-node', 'moon'
+ ],
+}]
+
+
diff --git a/deploy/compass_conf/flavor_mapping/HA-ansible-multinodes-pike.conf b/deploy/compass_conf/flavor_mapping/HA-ansible-multinodes-pike.conf
new file mode 100755
index 00000000..d108c9b5
--- /dev/null
+++ b/deploy/compass_conf/flavor_mapping/HA-ansible-multinodes-pike.conf
@@ -0,0 +1,124 @@
+ADAPTER = 'openstack_pike'
+FLAVOR = 'HA-ansible-multinodes-pike'
+CONFIG_MAPPING = {
+ "mapped_name": "flavor_config",
+ "mapped_children": [{
+ "security": {
+ "accordion_heading": "OpenStack Database and Queue Credentials",
+ "category": "service_credentials",
+ "data_structure": "table",
+ "action": "true",
+ "modifiable_data": ["username", "password"],
+ "table_display_header": ["Service", "UserName", "Password", "Action"],
+ "config": {
+ "rabbitmq": {
+ "username": "guest",
+ "password": "guest"
+ },
+ "compute": {
+ "username": "nova",
+ "password": "nova"
+ },
+ "dashboard": {
+ "username": "dashboard",
+ "password": "dashboard"
+ },
+ "identity": {
+ "username": "keystone",
+ "password": "keystone"
+ },
+ "image": {
+ "username": "glance",
+ "password": "glance"
+ },
+ "metering": {
+ "username": "ceilometer",
+ "password": "ceilometer"
+ },
+ "alarming": {
+ "username": "aodh",
+ "password": "aodh"
+ },
+ "network": {
+ "username": "neutron",
+ "password": "neutron"
+ },
+ "mysql": {
+ "username": "root",
+ "password": "root"
+ },
+ "volume": {
+ "username": "cinder",
+ "password": "cinder"
+ },
+ "heat": {
+ "username": "heat",
+ "password": "heat"
+ },
+ "policy": {
+ "username": "congress",
+ "password": "congress"
+ }
+ }
+ }
+ },{
+ "security": {
+ "accordion_heading": "OpenStack Keystone User Credentials",
+ "category": "console_credentials",
+ "data_structure": "table",
+ "action": "true",
+ "modifiable_data": ["username", "password"],
+ "table_display_header": ["Service", "UserName", "Password", "Action"],
+ "config":{
+ "admin": {
+ "username": "admin",
+ "password": "admin"
+ },
+ "demo": {
+ "username": "demo",
+ "password": "demo"
+ },
+ "compute": {
+ "username": "nova",
+ "password": "nova"
+ },
+ "dashboard": {
+ "username": "dashboard",
+ "password": "dashboard"
+ },
+ "identity": {
+ "username": "keystone",
+ "password": "keystone"
+ },
+ "image": {
+ "username": "glance",
+ "password": "glance"
+ },
+ "metering": {
+ "username": "ceilometer",
+ "password": "ceilometer"
+ },
+ "alarming": {
+ "username": "aodh",
+ "password": "aodh"
+ },
+ "network": {
+ "username": "quantum",
+ "password": "quantum"
+ },
+ "object-store": {
+ "username": "swift",
+ "password": "swift"
+ },
+ "heat": {
+ "username": "heat",
+ "password": "heat"
+ },
+ "volume": {
+ "username": "cinder",
+ "password": "cinder"
+ }
+ }
+ }
+ }]
+}
diff --git a/deploy/compass_conf/flavor_metadata/HA-ansible-multinodes-pike.conf b/deploy/compass_conf/flavor_metadata/HA-ansible-multinodes-pike.conf
new file mode 100755
index 00000000..c5eb328a
--- /dev/null
+++ b/deploy/compass_conf/flavor_metadata/HA-ansible-multinodes-pike.conf
@@ -0,0 +1,19 @@
+ADAPTER = 'openstack_pike'
+FLAVOR = 'HA-ansible-multinodes-pike'
+METADATA = {
+ 'ha_proxy': {
+ '_self': {
+ },
+ 'vip': {
+ '_self': {
+ 'is_required': True,
+ 'field': 'general',
+ 'mapping_to': 'ha_vip'
+ }
+ },
+ 'test': {
+ '_self': {
+ },
+ }
+ }
+}
diff --git a/deploy/compass_conf/os/centos7.4.conf b/deploy/compass_conf/os/centos7.4.conf
new file mode 100755
index 00000000..a4d0e1d0
--- /dev/null
+++ b/deploy/compass_conf/os/centos7.4.conf
@@ -0,0 +1,3 @@
+NAME = 'CentOS-7-Minimal-1708-x86_64'
+PARENT = 'CentOS'
+DEPLOYABLE = True
diff --git a/deploy/compass_conf/os/ubuntu16.04.3.conf b/deploy/compass_conf/os/ubuntu16.04.3.conf
new file mode 100755
index 00000000..4dae23b3
--- /dev/null
+++ b/deploy/compass_conf/os/ubuntu16.04.3.conf
@@ -0,0 +1,3 @@
+NAME = 'ubuntu-16.04.3-server-x86_64'
+PARENT = 'Ubuntu'
+DEPLOYABLE = True
diff --git a/deploy/compass_conf/package_installer/ansible-pike.conf b/deploy/compass_conf/package_installer/ansible-pike.conf
new file mode 100755
index 00000000..81efc41d
--- /dev/null
+++ b/deploy/compass_conf/package_installer/ansible-pike.conf
@@ -0,0 +1,15 @@
+NAME = 'ansible_installer'
+INSTANCE_NAME = 'ansible_installer_pike'
+SETTINGS = {
+ 'ansible_dir': '/var/ansible',
+ 'ansible_run_dir': '/var/ansible/run',
+ 'ansible_config': 'ansible.cfg',
+ 'playbook_file': 'site.yml',
+ 'inventory_file': 'inventory.py',
+ 'inventory_json_file': 'inventory.json',
+ 'inventory_group': ['controller', 'compute', 'ha', 'odl', 'onos', 'opencontrail', 'ceph_adm', 'ceph_mon', 'ceph_osd', 'moon'],
+ 'group_variable': 'all',
+ 'etc_hosts_path': 'roles/pre-openstack/templates/hosts',
+ 'runner_dirs': ['roles','openstack_pike/templates','openstack_pike/roles']
+}
+
diff --git a/deploy/compass_conf/role/openstack_pike_ansible.conf b/deploy/compass_conf/role/openstack_pike_ansible.conf
new file mode 100755
index 00000000..aab128ac
--- /dev/null
+++ b/deploy/compass_conf/role/openstack_pike_ansible.conf
@@ -0,0 +1,125 @@
+ADAPTER_NAME = 'openstack_pike'
+ROLES = [{
+ 'role': 'allinone-compute',
+ 'display_name': 'all in one',
+ 'description': 'All in One'
+}, {
+ 'role': 'controller',
+ 'display_name': 'controller node',
+ 'description': 'Controller Node'
+}, {
+ 'role': 'compute',
+ 'display_name': 'compute node',
+ 'description': 'Compute Node'
+}, {
+ 'role': 'storage',
+ 'display_name': 'storage node',
+ 'description': 'Storage Node'
+}, {
+ 'role': 'network',
+ 'display_name': 'network node',
+ 'description': 'Network Node'
+}, {
+ 'role': 'compute-worker',
+ 'display_name': 'Compute worker node',
+ 'description': 'Compute worker node'
+}, {
+ 'role': 'compute-controller',
+ 'display_name': 'Compute controller node',
+ 'description': 'Compute controller node'
+}, {
+ 'role': 'network-server',
+ 'display_name': 'Network server node',
+ 'description': 'Network server node'
+}, {
+ 'role': 'database',
+ 'display_name': 'Database node',
+ 'description': 'Database node'
+}, {
+ 'role': 'messaging',
+ 'display_name': 'Messaging queue node',
+ 'description': 'Messaging queue node'
+}, {
+ 'role': 'image',
+ 'display': 'Image node',
+ 'description': 'Image node'
+}, {
+ 'role': 'dashboard',
+ 'display': 'Dashboard node',
+ 'description': 'Dashboard node'
+}, {
+ 'role': 'identity',
+ 'display': 'Identity node',
+ 'description': 'Identity node'
+}, {
+ 'role': 'storage-controller',
+ 'display': 'Storage controller node',
+ 'description': 'Storage controller node'
+}, {
+ 'role': 'storage-volume',
+ 'display': 'Storage volume node',
+ 'description': 'Storage volume node'
+}, {
+ 'role': 'network-worker',
+ 'display': 'Network worker node',
+ 'description': 'Network worker node'
+}, {
+ 'role': 'odl',
+ 'display': 'open day light',
+ 'description': 'odl node',
+ 'optional': True
+}, {
+ 'role': 'onos',
+ 'display': 'open network operating system',
+ 'description': 'onos node',
+ 'optional': True
+}, {
+ 'role': 'opencontrail',
+ 'display': 'open contrail',
+ 'description': 'opencontrail node',
+ 'optional': True
+}, {
+ 'role': 'ha',
+ 'display': 'Cluster with HA',
+ 'description': 'Cluster with HA node'
+}, {
+ 'role': 'ceph-adm',
+ 'display': 'Ceph Admin Node',
+ 'description': 'Ceph Admin Node',
+ 'optional': True
+}, {
+ 'role': 'ceph-mon',
+ 'display': 'Ceph Monitor Node',
+ 'description': 'Ceph Monitor Node',
+ 'optional': True
+}, {
+ 'role': 'ceph-osd',
+ 'display': 'Ceph Storage Node',
+ 'description': 'Ceph Storage Node',
+ 'optional': True
+}, {
+ 'role': 'ceph-osd-node',
+ 'display': 'Ceph osd install from node',
+ 'description': '',
+ 'optional': True
+}, {
+ 'role': 'ceph',
+ 'display': 'ceph node',
+ 'description': 'ceph node',
+ 'optional': True
+}, {
+ 'role': 'sec-patch',
+ 'display': 'sec-patch node',
+ 'description': 'Security Patch Node',
+ 'optional': True
+}, {
+ 'role': 'none',
+ 'display': 'none node',
+ 'description': 'Only install OS Node',
+ 'optional': True
+}, {
+ 'role': 'moon',
+ 'display': 'moon master or slave node',
+ 'description': "Moon master/slave Node",
+ 'optional': True
+}]
diff --git a/deploy/compass_conf/templates/ansible_installer/openstack_pike/ansible_cfg/HA-ansible-multinodes.tmpl b/deploy/compass_conf/templates/ansible_installer/openstack_pike/ansible_cfg/HA-ansible-multinodes.tmpl
new file mode 100755
index 00000000..cd8c8d30
--- /dev/null
+++ b/deploy/compass_conf/templates/ansible_installer/openstack_pike/ansible_cfg/HA-ansible-multinodes.tmpl
@@ -0,0 +1,11 @@
+#set cluster_name = $getVar('name', '')
+[defaults]
+log_path = /var/ansible/run/openstack_pike-$cluster_name/ansible.log
+host_key_checking = False
+callback_whitelist = playbook_done, status_callback
+callback_plugins = /opt/ansible_callbacks
+forks=100
+
+[ssh_connection]
+pipelining=True
+retries = 5
diff --git a/deploy/compass_conf/templates/ansible_installer/openstack_pike/ansible_cfg/allinone.tmpl b/deploy/compass_conf/templates/ansible_installer/openstack_pike/ansible_cfg/allinone.tmpl
new file mode 100755
index 00000000..49a775dd
--- /dev/null
+++ b/deploy/compass_conf/templates/ansible_installer/openstack_pike/ansible_cfg/allinone.tmpl
@@ -0,0 +1,6 @@
+#set cluster_name = $getVar('name', '')
+[defaults]
+log_path = /var/ansible/run/openstack_pike-$cluster_name/ansible.log
+host_key_checking = False
+callback_plugins = /opt/ansible_callbacks
+pipelining=True
diff --git a/deploy/compass_conf/templates/ansible_installer/openstack_pike/ansible_cfg/multinodes.tmpl b/deploy/compass_conf/templates/ansible_installer/openstack_pike/ansible_cfg/multinodes.tmpl
new file mode 100755
index 00000000..49a775dd
--- /dev/null
+++ b/deploy/compass_conf/templates/ansible_installer/openstack_pike/ansible_cfg/multinodes.tmpl
@@ -0,0 +1,6 @@
+#set cluster_name = $getVar('name', '')
+[defaults]
+log_path = /var/ansible/run/openstack_pike-$cluster_name/ansible.log
+host_key_checking = False
+callback_plugins = /opt/ansible_callbacks
+pipelining=True
diff --git a/deploy/compass_conf/templates/ansible_installer/openstack_pike/ansible_cfg/single-controller.tmpl b/deploy/compass_conf/templates/ansible_installer/openstack_pike/ansible_cfg/single-controller.tmpl
new file mode 100755
index 00000000..49a775dd
--- /dev/null
+++ b/deploy/compass_conf/templates/ansible_installer/openstack_pike/ansible_cfg/single-controller.tmpl
@@ -0,0 +1,6 @@
+#set cluster_name = $getVar('name', '')
+[defaults]
+log_path = /var/ansible/run/openstack_pike-$cluster_name/ansible.log
+host_key_checking = False
+callback_plugins = /opt/ansible_callbacks
+pipelining=True
diff --git a/deploy/compass_conf/templates/ansible_installer/openstack_pike/hosts/HA-ansible-multinodes.tmpl b/deploy/compass_conf/templates/ansible_installer/openstack_pike/hosts/HA-ansible-multinodes.tmpl
new file mode 100755
index 00000000..4c98066e
--- /dev/null
+++ b/deploy/compass_conf/templates/ansible_installer/openstack_pike/hosts/HA-ansible-multinodes.tmpl
@@ -0,0 +1,31 @@
+#set ip_settings={}
+#for k,v in $getVar('ip_settings', {}).items()
+#set host_ip_settings={}
+#for intf in v
+#set $host_ip_settings[$intf["alias"]]=intf
+#end for
+#set $ip_settings[$k]=$host_ip_settings
+#end for
+
+# localhost
+127.0.0.1 localhost
+#set controllers = $getVar('controller', [])
+#set computes = $getVar('compute', [])
+#if not $isinstance($controllers, list)
+ #set controllers = [$controllers]
+#end if
+#if not $isinstance($compute, list)
+ #set computes = [$computes]
+#end if
+# controller
+#for worker in $controllers
+ #set worker_hostname = $worker.hostname
+ #set worker_ip = $ip_settings[$worker_hostname]["tenant"]["ip"]
+$worker_ip $worker_hostname
+#end for
+# compute
+#for worker in $computes
+ #set worker_hostname = $worker.hostname
+ #set worker_ip = $ip_settings[$worker_hostname]["tenant"]["ip"]
+$worker_ip $worker_hostname
+#end for
diff --git a/deploy/compass_conf/templates/ansible_installer/openstack_pike/hosts/allinone.tmpl b/deploy/compass_conf/templates/ansible_installer/openstack_pike/hosts/allinone.tmpl
new file mode 100755
index 00000000..b777815e
--- /dev/null
+++ b/deploy/compass_conf/templates/ansible_installer/openstack_pike/hosts/allinone.tmpl
@@ -0,0 +1,10 @@
+#set controllers = $getVar('allinone_compute', [])
+#if not $isinstance($controllers, list)
+ #set controllers = [$controllers]
+#end if
+# allinone
+#for controller in $controllers
+ #set controller_ip = $controller.management.ip
+ #set controller_hostname = $controller.hostname
+$controller_ip $controller_hostname
+#end for
diff --git a/deploy/compass_conf/templates/ansible_installer/openstack_pike/hosts/multinodes.tmpl b/deploy/compass_conf/templates/ansible_installer/openstack_pike/hosts/multinodes.tmpl
new file mode 100755
index 00000000..ca8c793f
--- /dev/null
+++ b/deploy/compass_conf/templates/ansible_installer/openstack_pike/hosts/multinodes.tmpl
@@ -0,0 +1,110 @@
+#set compute_controllers = $getVar('compute_controller', [])
+#set compute_workers = $getVar('compute_worker', [])
+#set network_servers = $getVar('network_server', [])
+#set network_workers = $getVar('network_worker', [])
+#set databases = $getVar('database', [])
+#set messagings = $getVar('messaging', [])
+#set images = $getVar('image', [])
+#set dashboards = $getVar('dashboard', [])
+#set identities = $getVar('identity', [])
+#set storage_controllers = $getVar('storage_controller', [])
+#set storage_volumes = $getVar('storage_volume', [])
+#if not $isinstance($compute_controllers, list)
+ #set compute_controllers = [$compute_controllers]
+#end if
+#if not $isinstance($compute_workers, list)
+ #set compute_workers = [$compute_workers]
+#end if
+#if not $isinstance($network_servers, list)
+ #set network_servers = [$network_servers]
+#end if
+#if not $isinstance($network_workers, list)
+ #set network_workers = [$network_workers]
+#end if
+#if not $isinstance($databases, list)
+ #set databases = [$databases]
+#end if
+#if not $isinstance($messagings, list)
+ #set messagings = [$messagings]
+#end if
+#if not $isinstance($images, list)
+ #set images = [$images]
+#end if
+#if not $isinstance($dashboards, list)
+ #set dashboards = [$dashboards]
+#end if
+#if not $isinstance($identities, list)
+ #set identities = [$identities]
+#end if
+#if not $isinstance($storage_controllers, list)
+ #set storage_controllers = [$storage_controllers]
+#end if
+#if not $isinstance($storage_volumes, list)
+ #set storage_volumes = [$storage_volumes]
+#end if
+# compute-controller
+#for worker in $compute_controllers
+ #set worker_ip = $worker.management.ip
+ #set worker_hostname = $worker.hostname
+$worker_ip $worker_hostname
+#end for
+# database
+#for worker in $databases
+ #set worker_ip = $worker.management.ip
+ #set worker_hostname = $worker.hostname
+$worker_ip $worker_hostname
+#end for
+# messaging
+#for worker in $messagings
+ #set worker_ip = $worker.management.ip
+ #set worker_hostname = $worker.hostname
+$worker_ip $worker_hostname
+#end for
+# storage-controller
+#for worker in $storage_controllers
+ #set worker_ip = $worker.management.ip
+ #set worker_hostname = $worker.hostname
+$worker_ip $worker_hostname
+#end for
+# image
+#for worker in $images
+ #set worker_ip = $worker.management.ip
+ #set worker_hostname = $worker.hostname
+$worker_ip $worker_hostname
+#end for
+# identity
+#for worker in $identities
+ #set worker_ip = $worker.management.ip
+ #set worker_hostname = $worker.hostname
+$worker_ip $worker_hostname
+#end for
+# network-server
+#for worker in $network_servers
+ #set worker_ip = $worker.management.ip
+ #set worker_hostname = $worker.hostname
+$worker_ip $worker_hostname
+#end for
+# dashboard
+#for worker in $dashboards
+ #set worker_ip = $worker.management.ip
+ #set worker_hostname = $worker.hostname
+$worker_ip $worker_hostname
+#end for
+# storage-volume
+#for worker in $storage_volumes
+ #set worker_ip = $worker.management.ip
+ #set worker_hostname = $worker.hostname
+$worker_ip $worker_hostname
+#end for
+# network-worker
+#for worker in $network_workers
+ #set worker_ip = $worker.management.ip
+ #set worker_hostname = $worker.hostname
+$worker_ip $worker_hostname
+#end for
+# compute-worker
+#for worker in $compute_workers
+ #set worker_ip = $worker.management.ip
+ #set worker_hostname = $worker.hostname
+$worker_ip $worker_hostname
+#end for
diff --git a/deploy/compass_conf/templates/ansible_installer/openstack_pike/hosts/single-controller.tmpl b/deploy/compass_conf/templates/ansible_installer/openstack_pike/hosts/single-controller.tmpl
new file mode 100755
index 00000000..3ed94694
--- /dev/null
+++ b/deploy/compass_conf/templates/ansible_installer/openstack_pike/hosts/single-controller.tmpl
@@ -0,0 +1,40 @@
+#set controllers = $getVar('controller', [])
+#set computes = $getVar('compute', [])
+#set storages = $getVar('storage', [])
+#set networks = $getVar('network', [])
+#if not $isinstance($controllers, list)
+ #set controllers = [$controllers]
+#end if
+#if not $isinstance($computes, list)
+ #set computes = [$computes]
+#end if
+#if not $isinstance($storages, list)
+ #set storages = [$storages]
+#end if
+#if not $isinstance($networks, list)
+ #set networks = [$networks]
+#end if
+# controller
+#for controller in $controllers
+ #set controller_ip = $controller.management.ip
+ #set controller_hostname = $controller.hostname
+$controller_ip $controller_hostname
+#end for
+# compute
+#for worker in $computes
+ #set worker_ip = $worker.management.ip
+ #set worker_hostname = $worker.hostname
+$worker_ip $worker_hostname
+#end for
+# storage
+#for worker in $storages
+ #set worker_ip = $worker.management.ip
+ #set worker_hostname = $worker.hostname
+$worker_ip $worker_hostname
+#end for
+# network
+#for worker in $networks
+ #set worker_ip = $worker.management.ip
+ #set worker_hostname = $worker.hostname
+$worker_ip $worker_hostname
+#end for
diff --git a/deploy/compass_conf/templates/ansible_installer/openstack_pike/inventories/HA-ansible-multinodes.tmpl b/deploy/compass_conf/templates/ansible_installer/openstack_pike/inventories/HA-ansible-multinodes.tmpl
new file mode 100755
index 00000000..7184d21d
--- /dev/null
+++ b/deploy/compass_conf/templates/ansible_installer/openstack_pike/inventories/HA-ansible-multinodes.tmpl
@@ -0,0 +1,74 @@
+#set inventory_json = $getVar('inventory_json', [])
+#!/usr/bin/env python
+
+import os
+import sys
+import copy
+import argparse
+
+try:
+ import json
+except ImportError:
+ import simplejson as json
+
+local_inventory='$inventory_json'
+
+def _byteify(data, ignore_dicts = False):
+ if isinstance(data, unicode):
+ return data.encode('utf-8')
+ if isinstance(data, list):
+ return [ _byteify(item, ignore_dicts=True) for item in data ]
+ if isinstance(data, dict) and not ignore_dicts:
+ return {
+ _byteify(key, ignore_dicts=True): _byteify(value, ignore_dicts=True)
+ for key, value in data.iteritems()
+ }
+ return data
+
+def merge_dict(ldict, rdict, overwrite=True):
+ if not (ldict and rdict):
+ return
+
+ if not isinstance(ldict, dict):
+ raise TypeError('ldict type is %s not dict' % type(ldict))
+
+ if not isinstance(rdict, dict):
+ raise TypeError('rdict type is %s not dict' % type(rdict))
+
+ for key, value in rdict.items():
+ if isinstance(value, dict) and key in ldict and isinstance(ldict[key],
+ dict):
+ merge_dict(ldict[key], value, overwrite)
+ else:
+ if overwrite or key not in ldict:
+ ldict[key] = copy.deepcopy(value)
+
+def load_inventory(inventory):
+ if not os.path.exists(inventory):
+ raise RuntimeError('file: %s not exist' % inventory)
+ with open(inventory, 'r') as fd:
+ return json.load(fd, object_hook=_byteify)
+
+def dump_inventory(inventory, data):
+ with open(inventory, 'w') as fd:
+ json.dump(data, fd, indent=4)
+
+def merge_inventory(linv, rinv):
+ ldata = load_inventory(linv)
+ rdata = load_inventory(rinv)
+ merge_dict(ldata, rdata, overwrite=True)
+ dump_inventory(linv, ldata)
+
+def read_cli_args():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--list', action = 'store_true')
+ parser.add_argument('--merge', action = 'store')
+ return parser.parse_args()
+
+if __name__ == '__main__':
+ get_args = read_cli_args()
+ new_inventory = get_args.merge
+ if get_args.list:
+ print load_inventory(local_inventory)
+ elif new_inventory:
+ merge_inventory(local_inventory, new_inventory)
diff --git a/deploy/compass_conf/templates/ansible_installer/openstack_pike/inventories/allinone.tmpl b/deploy/compass_conf/templates/ansible_installer/openstack_pike/inventories/allinone.tmpl
new file mode 100755
index 00000000..b320b9c5
--- /dev/null
+++ b/deploy/compass_conf/templates/ansible_installer/openstack_pike/inventories/allinone.tmpl
@@ -0,0 +1,47 @@
+#set controllers = $getVar('allinone_compute', [])
+#set computes = $getVar('allinone_compute', [])
+#set storages = $getVar('allinone_compute', [])
+#set networks = $getVar('allinone_compute', [])
+#if not $isinstance($controllers, list)
+ #set controllers = [$controllers]
+#end if
+#if not $isinstance($computes, list)
+ #set computes = [$computes]
+#end if
+#if not $isinstance($storages, list)
+ #set storages = [$storages]
+#end if
+#if not $isinstance($networks, list)
+ #set networks = [$networks]
+#end if
+
+#set credentials = $getVar('server_credentials', {})
+#set username = $credentials.get('username', 'root')
+#set password = $credentials.get('password', 'root')
+[controller]
+#for controller in $controllers
+ #set controller_ip = $controller.management.ip
+ #set controller_hostname = $controller.hostname
+$controller_hostname ansible_ssh_host=$controller_ip ansible_ssh_user=$username ansible_ssh_pass=$password
+#end for
+
+[compute]
+#for compute in $computes
+ #set compute_ip = $compute.management.ip
+ #set compute_hostname = $compute.hostname
+$compute_hostname ansible_ssh_host=$compute_ip ansible_ssh_user=$username ansible_ssh_pass=$password
+#end for
+
+[network]
+#for network in $networks
+ #set network_ip = $network.management.ip
+ #set network_hostname = $network.hostname
+$network_hostname ansible_ssh_host=$network_ip ansible_ssh_user=$username ansible_ssh_pass=$password
+#end for
+
+[storage]
+#for storage in storages
+ #set storage_ip = $storage.management.ip
+ #set storage_hostname = $storage.hostname
+$storage_hostname ansible_ssh_host=$storage_ip ansible_ssh_user=$username ansible_ssh_pass=$password
+#end for
diff --git a/deploy/compass_conf/templates/ansible_installer/openstack_pike/inventories/multinodes.tmpl b/deploy/compass_conf/templates/ansible_installer/openstack_pike/inventories/multinodes.tmpl
new file mode 100755
index 00000000..b342d22f
--- /dev/null
+++ b/deploy/compass_conf/templates/ansible_installer/openstack_pike/inventories/multinodes.tmpl
@@ -0,0 +1,123 @@
+#set compute_controllers = $getVar('compute_controller', [])
+#set compute_workers = $getVar('compute_worker', [])
+#set network_servers = $getVar('network_server', [])
+#set network_workers = $getVar('network_worker', [])
+#set databases = $getVar('database', [])
+#set messagings = $getVar('messaging', [])
+#set images = $getVar('image', [])
+#set dashboards = $getVar('dashboard', [])
+#set identities = $getVar('identity', [])
+#set storage_controllers = $getVar('storage_controller', [])
+#set storage_volumes = $getVar('storage_volume', [])
+#if not $isinstance($compute_controllers, list)
+ #set compute_controllers = [$compute_controllers]
+#end if
+#if not $isinstance($compute_workers, list)
+ #set compute_workers = [$compute_workers]
+#end if
+#if not $isinstance($network_servers, list)
+ #set network_servers = [$network_servers]
+#end if
+#if not $isinstance($network_workers, list)
+ #set network_workers = [$network_workers]
+#end if
+#if not $isinstance($databases, list)
+ #set databases = [$databases]
+#end if
+#if not $isinstance($messagings, list)
+ #set messagings = [$messagings]
+#end if
+#if not $isinstance($images, list)
+ #set images = [$images]
+#end if
+#if not $isinstance($dashboards, list)
+ #set dashboards = [$dashboards]
+#end if
+#if not $isinstance($identities, list)
+ #set identities = [$identities]
+#end if
+#if not $isinstance($storage_controllers, list)
+ #set storage_controllers = [$storage_controllers]
+#end if
+#if not $isinstance($storage_volumes, list)
+ #set storage_volumes = [$storage_volumes]
+#end if
+#set credentials = $getVar('server_credentials', {})
+#set username = $credentials.get('username', 'root')
+#set password = $credentials.get('password', 'root')
+[compute-controller]
+#for controller in $compute_controllers
+ #set controller_ip = $controller.management.ip
+ #set controller_hostname = $controller.hostname
+$controller_hostname ansible_ssh_host=$controller_ip ansible_ssh_user=$username ansible_ssh_pass=$password
+#end for
+
+[compute-worker]
+#for compute in $compute_workers
+ #set compute_ip = $compute.management.ip
+ #set compute_hostname = $compute.hostname
+$compute_hostname ansible_ssh_host=$compute_ip ansible_ssh_user=$username ansible_ssh_pass=$password
+#end for
+
+[network-server]
+#for network in $network_servers
+ #set network_ip = $network.management.ip
+ #set network_hostname = $network.hostname
+$network_hostname ansible_ssh_host=$network_ip ansible_ssh_user=$username ansible_ssh_pass=$password
+#end for
+
+[network-worker]
+#for network in $network_workers
+ #set network_ip = $network.management.ip
+ #set network_hostname = $network.hostname
+$network_hostname ansible_ssh_host=$network_ip ansible_ssh_user=$username ansible_ssh_pass=$password
+#end for
+
+[database]
+#for worker in $databases
+ #set worker_ip = $worker.management.ip
+ #set worker_hostname = $worker.hostname
+$worker_hostname ansible_ssh_host=$worker_ip ansible_ssh_user=$username ansible_ssh_pass=$password
+#end for
+
+[messaging]
+#for worker in $messagings
+ #set worker_ip = $worker.management.ip
+ #set worker_hostname = $worker.hostname
+$worker_hostname ansible_ssh_host=$worker_ip ansible_ssh_user=$username ansible_ssh_pass=$password
+#end for
+
+[image]
+#for worker in $images
+ #set worker_ip = $worker.management.ip
+ #set worker_hostname = $worker.hostname
+$worker_hostname ansible_ssh_host=$worker_ip ansible_ssh_user=$username ansible_ssh_pass=$password
+#end for
+
+[dashboard]
+#for worker in $dashboards
+ #set worker_ip = $worker.management.ip
+ #set worker_hostname = $worker.hostname
+$worker_hostname ansible_ssh_host=$worker_ip ansible_ssh_user=$username ansible_ssh_pass=$password
+#end for
+
+[identity]
+#for worker in $identities
+ #set worker_ip = $worker.management.ip
+ #set worker_hostname = $worker.hostname
+$worker_hostname ansible_ssh_host=$worker_ip ansible_ssh_user=$username ansible_ssh_pass=$password
+#end for
+
+[storage-controller]
+#for worker in $storage_controllers
+ #set worker_ip = $worker.management.ip
+ #set worker_hostname = $worker.hostname
+$worker_hostname ansible_ssh_host=$worker_ip ansible_ssh_user=$username ansible_ssh_pass=$password
+#end for
+
+[storage-volume]
+#for worker in $storage_volumes
+ #set worker_ip = $worker.management.ip
+ #set worker_hostname = $worker.hostname
+$worker_hostname ansible_ssh_host=$worker_ip ansible_ssh_user=$username ansible_ssh_pass=$password
+#end for
diff --git a/deploy/compass_conf/templates/ansible_installer/openstack_pike/inventories/single-controller.tmpl b/deploy/compass_conf/templates/ansible_installer/openstack_pike/inventories/single-controller.tmpl
new file mode 100755
index 00000000..1afb45fa
--- /dev/null
+++ b/deploy/compass_conf/templates/ansible_installer/openstack_pike/inventories/single-controller.tmpl
@@ -0,0 +1,67 @@
+#set controllers = $getVar('controller', [])
+#set computes = $getVar('compute', [])
+#set storages = $getVar('storage', [])
+#set networks = $getVar('network', [])
+#set odls = $getVar('odl', [])
+#set onoss = $getVar('onos', [])
+#if not $isinstance($controllers, list)
+ #set controllers = [$controllers]
+#end if
+#if not $isinstance($computes, list)
+ #set computes = [$computes]
+#end if
+#if not $isinstance($storages, list)
+ #set storages = [$storages]
+#end if
+#if not $isinstance($networks, list)
+ #set networks = [$networks]
+#end if
+#if not $isinstance($odls, list)
+ #set odls = [$odls]
+#end if
+#if not $isinstance($onoss, list)
+ #set onoss = [$onoss]
+#end if
+
+#set credentials = $getVar('server_credentials', {})
+#set username = $credentials.get('username', 'root')
+#set password = $credentials.get('password', 'root')
+[controller]
+#for controller in $controllers
+ #set controller_ip = $controller.management.ip
+ #set controller_hostname = $controller.hostname
+$controller_hostname ansible_ssh_host=$controller_ip ansible_ssh_user=$username ansible_ssh_pass=$password
+#end for
+
+[compute]
+#for compute in $computes
+ #set compute_ip = $compute.management.ip
+ #set compute_hostname = $compute.hostname
+$compute_hostname ansible_ssh_host=$compute_ip ansible_ssh_user=$username ansible_ssh_pass=$password
+#end for
+
+[network]
+#for network in $networks
+ #set network_ip = $network.management.ip
+ #set network_hostname = $network.hostname
+$network_hostname ansible_ssh_host=$network_ip ansible_ssh_user=$username ansible_ssh_pass=$password
+#end for
+
+[storage]
+#for storage in storages
+ #set storage_ip = $storage.management.ip
+ #set storage_hostname = $storage.hostname
+$storage_hostname ansible_ssh_host=$storage_ip ansible_ssh_user=$username ansible_ssh_pass=$password
+#end for
+[odl]
+#for odl in odls
+ #set odl_ip = $odl.management.ip
+ #set odl_hostname = $odl.hostname
+$odl_hostname ansible_ssh_host=$odl_ip ansible_ssh_user=$username ansible_ssh_pass=$password
+#end for
+[storage]
+#for storage in storages
+ #set storage_ip = $storage.management.ip
+ #set storage_hostname = $storage.hostname
+$storage_hostname ansible_ssh_host=$storage_ip ansible_ssh_user=$username ansible_ssh_pass=$password
+#end for
diff --git a/deploy/compass_conf/templates/ansible_installer/openstack_pike/vars/HA-ansible-multinodes.tmpl b/deploy/compass_conf/templates/ansible_installer/openstack_pike/vars/HA-ansible-multinodes.tmpl
new file mode 100755
index 00000000..6b226e6f
--- /dev/null
+++ b/deploy/compass_conf/templates/ansible_installer/openstack_pike/vars/HA-ansible-multinodes.tmpl
@@ -0,0 +1,275 @@
+#from random import randint
+#set cluster_name = $getVar('name', '')
+#set network_cfg = $getVar('network_cfg', {})
+#set ntp_server = $getVar('ntp_server', "")
+#set ceph_disk = $getVar('ceph_disk',"")
+#set controllers = $getVar('controller', [])
+#set computes = $getVar('compute', [])
+#set $contr_sys_mappings= {}
+#set $compu_sys_mappings= {}
+#for $intf_info in $network_cfg.sys_intf_mappings
+#if "controller" in $intf_info["role"]
+#set $contr_sys_mappings[$intf_info["name"]] = $intf_info
+#end if
+#if "compute" in $intf_info["role"]
+#set $compu_sys_mappings[$intf_info["name"]] = $intf_info
+#end if
+#end for
+
+#set ip_settings={}
+#for k,v in $getVar('ip_settings', {}).items()
+#set host_ip_settings={}
+#for intf in v
+#set $host_ip_settings[$intf["alias"]]=intf
+#end for
+#set $ip_settings[$k]=$host_ip_settings
+#end for
+
+#for item in $network_cfg["ip_settings"]
+#if $item["name"] == "mgmt"
+#set mgmt_cfg = $item
+#end if
+#if $item["name"] == "external"
+#set external_cfg = $item
+#end if
+#if $item["name"] == "tenant"
+#set tenant_cfg = $item
+#end if
+#if $item["name"] == "storage"
+#set storage_cfg = $item
+#end if
+#end for
+
+#set provider_net_mappings = $network_cfg["provider_net_mappings"]
+#set contr_prv_mappings = {}
+#set compu_prv_mappings = {}
+#for item in $provider_net_mappings
+#if "controller" in $item["role"]
+#set $contr_prv_mappings[$item["network"]] = {"bridge":$item["name"],"interface":$item["interface"]}
+#end if
+#if "compute" in $item["role"]
+#set $compu_prv_mappings[$item["network"]] = {"bridge":$item["name"],"interface":$item["interface"]}
+#end if
+#end for
+
+#set neutron_cfg = $getVar('neutron_config', {})
+#set ovs_config = $neutron_cfg.openvswitch
+#set has = $getVar('ha', [])
+#set ha_vip = $getVar('ha_vip', [])
+
+run_dir: $getVar('run_dir', '')
+
+enable_secgroup: $getVar('enable_secgroup', True)
+enable_fwaas: $getVar('enable_fwaas', True)
+enable_vpnaas: $getVar('enable_vpnaas', True)
+odl_l3_agent: $getVar('odl_l3_agent', 'Disable')
+ha_network: $getVar('ha_network', 'Disable')
+onos_nic: $getVar('onos_nic', 'eth2')
+onos_sfc: $getVar('onos_sfc', 'Disable')
+ip_settings: $ip_settings
+network_cfg: $network_cfg
+
+provider_net_mappings: $network_cfg["provider_net_mappings"]
+
+contr_sys_mappings: $contr_sys_mappings
+compu_sys_mappings: $compu_sys_mappings
+
+contr_prv_mappings: $contr_prv_mappings
+compu_prv_mappings: $compu_prv_mappings
+
+deploy_type: $getVar('deploy_type', 'virtual')
+
+mgmt_cidr: $mgmt_cfg["cidr"]
+external_cidr: $external_cfg["cidr"]
+tenant_cidr: $tenant_cfg["cidr"]
+storage_cidr: $storage_cfg["cidr"]
+
+tenant_net_info: "{{ network_cfg.tenant_net_info }}"
+public_net_info: "{{ network_cfg.public_net_info }}"
+host_ip_settings: "{{ ip_settings[inventory_hostname] }}"
+
+ntp_server: $ntp_server
+
+offline_deployment: $getVar('offline_deployment', 'Disable')
+offline_repo_ip: $getVar('compass_ip', '')
+offline_repo_port: $getVar('offline_repo_port', '5151')
+
+internal_vip:
+ ip: $network_cfg["internal_vip"]["ip"]
+ netmask: $network_cfg["internal_vip"]["netmask"]
+#if "vlan_tag" in $contr_sys_mappings[$network_cfg["internal_vip"]["interface"]]
+ interface: $contr_sys_mappings[$network_cfg["internal_vip"]["interface"]]["name"]
+#else
+ interface: $contr_sys_mappings[$network_cfg["internal_vip"]["interface"]]["interface"]
+#end if
+
+public_vip:
+ ip: $network_cfg["public_vip"]["ip"]
+ netmask: $network_cfg["public_vip"]["netmask"]
+#if "vlan_tag" in $contr_sys_mappings[$network_cfg["public_vip"]["interface"]]
+ interface: $contr_sys_mappings[$network_cfg["public_vip"]["interface"]]["name"]
+#else
+ interface: $contr_sys_mappings[$network_cfg["public_vip"]["interface"]]["interface"]
+#end if
+
+db_host: "{{ internal_vip.ip }}"
+rabbit_host: "{{ internal_vip.ip }}"
+
+internal_ip: "{{ ip_settings[inventory_hostname]['tenant']['ip'] }}"
+internal_nic: tenant
+
+#set random_id = randint(1, 255)
+vrouter_id_internal: $random_id
+vrouter_id_public: $random_id
+
+identity_host: "{{ internal_ip }}"
+controllers_host: "{{ internal_ip }}"
+storage_controller_host: "{{ internal_ip }}"
+compute_controller_host: "{{ internal_ip }}"
+image_host: "{{ internal_ip }}"
+network_server_host: "{{ internal_ip }}"
+dashboard_host: "{{ internal_ip }}"
+
+haproxy_hosts:
+#for $item in $has
+#set $hostname=$item["hostname"]
+ $hostname: $ip_settings[$hostname]["tenant"]["ip"]
+#end for
+
+host_index:
+#for $index, $item in enumerate($has)
+ $item["hostname"]: $index
+#end for
+
+ERLANG_TOKEN: YOWSJSJIGGAUFZTIBRAD
+#set credentials = $getVar('service_credentials', {})
+#set console_credentials = $getVar('console_credentials', {})
+#set rabbit_username = $credentials.rabbitmq.username
+#set rabbit_password = $credentials.rabbitmq.password
+#set keystone_dbpass = $credentials.identity.password
+#set keystone_pass = $console_credentials.identity.password
+#set glance_dbpass = $credentials.image.password
+#set glance_pass = $console_credentials.image.password
+#set nova_dbpass = $credentials.compute.password
+#set nova_pass = $console_credentials.compute.password
+#set dash_dbpass = $credentials.dashboard.password
+#set cinder_dbpass = $credentials.volume.password
+#set cinder_pass = $console_credentials.volume.password
+#set heat_dbpass = $credentials.heat.password
+#set heat_pass = $console_credentials.heat.password
+#set neutron_dbpass = $credentials.network.password
+#set neutron_pass = $console_credentials.network.password
+#set ceilometer_dbpass = $credentials.metering.password
+#set ceilometer_pass = $console_credentials.metering.password
+#set aodh_dbpass = $credentials.alarming.password
+#set aodh_pass = $console_credentials.alarming.password
+#set congress_dbpass = $credentials.policy.password
+#set congress_pass = $console_credentials.policy.password
+#set admin_pass = $console_credentials.admin.password
+#set demo_pass = $console_credentials.demo.password
+
+cluster_name: $cluster_name
+
+odl_controller: 10.1.0.15
+
+DEBUG: true
+VERBOSE: true
+NTP_SERVER_LOCAL: "{{ controllers_host }}"
+DB_HOST: "{{ db_host }}"
+MQ_BROKER: rabbitmq
+
+OPENSTACK_REPO: cloudarchive-pike.list
+pike_cloud_archive: deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/pike main
+ADMIN_TOKEN: admin
+CEILOMETER_TOKEN: c095d479023a0fd58a54
+erlang.cookie: DJJVECFMCJPVYQTJTDWG
+
+RABBIT_USER: $rabbit_username
+RABBIT_PASS: $rabbit_password
+KEYSTONE_DBPASS: $keystone_dbpass
+KEYSTONE_PASS: $keystone_pass
+CEILOMETER_DBPASS: $ceilometer_dbpass
+CEILOMETER_PASS: $ceilometer_pass
+AODH_DBPASS: $aodh_dbpass
+AODH_PASS: $aodh_pass
+GLANCE_DBPASS: $glance_dbpass
+GLANCE_PASS: $glance_pass
+NOVA_DBPASS: $nova_dbpass
+NOVA_PASS: $nova_pass
+DASH_DBPASS: $dash_dbpass
+CINDER_DBPASS: $cinder_dbpass
+CINDER_PASS: $cinder_pass
+NEUTRON_DBPASS: $neutron_dbpass
+NEUTRON_PASS: $neutron_pass
+HEAT_DBPASS: $heat_dbpass
+HEAT_PASS: $heat_pass
+CONGRESS_DBPASS: $congress_dbpass
+CONGRESS_PASS: $congress_pass
+DEMO_PASS: $demo_pass
+ADMIN_PASS: $admin_pass
+
+#set plugins = $getVar('plugins', [])
+#for item in plugins
+#set keys = $item.keys()
+#set values = $item.values()
+$keys[0]: $values[0]
+#end for
+
+#set neutron_service_plugins=['router']
+#if $getVar('enable_fwaas', True)
+#neutron_service_plugins.append('firewall')
+#end if
+#if $getVar('enable_vpnaas', True)
+#neutron_service_plugins.append('vpnaas')
+#end if
+
+NEUTRON_SERVICE_PLUGINS: $neutron_service_plugins
+NEUTRON_TYPE_DRIVERS: ['flat', 'gre', 'vxlan', 'vlan']
+NEUTRON_TENANT_NETWORK_TYPES: ['$ovs_config["tenant_network_type"]']
+NEUTRON_OVS_BRIDGE_MAPPINGS: $ovs_config['bridge_mappings']
+#if 'vlan_ranges' in $ovs_config
+NEUTRON_VLAN_RANGES: $ovs_config['vlan_ranges']
+#else
+NEUTRON_VLAN_RANGES: []
+#end if
+#if 'tunnel_id_ranges' in $ovs_config
+NEUTRON_TUNNEL_ID_RANGES: $ovs_config['tunnel_id_ranges']
+#else
+NEUTRON_TUNNEL_ID_RANGES: []
+#end if
+
+#NEUTRON_MECHANISM_DRIVERS: ['opendaylight']
+NEUTRON_MECHANISM_DRIVERS: ['openvswitch']
+NEUTRON_TUNNEL_TYPES: ['vxlan']
+METADATA_SECRET: metadata_secret
+WSREP_SST_USER: wsrep_sst
+WSREP_SST_PASS: wsrep_sst_sercet
+
+INSTANCE_TUNNELS_INTERFACE_IP_ADDRESS: "{{ internal_ip }}"
+
+#build_in_image: http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img
+build_in_image: http://192.168.121.12:9999/img/cirros-0.3.3-x86_64-disk.img
+build_in_image_name: cirros-0.3.3-x86_64-disk.img
+
+api_workers: 1
+
+physical_device: /dev/sdb
+
+odl_username: admin
+odl_password: admin
+odl_api_port: 8080
+
+odl_pkg_url: https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/0.2.2-Helium-SR2/distribution-karaf-0.2.2-Helium-SR2.tar.gz
+odl_pkg_name: karaf.tar.gz
+odl_home: "/opt/opendaylight-0.2.2/"
+odl_base_features: ['config', 'standard', 'region', 'package', 'kar', 'ssh', 'management', 'http', 'odl-base-all','odl-aaa-authn','odl-restconf','odl-nsf-all','odl-adsal-northbound','odl-mdsal-apidocs', 'odl-openflowplugin-all']
+odl_extra_features: ['odl-l2switch-switch', 'odl-ovsdb-plugin', 'odl-ovsdb-openstack', 'odl-ovsdb-northbound','odl-dlux-core', 'odl-restconf-all', 'odl-mdsal-clustering', 'odl-openflowplugin-flow-services', 'odl-netconf-connector', 'odl-netconf-connector-ssh', 'jolokia-osgi']
+odl_features: "{{ odl_base_features + odl_extra_features }}"
+odl_api_port: 8080
+
+#set moon_cfg = $getVar('moon_cfg', {})
+moon_master: $moon_cfg.master.flag
+moon_slave: $moon_cfg.slave.flag
+moon_slave_name: $moon_cfg.slave.name
+moon_master_ip: $moon_cfg.slave.master_ip
+
diff --git a/deploy/compass_conf/templates/ansible_installer/openstack_pike/vars/allinone.tmpl b/deploy/compass_conf/templates/ansible_installer/openstack_pike/vars/allinone.tmpl
new file mode 100755
index 00000000..0fb6581f
--- /dev/null
+++ b/deploy/compass_conf/templates/ansible_installer/openstack_pike/vars/allinone.tmpl
@@ -0,0 +1,96 @@
+#set cluster_name = $getVar('name', '')
+#set controllers = $getVar('allinone_compute', [])
+#if not $isinstance($controllers, list)
+ #set controllers = [$controllers]
+#end if
+
+#for controller in $controllers
+ #set controller_ip = $controller.management.ip
+ #set controller_hostname = $controller.hostname
+controller_host: $controller_ip
+#end for
+#for network in $controllers
+ #set network_external_nic = $network.external.interface
+ #set network_external_subnet = $network.external.subnet
+ #set network_internal_nic = $network.management.interface
+INTERFACE_NAME: $network_external_nic
+INTERNAL_INTERFACE: $network_internal_nic
+#end for
+
+#set credentials = $getVar('service_credentials', {})
+#set console_credentials = $getVar('console_credentials', {})
+#set rabbit_username = $credentials.rabbitmq.username
+#set rabbit_password = $credentials.rabbitmq.password
+#set keystone_dbpass = $credentials.identity.password
+#set glance_dbpass = $credentials.image.password
+#set glance_pass = $console_credentials.image.password
+#set nova_dbpass = $credentials.compute.password
+#set nova_pass = $console_credentials.compute.password
+#set dash_dbpass = $credentials.dashboard.password
+#set cinder_dbpass = $credentials.volume.password
+#set cinder_pass = $console_credentials.volume.password
+#set admin_pass = $console_credentials.admin.password
+#set neutron_pass = $console_credentials.network.password
+
+compute_controller_host: "{{ controller_host }}"
+db_host: "{{ controller_host }}"
+rabbit_host: "{{ controller_host }}"
+storage_controller_host: "{{ controller_host }}"
+image_host: "{{ controller_host }}"
+identity_host: "{{ controller_host }}"
+network_server_host: "{{ controller_host }}"
+dashboard_host: "{{ controller_host }}"
+
+cluster_name: $cluster_name
+odl_controller: 10.1.0.15
+
+DEBUG: true
+VERBOSE: true
+NTP_SERVER_LOCAL: "{{ controller_host }}"
+DB_HOST: "{{ controller_host }}"
+MQ_BROKER: rabbitmq
+
+OPENSTACK_REPO: cloudarchive-pike.list
+pike_cloud_archive: deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/pike main
+ADMIN_TOKEN: admin
+CEILOMETER_TOKEN: c095d479023a0fd58a54
+
+RABBIT_USER: $rabbit_username
+RABBIT_PASS: $rabbit_password
+KEYSTONE_DBPASS: $keystone_dbpass
+DEMO_PASS: demo_secret
+ADMIN_PASS: $admin_pass
+GLANCE_DBPASS: $glance_dbpass
+GLANCE_PASS: $glance_pass
+NOVA_DBPASS: $nova_dbpass
+NOVA_PASS: $nova_pass
+DASH_DBPASS: $dash_dbpass
+CINDER_DBPASS: $cinder_dbpass
+CINDER_PASS: $cinder_pass
+NEUTRON_DBPASS: $neutron_pass
+NEUTRON_PASS: $neutron_pass
+NEUTRON_TYPE_DRIVERS: ['flat', 'gre', 'vxlan']
+NEUTRON_TENANT_NETWORK_TYPES: ['vxlan']
+#NEUTRON_MECHANISM_DRIVERS: ['opendaylight']
+NEUTRON_MECHANISM_DRIVERS: ['openvswitch']
+NEUTRON_TUNNEL_TYPES: ['vxlan']
+METADATA_SECRET: metadata_secret
+INSTANCE_TUNNELS_INTERFACE_IP_ADDRESS: 10.1.1.21
+
+EXTERNAL_NETWORK_CIDR: 203.0.113.0/24
+EXTERNAL_NETWORK_GATEWAY: 203.0.113.1
+FLOATING_IP_START: 203.0.113.101
+FLOATING_IP_END: 203.0.113.200
+
+build_in_image: http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img
+build_in_image_name: cirros-0.3.3-x86_64-disk.img
+
+physical_device: /dev/sdb
+
+internal_interface: "ansible_{{ INTERNAL_INTERFACE }}"
+internal_ip: "{{ hostvars[inventory_hostname][internal_interface]['ipv4']['address'] }}"
+HA_VIP: "{{ internal_ip }}"
+
+odl_username: admin
+odl_password: admin
+odl_api_port: 8080
diff --git a/deploy/compass_conf/templates/ansible_installer/openstack_pike/vars/multinodes.tmpl b/deploy/compass_conf/templates/ansible_installer/openstack_pike/vars/multinodes.tmpl
new file mode 100755
index 00000000..10056042
--- /dev/null
+++ b/deploy/compass_conf/templates/ansible_installer/openstack_pike/vars/multinodes.tmpl
@@ -0,0 +1,165 @@
+#set cluster_name = $getVar('name', '')
+#set compute_controllers = $getVar('compute_controller', [])
+#set compute_workers = $getVar('compute_worker', [])
+#set network_servers = $getVar('network_server', [])
+#set network_workers = $getVar('network_worker', [])
+#set databases = $getVar('database', [])
+#set messagings = $getVar('messaging', [])
+#set images = $getVar('image', [])
+#set dashboards = $getVar('dashboard', [])
+#set identities = $getVar('identity', [])
+#set storage_controllers = $getVar('storage_controller', [])
+#set storage_volumes = $getVar('storage_volume', [])
+#if not $isinstance($compute_controllers, list)
+ #set compute_controllers = [$compute_controllers]
+#end if
+#if not $isinstance($compute_workers, list)
+ #set compute_workers = [$compute_workers]
+#end if
+#if not $isinstance($network_servers, list)
+ #set network_servers = [$network_servers]
+#end if
+#if not $isinstance($network_workers, list)
+ #set network_workers = [$network_workers]
+#end if
+#if not $isinstance($databases, list)
+ #set databases = [$databases]
+#end if
+#if not $isinstance($messagings, list)
+ #set messagings = [$messagings]
+#end if
+#if not $isinstance($images, list)
+ #set images = [$images]
+#end if
+#if not $isinstance($dashboards, list)
+ #set dashboards = [$dashboards]
+#end if
+#if not $isinstance($identities, list)
+ #set identities = [$identities]
+#end if
+#if not $isinstance($storage_controllers, list)
+ #set storage_controllers = [$storage_controllers]
+#end if
+#if not $isinstance($storage_volumes, list)
+ #set storage_volumes = [$storage_volumes]
+#end if
+#for worker in $compute_controllers
+ #set worker_ip = $worker.management.ip
+compute_controller_host: $worker_ip
+#end for
+#for worker in $databases
+ #set worker_ip = $worker.management.ip
+db_host: $worker_ip
+#end for
+#for worker in $messagings
+ #set worker_ip = $worker.management.ip
+rabbit_host: $worker_ip
+#end for
+#for worker in $storage_controllers
+ #set worker_ip = $worker.management.ip
+storage_controller_host: $worker_ip
+#end for
+#for worker in $images
+ #set worker_ip = $worker.management.ip
+image_host: $worker_ip
+#end for
+#for worker in $identities
+ #set worker_ip = $worker.management.ip
+identity_host: $worker_ip
+#end for
+#for worker in $compute_controllers
+ #set worker_ip = $worker.management.ip
+compute_controller_host: $worker_ip
+#end for
+#for worker in $network_servers
+ #set worker_ip = $worker.management.ip
+network_server_host: $worker_ip
+#end for
+#for worker in $dashboards
+ #set worker_ip = $worker.management.ip
+dashboard_host: $worker_ip
+#end for
+#for network in $network_workers
+ #set network_external_nic = $network.external.interface
+ #set network_internal_nic = $network.management.interface
+INTERFACE_NAME: $network_external_nic
+INTERNAL_INTERFACE: $network_internal_nic
+#end for
+
+#set credentials = $getVar('service_credentials', {})
+#set console_credentials = $getVar('console_credentials', {})
+#set rabbit_username = $credentials.rabbitmq.username
+#set rabbit_password = $credentials.rabbitmq.password
+#set keystone_dbpass = $credentials.identity.password
+#set glance_dbpass = $credentials.image.password
+#set glance_pass = $console_credentials.image.password
+#set nova_dbpass = $credentials.compute.password
+#set nova_pass = $console_credentials.compute.password
+#set dash_dbpass = $credentials.dashboard.password
+#set cinder_dbpass = $credentials.volume.password
+#set cinder_pass = $console_credentials.volume.password
+#set admin_pass = $console_credentials.admin.password
+#set neutron_pass = $console_credentials.network.password
+
+cluster_name: $cluster_name
+
+odl_controller: 10.1.0.15
+
+DEBUG: true
+VERBOSE: true
+NTP_SERVER_LOCAL: "{{ compute_controller_host }}"
+DB_HOST: "{{ db_host }}"
+MQ_BROKER: rabbitmq
+
+OPENSTACK_REPO: cloudarchive-pike.list
+pike_cloud_archive: deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/pike main
+ADMIN_TOKEN: admin
+CEILOMETER_TOKEN: c095d479023a0fd58a54
+
+RABBIT_USER: $rabbit_username
+RABBIT_PASS: $rabbit_password
+KEYSTONE_DBPASS: $keystone_dbpass
+DEMO_PASS: demo_secret
+ADMIN_PASS: $admin_pass
+GLANCE_DBPASS: $glance_dbpass
+GLANCE_PASS: $glance_pass
+NOVA_DBPASS: $nova_dbpass
+NOVA_PASS: $nova_pass
+DASH_DBPASS: $dash_dbpass
+CINDER_DBPASS: $cinder_dbpass
+CINDER_PASS: $cinder_pass
+NEUTRON_DBPASS: $neutron_pass
+NEUTRON_PASS: $neutron_pass
+NEUTRON_TYPE_DRIVERS: ['flat', 'gre', 'vxlan']
+NEUTRON_TENANT_NETWORK_TYPES: ['vxlan']
+#NEUTRON_MECHANISM_DRIVERS: ['opendaylight']
+NEUTRON_MECHANISM_DRIVERS: ['openvswitch']
+NEUTRON_TUNNEL_TYPES: ['vxlan']
+METADATA_SECRET: metadata_secret
+INSTANCE_TUNNELS_INTERFACE_IP_ADDRESS: 10.1.1.21
+
+EXTERNAL_NETWORK_CIDR: 203.0.113.0/24
+EXTERNAL_NETWORK_GATEWAY: 203.0.113.1
+FLOATING_IP_START: 203.0.113.101
+FLOATING_IP_END: 203.0.113.200
+
+build_in_image: http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img
+build_in_image_name: cirros-0.3.3-x86_64-disk.img
+
+physical_device: /dev/sdb
+
+internal_interface: "ansible_{{ INTERNAL_INTERFACE }}"
+internal_ip: "{{ hostvars[inventory_hostname][internal_interface]['ipv4']['address'] }}"
+HA_VIP: "{{ internal_ip }}"
+odl_username: admin
+odl_password: admin
+odl_api_port: 8080
+
+odl_pkg_url: https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/0.2.2-Helium-SR2/distribution-karaf-0.2.2-Helium-SR2.tar.gz
+odl_pkg_name: karaf.tar.gz
+odl_home: "/opt/opendaylight-0.2.2/"
+odl_base_features: ['config', 'standard', 'region', 'package', 'kar', 'ssh', 'management', 'http', 'odl-base-all','odl-aaa-authn','odl-restconf','odl-nsf-all','odl-adsal-northbound','odl-mdsal-apidocs', 'odl-openflowplugin-all']
+odl_extra_features: ['odl-l2switch-switch', 'odl-ovsdb-plugin', 'odl-ovsdb-openstack', 'odl-ovsdb-northbound','odl-dlux-core', 'odl-restconf-all', 'odl-mdsal-clustering', 'odl-openflowplugin-flow-services', 'odl-netconf-connector', 'odl-netconf-connector-ssh', 'jolokia-osgi']
+odl_features: "{{ odl_base_features + odl_extra_features }}"
+odl_api_port: 8080
+
diff --git a/deploy/compass_conf/templates/ansible_installer/openstack_pike/vars/single-controller.tmpl b/deploy/compass_conf/templates/ansible_installer/openstack_pike/vars/single-controller.tmpl
new file mode 100755
index 00000000..08423749
--- /dev/null
+++ b/deploy/compass_conf/templates/ansible_installer/openstack_pike/vars/single-controller.tmpl
@@ -0,0 +1,108 @@
+#set cluster_name = $getVar('name', '')
+#set controllers = $getVar('controller', [])
+#set computes = $getVar('compute', [])
+#set networks = $getVar('network', [])
+#set storages = $getVar('storage', [])
+#if not $isinstance($controllers, list)
+ #set controllers = [$controllers]
+#end if
+#if not $isinstance($computes, list)
+ #set computes = [$computes]
+#end if
+#if not $isinstance($networks, list)
+ #set networks = [$networks]
+#end if
+#if not $isinstance($storages, list)
+ #set storages = [$storages]
+#end if
+
+#for controller in $controllers
+ #set controller_ip = $controller.management.ip
+ #set controller_hostname = $controller.hostname
+controller_host: $controller_ip
+#end for
+#for network in $networks
+ #set network_external_nic = $network.external.interface
+ #set network_external_subnet = $network.external.subnet
+ #set network_internal_nic = $network.management.interface
+INTERFACE_NAME: $network_external_nic
+INTERNAL_INTERFACE: $network_internal_nic
+#end for
+
+#set credentials = $getVar('service_credentials', {})
+#set console_credentials = $getVar('console_credentials', {})
+#set rabbit_username = $credentials.rabbitmq.username
+#set rabbit_password = $credentials.rabbitmq.password
+#set keystone_dbpass = $credentials.identity.password
+#set glance_dbpass = $credentials.image.password
+#set glance_pass = $console_credentials.image.password
+#set nova_dbpass = $credentials.compute.password
+#set nova_pass = $console_credentials.compute.password
+#set dash_dbpass = $credentials.dashboard.password
+#set cinder_dbpass = $credentials.volume.password
+#set cinder_pass = $console_credentials.volume.password
+#set admin_pass = $console_credentials.admin.password
+#set neutron_pass = $console_credentials.network.password
+
+cluster_name: $cluster_name
+deploy_type: $getVar('deploy_type', 'virtual')
+compute_controller_host: "{{ controller_host }}"
+db_host: "{{ controller_host }}"
+rabbit_host: "{{ controller_host }}"
+storage_controller_host: "{{ controller_host }}"
+image_host: "{{ controller_host }}"
+identity_host: "{{ controller_host }}"
+network_server_host: "{{ controller_host }}"
+dashboard_host: "{{ controller_host }}"
+odl_controller: 10.1.0.15
+
+DEBUG: true
+VERBOSE: true
+NTP_SERVER_LOCAL: "{{ controller_host }}"
+DB_HOST: "{{ controller_host }}"
+MQ_BROKER: rabbitmq
+
+OPENSTACK_REPO: cloudarchive-pike.list
+pike_cloud_archive: deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/pike main
+ADMIN_TOKEN: admin
+CEILOMETER_TOKEN: c095d479023a0fd58a54
+
+RABBIT_USER: $rabbit_username
+RABBIT_PASS: $rabbit_password
+KEYSTONE_DBPASS: $keystone_dbpass
+DEMO_PASS: demo_secret
+ADMIN_PASS: $admin_pass
+GLANCE_DBPASS: $glance_dbpass
+GLANCE_PASS: $glance_pass
+NOVA_DBPASS: $nova_dbpass
+NOVA_PASS: $nova_pass
+DASH_DBPASS: $dash_dbpass
+CINDER_DBPASS: $cinder_dbpass
+CINDER_PASS: $cinder_pass
+NEUTRON_DBPASS: $neutron_pass
+NEUTRON_PASS: $neutron_pass
+NEUTRON_TYPE_DRIVERS: ['flat', 'gre', 'vxlan']
+NEUTRON_TENANT_NETWORK_TYPES: ['vxlan']
+#NEUTRON_MECHANISM_DRIVERS: ['opendaylight']
+NEUTRON_MECHANISM_DRIVERS: ['openvswitch']
+NEUTRON_TUNNEL_TYPES: ['vxlan']
+METADATA_SECRET: metadata_secret
+INSTANCE_TUNNELS_INTERFACE_IP_ADDRESS: 10.1.1.21
+
+EXTERNAL_NETWORK_CIDR: 203.0.113.0/24
+# EXTERNAL_NETWORK_CIDR: $network_external_subnet
+EXTERNAL_NETWORK_GATEWAY: 203.0.113.1
+FLOATING_IP_START: 203.0.113.101
+FLOATING_IP_END: 203.0.113.200
+
+build_in_image: http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img
+build_in_image_name: cirros-0.3.3-x86_64-disk.img
+
+physical_device: /dev/sdb
+
+internal_interface: "ansible_{{ INTERNAL_INTERFACE }}"
+internal_ip: "{{ hostvars[inventory_hostname][internal_interface]['ipv4']['address'] }}"
+HA_VIP: "{{ internal_ip }}"
+odl_username: admin
+odl_password: admin
+odl_api_port: 8080
diff --git a/deploy/compass_conf/templates/cobbler/ubuntu-16.04-server-x86_64/profile.tmpl b/deploy/compass_conf/templates/cobbler/CentOS-7-Minimal-1708-x86_64/profile.tmpl
index cfa89004..cfa89004 100755
--- a/deploy/compass_conf/templates/cobbler/ubuntu-16.04-server-x86_64/profile.tmpl
+++ b/deploy/compass_conf/templates/cobbler/CentOS-7-Minimal-1708-x86_64/profile.tmpl
diff --git a/deploy/compass_conf/templates/cobbler/CentOS-7-Minimal-1708-x86_64/system.tmpl b/deploy/compass_conf/templates/cobbler/CentOS-7-Minimal-1708-x86_64/system.tmpl
new file mode 100755
index 00000000..8e4cbbbe
--- /dev/null
+++ b/deploy/compass_conf/templates/cobbler/CentOS-7-Minimal-1708-x86_64/system.tmpl
@@ -0,0 +1,76 @@
+{
+ "name": "$hostname",
+ "hostname": "$hostname",
+ "profile": "$profile",
+ "gateway": "$gateway",
+ #import simplejson as json
+ #set nameservers = json.dumps($nameservers, encoding='utf-8')
+ "name_servers": $nameservers,
+ #set search_path = ' '.join($search_path)
+ "name_servers_search": "$search_path",
+ "proxy": "$getVar('http_proxy', '')",
+ "modify_interface":
+ #set networks = $networks
+ #set rekeyed = {}
+ #set promic_nic = ""
+ #for $nic, $val in $networks.iteritems():
+ #set ip_key = '-'.join(('ipaddress', $nic))
+ #set netmask_key = '-'.join(('netmask', $nic))
+ #set mgmt_key = '-'.join(('management', $nic))
+ #set static_key = '-'.join(('static', $nic))
+ #set $rekeyed[$ip_key] = $val.ip
+ #set $rekeyed[$netmask_key] = $val.netmask
+ #set $rekeyed[$mgmt_key] = $val.is_mgmt
+ #set $rekeyed[$static_key] = True
+
+ #set dns_key = '-'.join(('dnsname', $nic))
+ #if $val.is_mgmt
+ #set $rekeyed[$dns_key] = $dns
+ #else
+ #if '.' in $dns
+ #set $dns_name, $dns_domain = $dns.split('.', 1)
+ #set $dns_nic = '%s-%s.%s' % ($dns_name, $nic, $dns_domain)
+ #else
+ #set $dns_nic = '%s-%s' % ($dns, $nic)
+ #end if
+ #set $rekeyed[$dns_key] = $dns_nic
+ #end if
+
+ #if $val.is_promiscuous:
+ #set promic_nic = $nic
+ #end if
+ #if $val.is_mgmt:
+ #set mac_key = '-'.join(('macaddress', $nic))
+ #set $rekeyed[$mac_key] = $mac
+ #end if
+ #end for
+ #set nic_info = json.dumps($rekeyed, encoding='utf-8')
+ $nic_info
+ ,
+ "ksmeta":{
+ #set partition_config = ''
+ #for k, v in $partition.iteritems():
+ #set path = ''
+ #if v['vol_percentage']:
+ #set $path = k + ' ' + str(v['vol_percentage']) + '%'
+ #else:
+ #set $path = k + ' ' + str(v['vol_size'])
+ #end if
+ #set partition_config = ';'.join((partition_config, $path))
+ #end for
+ #set partition_config = partition_config[1:]
+ #import crypt
+ #set $password = crypt.crypt($server_credentials.password, "az")
+ #set no_proxy = ','.join($getVar('no_proxy', []))
+ "username": "$server_credentials.username",
+ "password": "$password",
+ "promisc_nics": "$promic_nic",
+ "partition": "$partition_config",
+ "https_proxy": "$getVar('https_proxy', '')",
+ "ntp_server": "$ntp_server",
+ "timezone": "$timezone",
+ "ignore_proxy": "$no_proxy",
+ "local_repo": "$getVar('local_repo', '')",
+ "disk_num": "1"
+ }
+}
diff --git a/deploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64/profile.tmpl b/deploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64/profile.tmpl
new file mode 100755
index 00000000..cfa89004
--- /dev/null
+++ b/deploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64/profile.tmpl
@@ -0,0 +1,3 @@
+{
+ "repos": "$getVar('repo_name', '')"
+}
diff --git a/deploy/compass_conf/templates/cobbler/ubuntu-16.04-server-x86_64/system.tmpl b/deploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64/system.tmpl
index cfcc883e..cfcc883e 100755
--- a/deploy/compass_conf/templates/cobbler/ubuntu-16.04-server-x86_64/system.tmpl
+++ b/deploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64/system.tmpl
diff --git a/deploy/conf/cluster.conf b/deploy/conf/cluster.conf
index c9e565ad..750ff113 100644
--- a/deploy/conf/cluster.conf
+++ b/deploy/conf/cluster.conf
@@ -3,13 +3,13 @@ export OS_VERSION=${OS_VERSION:-"xenial"}
# for Operating System
if [ $OS_VERSION = 'xenial' ]; then
- export ADAPTER_OS_PATTERN=${ADAPTER_OS_PATTERN:-'(?i)ubuntu-16\.04'}
+ export ADAPTER_OS_PATTERN=${ADAPTER_OS_PATTERN:-'(?i)ubuntu-16\.04\.3'}
else
- export ADAPTER_OS_PATTERN=${ADAPTER_OS_PATTERN:-'(?i)CentOS-7.*16.*'}
+ export ADAPTER_OS_PATTERN=${ADAPTER_OS_PATTERN:-'(?i)CentOS-7.*17.*'}
fi
-# ocata
-export OPENSTACK_VERSION=${OPENSTACK_VERSION:-"ocata"}
+# pike
+export OPENSTACK_VERSION=${OPENSTACK_VERSION:-"pike"}
# don't touch this
export ADAPTER_TARGET_SYSTEM_PATTERN="^openstack$"
diff --git a/deploy/conf/compass.conf b/deploy/conf/compass.conf
index dc3a975e..8a3bb3a3 100644
--- a/deploy/conf/compass.conf
+++ b/deploy/conf/compass.conf
@@ -22,13 +22,15 @@ export OFFLINE_DEPLOY=${OFFLINE_DEPLOY:-'Disable'}
COMPASS_DOCKER_REPO=${COMPASS_DOCKER_REPO:-compass4nfv}
export COMPASS_DECK="$COMPASS_DOCKER_REPO/compass-deck"
-export COMPASS_TASKS="$COMPASS_DOCKER_REPO/compass-tasks-osa:euphrates"
+# export COMPASS_TASKS="$COMPASS_DOCKER_REPO/compass-tasks-osa:euphrates"
+export COMPASS_TASKS="yifei0van0xue/compass-tasks-osa"
if [[ "x"$KUBERNETES_VERSION != "x" ]]; then
export COMPASS_TASKS="$COMPASS_DOCKER_REPO/compass-tasks-k8s"
fi
-export COMPASS_COBBLER="$COMPASS_DOCKER_REPO/compass-cobbler"
+# export COMPASS_COBBLER="$COMPASS_DOCKER_REPO/compass-cobbler"
export COMPASS_DB="$COMPASS_DOCKER_REPO/compass-db"
export COMPASS_MQ="$COMPASS_DOCKER_REPO/compass-mq"
export COMPASS_REPO="$COMPASS_DOCKER_REPO/compass-repo-osa-ubuntu:euphrates"
+export COMPASS_COBBLER="yifei0van0xue/compass-cobbler"
diff --git a/deploy/prepare.sh b/deploy/prepare.sh
index e4cfb95b..c0a05564 100755
--- a/deploy/prepare.sh
+++ b/deploy/prepare.sh
@@ -89,7 +89,7 @@ function _prepare_python_env() {
sudo apt-get install -y --force-yes libxslt-dev libxml2-dev libvirt-dev build-essential qemu-utils qemu-kvm libvirt-bin virtinst libmysqld-dev
sudo apt-get install -y --force-yes libffi-dev libssl-dev
else
- sudo yum install -y centos-release-openstack-ocata
+ sudo yum install -y centos-release-openstack-pike
sudo yum install -y epel-release
sudo yum install openvswitch -y --nogpgcheck
sudo yum install -y git python-devel python-pip figlet sshpass mkisofs bc curl ipmitool