diff options
author | grakiss <grakiss.wanglei@huawei.com> | 2016-02-15 22:14:45 -0500 |
---|---|---|
committer | grakiss <grakiss.wanglei@huawei.com> | 2016-02-24 01:54:19 -0500 |
commit | e72bc045fd467a442a0ffb1c78e710a270a59dfa (patch) | |
tree | de36cb10caf65af125d3815733c92abd561d8866 | |
parent | 00ba12cbc900cb1cb38bee938544cc95583ab416 (diff) |
Support version Liberty of OpenStack for CENTOS7
JIRA:COMPASS-315
-Support version Liberty of OpenStack for CENTOS7
Change-Id: I81abbb37a295a0ea733398ad1f278bafc3525d87
Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
28 files changed, 338 insertions, 157 deletions
diff --git a/build/make_repo.sh b/build/make_repo.sh index 6af86a04..16490c67 100755 --- a/build/make_repo.sh +++ b/build/make_repo.sh @@ -204,6 +204,11 @@ function make_all_repo() --ansible-dir $WORK_PATH/deploy/adapters/ansible \ --default-package "rsyslog-7.6.7-1.el7 strace net-tools wget vim openssh-server \ dracut-config-rescue-033-241.el7_1.5 dracut-network-033-241.el7_1.5" + + make_repo --os-ver rhel7 --package-tag liberty \ + --ansible-dir $WORK_PATH/deploy/adapters/ansible \ + --default-package "rsyslog-7.6.7-1.el7 strace net-tools wget vim openssh-server \ + dracut-config-rescue-033-241.el7_1.5 dracut-network-033-241.el7_1.5" } function main() diff --git a/build/templates/RedHat_liberty.tmpl b/build/templates/RedHat_liberty.tmpl index 29469437..baafc17f 100644 --- a/build/templates/RedHat_liberty.tmpl +++ b/build/templates/RedHat_liberty.tmpl @@ -14,6 +14,15 @@ yum install http://rdo.fedorapeople.org/openstack-liberty/rdo-release-liberty.rp # modify centos7 repo for workaround sed -i 's/epel-Derived from Red Hat Enterprise Linux 7.1 (Source)/epel-7/g' /etc/yum.repos.d/rdo-release.repo +# add mongodb repo +cat <<EOF >/etc/yum.repos.d/mongodb.repo +[mongodb] +name=MongoDB Repository +baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/ +gpgcheck=0 +enabled=1 +EOF + # add galeracluster repo cat <<EOF >/etc/yum.repos.d/MariaDB.repo [mariadb] diff --git a/deploy/adapters/ansible/roles/ceilometer_compute/vars/RedHat.yml b/deploy/adapters/ansible/roles/ceilometer_compute/vars/RedHat.yml index b9f46bdf..5a9128cd 100644 --- a/deploy/adapters/ansible/roles/ceilometer_compute/vars/RedHat.yml +++ b/deploy/adapters/ansible/roles/ceilometer_compute/vars/RedHat.yml @@ -7,5 +7,19 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## --- -services: [] -packages: [] +ceilometer_packages: + - openstack-ceilometer-compute + - python-ceilometerclient + - python-pecan + +ceilometer_services: + - openstack-ceilometer-compute + - openstack-nova-compute + +ceilometer_configs_templates: + - src: ceilometer.j2 + dest: + - /etc/ceilometer/ceilometer.conf + - src: nova.j2 + dest: + - /etc/nova/nova.conf diff --git a/deploy/adapters/ansible/roles/ceilometer_controller/vars/RedHat.yml b/deploy/adapters/ansible/roles/ceilometer_controller/vars/RedHat.yml index b9f46bdf..f1eb4e5b 100644 --- a/deploy/adapters/ansible/roles/ceilometer_controller/vars/RedHat.yml +++ b/deploy/adapters/ansible/roles/ceilometer_controller/vars/RedHat.yml @@ -7,5 +7,30 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## --- -services: [] -packages: [] +ceilometer_packages: + - openstack-ceilometer-api + - openstack-ceilometer-collector + - openstack-ceilometer-central + - openstack-ceilometer-notification + - openstack-ceilometer-alarm + - python-ceilometerclient + +ceilometer_services: + - openstack-ceilometer-central + - openstack-ceilometer-notification + - openstack-ceilometer-api + - openstack-ceilometer-collector + - openstack-ceilometer-alarm-evaluator + - openstack-ceilometer-alarm-notifier + +ceilometer_configs_templates: + - src: ceilometer.j2 + dest: + - /etc/ceilometer/ceilometer.conf + - src: cinder.j2 + dest: + - /etc/cinder/cinder.conf + - src: glance.j2 + dest: + - /etc/glance/glance-api.conf + - /etc/glance/glance-registry.conf diff --git a/deploy/adapters/ansible/roles/ceph-mon/tasks/install_mon.yml b/deploy/adapters/ansible/roles/ceph-mon/tasks/install_mon.yml index 3b818ea2..658d109e 100644 --- a/deploy/adapters/ansible/roles/ceph-mon/tasks/install_mon.yml +++ b/deploy/adapters/ansible/roles/ceph-mon/tasks/install_mon.yml @@ -7,20 +7,22 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +- include_vars: "{{ ansible_os_family }}.yml" + - name: Create a default data directory file: path="/var/lib/ceph/mon/ceph-{{ inventory_hostname }}" state="directory" - name: Populate the monitor daemon shell: "ceph-mon --mkfs -i {{ inventory_hostname }} --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring" -- name: Touch the done file - file: path="/var/lib/ceph/mon/ceph-{{ inventory_hostname }}/done" state="touch" +- name: Touch the done and auto start file + file: path="/var/lib/ceph/mon/ceph-{{ inventory_hostname }}/{{ item }}" state="touch" + with_items: + - "done" + - "{{ ceph_start_type }}" - name: start mon daemon - shell: start ceph-mon id={{ inventory_hostname }} - -- name: auto start ceph-mon - file: path="/var/lib/ceph/mon/ceph-{{ inventory_hostname }}/upstart" state="touch" + shell: "{{ ceph_start_script }}" - name: wait for creating osd keyring wait_for: path=/var/lib/ceph/bootstrap-osd/ceph.keyring diff --git a/deploy/adapters/ansible/roles/ceph-mon/vars/Debian.yml b/deploy/adapters/ansible/roles/ceph-mon/vars/Debian.yml new file mode 100644 index 00000000..16b7989b --- /dev/null +++ b/deploy/adapters/ansible/roles/ceph-mon/vars/Debian.yml @@ -0,0 +1,12 @@ +############################################################################## +# 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 +############################################################################## +--- + +ceph_start_script: "start ceph-mon id={{ inventory_hostname }}" +ceph_start_type: "upstart" diff --git a/deploy/adapters/ansible/roles/ceph-mon/vars/RedHat.yml b/deploy/adapters/ansible/roles/ceph-mon/vars/RedHat.yml new file mode 100644 index 00000000..fa19fc08 --- /dev/null +++ b/deploy/adapters/ansible/roles/ceph-mon/vars/RedHat.yml @@ -0,0 +1,12 @@ +############################################################################## +# 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 +############################################################################## +--- + +ceph_start_script: "/etc/init.d/ceph start mon.{{ inventory_hostname }}" +ceph_start_type: "sysvinit" diff --git a/deploy/adapters/ansible/roles/ceph-mon/vars/main.yml b/deploy/adapters/ansible/roles/ceph-mon/vars/main.yml new file mode 100644 index 00000000..466ea6ab --- /dev/null +++ b/deploy/adapters/ansible/roles/ceph-mon/vars/main.yml @@ -0,0 +1,10 @@ +############################################################################## +# 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 +############################################################################## +--- + diff --git a/deploy/adapters/ansible/roles/ceph-osd/tasks/install_osd.yml b/deploy/adapters/ansible/roles/ceph-osd/tasks/install_osd.yml index 9494e679..5c637a2e 100644 --- a/deploy/adapters/ansible/roles/ceph-osd/tasks/install_osd.yml +++ b/deploy/adapters/ansible/roles/ceph-osd/tasks/install_osd.yml @@ -25,3 +25,9 @@ - name: rebuild osd after reboot lineinfile: dest=/etc/init/ceph-osd-all-starter.conf insertafter="^task" line="pre-start script\n set -e\n /opt/setup_storage/losetup.sh\n sleep 3\n mount /dev/storage-volumes/ceph0 /var/local/osd\nend script" + when: ansible_os_family == "Debian" + +- name: rebuild osd after reboot for centos + lineinfile: dest=/usr/init.d/ceph insertafter="^### END INIT INFO" line="\nsleep 1\nmount /dev/storage-volumes/ceph0 /var/local/osd" + when: ansible_os_family == "RedHat" + diff --git a/deploy/adapters/ansible/roles/common/vars/RedHat.yml b/deploy/adapters/ansible/roles/common/vars/RedHat.yml index 2e1c6d40..50102c58 100644 --- a/deploy/adapters/ansible/roles/common/vars/RedHat.yml +++ b/deploy/adapters/ansible/roles/common/vars/RedHat.yml @@ -9,10 +9,13 @@ --- packages: - openvswitch + - python-devel - python-memcached + - gcc pip_packages: - crudini + - python-keyczar pip_conf: pip.conf diff --git a/deploy/adapters/ansible/roles/database/files/my.cnf b/deploy/adapters/ansible/roles/database/files/my.cnf deleted file mode 100644 index e4a23d96..00000000 --- a/deploy/adapters/ansible/roles/database/files/my.cnf +++ /dev/null @@ -1,131 +0,0 @@ -# -# The MySQL database server configuration file. -# -# You can copy this to one of: -# - "/etc/mysql/my.cnf" to set global options, -# - "~/.my.cnf" to set user-specific options. -# -# One can use all long options that the program supports. -# Run program with --help to get a list of available options and with -# --print-defaults to see which it would actually understand and use. -# -# For explanations see -# http://dev.mysql.com/doc/mysql/en/server-system-variables.html - -# This will be passed to all mysql clients -# It has been reported that passwords should be enclosed with ticks/quotes -# escpecially if they contain "#" chars... -# Remember to edit /etc/mysql/debian.cnf when changing the socket location. -[client] -port = 3306 -socket = /var/run/mysqld/mysqld.sock - -# Here is entries for some specific programs -# The following values assume you have at least 32M ram - -# This was formally known as [safe_mysqld]. Both versions are currently parsed. -[mysqld_safe] -socket = /var/run/mysqld/mysqld.sock -nice = 0 - -[mysqld] -# -# * Basic Settings -# -user = mysql -pid-file = /var/run/mysqld/mysqld.pid -socket = /var/run/mysqld/mysqld.sock -port = 3306 -basedir = /usr -datadir = /var/lib/mysql -tmpdir = /tmp -lc-messages-dir = /usr/share/mysql -skip-external-locking -# -# Instead of skip-networking the default is now to listen only on -# localhost which is more compatible and is not less secure. -bind-address = 0.0.0.0 -# -# * Fine Tuning -# -key_buffer = 16M -max_allowed_packet = 16M -thread_stack = 192K -thread_cache_size = 8 -# This replaces the startup script and checks MyISAM tables if needed -# the first time they are touched -myisam-recover = BACKUP -#max_connections = 100 -#table_cache = 64 -#thread_concurrency = 10 -# -# * Query Cache Configuration -# -query_cache_limit = 1M -query_cache_size = 16M -# -# * Logging and Replication -# -# Both location gets rotated by the cronjob. -# Be aware that this log type is a performance killer. -# As of 5.1 you can enable the log at runtime! -#general_log_file = /var/log/mysql/mysql.log -#general_log = 1 -# -# Error log - should be very few entries. -# -log_error = /var/log/mysql/error.log -# -# Here you can see queries with especially long duration -#log_slow_queries = /var/log/mysql/mysql-slow.log -#long_query_time = 2 -#log-queries-not-using-indexes -# -# The following can be used as easy to replay backup logs or for replication. -# note: if you are setting up a replication slave, see README.Debian about -# other settings you may need to change. -#server-id = 1 -#log_bin = /var/log/mysql/mysql-bin.log -expire_logs_days = 10 -max_binlog_size = 100M -#binlog_do_db = include_database_name -#binlog_ignore_db = include_database_name -# -# * InnoDB -# -# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. -# Read the manual for more InnoDB related options. There are many! -# -# * Security Features -# -# Read the manual, too, if you want chroot! -# chroot = /var/lib/mysql/ -# -# For generating SSL certificates I recommend the OpenSSL GUI "tinyca". -# -# ssl-ca=/etc/mysql/cacert.pem -# ssl-cert=/etc/mysql/server-cert.pem -# ssl-key=/etc/mysql/server-key.pem -default-storage-engine = innodb -innodb_file_per_table -collation-server = utf8_general_ci -init-connect = 'SET NAMES utf8' -character-set-server = utf8 - -[mysqldump] -quick -quote-names -max_allowed_packet = 16M - -[mysql] -#no-auto-rehash # faster start of mysql but no tab completition - -[isamchk] -key_buffer = 16M - -# -# * IMPORTANT: Additional settings that can override those from this file! -# The files must end with '.cnf', otherwise they'll be ignored. -# -!includedir /etc/mysql/conf.d/ - diff --git a/deploy/adapters/ansible/roles/database/tasks/main.yml b/deploy/adapters/ansible/roles/database/tasks/main.yml index 1918f06a..124b2639 100644 --- a/deploy/adapters/ansible/roles/database/tasks/main.yml +++ b/deploy/adapters/ansible/roles/database/tasks/main.yml @@ -8,6 +8,8 @@ ############################################################################## --- - include_vars: "{{ ansible_os_family }}.yml" + tags: + - test_mongo - include: mariadb_install.yml - include: mariadb_cluster.yml @@ -17,8 +19,13 @@ - inventory_hostname == haproxy_hosts.keys()[0] - include: mongodb_install.yml + tags: + - test_mongo + - include: mongodb_config.yml when: - inventory_hostname == haproxy_hosts.keys()[0] + tags: + - test_mongo - meta: flush_handlers diff --git a/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster.yml b/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster.yml index 16bbabce..84704fa4 100644 --- a/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster.yml +++ b/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster.yml @@ -9,3 +9,6 @@ --- - include: mariadb_cluster_debian.yml when: ansible_os_family == "Debian" + +- include: mariadb_cluster_redhat.yml + when: ansible_os_family == "RedHat" diff --git a/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster_redhat.yml b/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster_redhat.yml new file mode 100755 index 00000000..2fbde33b --- /dev/null +++ b/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster_redhat.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 +############################################################################## +--- +- name: start first node to create new cluster + shell: service mysql start --wsrep-new-cluster + when: + - inventory_hostname == haproxy_hosts.keys()[0] + +- name: wait for cluster ready + command: mysql -e"show status like 'wsrep%'" + register: cluster_status + until: cluster_status|success + failed_when: not cluster_status.stdout | search("ON") + retries: 10 + delay: 3 + when: + - inventory_hostname == haproxy_hosts.keys()[0] + +- name: restart other nodes and join cluster + service: + name: mysql + state: restarted + enabled: yes + when: + - inventory_hostname != haproxy_hosts.keys()[0] + +- name: restart first nodes + service: + name: mysql + state: restarted + when: inventory_hostname == haproxy_hosts.keys()[0] and haproxy_hosts|length > 1 diff --git a/deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml b/deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml index d4ef6dd1..f9811dfa 100644 --- a/deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml +++ b/deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml @@ -8,11 +8,14 @@ ############################################################################## --- - name: create all needed db - mysql_db: name={{ item.db }} state=present + mysql_db: login_unix_socket=/var/run/mysqld/mysqld.sock name={{ item.db }} state=present with_items: "{{ credentials }}" + tags: + - test_db - name: create service db user mysql_user: + login_unix_socket=/var/run/mysqld/mysqld.sock name={{ item[0].user }} password={{ item[0].password }} priv=*.*:ALL,GRANT @@ -20,13 +23,16 @@ state=present with_nested: - "{{ credentials }}" - - ['%', 'localhost', inventory_hostname] + - ['%', 'localhost', '{{ inventory_hostname }}'] + tags: + - test_user - name: create wsrep db user mysql_user: + login_unix_socket=/var/run/mysqld/mysqld.sock name={{ WSREP_SST_USER }} password={{ WSREP_SST_PASS }} priv=*.*:ALL,GRANT host={{ item }} state=present - with_items: ['%', 'localhost', inventory_hostname] + with_items: ['%', 'localhost', '{{ inventory_hostname }}'] diff --git a/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml b/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml index 62257810..14fe1634 100644 --- a/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml +++ b/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml @@ -24,6 +24,10 @@ dest: "/etc/security/limits.conf" mode: 0755 +- name: create conf dir for wsrep + file: path=/etc/my.cnf.d state=directory mode=0755 + when: ansible_os_family == "RedHat" + - name: update mariadb config file template: src: '{{ item.src }}' diff --git a/deploy/adapters/ansible/roles/database/tasks/mongodb_install.yml b/deploy/adapters/ansible/roles/database/tasks/mongodb_install.yml index 4eb91560..dea15a83 100755 --- a/deploy/adapters/ansible/roles/database/tasks/mongodb_install.yml +++ b/deploy/adapters/ansible/roles/database/tasks/mongodb_install.yml @@ -19,17 +19,18 @@ template: src=mongodb.conf dest=/opt/os_templates backup=yes - name: update mongodb config file - shell: crudini --merge /etc/mongodb.conf < /opt/os_templates/mongodb.conf + shell: crudini --merge {{ mongodb_config.dest }} < /opt/os_templates/mongodb.conf - name: rm prealloc files file: dest: "{{ item }}" state: absent with_fileglob: - - /var/lib/mongodb/journal/* + - "{{ mongodb_config.journal }}" - name: manually restart mongodb server service: name={{ mongodb_service }} state=restarted enabled=yes + ignore_errors: true - name: write mongodb to monitor list lineinfile: dest=/opt/service create=yes line={{ mongodb_service}} diff --git a/deploy/adapters/ansible/roles/database/templates/my.cnf b/deploy/adapters/ansible/roles/database/templates/my.cnf index b8016849..68e0fca2 100644 --- a/deploy/adapters/ansible/roles/database/templates/my.cnf +++ b/deploy/adapters/ansible/roles/database/templates/my.cnf @@ -56,4 +56,4 @@ quote-names max_allowed_packet = 16M -!includedir /etc/mysql/conf.d/ +!includedir /etc/my.cnf.d/ diff --git a/deploy/adapters/ansible/roles/database/templates/my_debian.cnf b/deploy/adapters/ansible/roles/database/templates/my_debian.cnf new file mode 100644 index 00000000..b8016849 --- /dev/null +++ b/deploy/adapters/ansible/roles/database/templates/my_debian.cnf @@ -0,0 +1,59 @@ +[client] +port = 3306 +socket = /var/run/mysqld/mysqld.sock + + +[mysqld_safe] +socket = /var/run/mysqld/mysqld.sock +nice = 0 + + +[mysql] +default-character-set = utf8 + +[mysqld] +user = mysql +collation-server = utf8_unicode_ci +init-connect = 'SET NAMES utf8' +character-set-server = utf8 +datadir = /var/lib/mysql +bind-address = {{ internal_ip }} + +max-allowed-packet = 16M +max-connect-errors = 1000000 + +max_connections = {{ ansible_processor_vcpus * 100 }} + +wait_timeout = 28800 +tmp-table-size = 32M +max-heap-table-size = 32M +query-cache-type = 0 +query-cache-size = 0M +thread-cache-size = 50 +open-files-limit = 65535 +table-definition-cache = 4096 +table-open-cache = 10240 + +innodb-flush-method = O_DIRECT +innodb-additional-mem-pool-size = 24M +innodb-log-file-size = 1024M +innodb-file-per-table = 1 +innodb-buffer-pool-size = 4096M + +innodb-read-io-threads = 4 +innodb-write-io-threads = 4 +innodb-doublewrite = 1 +innodb-log-buffer-size = 1024M +innodb-buffer-pool-instances = 8 +innodb-log-files-in-group = 2 +innodb-thread-concurrency = {{ ansible_processor_vcpus * 2 }} + +innodb_stats_on_metadata = 0 + +[mysqldump] +quick +quote-names +max_allowed_packet = 16M + + +!includedir /etc/mysql/conf.d/ diff --git a/deploy/adapters/ansible/roles/database/templates/my_redhat.cnf b/deploy/adapters/ansible/roles/database/templates/my_redhat.cnf new file mode 100644 index 00000000..68e0fca2 --- /dev/null +++ b/deploy/adapters/ansible/roles/database/templates/my_redhat.cnf @@ -0,0 +1,59 @@ +[client] +port = 3306 +socket = /var/run/mysqld/mysqld.sock + + +[mysqld_safe] +socket = /var/run/mysqld/mysqld.sock +nice = 0 + + +[mysql] +default-character-set = utf8 + +[mysqld] +user = mysql +collation-server = utf8_unicode_ci +init-connect = 'SET NAMES utf8' +character-set-server = utf8 +datadir = /var/lib/mysql +bind-address = {{ internal_ip }} + +max-allowed-packet = 16M +max-connect-errors = 1000000 + +max_connections = {{ ansible_processor_vcpus * 100 }} + +wait_timeout = 28800 +tmp-table-size = 32M +max-heap-table-size = 32M +query-cache-type = 0 +query-cache-size = 0M +thread-cache-size = 50 +open-files-limit = 65535 +table-definition-cache = 4096 +table-open-cache = 10240 + +innodb-flush-method = O_DIRECT +innodb-additional-mem-pool-size = 24M +innodb-log-file-size = 1024M +innodb-file-per-table = 1 +innodb-buffer-pool-size = 4096M + +innodb-read-io-threads = 4 +innodb-write-io-threads = 4 +innodb-doublewrite = 1 +innodb-log-buffer-size = 1024M +innodb-buffer-pool-instances = 8 +innodb-log-files-in-group = 2 +innodb-thread-concurrency = {{ ansible_processor_vcpus * 2 }} + +innodb_stats_on_metadata = 0 + +[mysqldump] +quick +quote-names +max_allowed_packet = 16M + + +!includedir /etc/my.cnf.d/ diff --git a/deploy/adapters/ansible/roles/database/vars/Debian.yml b/deploy/adapters/ansible/roles/database/vars/Debian.yml index d1704385..2eefc703 100644 --- a/deploy/adapters/ansible/roles/database/vars/Debian.yml +++ b/deploy/adapters/ansible/roles/database/vars/Debian.yml @@ -30,8 +30,13 @@ services: [] mongodb_service: mongodb mysql_config: - dest: /etc/mysql/my.cnf - src: my.cnf + src: my_debian.cnf - dest: /etc/mysql/conf.d/wsrep.cnf src: wsrep.cnf +mongodb_config: + dest: /etc/mongodb.conf + src: mongodb.conf + journal: /var/lib/mongodb/journal/* + wsrep_provider_file: "/usr/lib/galera/libgalera_smm.so" diff --git a/deploy/adapters/ansible/roles/database/vars/RedHat.yml b/deploy/adapters/ansible/roles/database/vars/RedHat.yml index 0782de91..fe2d3f0a 100644 --- a/deploy/adapters/ansible/roles/database/vars/RedHat.yml +++ b/deploy/adapters/ansible/roles/database/vars/RedHat.yml @@ -27,12 +27,17 @@ pip_packages: services: [] -mongodb_service: mongodb +mongodb_service: mongod mysql_config: - - dest: /etc/mysql/my.cnf - src: my.cnf - - dest: /etc/mysql/conf.d/wsrep.cnf + - dest: /etc/my.cnf + src: my_redhat.cnf + - dest: /etc/my.cnf.d/wsrep.cnf src: wsrep.cnf +mongodb_config: + dest: /etc/mongod.conf + src: mongodb.conf + journal: /var/lib/mongo/journal/* + wsrep_provider_file: "/usr/lib64/galera/libgalera_smm.so" diff --git a/deploy/adapters/ansible/roles/glance/vars/RedHat.yml b/deploy/adapters/ansible/roles/glance/vars/RedHat.yml index a5621de3..517f347c 100644 --- a/deploy/adapters/ansible/roles/glance/vars/RedHat.yml +++ b/deploy/adapters/ansible/roles/glance/vars/RedHat.yml @@ -9,10 +9,10 @@ --- packages: - openstack-glance + - rpcbind nfs_services: - rpcbind - - rpc-statd services: - openstack-glance-api diff --git a/deploy/adapters/ansible/roles/heat/vars/RedHat.yml b/deploy/adapters/ansible/roles/heat/vars/RedHat.yml index 7f5b8b64..680b161f 100644 --- a/deploy/adapters/ansible/roles/heat/vars/RedHat.yml +++ b/deploy/adapters/ansible/roles/heat/vars/RedHat.yml @@ -7,7 +7,13 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## --- -services: [] - -packages: [] +services: + - openstack-heat-api + - openstack-heat-api-cfn + - openstack-heat-engine +packages: + - openstack-heat-api + - openstack-heat-api-cfn + - openstack-heat-engine + - python-heatclient diff --git a/deploy/adapters/ansible/roles/keystone/templates/keystone.conf b/deploy/adapters/ansible/roles/keystone/templates/keystone.conf index b9573655..649fc32c 100644 --- a/deploy/adapters/ansible/roles/keystone/templates/keystone.conf +++ b/deploy/adapters/ansible/roles/keystone/templates/keystone.conf @@ -9,7 +9,6 @@ [DEFAULT] admin_token={{ ADMIN_TOKEN }} debug={{ DEBUG }} -verbose={{ VERBOSE }} log_dir = /var/log/keystone [cache] diff --git a/deploy/adapters/ansible/roles/memcached/tasks/main.yml b/deploy/adapters/ansible/roles/memcached/tasks/main.yml index 72c56b36..732076ae 100644 --- a/deploy/adapters/ansible/roles/memcached/tasks/main.yml +++ b/deploy/adapters/ansible/roles/memcached/tasks/main.yml @@ -15,6 +15,7 @@ - name: change memcache listen ip lineinfile: dest=/etc/memcached.conf regexp="^-l " line="-l 0.0.0.0" + when: ansible_os_family == "Debian" - name: restart services service: name={{ item }} state=restarted enabled=yes diff --git a/deploy/adapters/ansible/roles/storage/files/storage.service b/deploy/adapters/ansible/roles/storage/files/storage.service new file mode 100644 index 00000000..924db25a --- /dev/null +++ b/deploy/adapters/ansible/roles/storage/files/storage.service @@ -0,0 +1,15 @@ +[Unit] +Description=Storage Service +Before=runlevel2.target runlevel3.target runlevel4.target runlevel5.target shutdown.target +After=remote-fs.target nss-lookup.target network-online.target time-sync.target network-online.target net_init.service +Before=ceph.service +Wants=network-online.target +Conflicts=shutdown.target + +[Service] +Type=oneshot +ExecStart=/bin/sh -c "/etc/init.d/storage" + +[Install] +WantedBy=multi-user.target + diff --git a/deploy/adapters/ansible/roles/storage/tasks/main.yml b/deploy/adapters/ansible/roles/storage/tasks/main.yml index 0a27be5d..b48e6769 100755 --- a/deploy/adapters/ansible/roles/storage/tasks/main.yml +++ b/deploy/adapters/ansible/roles/storage/tasks/main.yml @@ -42,6 +42,13 @@ tags: - storage +- name: set autostart file for centos + copy: src=storage.service dest=/usr/lib/systemd/system/storage.service mode=0755 + when: ansible_os_family == "RedHat" + tags: + - storage + + - name: enable service service: name=storage enabled=yes tags: |