Skip to content

Commit

Permalink
Merge pull request #81 from idealista/develop
Browse files Browse the repository at this point in the history
Release 4.3.0
  • Loading branch information
Francisco Javier Tsao Santín authored Feb 3, 2022
2 parents a428188 + e54807e commit 6cf37ea
Show file tree
Hide file tree
Showing 16 changed files with 391 additions and 357 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a changelog](https://github.com/olivierlacan/keep-a-changelog).

## [4.3.0](https://github.com/idealista/mysql_role/tree/4.3.0)
[Full Changelog](https://github.com/idealista/mysql_role/compare/4.2.0...4.3.0)
### Fixed
- [#79](https://github.com/idealista/mysql_role/issues/79) *Fixed .my.cnf template* @frantsao
### Added
- [#79](https://github.com/idealista/mysql_role/issues/79) *Improved python3 support in tests* @frantsao
- [#79](https://github.com/idealista/mysql_role/issues/79) *Updated tests dependencies* @frantsao

## [4.2.0](https://github.com/idealista/mysql_role/tree/4.2.0)
[Full Changelog](https://github.com/idealista/mysql_role/compare/4.1.1...4.2.0)
### Added
Expand Down
17 changes: 9 additions & 8 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
name = "pypi"

[packages]
ansible = "==2.9.19"
molecule = "==3.0.8"
docker = "==4.1.0"
ansible-lint = "==4.3.4"
yamllint = "==1.26.1"
ansible = "==5.2.0"
molecule = "==3.5.2"
docker = "==5.0.3"
molecule-docker = "==1.1.0"
ansible-lint = "==5.3.2"
yamllint = "==1.26.3"

[dev-packages]

[requires]
python_version = "3.9"
559 changes: 311 additions & 248 deletions Pipfile.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ These instructions will get you a copy of the role for your Ansible playbook. On

### Prerequisities

Ansible 4.0.0 version installed.
Ansible >= 2.9 version installed.
Inventory destination should be a Debian environment.

For testing purposes, [Molecule](https://molecule.readthedocs.io/) with Docker as driver and [Goss](https://goss.rocks/) as verifier.
Expand All @@ -35,7 +35,7 @@ Create or add to your roles dependency file (e.g requirements.yml):

```
- src: idealista.mysql_role
version: 4.1.0
version: 4.3.0
name: mysql
```

Expand Down Expand Up @@ -128,8 +128,8 @@ mysql> show databases;
## Built With
![Ansible](https://img.shields.io/badge/ansible-4.0.0-green.svg)
![Molecule](https://img.shields.io/badge/molecule-3.3.2-green.svg)
![Ansible](https://img.shields.io/badge/ansible-5.2.0-green.svg)
![Molecule](https://img.shields.io/badge/molecule-3.4.2-green.svg)
![Goss](https://img.shields.io/badge/goss-0.3.16-green.svg)
## Versioning
Expand Down
94 changes: 50 additions & 44 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ mysql_flavour: mysql

mysql_version: 0.8.19-1

mysql_oracle_gpg_keyserver: keyserver.ubuntu.com
mysql_oracle_gpg_key: 467B942D3A79BD29

mysql_required_libs:
- python3-mysqldb

# Alt option for mariadb:
# mysql_version: 10.5
# mysql_key_url: https://mariadb.org/mariadb_release_signing_key.asc
Expand Down Expand Up @@ -65,47 +71,47 @@ mysql_remount_run_partition_size: 512M
## to show available system variables or check
## https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html
mysql_global_variables:
include_dirs:
- "{{ mysql_extra_conf_include_dir }}"
groups:
client:
user: "{{ mysql_user }}"
password: "{{ mysql_root_password }}"
port: 3306
socket: /var/run/mysqld/mysqld.sock
mysqld:
port: 3306
bind_address: 0.0.0.0
socket: /var/run/mysqld/mysqld.sock
basedir: /usr/
tmpdir: /tmp
datadir: "{{ mysql_datadir }}"
lc_messages_dir: "{{ mysql_share_dir }}"
pid_file: "{{ mysql_pid_file }}"
slow_launch_time: 2
key_buffer_size: 256M
max_allowed_packet: 64M
table_open_cache: 256
sort_buffer_size: 1M
read_buffer_size: 1M
read_rnd_buffer_size: 4M
thread_cache_size: 8
max_connections: 151
wait_timeout: 28800
sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
innodb_file_per_table: "ON"
innodb_buffer_pool_size: 256M
innodb_flush_log_at_trx_commit: 1
innodb_lock_wait_timeout: 50
innodb_log_file_size: 64M
innodb_log_buffer_size: 8M
general_log_file: /var/log/mysql/mysql.log
slow_query_log_file: /var/log/mysql/mysql-slow.log
slow_query_log: "ON"
mysqldump:
quick: 1
max_allowed_packet: 64M
mysql_safe:
pid_file: "{{ mysql_pid_file }}"
socket: /var/run/mysqld/mysqld.sock
nice: 0
include_dirs:
- "{{ mysql_extra_conf_include_dir }}"
groups:
client:
user: "{{ mysql_user }}"
password: "{{ mysql_root_password }}"
port: 3306
socket: /var/run/mysqld/mysqld.sock
mysqld:
port: 3306
bind_address: 0.0.0.0
socket: /var/run/mysqld/mysqld.sock
basedir: /usr/
tmpdir: /tmp
datadir: "{{ mysql_datadir }}"
lc_messages_dir: "{{ mysql_share_dir }}"
pid_file: "{{ mysql_pid_file }}"
slow_launch_time: 2
key_buffer_size: 256M
max_allowed_packet: 64M
table_open_cache: 256
sort_buffer_size: 1M
read_buffer_size: 1M
read_rnd_buffer_size: 4M
thread_cache_size: 8
max_connections: 151
wait_timeout: 28800
sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
innodb_file_per_table: "ON"
innodb_buffer_pool_size: 256M
innodb_flush_log_at_trx_commit: 1
innodb_lock_wait_timeout: 50
innodb_log_file_size: 64M
innodb_log_buffer_size: 8M
general_log_file: /var/log/mysql/mysql.log
slow_query_log_file: /var/log/mysql/mysql-slow.log
slow_query_log: "ON"
mysqldump:
quick: 1
max_allowed_packet: 64M
mysql_safe:
pid_file: "{{ mysql_pid_file }}"
socket: /var/run/mysqld/mysqld.sock
nice: 0
7 changes: 0 additions & 7 deletions molecule/mariadb-version/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,8 @@ FROM {{ item.image }}
RUN mkdir -p /usr/share/man/man1

# install minimal packages for debian slim images
{% if item.image == 'debian:bullseye-slim' %}
RUN apt-get update && \
apt-get install -y python3 sudo bash ca-certificates iproute2 systemd systemd-sysv python3-pip && \
update-alternatives --install /usr/bin/python python /usr/bin/python3 0 &&\
apt-get clean
{% else %}
RUN apt-get update && \
apt-get install -y python sudo bash ca-certificates iproute2 systemd systemd-sysv python-pip && \
apt-get clean
{% endif %}

RUN systemctl mask getty.target
7 changes: 0 additions & 7 deletions molecule/mariadb/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,8 @@ FROM {{ item.image }}
RUN mkdir -p /usr/share/man/man1

# install minimal packages for debian slim images
{% if item.image == 'debian:bullseye-slim' %}
RUN apt-get update && \
apt-get install -y python3 sudo bash ca-certificates iproute2 systemd systemd-sysv python3-pip && \
update-alternatives --install /usr/bin/python python /usr/bin/python3 0 &&\
apt-get clean
{% else %}
RUN apt-get update && \
apt-get install -y python sudo bash ca-certificates iproute2 systemd systemd-sysv python-pip && \
apt-get clean
{% endif %}

RUN systemctl mask getty.target
7 changes: 0 additions & 7 deletions molecule/mysql/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,8 @@ FROM {{ item.image }}
RUN mkdir -p /usr/share/man/man1

# install minimal packages for debian slim images
{% if item.image == 'debian:bullseye-slim' %}
RUN apt-get update && \
apt-get install -y python3 sudo bash ca-certificates iproute2 systemd systemd-sysv python3-pip && \
update-alternatives --install /usr/bin/python python /usr/bin/python3 0 &&\
apt-get clean
{% else %}
RUN apt-get update && \
apt-get install -y python sudo bash ca-certificates iproute2 systemd systemd-sysv python-pip && \
apt-get clean
{% endif %}

RUN systemctl mask getty.target
3 changes: 2 additions & 1 deletion tasks/install_mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
apt:
deb: "/usr/src/{{ mysql_deb_package }}"

- name: MySQL | Fix Oracle s GPG key
- name: MySQL | Add Oracle repo GPG key
apt_key:
keyserver: "{{ mysql_oracle_gpg_keyserver }}"
id: "{{ mysql_oracle_gpg_key }}"
state: present

- name: MySQL | Update cache
apt:
Expand Down
11 changes: 6 additions & 5 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ansible==2.9.9
molecule==3.0.4
docker==4.1.0
ansible-lint==4.2.0

ansible==5.2.0
molecule==3.5.2
docker==5.0.3
molecule-docker==1.1.0
ansible-lint==5.3.2
yamllint==1.26.3
7 changes: 0 additions & 7 deletions vars/mariadb-Debian11.yml

This file was deleted.

2 changes: 1 addition & 1 deletion vars/mariadb.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
mysql_required_libs:
- python-mysqldb
- python3-mysqldb

mysql_packages:
- mysql-common
Expand Down
3 changes: 0 additions & 3 deletions vars/mysql-Debian10.yml

This file was deleted.

6 changes: 0 additions & 6 deletions vars/mysql-Debian11.yml

This file was deleted.

3 changes: 0 additions & 3 deletions vars/mysql-Debian9.yml

This file was deleted.

6 changes: 0 additions & 6 deletions vars/mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
mysql_deb_package: "mysql-apt-config_{{ mysql_version }}_all.deb"
mysql_deb_repo: "http://dev.mysql.com/get/{{ mysql_deb_package }}"

mysql_oracle_gpg_keyserver: keyserver.ubuntu.com
mysql_oracle_gpg_key: A4A9406876FCBD3C456770C88C718D3B5072E1F5

mysql_required_libs:
- python-mysqldb

mysql_packages:
- mysql-common
- mysql-server

0 comments on commit 6cf37ea

Please sign in to comment.