summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/openstack_newton_xenial
diff options
context:
space:
mode:
authorshuai chen <chenshuai@huawei.com>2016-10-25 06:33:25 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-10-25 06:33:25 +0000
commitd0c360afa9c61e1b2dde99935510f6ca061920ca (patch)
tree0c983eb13b07bfab8b50eb394b635645861ac29e /deploy/adapters/ansible/openstack_newton_xenial
parent6ebd4fddcd9e68d8b9fcc9e8855957909a80a3df (diff)
parent0d4fc38c569df7a417065fd3094c7477660eb18c (diff)
Merge "Edit the docker file and adjust HA yml"
Diffstat (limited to 'deploy/adapters/ansible/openstack_newton_xenial')
-rw-r--r--deploy/adapters/ansible/openstack_newton_xenial/HA-ansible-multinodes.yml2
-rwxr-xr-xdeploy/adapters/ansible/openstack_newton_xenial/roles/apache/tasks/main.yml31
-rw-r--r--deploy/adapters/ansible/openstack_newton_xenial/roles/apache/templates/ports.conf.j23
-rw-r--r--deploy/adapters/ansible/openstack_newton_xenial/roles/glance/tasks/nfs.yml6
-rw-r--r--deploy/adapters/ansible/openstack_newton_xenial/roles/keystone/tasks/keystone_install.yml8
-rw-r--r--deploy/adapters/ansible/openstack_newton_xenial/roles/keystone/vars/Debian.yml2
-rw-r--r--deploy/adapters/ansible/openstack_newton_xenial/roles/keystone/vars/main.yml1
-rw-r--r--deploy/adapters/ansible/openstack_newton_xenial/roles/neutron-controller/tasks/neutron_install.yml49
-rw-r--r--deploy/adapters/ansible/openstack_newton_xenial/roles/odl_cluster/files/odl-aaa-moon.tar.gzbin619269 -> 0 bytes
-rw-r--r--deploy/adapters/ansible/openstack_newton_xenial/roles/swift/files/swift-lib.tar.gzbin499553 -> 0 bytes
10 files changed, 62 insertions, 40 deletions
diff --git a/deploy/adapters/ansible/openstack_newton_xenial/HA-ansible-multinodes.yml b/deploy/adapters/ansible/openstack_newton_xenial/HA-ansible-multinodes.yml
index 9e8ec15b..9be0c384 100644
--- a/deploy/adapters/ansible/openstack_newton_xenial/HA-ansible-multinodes.yml
+++ b/deploy/adapters/ansible/openstack_newton_xenial/HA-ansible-multinodes.yml
@@ -61,10 +61,10 @@
max_fail_percentage: 0
roles:
- memcached
+ - apache
- database
- mq
- keystone
- - apache
- nova-controller
- neutron-controller
- cinder-controller
diff --git a/deploy/adapters/ansible/openstack_newton_xenial/roles/apache/tasks/main.yml b/deploy/adapters/ansible/openstack_newton_xenial/roles/apache/tasks/main.yml
deleted file mode 100755
index ad1d544f..00000000
--- a/deploy/adapters/ansible/openstack_newton_xenial/roles/apache/tasks/main.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 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
-##############################################################################
----
-- include_vars: "{{ ansible_os_family }}.yml"
-
-- name: install packages
- action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest update_cache=yes"
- with_items: packages | union(packages_noarch)
- when ansible_os_family != 'Debian'
-
-- name: assure listen port exist
- template:
- dest: '{{ apache_config_dir }}/ports.conf'
- src: ports.conf.j2
- notify:
- - restart apache related services
-
-- name: remove default listen port on centos
- lineinfile:
- dest: /etc/httpd/conf/httpd.conf
- state: absent
- regexp: 'Listen 80'
- when: ansible_os_family == 'RedHat'
-
-- meta: flush_handlers
diff --git a/deploy/adapters/ansible/openstack_newton_xenial/roles/apache/templates/ports.conf.j2 b/deploy/adapters/ansible/openstack_newton_xenial/roles/apache/templates/ports.conf.j2
deleted file mode 100644
index f6c9c8b1..00000000
--- a/deploy/adapters/ansible/openstack_newton_xenial/roles/apache/templates/ports.conf.j2
+++ /dev/null
@@ -1,3 +0,0 @@
-Listen {{ internal_ip }}:80
-Listen {{ internal_ip }}:5000
-Listen {{ internal_ip }}:35357
diff --git a/deploy/adapters/ansible/openstack_newton_xenial/roles/glance/tasks/nfs.yml b/deploy/adapters/ansible/openstack_newton_xenial/roles/glance/tasks/nfs.yml
index 07dfacdd..1d13bfe7 100644
--- a/deploy/adapters/ansible/openstack_newton_xenial/roles/glance/tasks/nfs.yml
+++ b/deploy/adapters/ansible/openstack_newton_xenial/roles/glance/tasks/nfs.yml
@@ -42,10 +42,14 @@
- name: get mount info
command: mount
register: mount_info
+ tags:
+ - recovery
- name: get nfs server
shell: awk -F'=' '/compass_server/ {print $2}' /etc/compass.conf
register: ip_info
+ tags:
+ - recovery
- name: restart host nfs service
service: name={{ item }} state=restarted enabled=yes
@@ -59,3 +63,5 @@
when: mount_info.stdout.find('images') == -1
retries: 5
delay: 3
+ tags:
+ - recovery
diff --git a/deploy/adapters/ansible/openstack_newton_xenial/roles/keystone/tasks/keystone_install.yml b/deploy/adapters/ansible/openstack_newton_xenial/roles/keystone/tasks/keystone_install.yml
index 79d02729..8ff087ce 100644
--- a/deploy/adapters/ansible/openstack_newton_xenial/roles/keystone/tasks/keystone_install.yml
+++ b/deploy/adapters/ansible/openstack_newton_xenial/roles/keystone/tasks/keystone_install.yml
@@ -66,7 +66,7 @@
- name: update apache2 configs
template:
src: wsgi-keystone.conf.j2
- dest: '{{ apache_config_dir }}/sites-available/wsgi-keystone.conf'
+ dest: '{{ apache_config_dir }}/sites-available/keystone.conf'
when: ansible_os_family == 'Debian'
notify:
- restart keystone services
@@ -74,15 +74,15 @@
- name: update apache2 configs
template:
src: wsgi-keystone.conf.j2
- dest: '{{ apache_config_dir }}/wsgi-keystone.conf'
+ dest: '{{ apache_config_dir }}/keystone.conf'
when: ansible_os_family == 'RedHat'
notify:
- restart keystone services
- name: enable keystone server
file:
- src: "{{ apache_config_dir }}/sites-available/wsgi-keystone.conf"
- dest: "{{ apache_config_dir }}/sites-enabled/wsgi-keystone.conf"
+ src: "{{ apache_config_dir }}/sites-available/keystone.conf"
+ dest: "{{ apache_config_dir }}/sites-enabled/keystone.conf"
state: "link"
when: ansible_os_family == 'Debian'
notify:
diff --git a/deploy/adapters/ansible/openstack_newton_xenial/roles/keystone/vars/Debian.yml b/deploy/adapters/ansible/openstack_newton_xenial/roles/keystone/vars/Debian.yml
index 6000c6fd..89bfbe0a 100644
--- a/deploy/adapters/ansible/openstack_newton_xenial/roles/keystone/vars/Debian.yml
+++ b/deploy/adapters/ansible/openstack_newton_xenial/roles/keystone/vars/Debian.yml
@@ -11,11 +11,11 @@
cron_path: "/var/spool/cron/crontabs"
packages:
- - keystone
- apache2
- libapache2-mod-wsgi
- python-keystone
- python-openstackclient
+ - keystone
services:
- apache2
diff --git a/deploy/adapters/ansible/openstack_newton_xenial/roles/keystone/vars/main.yml b/deploy/adapters/ansible/openstack_newton_xenial/roles/keystone/vars/main.yml
index ac548a09..79ed06fe 100644
--- a/deploy/adapters/ansible/openstack_newton_xenial/roles/keystone/vars/main.yml
+++ b/deploy/adapters/ansible/openstack_newton_xenial/roles/keystone/vars/main.yml
@@ -9,6 +9,7 @@
---
packages_noarch:
- python-keystoneclient
+ - python3-keystoneclient
services_noarch: []
os_services:
diff --git a/deploy/adapters/ansible/openstack_newton_xenial/roles/neutron-controller/tasks/neutron_install.yml b/deploy/adapters/ansible/openstack_newton_xenial/roles/neutron-controller/tasks/neutron_install.yml
new file mode 100644
index 00000000..0a30af7a
--- /dev/null
+++ b/deploy/adapters/ansible/openstack_newton_xenial/roles/neutron-controller/tasks/neutron_install.yml
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2016 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
+##############################################################################
+---
+- include_vars: "{{ ansible_os_family }}.yml"
+
+- name: disable auto start
+ copy:
+ content: "#!/bin/sh\nexit 101"
+ dest: "/usr/sbin/policy-rc.d"
+ mode: 0755
+ when: ansible_os_family == "Debian"
+
+- name: install controller-related neutron packages
+ action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
+ with_items: packages | union(packages_noarch)
+
+- name: enable auto start
+ file:
+ path=/usr/sbin/policy-rc.d
+ state=absent
+ when: ansible_os_family == "Debian"
+
+- name: generate neutron control service list
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
+ with_items: services | union(services_noarch)
+
+- name: get tenant id to fill neutron.conf
+ shell: openstack project show \
+ --os-username=admin \
+ --os-password=console \
+ --os-auth-url=http://{{ internal_vip.ip }}:35357/v2.0 \
+ --os-tenant-name=admin \
+ service | grep id | awk '{print $4}'
+ register: NOVA_ADMIN_TENANT_ID
+
+- name: update neutron conf
+ template: src=templates/neutron.conf dest=/etc/neutron/neutron.conf backup=yes
+
+- name: update ml2 plugin conf
+ template: src=templates/ml2_conf.ini dest=/etc/neutron/plugins/ml2/ml2_conf.ini backup=yes
+
+- name: ln plugin.ini
+ file: src=/etc/neutron/plugins/ml2/ml2_conf.ini dest=/etc/neutron/plugin.ini state=link
diff --git a/deploy/adapters/ansible/openstack_newton_xenial/roles/odl_cluster/files/odl-aaa-moon.tar.gz b/deploy/adapters/ansible/openstack_newton_xenial/roles/odl_cluster/files/odl-aaa-moon.tar.gz
deleted file mode 100644
index dd03749c..00000000
--- a/deploy/adapters/ansible/openstack_newton_xenial/roles/odl_cluster/files/odl-aaa-moon.tar.gz
+++ /dev/null
Binary files differ
diff --git a/deploy/adapters/ansible/openstack_newton_xenial/roles/swift/files/swift-lib.tar.gz b/deploy/adapters/ansible/openstack_newton_xenial/roles/swift/files/swift-lib.tar.gz
deleted file mode 100644
index fdbb38fd..00000000
--- a/deploy/adapters/ansible/openstack_newton_xenial/roles/swift/files/swift-lib.tar.gz
+++ /dev/null
Binary files differ