Skip to content

Commit

Permalink
Adding Galera plan and testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jcpowermac committed Feb 20, 2018
1 parent 2a409ab commit 61dac73
Show file tree
Hide file tree
Showing 18 changed files with 564 additions and 60 deletions.
44 changes: 26 additions & 18 deletions Dockerfile-canary
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,32 @@ b24KICAgIGRlZmF1bHQ6ICIxMC4yIgogICAgZW51bTogWycxMC4yJyAsICcxMC4xJywgJzEwLjAn\
XQogICAgdHlwZTogZW51bQogICAgdGl0bGU6IE1hcmlhREIgVmVyc2lvbgogICAgcmVxdWlyZWQ6\
IHRydWUKICAgIHVwZGF0YWJsZTogdHJ1ZQoKdmVyc2lvbjogMS4wCm5hbWU6IG1hcmlhZGItYXBi\
CmRlc2NyaXB0aW9uOiBNYXJpYWRiIGFwYiBpbXBsZW1lbnRhdGlvbgpiaW5kYWJsZTogdHJ1ZQph\
c3luYzogb3B0aW9uYWwKdGFnczoKICAtIGRhdGFiYXNlCiAgLSBtYXJpYWRiCm1ldGFkYXRhOgog\
IGRvY3VtZW50YXRpb25Vcmw6ICJodHRwczovL21hcmlhZGIuY29tL2tiL2VuL21hcmlhZGIvZG9j\
dW1lbnRhdGlvbi8iCiAgbG9uZ0Rlc2NyaXB0aW9uOiAiRGVwbG95cyBhIGJpbmRhYmxlIG1hcmlh\
ZGIgaW5zdGFuY2UiCiAgZGVwZW5kZW5jaWVzOgogICAgLSAncmVnaXN0cnkuYWNjZXNzLnJlZGhh\
dC5jb20vcmhzY2wvbWFyaWFkYi0xMDAtcmhlbDcnCiAgICAtICdyZWdpc3RyeS5hY2Nlc3MucmVk\
aGF0LmNvbS9yaHNjbC9tYXJpYWRiLTEwMS1yaGVsNycKICAgIC0gJ3JlZ2lzdHJ5LmFjY2Vzcy5y\
ZWRoYXQuY29tL3Joc2NsL21hcmlhZGItMTAyLXJoZWw3JwogIGRpc3BsYXlOYW1lOiAiTWFyaWFE\
QiAoQVBCKSIK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udE9TIE1hcmlhREIgR2FsZXJhIGluc3Rh\
bmNlIHdpdGggcGVyc2lzdGVudCBzdG9yYWdlCiAgICBmcmVlOiB0cnVlCiAgICBkZWZhdWx0OiBm\
YWxzZQogICAgbWV0YWRhdGE6CiAgICAgIGRpc3BsYXlOYW1lOiBIaWdoLUF2YWlsYWJsaXR5CiAg\
ICAgIGNvc3Q6ICQwLjAwCiAgICBwYXJhbWV0ZXJzOiAqX3BhcmFtcwogICAgdXBkYXRlc190bzog\
W10KICAtIG5hbWU6IHByb2QKICAgIGRlc2NyaXB0aW9uOiBUaGlzIHBsYW4gZGVwbG95cyBhIHNp\
bmdsZSBNYXJpYURCIGluc3RhbmNlIHdpdGggMTAgR2lCIG9mIHBlcnNpc3RlbnQgc3RvcmFnZQog\
ICAgZnJlZTogdHJ1ZQogICAgbWV0YWRhdGE6CiAgICAgIGRpc3BsYXlOYW1lOiBQcm9kdWN0aW9u\
CiAgICAgIGNvc3Q6ICQwLjAwCiAgICBwYXJhbWV0ZXJzOiAqX3BhcmFtcwogICAgdXBkYXRlc190\
bzoKICAgICAgLSBkZXYK"



Expand Down
44 changes: 26 additions & 18 deletions Dockerfile-latest
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,32 @@ b24KICAgIGRlZmF1bHQ6ICIxMC4yIgogICAgZW51bTogWycxMC4yJyAsICcxMC4xJywgJzEwLjAn\
XQogICAgdHlwZTogZW51bQogICAgdGl0bGU6IE1hcmlhREIgVmVyc2lvbgogICAgcmVxdWlyZWQ6\
IHRydWUKICAgIHVwZGF0YWJsZTogdHJ1ZQoKdmVyc2lvbjogMS4wCm5hbWU6IG1hcmlhZGItYXBi\
CmRlc2NyaXB0aW9uOiBNYXJpYWRiIGFwYiBpbXBsZW1lbnRhdGlvbgpiaW5kYWJsZTogdHJ1ZQph\
c3luYzogb3B0aW9uYWwKdGFnczoKICAtIGRhdGFiYXNlCiAgLSBtYXJpYWRiCm1ldGFkYXRhOgog\
IGRvY3VtZW50YXRp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"



Expand Down
44 changes: 26 additions & 18 deletions Dockerfile-nightly
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,32 @@ b24KICAgIGRlZmF1bHQ6ICIxMC4yIgogICAgZW51bTogWycxMC4yJyAsICcxMC4xJywgJzEwLjAn\
XQogICAgdHlwZTogZW51bQogICAgdGl0bGU6IE1hcmlhREIgVmVyc2lvbgogICAgcmVxdWlyZWQ6\
IHRydWUKICAgIHVwZGF0YWJsZTogdHJ1ZQoKdmVyc2lvbjogMS4wCm5hbWU6IG1hcmlhZGItYXBi\
CmRlc2NyaXB0aW9uOiBNYXJpYWRiIGFwYiBpbXBsZW1lbnRhdGlvbgpiaW5kYWJsZTogdHJ1ZQph\
c3luYzogb3B0aW9uYWwKdGFnczoKICAtIGRhdGFiYXNlCiAgLSBtYXJpYWRiCm1ldGFkYXRhOgog\
IGRvY3VtZW50YXRpb25Vcmw6ICJodHRwczovL21hcmlhZGIuY29tL2tiL2VuL21hcmlhZGIvZG9j\
dW1lbnRhdGlvbi8iCiAgbG9uZ0Rlc2NyaXB0aW9uOiAiRGVwbG95cyBhIGJpbmRhYmxlIG1hcmlh\
ZGIgaW5zdGFuY2UiCiAgZGVwZW5kZW5jaWVzOgogICAgLSAncmVnaXN0cnkuYWNjZXNzLnJlZGhh\
dC5jb20vcmhzY2wvbWFyaWFkYi0xMDAtcmhlbDcnCiAgICAtICdyZWdpc3RyeS5hY2Nlc3MucmVk\
aGF0LmNvbS9yaHNjbC9tYXJpYWRiLTEwMS1yaGVsNycKICAgIC0gJ3JlZ2lzdHJ5LmFjY2Vzcy5y\
ZWRoYXQuY29tL3Joc2NsL21hcmlhZGItMTAyLXJoZWw3JwogIGRpc3BsYXlOYW1lOiAiTWFyaWFE\
QiAoQVBCKSIKICBjb25zb2xlLm9wZW5zaGlmdC5pby9pY29uQ2xhc3M6IGljb24tbWFyaWFkYgog\
IHByb3ZpZGVyRGlzcGxheU5hbWU6ICJSZWQgSGF0LCBJbmMuIgpwbGFuczo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bWV0YWRhdGE6CiAgICAgIGRpc3BsYXlOYW1lOiBIaWdoLUF2YWlsYWJsaXR5CiAg\
ICAgIGNvc3Q6ICQwLjAwCiAgICBwYXJhbWV0ZXJzOiAqX3BhcmFtcwogICAgdXBkYXRlc190bzog\
W10KICAtIG5hbWU6IHByb2QKICAgIGRlc2NyaXB0aW9uOiBUaGlzIHBsYW4gZGVwbG95cyBhIHNp\
bmdsZSBNYXJpYURCIGluc3RhbmNlIHdpdGggMTAgR2lCIG9mIHBlcnNpc3RlbnQgc3RvcmFnZQog\
ICAgZnJlZTogdHJ1ZQogICAgbWV0YWRhdGE6CiAgICAgIGRpc3BsYXlOYW1lOiBQcm9kdWN0aW9u\
CiAgICAgIGNvc3Q6ICQwLjAwCiAgICBwYXJhbWV0ZXJzOiAqX3BhcmFtcwogICAgdXBkYXRlc190\
bzoKICAgICAgLSBkZXYK"



Expand Down
13 changes: 13 additions & 0 deletions apb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,17 @@ async: optional
tags:
- database
- mariadb
- galera
metadata:
documentationUrl: "https://mariadb.com/kb/en/mariadb/documentation/"
longDescription: "Deploys a bindable mariadb instance"
dependencies:
- 'registry.access.redhat.com/rhscl/mariadb-100-rhel7'
- 'registry.access.redhat.com/rhscl/mariadb-101-rhel7'
- 'registry.access.redhat.com/rhscl/mariadb-102-rhel7'
- 'registry.centos.org/centos/mariadb-100-centos7'
- 'registry.centos.org/centos/mariadb-101-centos7'
- 'registry.centos.org/centos/mariadb-102-centos7'
displayName: "MariaDB (APB)"
console.openshift.io/iconClass: icon-mariadb
providerDisplayName: "Red Hat, Inc."
Expand All @@ -61,6 +65,15 @@ plans:
parameters: *_params
updates_to:
- prod
- name: ha
description: This plan deploys an unsupported three-node CentOS MariaDB Galera instance with persistent storage
free: true
default: false
metadata:
displayName: High-Availablity
cost: $0.00
parameters: *_params
updates_to: []
- name: prod
description: This plan deploys a single MariaDB instance with 10 GiB of persistent storage
free: true
Expand Down
18 changes: 18 additions & 0 deletions playbooks/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
- name: "[MARIADB_APB][TEST] Test MariaDB APB"
hosts: localhost
gather_facts: False
connection: local
roles:
- role: ansible.kubernetes-modules
install_python_requirements: no
- role: ansibleplaybookbundle.asb-modules

tasks:
- include_tasks: test_tasks.yml
vars:
plan: "{{ outer_item }}"
with_items:
- ha
loop_control:
loop_var: outer_item
37 changes: 37 additions & 0 deletions playbooks/test_tasks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
- name: "Include variables per apb plan"
include_vars:
file: "vars/{{ plan }}.yml"

- debug:
msg: "{{ hostvars[inventory_hostname] }}"

- name: "[TEST][{{ _apb_plan_id }}] Create new project"
openshift_v1_project:
name: '{{ namespace }}'
state: 'present'

- name: "[TEST][{{ _apb_plan_id }}]"
include_role:
name: rhscl-mariadb-apb-openshift
vars:
action: 'provision'
state: 'present'

- name: "[TEST][{{ _apb_plan_id }}]"
include_role:
name: rhscl-mariadb-apb-openshift
vars:
action: 'test'

- name: "[TEST][{{ _apb_plan_id }}]"
include_role:
name: rhscl-mariadb-apb-openshift
vars:
action: 'deprovision'
state: 'absent'

- name: "[TEST][{{ _apb_plan_id }}] Delete test project"
openshift_v1_project:
name: '{{ namespace }}'
state: 'absent'
10 changes: 10 additions & 0 deletions playbooks/vars/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
_apb_plan_id: "dev"
service_name: "rhscl-mariadb"
namespace: "test-{{ _apb_plan_id }}-{{ service_name }}"
mariadb_database: "userdb"
mariadb_user: "user"
volume_size: "1Gi"
mariadb_version: "10.2"
mariadb_root_password: "password123"
mariadb_password: "password123"
10 changes: 10 additions & 0 deletions playbooks/vars/ha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
_apb_plan_id: "ha"
service_name: "rhscl-mariadb"
namespace: "test-{{ _apb_plan_id }}-{{ service_name }}"
mariadb_database: "userdb"
mariadb_user: "user"
volume_size: "1Gi"
mariadb_version: "10.2"
mariadb_root_password: "password123"
mariadb_password: "password123"
10 changes: 10 additions & 0 deletions playbooks/vars/prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
_apb_plan_id: "prod"
service_name: "rhscl-mariadb"
namespace: "test-{{ _apb_plan_id }}-{{ service_name }}"
mariadb_database: "userdb"
mariadb_user: "user"
volume_size: "1Gi"
mariadb_version: "10.2"
mariadb_root_password: "password123"
mariadb_password: "password123"
28 changes: 27 additions & 1 deletion roles/rhscl-mariadb-apb-openshift/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
---

service_name: "{{ lookup('env','SERVICE_NAME') | default('rhscl-mariadb', true) }}"
namespace: "{{ lookup('env','NAMESPACE') | default('rhscl-mariadb-apb', true) }}"
mariadb_database: "{{ lookup('env','MARIADB_DATABASE') | default('', true) }}"
mariadb_user: "{{ lookup('env','MARIADB_USER') | default('admin', true) }}"
volume_size: "{{ lookup('env','VOLUME_SIZE') | default('10Gi', true) }}"
mariadb_version: "{{ lookup('env','MARIADB_VERSION') | default('10.0', true) }}"
image: "registry.access.redhat.com/rhscl/mariadb-{{ mariadb_version | replace('.', '') }}-rhel7"
mariadb_version_nodots: "{{ mariadb_version | replace('.', '') }}"


# http://jinja.pocoo.org/docs/2.10/templates/#whitespace-control
# https://stackoverflow.com/a/21699210
image: >-
{% if _apb_plan_id == "ha" -%}
registry.centos.org/centos/mariadb-{{ mariadb_version_nodots }}-centos7
{%- else %}
registry.access.redhat.com/rhscl/mariadb-{{ mariadb_version_nodots }}-rhel7
{%- endif %}
state: present

# Variables below are for the testing of the mariadb service.

test_create_table: 'CREATE TABLE IF NOT EXISTS example_timestamp (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,data VARCHAR(100),cur_timestamp TIMESTAMP(6));'
test_insert: 'INSERT INTO example_timestamp (data) VALUES ("The time of creation is:");'
test_select: 'SELECT * FROM example_timestamp;'
test_galera:
- 'SHOW GLOBAL STATUS LIKE "wsrep_local_state_comment";'
- 'SHOW GLOBAL STATUS LIKE "wsrep_connected";'
- 'SHOW GLOBAL STATUS LIKE "wsrep_ready";'

test_galera_expected_results:
wsrep_connected: "ON"
wsrep_ready: "ON"
wsrep_local_state_comment: "Synced"
73 changes: 73 additions & 0 deletions roles/rhscl-mariadb-apb-openshift/tasks/ha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
# This module fails if the import ImageStream exists
- name: Image Streams
openshift_v1_image_stream:
name: "{{ item.name }}"
namespace: "{{ namespace }}"
state: "{{ state }}"
spec_tags: "{{ item.tags | default(omit) }}"
ignore_errors: True
with_items:
- name: "{{ service_name }}-{{ mariadb_version_nodots }}-{{ _apb_plan_id }}"
- name: "{{ service_name }}-{{ mariadb_version_nodots }}-galera"
- name: "{{ image.split('/')[-1] }}"
tags:
- from:
kind: DockerImage
name: "{{ image }}"
name: latest

# This module does not correctly implement `spec_cluster_ip` when setting
# to 'None' still creates a clusterIP.
- name: Template Service
template:
src: service.yaml.j2
dest: /tmp/service.yaml
register: svc

- name: Apply Service
command: "oc apply -n {{ namespace }} -f {{ svc.dest | default(svc.path) }}"

- name: Template BuildConfigs
template:
src: "{{ item }}.j2"
dest: "/tmp/{{ item }}"
register: bc
with_items:
- "bc-ha.yaml"
- "bc-galera.yaml"

- name: Create BuildConfigs
openshift_v1_build_config:
name: "{{ (lookup('file', item.dest|default(item.path)) | from_yaml).metadata['name'] }}"
namespace: "{{ namespace }}"
state: "{{ state }}"
src: "{{ item.dest | default(item.path) }}"
with_items: "{{ bc.results }}"

- name: Template StatefulSet
template:
src: statefulset.yaml.j2
dest: /tmp/statefulset.yaml
register: sfs

# This module fails if the statefulset exists and state is present
- name: Create StatefulSet
k8s_v1beta1_stateful_set:
name: "{{ service_name }}-{{ mariadb_version_nodots }}-{{ _apb_plan_id }}"
namespace: "{{ namespace }}"
src: "{{ sfs.dest | default(sfs.path) }}"
state: "{{ state }}"
ignore_errors: True


- name: Wait for rollout of StatefulSet
k8s_v1beta1_stateful_set:
name: "{{ service_name }}-{{ mariadb_version_nodots }}-{{ _apb_plan_id }}"
namespace: "{{ namespace }}"
register: rollout
until: rollout['stateful_set']['status']['ready_replicas'] == rollout['stateful_set']['status']['replicas']
delay: 30
retries: 20
when: state == 'present'

Loading

0 comments on commit 61dac73

Please sign in to comment.