Implement MDBF cluster deployment
Add a new CI task to deploy MDBF MariaDB versions in a cluster.
This commit is contained in:
		
							parent
							
								
									2f661616a2
								
							
						
					
					
						commit
						c64038d6d9
					
				|  | @ -45,8 +45,6 @@ jobs: | ||||||
|           - almalinux-9 |           - almalinux-9 | ||||||
|           - rockylinux-8 |           - rockylinux-8 | ||||||
|           # - rockylinux-9 |           # - rockylinux-9 | ||||||
|         playbook: |  | ||||||
|           - converge.yml |  | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v3 |       - uses: actions/checkout@v3 | ||||||
|       - name: Install requirements |       - name: Install requirements | ||||||
|  | @ -66,4 +64,3 @@ jobs: | ||||||
|           PY_COLORS: "1" |           PY_COLORS: "1" | ||||||
|           ANSIBLE_FORCE_COLOR: "1" |           ANSIBLE_FORCE_COLOR: "1" | ||||||
|           MOLECULE_DISTRO: ${{ matrix.distro }} |           MOLECULE_DISTRO: ${{ matrix.distro }} | ||||||
|           MOLECULE_PLAYBOOK: ${{ matrix.playbook }} |  | ||||||
|  |  | ||||||
|  | @ -0,0 +1,67 @@ | ||||||
|  | --- | ||||||
|  | name: Cluster MDBF | ||||||
|  | 
 | ||||||
|  | on: | ||||||
|  |   push: | ||||||
|  |     paths: | ||||||
|  |       - .github/workflows/test_cluster_mdbf.yml | ||||||
|  |       - requirements.txt | ||||||
|  |       - "files/**" | ||||||
|  |       - "handlers/**" | ||||||
|  |       - "molecule/cluster/**" | ||||||
|  |       - "tasks/**" | ||||||
|  |       - "templates/**" | ||||||
|  |       - "vars/**" | ||||||
|  |   pull_request: | ||||||
|  |     paths: | ||||||
|  |       - .github/workflows/test_cluster_mdbf.yml | ||||||
|  |       - requirements.txt | ||||||
|  |       - "files/**" | ||||||
|  |       - "handlers/**" | ||||||
|  |       - "molecule/cluster/**" | ||||||
|  |       - "tasks/**" | ||||||
|  |       - "templates/**" | ||||||
|  |       - "vars/**" | ||||||
|  |   schedule: | ||||||
|  |     - cron: "30 5 * * 2" | ||||||
|  | 
 | ||||||
|  | jobs: | ||||||
|  |   molecule-cluster-pkg: | ||||||
|  |     name: Cluster MDBF | ||||||
|  |     runs-on: ubuntu-latest | ||||||
|  |     strategy: | ||||||
|  |       fail-fast: false | ||||||
|  |       matrix: | ||||||
|  |         distro: | ||||||
|  |           - ubuntu-22.04 | ||||||
|  |           - debian-11 | ||||||
|  |           - fedora-36 | ||||||
|  |           - almalinux-8 | ||||||
|  |           - rockylinux-9 | ||||||
|  |         mariadb-version: | ||||||
|  |           - "10.6" | ||||||
|  |           - "10.7" | ||||||
|  |           - "10.8" | ||||||
|  |           - "10.9" | ||||||
|  |           - "10.10" | ||||||
|  |     steps: | ||||||
|  |       - uses: actions/checkout@v3 | ||||||
|  |       - name: Install requirements | ||||||
|  |         run: | | ||||||
|  |           python3 -m pip install --upgrade pip | ||||||
|  |           python3 -m pip install -r requirements.txt | ||||||
|  |         # This is necessary on GH Actions to allow running systemd in rootless containers | ||||||
|  |         # see: https://github.com/actions/virtual-environments/issues/3536 | ||||||
|  |         # see: https://github.com/ansible-community/molecule/discussions/3155 | ||||||
|  |       - name: Start systemd user service | ||||||
|  |         run: | | ||||||
|  |           loginctl enable-linger $(whoami) | ||||||
|  |           sleep 1 | ||||||
|  |       - name: Run molecule | ||||||
|  |         run: molecule test -s cluster | ||||||
|  |         env: | ||||||
|  |           PY_COLORS: "1" | ||||||
|  |           ANSIBLE_FORCE_COLOR: "1" | ||||||
|  |           MOLECULE_DISTRO: ${{ matrix.distro }} | ||||||
|  |           MOLECULE_PLAYBOOK: mdbf.yml | ||||||
|  |           MARIADB_VERSION: ${{ matrix.mariadb-version }} | ||||||
|  | @ -27,7 +27,7 @@ on: | ||||||
| 
 | 
 | ||||||
| jobs: | jobs: | ||||||
|   molecule-distrib-pkg: |   molecule-distrib-pkg: | ||||||
|     name: Default |     name: Default deployment | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     strategy: |     strategy: | ||||||
|       fail-fast: false |       fail-fast: false | ||||||
|  | @ -45,8 +45,6 @@ jobs: | ||||||
|           - almalinux-9 |           - almalinux-9 | ||||||
|           - rockylinux-8 |           - rockylinux-8 | ||||||
|           - rockylinux-9 |           - rockylinux-9 | ||||||
|         playbook: |  | ||||||
|           - converge.yml |  | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v3 |       - uses: actions/checkout@v3 | ||||||
|       - name: Install requirements |       - name: Install requirements | ||||||
|  | @ -66,4 +64,3 @@ jobs: | ||||||
|           PY_COLORS: "1" |           PY_COLORS: "1" | ||||||
|           ANSIBLE_FORCE_COLOR: "1" |           ANSIBLE_FORCE_COLOR: "1" | ||||||
|           MOLECULE_DISTRO: ${{ matrix.distro }} |           MOLECULE_DISTRO: ${{ matrix.distro }} | ||||||
|           MOLECULE_PLAYBOOK: ${{ matrix.playbook }} |  | ||||||
|  |  | ||||||
|  | @ -23,7 +23,7 @@ on: | ||||||
|       - "templates/**" |       - "templates/**" | ||||||
|       - "vars/**" |       - "vars/**" | ||||||
|   schedule: |   schedule: | ||||||
|     - cron: "0 5 * * 2" |     - cron: "10 5 * * 2" | ||||||
| 
 | 
 | ||||||
| jobs: | jobs: | ||||||
|   molecule-mdbf-pkg: |   molecule-mdbf-pkg: | ||||||
|  | @ -45,8 +45,6 @@ jobs: | ||||||
|           - almalinux-9 |           - almalinux-9 | ||||||
|           - rockylinux-8 |           - rockylinux-8 | ||||||
|           - rockylinux-9 |           - rockylinux-9 | ||||||
|         playbook: |  | ||||||
|           - mdbf.yml |  | ||||||
|         mariadb-version: |         mariadb-version: | ||||||
|           - "10.3" |           - "10.3" | ||||||
|           - "10.4" |           - "10.4" | ||||||
|  | @ -111,5 +109,5 @@ jobs: | ||||||
|           PY_COLORS: "1" |           PY_COLORS: "1" | ||||||
|           ANSIBLE_FORCE_COLOR: "1" |           ANSIBLE_FORCE_COLOR: "1" | ||||||
|           MOLECULE_DISTRO: ${{ matrix.distro }} |           MOLECULE_DISTRO: ${{ matrix.distro }} | ||||||
|           MOLECULE_PLAYBOOK: ${{ matrix.playbook }} |           MOLECULE_PLAYBOOK: mdbf.yml | ||||||
|           MARIADB_VERSION: ${{ matrix.mariadb-version }} |           MARIADB_VERSION: ${{ matrix.mariadb-version }} | ||||||
|  |  | ||||||
|  | @ -0,0 +1,11 @@ | ||||||
|  | --- | ||||||
|  | - name: Converge | ||||||
|  |   hosts: all | ||||||
|  |   gather_facts: true | ||||||
|  |   vars: | ||||||
|  |     mariadb_use_official_repo: true | ||||||
|  |     mariadb_use_official_repo_url: https://deb.mariadb.org | ||||||
|  |     mariadb_use_official_repo_version: "{{ lookup('env', 'MARIADB_VERSION') }}" | ||||||
|  | 
 | ||||||
|  |   roles: | ||||||
|  |     - role: ansible-role-mariadb | ||||||
|  | @ -8,9 +8,9 @@ | ||||||
|       [mariadb] |       [mariadb] | ||||||
|       name = MariaDB |       name = MariaDB | ||||||
|       {% if ansible_distribution == "Fedora" %} |       {% if ansible_distribution == "Fedora" %} | ||||||
|       baseurl = https://yum.mariadb.org/{{ mariadb_use_official_repo_version }}/fedora{{ ansible_distribution_major_version }}-amd64 |       baseurl = https://rpm.mariadb.org/{{ mariadb_use_official_repo_version }}/fedora{{ ansible_distribution_major_version }}-amd64 | ||||||
|       {% else %} |       {% else %} | ||||||
|       baseurl = https://yum.mariadb.org/{{ mariadb_use_official_repo_version }}/rhel{{ ansible_distribution_major_version }}-amd64 |       baseurl = https://rpm.mariadb.org/{{ mariadb_use_official_repo_version }}/rhel{{ ansible_distribution_major_version }}-amd64 | ||||||
|       {% endif %} |       {% endif %} | ||||||
|       gpgkey = https://yum.mariadb.org/RPM-GPG-KEY-MariaDB |       gpgkey = https://yum.mariadb.org/RPM-GPG-KEY-MariaDB | ||||||
|       module_hotfixes = 1 |       module_hotfixes = 1 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue