Skip to content

Commit 36140a7

Browse files
Merge pull request #128 from FREVA-CLINT/add-mysql-version
Add mysql version
2 parents 91b77eb + 39e26a3 commit 36140a7

File tree

5 files changed

+15
-9
lines changed

5 files changed

+15
-9
lines changed

assets/share/freva/deployment/playbooks/db-server-compose-template.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '3'
22
services:
33
{{db_name}}:
44
user: {{uid}}:{{gid}}
5-
image: mariadb:latest
5+
image: mariadb:{{db_version}}
66
hostname: {{db_name}}
77
{% if debug %}
88
network_mode: host
@@ -28,6 +28,7 @@ services:
2828
tty: true
2929
ports:
3030
- {{db_port}}:3306
31+
command: mariadbd-safe --skip-grant-tables
3132
{{vault_name}}:
3233
user: {{uid}}:{{gid}}
3334
image: ghcr.io/freva-clint/freva-vault:{{vault_version}}

assets/share/freva/deployment/playbooks/db-server-playbook.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
-v '{{db_data_path|regex_replace("^~", ansible_env.HOME)}}/freva-service-config/mysql/daily_backup.sh:/usr/local/bin/daily_backup:z'
2525
--rm
2626
--name {{db_name}}
27-
-t docker.io/mariadb:latest
27+
-t docker.io/mariadb:{{ db_version }}
2828
skip_tables_cmd: >
2929
--network {{ project_name }} -v
3030
'{{db_data_path|regex_replace("^~", ansible_env.HOME)}}/{{project_name}}/db_service:/var/lib/mysql:z'
@@ -36,7 +36,7 @@
3636
-v '{{db_data_path|regex_replace("^~", ansible_env.HOME)}}/freva-service-config/mysql/create_tables.sql:/docker-entrypoint-initdb.d/002_create_tables.sql:z'
3737
-v '{{db_data_path|regex_replace("^~", ansible_env.HOME)}}/freva-service-config/mysql/daily_backup.sh:/usr/local/bin/daily_backup:z'
3838
-v /tmp/reset_root_pw.sh:/tmp/reset_root_pw.sh:z
39-
-t docker.io/mariadb:latest mariadbd-safe --skip-grant-tables
39+
-t docker.io/mariadb:{{ db_version }} mariadbd-safe --skip-grant-tables
4040
continer_name: "{{ db_name }}"
4141
vault_name: "{{project_name}}-vault"
4242
tasks:
@@ -98,7 +98,7 @@
9898
- name: Pulling container
9999
shell: /tmp/docker-or-podman pull {{item}}
100100
with_items:
101-
- "docker.io/mariadb:latest"
101+
- "docker.io/mariadb:{{db_version}}"
102102
- "ghcr.io/freva-clint/freva-vault:{{vault_version}}"
103103
- name: Creating docker network
104104
shell: >
@@ -149,13 +149,13 @@
149149
owner: "{{uid}}"
150150
group: "{{gid}}"
151151
- name: Preparing the root password reset I
152-
shell: /tmp/docker-or-podman run --user {{uid}}:{{gid}} -d {{docker_cmd}}
152+
shell: /tmp/docker-or-podman run -d {{docker_cmd}}
153153
- pause: seconds=5
154154
- name: Preparing the root password reset II
155155
shell: /tmp/docker-or-podman rm -f {{db_name}}
156156
- name: Resetting the root password
157157
shell: |
158-
/tmp/docker-or-podman run --user {{uid}}:{{gid}} -d {{skip_tables_cmd}}
158+
/tmp/docker-or-podman run -d {{skip_tables_cmd}}
159159
sleep 5
160160
/tmp/docker-or-podman exec {{db_name}} bash /tmp/reset_root_pw.sh
161161
/tmp/docker-or-podman exec {{db_name}} /bin/sh -c 'mariadb -u root {{db}} < /docker-entrypoint-initdb.d/002_create_tables.sql'

docs/whatsnew.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ What's new
77
:maxdepth: 0
88
:titlesonly:
99

10+
v2406.0.1
11+
~~~~~~~~~
12+
* Keep track of mariadb version
13+
1014
v2406.0.0
1115
~~~~~~~~~
1216
* Add info panel (access via CTRL+f) for further information on config items.

src/freva_deployment/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import argparse
22
from urllib.request import urlretrieve
33

4-
__version__ = "2406.0.0"
4+
__version__ = "2406.0.1"
55

66
FREVA_PYTHON_VERSION = "3.11"
77
AVAILABLE_PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12"]

src/freva_deployment/versions.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"vault": "2405.1.0",
33
"freva_rest": "2403.0.3",
44
"solr": "9.6.0",
5-
"core": "2406.0.0",
6-
"web": "2405.0.1"
5+
"core": "2406.0.1",
6+
"web": "2405.0.0",
7+
"db": "11.1"
78
}

0 commit comments

Comments
 (0)