Skip to content

Commit

Permalink
feat(ci): introducing CI (#15)
Browse files Browse the repository at this point in the history
* feat(ci): introducing CI
  • Loading branch information
g0blin79 authored Dec 20, 2023
1 parent 7e39803 commit de4e46e
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 14 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Ansible Role Percona XtraDB Cluster
'on':
push:

defaults:
run:
working-directory: 'percona_xtradb_cluster'

jobs:

lint:
name: Linting ansible role bmeme.percona_xtradb_cluster
runs-on: ubuntu-latest
steps:
-
name: Check out the codebase.
uses: actions/checkout@v3
-
name: Run ansible-lint
uses: ansible/ansible-lint@main

# test:
# name: Testing ansible role bmeme.percona_xtradb_cluster
# runs-on: ubuntu-latest
# needs: [lint]
# strategy:
# matrix:
# distro: ["rockylinux:8.7-2.11", "rockylinux:8.8-2.11", "rockylinux:8.9-2.11", "rockylinux:9.3-2.15"]
# steps:
# -
# name: Check out the codebase.
# uses: actions/checkout@v3
# -
# name: Molecule test
# uses: gofrolist/molecule-action@v2
# with:
# molecule_options: --debug
# molecule_args: -d docker
# molecule_command: test
# env:
# ANSIBLE_FORCE_COLOR: '1'
# MOLECULE_DISTRO: ${{ matrix.distro }}
5 changes: 0 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# This workflow requires a GALAXY_API_KEY secret present in the GitHub
# repository or organization.
#
# See: https://github.com/marketplace/actions/publish-ansible-role-to-galaxy

name: Ansible Role Percona XtraDB Cluster
'on':
push:
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,11 @@ mysql_cluster_configuration: |-
```

## Supported Linux distro and versions
- EL 7
- EL 8
- EL 9

EOL 7 is no longer officially supported. As far as we know, the role can currently continue
to work properly on EL 7.9; we are unsure if it works on lower versions."

## Dependencies
N/A
Expand Down Expand Up @@ -173,7 +176,7 @@ A CI actions is not active for this role. This because (I don't know why...) rol
MIT / BSD

## Author Information
This role was created in 2022 by [Bmeme](https://www.bmeme.com). It is actually maintained by [Daniele Piaggesi](https://github.com/g0blin79), [Roberto Mariani](https://github.com/jean-louis) and [Michele Mondelli](https://github.com/Mithenks)
This role was created in 2022 by [Bmeme](https://www.bmeme.com). It is actually maintained by [Daniele Piaggesi](https://github.com/g0blin79) and [Roberto Mariani](https://github.com/jean-louis).

## Credits
This role was really inspired by [csuka Ansible Role XtraDB Cluster](https://github.com/csuka/ansible_role_percona_xtradb_cluster).
1 change: 1 addition & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ galaxy_info:
versions:
- "7"
- "8"
- "9"

galaxy_tags:
- database
Expand Down
13 changes: 6 additions & 7 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
scenario:
test_sequence:
- dependency
- lint
- cleanup
- destroy
- syntax
Expand All @@ -18,28 +17,25 @@ dependency:
name: galaxy
driver:
name: docker
lint: |
set -e
yamllint .
platforms:
- name: test-cluster-01
image: "bmeme/docker-ansible-${MOLECULE_DISTRO:-centos:7.9}"
image: "bmeme/docker-ansible-${MOLECULE_DISTRO:-rockylinux:8.7-2.11}"
command: "/usr/sbin/init"
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
cgroupns_mode: host
pre_build_image: true
- name: test-cluster-02
image: "bmeme/docker-ansible-${MOLECULE_DISTRO:-centos:7.9}"
image: "bmeme/docker-ansible-${MOLECULE_DISTRO:-rockylinux:8.7-2.11}"
command: "/usr/sbin/init"
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
cgroupns_mode: host
pre_build_image: true
- name: test-cluster-03
image: "bmeme/docker-ansible-${MOLECULE_DISTRO:-centos:7.9}"
image: "bmeme/docker-ansible-${MOLECULE_DISTRO:-rockylinux:8.7-2.11}"
command: "/usr/sbin/init"
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand All @@ -49,5 +45,8 @@ platforms:
provisioner:
name: ansible
log: true
lint:
name: ansible-lint
enabled: true
verifier:
name: ansible
31 changes: 31 additions & 0 deletions vars/RedHat-9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
__percona_rpm_key_url: "https://www.percona.com/downloads/RPM-GPG-KEY-percona"
__percona_repo_baseurl: "https://repo.percona.com/yum"
__percona_repo_release: "percona-release-latest"
__percona_version: "57"
__percona_mysql_daemon: mysql
__percona_arbiter_daemon: garb
__percona_required_packages:
- python3-PyMySQL
- gnupg2
- socat
- python3
- openssl
- diffutils
- iproute
__percona_packages_57:
- Percona-XtraDB-Cluster-57
- percona-xtrabackup-24
__percona_packages_80:
- percona-xtradb-cluster
__percona_arbiter_packages_57:
- Percona-XtraDB-Cluster-garbd-57
__percona_arbiter_packages_80:
- percona-xtradb-cluster-garbd
__mysql_log_file_group: mysql
__mysql_log_error: /var/log/mysqld.log
__mysql_pid_file: /var/run/mysqld/mysqld.pid
__mysql_config_file: /etc/my.cnf
__mysql_config_include_dir: /etc/percona-xtradb-cluster.conf.d/
__mysql_socket: /var/lib/mysql/mysql.sock
__garb_config_file: "/etc/sysconfig"

0 comments on commit de4e46e

Please sign in to comment.