Kevin Carter b651fa3bd8 Added major version upgrade support
The change adds in the ability for the role to take care of a major upgrade
in a version of an installed mariadb galera cluster.

The change adds a new task file that checks if the installed version of the
galera cluster matches that of the specified major version. The role will
hard stop if there is a version mismatch and the option "galera_upgrade=true"
is not passed.

Change-Id: I26560668325d45f670c8b946c978c48559f58419
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-02-12 12:36:57 +00:00

102 lines
3.2 KiB
YAML

---
# Copyright 2015, 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.
# Run basic prep
- include: test-prep.yml
# Run container clean up and build
- include: test-container-create.yml
# Deploy the environment
- name: Playbook for role testing
hosts: galera_all
serial: 1
user: root
gather_facts: true
vars:
galera_root_password: secrete
galera_root_user: root
galera_innodb_buffer_pool_size: 512M
galera_innodb_log_buffer_size: 32M
galera_server_id: "{{ inventory_hostname | string_2_int }}"
galera_wsrep_node_name: "{{ inventory_hostname }}"
galera_wsrep_provider_options:
- { option: "gcache.size", value: "32M" }
roles:
- role: "{{ rolename | basename }}"
galera_server_id: "{{ inventory_hostname | string_2_int }}"
# Run playbook test
- include: test-functional.yml
############################# UPGRADE TESTING #############################
# Run container clean up and build
- include: test-container-create.yml
# Deploy the environment running a 5.5 to 10.0 upgrade
- name: Playbook for role upgrade testing
hosts: galera_all
serial: 1
user: root
gather_facts: true
vars:
galera_root_password: secrete
galera_root_user: root
galera_innodb_buffer_pool_size: 512M
galera_innodb_log_buffer_size: 32M
galera_server_id: "{{ inventory_hostname | string_2_int }}"
galera_wsrep_node_name: "{{ inventory_hostname }}"
galera_wsrep_provider_options:
- { option: "gcache.size", value: "32M" }
pre_tasks:
- debug:
msg: "===== Running MariaDB 5.5 Deployment for Upgrade ====="
roles:
- role: "{{ rolename | basename }}"
galera_mariadb_server_package: "mariadb-galera-server-5.5"
galera_apt_repo_url: "https://mirror.rackspace.com/mariadb/repo/5.5/ubuntu"
galera_server_id: "{{ inventory_hostname | string_2_int }}"
# Run initial playbook test
- include: test-functional.yml
# Deploy the environment running a 5.5 to 10.0 upgrade
- name: Playbook for role upgrade testing
hosts: galera_all
serial: 1
user: root
gather_facts: true
vars:
galera_root_password: secrete
galera_root_user: root
galera_innodb_buffer_pool_size: 512M
galera_innodb_log_buffer_size: 32M
galera_server_id: "{{ inventory_hostname | string_2_int }}"
galera_wsrep_node_name: "{{ inventory_hostname }}"
galera_wsrep_provider_options:
- { option: "gcache.size", value: "32M" }
pre_tasks:
- debug:
msg: "===== Running MariaDB 5.5 to current Upgrade ====="
roles:
- role: "{{ rolename | basename }}"
galera_server_id: "{{ inventory_hostname | string_2_int }}"
galera_ignore_cluster_state: true
galera_upgrade: true
# Run final playbook test
- include: test-functional.yml