Skip to content

Commit

Permalink
PS-9004-Release-tasks-for-PS-5.7.44-48
Browse files Browse the repository at this point in the history
  • Loading branch information
adivinho committed Nov 27, 2023
1 parent 962e468 commit c0992dc
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
14 changes: 14 additions & 0 deletions percona-server-5.7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ RUN set -ex; \
ENV PS_VERSION 5.7.44-48.1
ENV OS_VER el8
ENV FULL_PERCONA_VERSION "$PS_VERSION.$OS_VER"
ENV ENV PS_TELEMETRY_VERSION 5.7.44-48-1

# Do not report during Docker image creation.
# Note that doing so, would create telemetry config file
# which would prevent reporting when new container is started.
# If we want to track Docker image creation as well,
# remove telemetry config file after installing packages!
ARG PERCONA_TELEMETRY_DISABLE=1

RUN set -ex; \
rpm -e --nodeps tzdata; \
Expand Down Expand Up @@ -81,6 +89,12 @@ RUN set -ex; \

VOLUME ["/var/lib/mysql", "/var/log/mysql"]

ADD https://raw.githubusercontent.com/Percona-Lab/telemetry-agent/phase-0/call-home.sh /call-home.sh
RUN chmod a+rx /call-home.sh
RUN mkdir -p /usr/local/percona
RUN chown mysql:mysql /usr/local/percona
ENV CALL_HOME_OPTIONAL_PARAMS=" -s ${OS_VER}"

COPY ps-entry.sh /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]

Expand Down
14 changes: 14 additions & 0 deletions percona-server-5.7/Dockerfile-dockerhub
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ RUN set -ex; \
ENV PS_VERSION 5.7.44-48.1
ENV OS_VER el8
ENV FULL_PERCONA_VERSION "$PS_VERSION.$OS_VER"
ENV ENV PS_TELEMETRY_VERSION 5.7.44-48-1

# Do not report during Docker image creation.
# Note that doing so, would create telemetry config file
# which would prevent reporting when new container is started.
# If we want to track Docker image creation as well,
# remove telemetry config file after installing packages!
ARG PERCONA_TELEMETRY_DISABLE=1

RUN set -ex; \
rpm -e --nodeps tzdata; \
Expand Down Expand Up @@ -73,6 +81,12 @@ RUN set -ex; \

VOLUME ["/var/lib/mysql", "/var/log/mysql"]

ADD https://raw.githubusercontent.com/Percona-Lab/telemetry-agent/phase-0/call-home.sh /call-home.sh
RUN chmod a+rx /call-home.sh
RUN mkdir -p /usr/local/percona
RUN chown mysql:mysql /usr/local/percona
ENV CALL_HOME_OPTIONAL_PARAMS=" -s ${OS_VER}"

COPY ps-entry.sh /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]

Expand Down
23 changes: 23 additions & 0 deletions percona-server-5.7/ps-entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,27 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
fi
fi

if [ ! -z "${PERCONA_INSTANCE_ID}" ]; then
CALL_HOME_OPTIONAL_PARAMS+=" -i ${PERCONA_INSTANCE_ID}"
fi

if [ ! -z "${PERCONA_TELEMETRY_CONFIG_FILE_PATH}" ]; then
CALL_HOME_OPTIONAL_PARAMS+=" -j ${PERCONA_TELEMETRY_CONFIG_FILE_PATH}"
fi

if [ ! -z "${PERCONA_SEND_TIMEOUT}" ]; then
CALL_HOME_OPTIONAL_PARAMS+=" -t ${PERCONA_SEND_TIMEOUT}"
else
CALL_HOME_OPTIONAL_PARAMS+=" -t 7"
fi

if [ ! -z "${PERCONA_CONNECT_TIMEOUT}" ]; then
CALL_HOME_OPTIONAL_PARAMS+=" -c ${PERCONA_CONNECT_TIMEOUT}"
else
CALL_HOME_OPTIONAL_PARAMS+=" -c 2"
fi

# PERCONA_TELEMETRY_DISABLE is handled at the very beginning of call-home.sh
/call-home.sh -f "PRODUCT_FAMILY_PS" -v "${PS_TELEMETRY_VERSION}" -d "DOCKER" ${CALL_HOME_OPTIONAL_PARAMS} &> /dev/null || :

exec "$@"

0 comments on commit c0992dc

Please sign in to comment.