Implement Xenial Support
This commit implements support for Ubuntu 16.04 Xenial. Changes include renaming several variables from galera_* to percona_* for clarity. The reason for this change is that 16.04 will be using distribution provided packages for percona-xtrabackup. Mariadb 10.0 packages are available for Ubuntu 16.04, so those packages and installations procedures will remain unchanged. Depends-On: Iab5485529cf14933fd7f37430d234a5c41185c18 Change-Id: I4baeb2eddf137619ffedba2f9efd61b7bd142f92
This commit is contained in:
parent
7bec84f67a
commit
5136160186
@ -68,17 +68,6 @@ galera_wsrep_sst_auth_password: "{{ galera_root_password }}"
|
||||
# xtrabackup parallel/compression/sync threads
|
||||
galera_xtrabackup_threads: 4
|
||||
|
||||
# Galera GPG Keys
|
||||
galera_gpg_keys:
|
||||
- key_name: 'mariadb'
|
||||
keyserver: 'hkp://keyserver.ubuntu.com:80'
|
||||
fallback_keyserver: 'hkp://p80.pool.sks-keyservers.net:80'
|
||||
hash_id: '0xcbcb082a1bb943db'
|
||||
- key_name: 'percona-xtrabackup'
|
||||
keyserver: 'hkp://keyserver.ubuntu.com:80'
|
||||
fallback_keyserver: 'hkp://p80.pool.sks-keyservers.net:80'
|
||||
hash_id: '0x1c4cbdcdcd2efd2a'
|
||||
|
||||
# Repositories
|
||||
galera_apt_repo_url: "https://mirror.rackspace.com/mariadb/repo/10.0/ubuntu"
|
||||
galera_apt_repo:
|
||||
@ -90,15 +79,20 @@ galera_apt_percona_xtrabackup_repo:
|
||||
repo: "deb {{ galera_apt_percona_xtrabackup_url }} {{ ansible_distribution_release }} main"
|
||||
state: "present"
|
||||
|
||||
galera_package_url: "https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.2.13/binary/debian/trusty/x86_64/percona-xtrabackup-22_2.2.13-1.trusty_amd64.deb"
|
||||
galera_package_sha256: "2f58eedefa905583f0650f77bb2b149139c4066c7fb690202124fe5c7ac83e9e"
|
||||
galera_package_path: "/opt/{{ galera_package_url | basename }}"
|
||||
percona_package_path: "/opt/{{ percona_package_url | basename }}"
|
||||
|
||||
galera_apt_pinned_packages: [{ package: "*", release: MariaDB, priority: "1001" }]
|
||||
|
||||
# Validate SSL certificates when downloading the galera deb above
|
||||
# Validate SSL certificates when downloading the percona deb above
|
||||
# May be set to "no" when proxy server is intercepting the certificates.
|
||||
galera_package_download_validate_certs: "yes"
|
||||
percona_package_download_validate_certs: "yes"
|
||||
|
||||
#There is no package currently provided for Xenial, but vivid uses the
|
||||
#same libraries and installs without issue.
|
||||
qpress_deb_url: https://repo.percona.com/apt/pool/main/q/qpress/qpress_11-1.vivid_amd64.deb
|
||||
qpress_package_download_validate_certs: yes
|
||||
qpress_package_sha256: "54c02ae825b5c08bfae0792b23390b1577d7a26cadfb321384377bde31465959"
|
||||
qpress_package_path: "/opt/{{ qpress_deb_url | basename }}"
|
||||
|
||||
galera_pip_packages:
|
||||
- MySQL-python
|
||||
|
@ -1,3 +1,2 @@
|
||||
#!/bin/sh
|
||||
echo "All runlevel operations denied by policy" >&2
|
||||
#!/bin/bash
|
||||
exit 101
|
||||
|
@ -22,7 +22,8 @@
|
||||
args: "{{ (not galera_existing_cluster | bool and inventory_hostname == galera_server_bootstrap_node) or (galera_cluster_members | length == 1) | ternary('--wsrep-new-cluster', '') }}"
|
||||
environment:
|
||||
MYSQLD_STARTUP_TIMEOUT: 180
|
||||
when: not galera_running_and_bootstrapped | bool
|
||||
when:
|
||||
- not galera_running_and_bootstrapped | bool
|
||||
register: galera_restart
|
||||
until: galera_restart | success
|
||||
retries: 3
|
||||
|
@ -0,0 +1,12 @@
|
||||
---
|
||||
features:
|
||||
- Implemented support for Ubuntu 16.04 Xenial. percona-xtrabackup
|
||||
packages will be installed from distro repositories, instead of
|
||||
upstream percona repositories due to lack of available packages
|
||||
upstream at the time of implementing this feature.
|
||||
deprecations:
|
||||
- galera_package_url changed to percona_package_url for clarity
|
||||
- galera_package_sha256 changed to percona_package_sha256 for clarity
|
||||
- galera_package_path changed to percona_package_path for clarity
|
||||
- galera_package_download_validate_certs changed to
|
||||
percona_package_download_validate_certs for clarity
|
@ -24,11 +24,21 @@
|
||||
state: restarted
|
||||
args: "--wsrep-new-cluster"
|
||||
when:
|
||||
- not using_mysql_init | bool
|
||||
- inventory_hostname == galera_server_bootstrap_node
|
||||
- mysql_running.rc != 0
|
||||
tags:
|
||||
- galera-bootstrap
|
||||
|
||||
- name: Start cluster with wsrep init
|
||||
shell: "/etc/init.d/mysql bootstrap"
|
||||
when:
|
||||
- inventory_hostname == galera_server_bootstrap_node
|
||||
- mysql_running.rc != 0
|
||||
- using_mysql_init | bool
|
||||
tags:
|
||||
- galera-bootstrap
|
||||
|
||||
- name: Wait for operational state
|
||||
command: mysql --silent --skip-column-names -e 'SHOW STATUS LIKE "wsrep_evs_state"'
|
||||
register: galera_check_wait
|
||||
|
@ -70,11 +70,11 @@
|
||||
- percona-xtrabackup
|
||||
- xtrabackup
|
||||
tags:
|
||||
- galera-apt-packages
|
||||
- percona-apt-packages
|
||||
|
||||
- name: Install galera package
|
||||
- name: Install percona packages upstream
|
||||
apt:
|
||||
deb: "{{ galera_package_path }}"
|
||||
deb: "{{ percona_package_path }}"
|
||||
force: yes
|
||||
tags:
|
||||
- galera-apt-packages
|
||||
- galera-apt-packages
|
||||
|
@ -73,7 +73,7 @@
|
||||
tags:
|
||||
- galera-apt-keys
|
||||
|
||||
- name: Add galera repo(s)
|
||||
- name: Add galera repo
|
||||
apt_repository:
|
||||
repo: "{{ item.repo }}"
|
||||
state: "{{ item.state }}"
|
||||
@ -83,23 +83,35 @@
|
||||
delay: 2
|
||||
with_items:
|
||||
- "{{ galera_apt_repo }}"
|
||||
- "{{ galera_apt_percona_xtrabackup_repo }}"
|
||||
tags:
|
||||
- galera-repos
|
||||
|
||||
- name: Download the galera package
|
||||
- name: Add percona repo
|
||||
apt_repository:
|
||||
repo: "{{ item.repo }}"
|
||||
state: "{{ item.state }}"
|
||||
register: add_repos
|
||||
until: add_repos|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items:
|
||||
- "{{ galera_apt_percona_xtrabackup_repo }}"
|
||||
tags:
|
||||
- percona-repos
|
||||
|
||||
- name: Download the percona package
|
||||
get_url:
|
||||
url: "{{ galera_package_url }}"
|
||||
dest: "{{ galera_package_path }}"
|
||||
url: "{{ percona_package_url }}"
|
||||
dest: "{{ percona_package_path }}"
|
||||
mode: "0644"
|
||||
sha256sum: "{{ galera_package_sha256 }}"
|
||||
validate_certs: "{{ galera_package_download_validate_certs }}"
|
||||
sha256sum: "{{ percona_package_sha256 }}"
|
||||
validate_certs: "{{ percona_package_download_validate_certs }}"
|
||||
register: package_download
|
||||
retries: 3
|
||||
delay: 10
|
||||
until: package_download|success
|
||||
tags:
|
||||
- galera-apt-packages
|
||||
- percona-apt-packages
|
||||
|
||||
- name: Prevent galera from starting on install
|
||||
copy:
|
||||
|
@ -13,6 +13,17 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Galera GPG Keys
|
||||
galera_gpg_keys:
|
||||
- key_name: 'mariadb'
|
||||
keyserver: 'hkp://keyserver.ubuntu.com:80'
|
||||
fallback_keyserver: 'hkp://p80.pool.sks-keyservers.net:80'
|
||||
hash_id: '0xcbcb082a1bb943db'
|
||||
- key_name: 'percona-xtrabackup'
|
||||
keyserver: 'hkp://keyserver.ubuntu.com:80'
|
||||
fallback_keyserver: 'hkp://p80.pool.sks-keyservers.net:80'
|
||||
hash_id: '0x1c4cbdcdcd2efd2a'
|
||||
|
||||
galera_pre_apt_packages:
|
||||
- apt-transport-https
|
||||
- debconf-utils
|
||||
@ -50,3 +61,8 @@ galera_debconf_items:
|
||||
name: "{{ galera_mariadb_server_package }}"
|
||||
value: "{{ galera_root_password }}"
|
||||
vtype: "string"
|
||||
|
||||
using_mysql_init: no
|
||||
|
||||
percona_package_url: "https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.2.13/binary/debian/trusty/x86_64/percona-xtrabackup-22_2.2.13-1.trusty_amd64.deb"
|
||||
percona_package_sha256: "2f58eedefa905583f0650f77bb2b149139c4066c7fb690202124fe5c7ac83e9e"
|
||||
|
73
vars/ubuntu-16.04.yml
Normal file
73
vars/ubuntu-16.04.yml
Normal file
@ -0,0 +1,73 @@
|
||||
---
|
||||
# Copyright 2016, Rackspace US, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# 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.
|
||||
|
||||
# Galera GPG Keys
|
||||
galera_gpg_keys:
|
||||
- key_name: 'mariadb'
|
||||
keyserver: 'hkp://keyserver.ubuntu.com:80'
|
||||
fallback_keyserver: 'hkp://p80.pool.sks-keyservers.net:80'
|
||||
hash_id: '0xF1656F24C74CD1D8'
|
||||
- key_name: 'percona-xtrabackup'
|
||||
keyserver: 'hkp://keyserver.ubuntu.com:80'
|
||||
fallback_keyserver: 'hkp://p80.pool.sks-keyservers.net:80'
|
||||
hash_id: '0x1c4cbdcdcd2efd2a'
|
||||
|
||||
galera_pre_apt_packages:
|
||||
- apt-transport-https
|
||||
- debconf-utils
|
||||
- libaio1
|
||||
- libc6
|
||||
- libdbd-mysql-perl
|
||||
- libgcc1
|
||||
- libgcrypt20
|
||||
- libstdc++6
|
||||
- python-software-properties
|
||||
- software-properties-common
|
||||
|
||||
# The package name for mariaDB is set as a variable
|
||||
# so that it can be used in debconf later in the
|
||||
# "galera_common" role.
|
||||
galera_mariadb_server_package: "mariadb-galera-server-10.0"
|
||||
|
||||
# NB This is specifically galera_packages as these packages only get installed
|
||||
# during the galera play - this is because of the preseed task and the service
|
||||
# startup control used when installing mariadb-galera-server and galera.
|
||||
galera_apt_packages:
|
||||
- mariadb-client
|
||||
- "{{ galera_mariadb_server_package }}"
|
||||
- galera-3
|
||||
- rsync
|
||||
- socat
|
||||
- qpress
|
||||
|
||||
galera_debconf_items:
|
||||
- question: "mysql-server/root_password"
|
||||
name: "{{ galera_mariadb_server_package }}"
|
||||
value: "{{ galera_root_password }}"
|
||||
vtype: "string"
|
||||
- question: "mysql-server/root_password_again"
|
||||
name: "{{ galera_mariadb_server_package }}"
|
||||
value: "{{ galera_root_password }}"
|
||||
vtype: "string"
|
||||
|
||||
using_mysql_init: yes
|
||||
|
||||
percona_package_url: "https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.2.13/binary/debian/vivid/x86_64/percona-xtrabackup-22_2.2.13-1.vivid_amd64.deb"
|
||||
percona_package_sha256: "3e3b15b2b261da004f7c4419ae427af9ec5707b40be1effe22a0142311c51856"
|
||||
|
||||
# TODO: update this to xenial if the repo ever gets created.
|
||||
galera_apt_percona_xtrabackup_repo:
|
||||
repo: "deb {{ galera_apt_percona_xtrabackup_url }} vivid main"
|
||||
state: "present"
|
Loading…
x
Reference in New Issue
Block a user