Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/5 Add Debian12 support #6

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
---
dist: bionic
dist: focal
language: python
python: "3.9"
os: linux
services:
- docker
install:
- pip install pipenv
- pip install pipenv==2023.12.1
- pipenv sync
env:
jobs:
- MOLECULE_DISTRO=debian:buster-slim
- MOLECULE_DISTRO=debian:bullseye-slim
- MOLECULE_DISTRO=debian:bookworm-slim
script:
- pipenv run molecule test --all

Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a ch
### Added
### Removed
### Fixed
## [1.0.1](https://github.com/idealista/percona_xtradb_role/tree/1.0.1)
### Added
- *Add Debian12 support* @sperez
## [1.0.0](https://github.com/idealista/percona_xtradb_role/tree/1.0.0)
### Added
- *Initial release* @emepege
9 changes: 4 additions & 5 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ verify_ssl = true
name = "pypi"

[packages]
ansible = "==4.2.0"
molecule = "==3.3.4"
ansible = "==4.4.0"
molecule = "==3.4.0"
docker = "==5.0.0"
molecule-docker = "==0.2.4"
ansible-lint = "==5.0.12"
yamllint = "==1.26.1"
molecule-docker = "==1.0.2"
ansible-lint = "==5.1.2"

[dev-packages]

Expand Down
147 changes: 83 additions & 64 deletions Pipfile.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ percona_xtradb_package_path: "{{ percona_xtradb_download_path }}/{{ percona_xtra
percona_xtradb_force_reinstall: false

# Installation
percona_xtradb_python_bin: "{{ (ansible_python.version.major | int == 3) | ternary('python3', 'python') }}"
percona_xtradb_required_libs:
- python-mysqldb
- python3-mysqldb
- "{{ percona_xtradb_python_bin }}-mysqldb"
percona_xtradb_packages:
- percona-xtradb-cluster-full
percona_xtradb_exec_name: mysql
Expand Down
6 changes: 6 additions & 0 deletions molecule/default/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ FROM {{ item.image }}
{% endif %}

# install minimal packages for debian slim images
{% if item.image == 'debian:bullseye-slim' or item.image == 'debian:bookworm-slim' %}
RUN apt-get update && \
apt-get install -y python3 sudo bash ca-certificates iproute2 systemd systemd-sysv python3-pip procps && \
apt-get clean
{% else %}
RUN apt-get update && \
apt-get install -y python sudo bash ca-certificates iproute2 systemd systemd-sysv python-pip procps && \
apt-get clean
{% endif %}
12 changes: 3 additions & 9 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ platforms:
groups:
- percona_xtradb_group
image: ${MOLECULE_DISTRO:-debian:buster-slim}
privileged: false
privileged: true
security_opts:
- apparmor=unconfined
exposed_ports:
Expand All @@ -26,15 +26,13 @@ platforms:
- /tmp
- /run
- /run/lock
volumes:
- '/sys/fs/cgroup:/sys/fs/cgroup:ro'
command: '/lib/systemd/systemd'
stop_signal: 'RTMIN+3'
- name: perconaxtradb2
groups:
- percona_xtradb_group
image: ${MOLECULE_DISTRO:-debian:buster-slim}
privileged: false
privileged: true
security_opts:
- apparmor=unconfined
exposed_ports:
Expand All @@ -49,15 +47,13 @@ platforms:
- /tmp
- /run
- /run/lock
volumes:
- '/sys/fs/cgroup:/sys/fs/cgroup:ro'
command: '/lib/systemd/systemd'
stop_signal: 'RTMIN+3'
- name: perconaxtradb3
groups:
- percona_xtradb_group
image: ${MOLECULE_DISTRO:-debian:buster-slim}
privileged: false
privileged: true
security_opts:
- apparmor=unconfined
exposed_ports:
Expand All @@ -72,8 +68,6 @@ platforms:
- /tmp
- /run
- /run/lock
volumes:
- '/sys/fs/cgroup:/sys/fs/cgroup:ro'
command: '/lib/systemd/systemd'
stop_signal: 'RTMIN+3'
provisioner:
Expand Down
9 changes: 4 additions & 5 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
ansible==4.2.0
molecule==3.3.4
ansible==4.4.0
molecule==3.4.0
docker==5.0.0
molecule-docker==0.2.4
ansible-lint==5.0.12
yamllint==1.26.1
molecule-docker==1.0.2
ansible-lint==5.1.2