Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit 9bc37c6

Browse files
authored
Merge pull request #242 from jdeathe/centos-7-mysql57-community-develop
Release changes for 2.2.0
2 parents 5112ff6 + d16706d commit 9bc37c6

27 files changed

+2856
-1015
lines changed

.dockerignore

+4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
.env
2+
.env.example
13
.git
24
.gitignore
35
dist
6+
images
47
test
8+
docker-compose.yml
59
LICENSE
610
README-short.txt
711
*.md

.env.example

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
MYSQL_ROOT_PASSWORD=
2+
MYSQL_ROOT_PASSWORD_HASHED=false
3+
MYSQL_SUBNET=127.0.0.1
4+
MYSQL_USER=
5+
MYSQL_USER_DATABASE=
6+
MYSQL_USER_PASSWORD=
7+
MYSQL_USER_PASSWORD_HASHED=false

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
.env
12
packages
23
dist

CHANGELOG.md

+30
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,36 @@ Summary of release changes for Version 2.
66

77
CentOS-7 7.5.1804 x86_64 - MySQL 5.7 Community Server.
88

9+
### 2.2.0 - 2019-03-18
10+
11+
- Updates source image to [2.5.1](https://github.com/jdeathe/centos-ssh/releases/tag/2.5.1).
12+
- Updates and restructures Dockerfile.
13+
- Updates container naming conventions and readability of `Makefile`.
14+
- Updates `mysql-community-server` package to 5.7.25-1.
15+
- Updates Dockerfile with combined ADD to reduce layer count in final image.
16+
- Fixes issue with unexpected published port in run templates when `DOCKER_PORT_MAP_TCP_3306` is set to an empty string or 0.
17+
- Fixes binary paths in systemd unit files for compatibility with both EL and Ubuntu hosts.
18+
- Adds placeholder replacement of `RELEASE_VERSION` docker argument to systemd service unit template.
19+
- Adds consideration for event lag into test cases for unhealthy health_status events.
20+
- Adds port incrementation to Makefile's run template for container names with an instance suffix.
21+
- Adds supervisord check to healthcheck script and removes unnecessary source script.
22+
- Adds images directory `.dockerignore` to reduce size of build context.
23+
- Adds docker-compose configuration example.
24+
- Adds improved logging output.
25+
- Adds improved root password configuration.
26+
- Adds improvement to pull logic in systemd unit install template.
27+
- Adds `SSH_AUTOSTART_SUPERVISOR_STDOUT` with a value "false", disabling startup of `supervisor_stdout`.
28+
- Adds improved `healtchcheck`, `sshd-bootstrap` and `sshd-wrapper` scripts.
29+
- Adds `MYSQL_INIT_LIMIT` with a default value of "60" seconds.
30+
- Adds `MYSQL_INIT_SQL` with a default empty value "".
31+
- Deprecates `CUSTOM_MYSQL_INIT_SQL`, use `MYSQL_INIT_SQL` instead.
32+
- Removes use of `/etc/services-config` paths.
33+
- Removes use of `/etc/mysqld-bootstrap.conf`.
34+
- Removes X-Fleet section from etcd register template unit-file.
35+
- Removes the unused group element from the default container name.
36+
- Removes the node element from the default container name.
37+
- Removes unused environment variables from Makefile and scmi configuration.
38+
939
### 2.1.1 - 2018-11-18
1040

1141
- Updates source image to [2.4.1](https://github.com/jdeathe/centos-ssh/releases/tag/2.4.1).

Dockerfile

+48-57
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,54 @@
1-
# =============================================================================
2-
# jdeathe/centos-ssh-mysql
3-
#
4-
# CentOS-7, MySQL 5.7 Community Server
5-
#
6-
# =============================================================================
7-
FROM jdeathe/centos-ssh:2.4.1
1+
FROM jdeathe/centos-ssh:2.5.1
82

9-
# -----------------------------------------------------------------------------
10-
# Install MySQL
11-
# -----------------------------------------------------------------------------
12-
RUN { \
13-
echo '[mysql57-community]'; \
14-
echo 'name=MySQL 5.7 Community Server'; \
15-
echo 'baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/'; \
16-
echo 'gpgcheck=1'; \
17-
echo 'enabled=1'; \
18-
echo 'gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql'; \
3+
ARG RELEASE_VERSION="2.2.0"
4+
5+
# ------------------------------------------------------------------------------
6+
# Base install of required packages
7+
# ------------------------------------------------------------------------------
8+
RUN { printf -- \
9+
'[%s]\nname=%s\nbaseurl=%s\ngpgcheck=%s\nenabled=%s\ngpgkey=%s\n' \
10+
'mysql57-community' \
11+
'MySQL 5.7 Community Server' \
12+
'http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/' \
13+
'1' \
14+
'1' \
15+
'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql'; \
1916
} > /etc/yum.repos.d/mysql-community.repo \
2017
&& rpm --import \
2118
https://repo.mysql.com/RPM-GPG-KEY-mysql \
2219
&& yum -y install \
2320
--setopt=tsflags=nodocs \
2421
--disableplugin=fastestmirror \
25-
mysql-community-server-5.7.23-1.el7 \
22+
mysql-community-client-5.7.25-1.el7 \
23+
mysql-community-common-5.7.25-1.el7 \
24+
mysql-community-libs-5.7.25-1.el7 \
25+
mysql-community-server-5.7.25-1.el7 \
2626
psmisc-22.20-15.el7 \
27+
sshpass-1.06-2.el7 \
2728
&& yum versionlock add \
28-
mysql* \
29+
mysql-community-* \
30+
psmisc-* \
31+
sshpass \
2932
&& rm -rf /var/cache/yum/* \
3033
&& yum clean all
3134

32-
# -----------------------------------------------------------------------------
35+
# ------------------------------------------------------------------------------
3336
# Copy files into place
34-
# -----------------------------------------------------------------------------
35-
ADD src/usr/bin \
36-
/usr/bin/
37-
ADD src/usr/sbin \
38-
/usr/sbin/
39-
ADD src/opt/scmi \
40-
/opt/scmi/
41-
ADD src/etc/systemd/system \
42-
/etc/systemd/system/
43-
ADD src/etc/services-config/mysql/my.cnf \
44-
src/etc/services-config/mysql/mysqld-bootstrap.conf \
45-
/etc/services-config/mysql/
46-
ADD src/etc/services-config/supervisor/supervisord.d \
47-
/etc/services-config/supervisor/supervisord.d/
37+
# ------------------------------------------------------------------------------
38+
ADD src /
4839

49-
RUN ln -sf \
50-
/etc/services-config/mysql/my.cnf \
51-
/etc/my.cnf \
52-
&& ln -sf \
53-
/etc/services-config/mysql/mysqld-bootstrap.conf \
54-
/etc/mysqld-bootstrap.conf \
55-
&& ln -sf \
56-
/etc/services-config/supervisor/supervisord.d/mysqld-bootstrap.conf \
57-
/etc/supervisord.d/mysqld-bootstrap.conf \
58-
&& ln -sf \
59-
/etc/services-config/supervisor/supervisord.d/mysqld-wrapper.conf \
60-
/etc/supervisord.d/mysqld-wrapper.conf \
40+
# ------------------------------------------------------------------------------
41+
# Provisioning
42+
# - Replace placeholders with values in systemd service unit template
43+
# - Set permissions
44+
# ------------------------------------------------------------------------------
45+
RUN sed -i \
46+
-e "s~{{RELEASE_VERSION}}~${RELEASE_VERSION}~g" \
47+
/etc/systemd/system/centos-ssh-mysql@.service \
6148
&& chmod 600 \
62-
/etc/services-config/mysql/{my.cnf,mysqld-bootstrap.conf} \
49+
/etc/my.cnf \
50+
&& chmod 644 \
51+
/etc/supervisord.d/mysqld-{bootstrap,wrapper}.conf \
6352
&& chmod 700 \
6453
/usr/{bin/healthcheck,sbin/mysqld-{bootstrap,wrapper}}
6554

@@ -68,22 +57,24 @@ EXPOSE 3306
6857
# -----------------------------------------------------------------------------
6958
# Set default environment variables
7059
# -----------------------------------------------------------------------------
71-
ENV MYSQL_AUTOSTART_MYSQLD_BOOTSTRAP=true \
72-
MYSQL_AUTOSTART_MYSQLD_WRAPPER=true \
60+
ENV MYSQL_AUTOSTART_MYSQLD_BOOTSTRAP="true" \
61+
MYSQL_AUTOSTART_MYSQLD_WRAPPER="true" \
62+
MYSQL_INIT_LIMIT="60" \
63+
MYSQL_INIT_SQL="" \
7364
MYSQL_ROOT_PASSWORD="" \
74-
MYSQL_ROOT_PASSWORD_HASHED=false \
65+
MYSQL_ROOT_PASSWORD_HASHED="false" \
7566
MYSQL_SUBNET="127.0.0.1" \
7667
MYSQL_USER="" \
7768
MYSQL_USER_DATABASE="" \
7869
MYSQL_USER_PASSWORD="" \
79-
MYSQL_USER_PASSWORD_HASHED=false \
80-
SSH_AUTOSTART_SSHD=false \
81-
SSH_AUTOSTART_SSHD_BOOTSTRAP=false
70+
MYSQL_USER_PASSWORD_HASHED="false" \
71+
SSH_AUTOSTART_SSHD="false" \
72+
SSH_AUTOSTART_SSHD_BOOTSTRAP="false" \
73+
SSH_AUTOSTART_SUPERVISOR_STDOUT="false"
8274

83-
# -----------------------------------------------------------------------------
75+
# ------------------------------------------------------------------------------
8476
# Set image metadata
85-
# -----------------------------------------------------------------------------
86-
ARG RELEASE_VERSION="2.1.1"
77+
# ------------------------------------------------------------------------------
8778
LABEL \
8879
maintainer="James Deathe <james.deathe@gmail.com>" \
8980
install="docker run \
@@ -120,4 +111,4 @@ HEALTHCHECK \
120111
--retries=10 \
121112
CMD ["/usr/bin/healthcheck"]
122113

123-
CMD ["/usr/bin/supervisord", "--configuration=/etc/supervisord.conf"]
114+
CMD ["/usr/bin/supervisord", "--configuration=/etc/supervisord.conf"]

0 commit comments

Comments
 (0)