Skip to content

Commit

Permalink
Percona call-home added.
Browse files Browse the repository at this point in the history
  • Loading branch information
kamil-holubicki committed Sep 22, 2023
1 parent 5a15cff commit 7abd358
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
7 changes: 7 additions & 0 deletions percona-server-8.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ ENV FULL_PERCONA_VERSION "$PS_VERSION.$OS_VER"
ENV FULL_MYSQL_SHELL_VERSION "$MYSQL_SHELL_VERSION.$OS_VER"
ENV PS_REPO release

# Do not report during Docker image creation.
ARG PERCONA_TELEMETRY_DISABLE=1

# check repository package signature in secure way
RUN set -ex; \
export GNUPGHOME="$(mktemp -d)"; \
Expand Down Expand Up @@ -81,6 +84,10 @@ RUN set -ex; \

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

COPY call-home.sh /call-home.sh
RUN mkdir -p /usr/local/percona
RUN chown mysql:mysql /usr/local/percona

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

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


CALL_HOME_OPTIONAL_PARAMS=

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+=" -j ${PERCONA_SEND_TIMEOUT}"
fi

# PERCONA_TELEMETRY_DISABLE is handled at the very beginning of call-home.sh
/call-home.sh -f "PRODUCT_FAMILY_PS" -v "$PS_VERSION" -s "$OS_VER" -d "DOCKER" ${CALL_HOME_OPTIONAL_PARAMS}


exec "$@"

0 comments on commit 7abd358

Please sign in to comment.