summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible')
-rw-r--r--deploy/adapters/ansible/openstack_mitaka_xenial/HA-ansible-multinodes.yml7
-rw-r--r--deploy/adapters/ansible/openstack_mitaka_xenial/roles/moon/tasks/keystone-moon-install.yml73
-rw-r--r--deploy/adapters/ansible/openstack_mitaka_xenial/roles/moon/tasks/main.yml37
-rw-r--r--deploy/adapters/ansible/openstack_mitaka_xenial/roles/moon/vars/Debian.yml92
-rw-r--r--deploy/adapters/ansible/openstack_mitaka_xenial/roles/moon/vars/main.yml14
5 files changed, 223 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/openstack_mitaka_xenial/HA-ansible-multinodes.yml b/deploy/adapters/ansible/openstack_mitaka_xenial/HA-ansible-multinodes.yml
index 0f84d97d..d374086a 100644
--- a/deploy/adapters/ansible/openstack_mitaka_xenial/HA-ansible-multinodes.yml
+++ b/deploy/adapters/ansible/openstack_mitaka_xenial/HA-ansible-multinodes.yml
@@ -233,5 +233,12 @@
accelerate: true
max_fail_percentage: 0
roles:
+ - moon
+
+- hosts: controller
+ remote_user: root
+ accelerate: true
+ max_fail_percentage: 0
+ roles:
- ext-network
diff --git a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/moon/tasks/keystone-moon-install.yml b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/moon/tasks/keystone-moon-install.yml
new file mode 100644
index 00000000..71315f82
--- /dev/null
+++ b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/moon/tasks/keystone-moon-install.yml
@@ -0,0 +1,73 @@
+
+# Note (asteroide): this part is specific but when Keystone-Moon packages will be installed in a true repository
+# we will not have to do that.
+
+- name: download keystone-moon packages
+ get_url: url=https://github.com/dthom/moon-bin/archive/master.zip dest=/tmp/master.zip mode=0444
+
+- name: extract keystone-moon packages
+ unarchive: src=/tmp/master.zip dest=/tmp copy=no
+
+# Pre-Configuration of the Keystone package
+
+- name: pre-configure Keystone
+ debconf: name=keystone question=keystone/auth-token value={{ ADMIN_TOKEN }} vtype="string"
+
+- name: pre-configure Keystone
+ debconf: name=keystone question=keystone/admin-password value={{ ADMIN_PASS }} vtype="string"
+
+- name: pre-configure Keystone
+ debconf: name=keystone question=keystone/admin-password-confirm value={{ ADMIN_PASS }} vtype="string"
+
+- name: pre-configure Keystone
+ debconf: name=keystone question=keystone/register-endpoint value=false vtype="boolean"
+
+- name: pre-configure Keystone
+ debconf: name=keystone question=keystone/region-name value="regionOne" vtype="string"
+
+- name: pre-configure Keystone
+ debconf: name=keystone question=keystone/admin-user value="admin" vtype="string"
+
+- name: pre-configure Keystone
+ debconf: name=keystone question=keystone/create-admin-tenant value=false vtype="boolean"
+
+- name: pre-configure Keystone
+ debconf: name=keystone question=keystone/configure_db value=false vtype="boolean"
+
+- name: pre-configure Keystone
+ debconf: name=keystone question=keystone/admin-tenant-name value="admin" vtype="string"
+
+- name: pre-configure Keystone
+ debconf: name=keystone question=keystone/admin-role-name value="admin" vtype="string"
+
+# debconf: name=keystone question=keystone/endpoint-ip:
+
+- name: pre-configure Keystone
+ debconf: name=keystone question=keystone/admin-email value="root@localhost" vtype="string"
+
+# install dependencies
+
+- name: install keystone-moon dependencies
+ shell: "apt-get install `python3 scripts/get_deb_depends.py /tmp/moon-bin-master/keystone*.deb`"
+ when: ansible_os_family == "Debian"
+
+- name: install keystone-moon packages
+ shell: "cd /tmp/moon-bin-master; dpkg --force-depends -i *.deb"
+ when: ansible_os_family == "Debian"
+
+- name: install keystone-moon packages
+ shell: "cd /tmp/moon-bin-master; rpm -i *.rpm"
+ when: ansible_os_family == "RedHat"
+
+- name: update keystone conf
+ template: src=keystone.conf dest=/etc/keystone/keystone.conf backup=yes
+ notify:
+ - restart keystone services
+
+# Note (asteroide): the next task is really specific to Moon
+
+- name: update keystone-paste.ini
+ template: src=keystone-paste.ini dest=/etc/keystone/keystone-paste.ini backup=yes
+ notify:
+ - restart keystone services
+
diff --git a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/moon/tasks/main.yml b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/moon/tasks/main.yml
new file mode 100644
index 00000000..31802e10
--- /dev/null
+++ b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/moon/tasks/main.yml
@@ -0,0 +1,37 @@
+##############################################################################
+# 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 keystone package dependencies
+ action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
+ with_items: packages | union(packages_noarch)
+
+- include: keystone-moon-install.yml
+
+
+
+
+- name: enable auto start
+ file:
+ path=/usr/sbin/policy-rc.d
+ state=absent
+ when: ansible_os_family == "Debian"
+
+- name: restart keystone services
+ service: name={{ item }} state=restarted enabled=yes
+ with_items: services | union(services_noarch)
+
diff --git a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/moon/vars/Debian.yml b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/moon/vars/Debian.yml
new file mode 100644
index 00000000..42177d42
--- /dev/null
+++ b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/moon/vars/Debian.yml
@@ -0,0 +1,92 @@
+##############################################################################
+# 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
+##############################################################################
+---
+
+packages:
+ - python-cryptography
+ - python-dateutil
+ - python-dogpile.cache
+ - python-eventlet
+ - python-greenlet
+ - python-jsonschema
+ - python-keystoneclient
+ - python-keystonemiddleware
+ - python-ldap
+ - python-ldappool
+ - python-lxml
+ - python-memcache
+ - python-migrate
+ - python-msgpack
+ - python-mysqldb
+ - python-oauthlib
+ - python-openstackclient
+ - python-oslo.cache
+ - python-oslo.concurrency
+ - python-oslo.config
+ - python-oslo.context
+ - python-oslo.db
+ - python-oslo.i18n
+ - python-oslo.log
+ - python-oslo.messaging
+ - python-oslo.middleware
+ - python-oslo.policy
+ - python-oslo.serialization
+ - python-oslo.service
+ - python-oslo.utils
+ - python-pam
+ - python-passlib
+ - python-paste
+ - python-pastedeploy
+ - python-pbr
+ - python-pycadf
+ - python-pymysql
+ - python-pysaml2
+ - python-pysqlite2
+ - python-routes
+ - python-six
+ - python-sqlalchemy
+ - python-stevedore
+ - python-webob
+ - unzip
+ - python3-keystoneauth1
+ - python3-keystoneclient
+ - python3-oslo.config
+ - python3-oslo.context
+ - python3-oslo.i18n
+ - python3-oslo.serialization
+ - python-oslo.service
+ - python-oslo.utils
+ - python-pam
+ - python-passlib
+ - python-paste
+ - python-pastedeploy
+ - python-pbr
+ - python-pycadf
+ - python-pymysql
+ - python-pysaml2
+ - python-pysqlite2
+ - python-routes
+ - python-six
+ - python-sqlalchemy
+ - python-stevedore
+ - python-webob
+ - unzip
+ - python3-keystoneauth1
+ - python3-keystoneclient
+ - python3-oslo.config
+ - python3-oslo.context
+ - python3-oslo.i18n
+ - python3-oslo.serialization
+ - python3-oslo.utils
+ - apache2
+ - libapache2-mod-wsgi
+
+services:
+ - apache2
+
diff --git a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/moon/vars/main.yml b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/moon/vars/main.yml
new file mode 100644
index 00000000..3a22d268
--- /dev/null
+++ b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/moon/vars/main.yml
@@ -0,0 +1,14 @@
+##############################################################################
+# 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 distributi
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+
+packages_noarch: []
+
+services_noarch: []
+