Merge "Drop Percona XtraBackup in favour of MariaDB Backup"

This commit is contained in:
Zuul 2019-09-16 13:14:01 +00:00 committed by Gerrit Code Review
commit b8950dbfae
11 changed files with 15 additions and 75 deletions

View File

@ -154,8 +154,7 @@ Kolla provides images to deploy the following infrastructure components:
- `Open vSwitch <http://openvswitch.org/>`__ and Linuxbridge back ends for Neutron.
- `Linux ptp <http://linuxptp.sourceforge.net/>`__ an implementation of the Precision
Time Protocol (PTP) according to IEEE standard 1588 for Linux.
- `Percona XtraBackup <https://www.percona.com/software/mysql-database/percona-xtrabackup/>`__
A tool which provides a method of performing a hot backup of your MySQL data while the
- MariaDB Backup A tool which provides a method of performing a hot backup of your MySQL data while the
system is running.
- `Prometheus <https://prometheus.io/>`__ an open-source systems monitoring
and alerting toolkit originally built at SoundCloud.

View File

@ -80,12 +80,10 @@ COPY yum.conf /etc/yum.conf
'grafana.repo',
'influxdb.repo',
'opendaylight.repo',
'percona-release.repo',
'rabbitmq_rabbitmq-server.repo',
'td.repo'
] %}
## NOTE(yoctozepto): Percona keys omitted on purpose (handled via the repo file for compatibility with Zuul)
{% set base_yum_repo_keys = [
'https://artifacts.elastic.co/GPG-KEY-elasticsearch',
'https://packages.grafana.com/gpg.key',
@ -345,7 +343,6 @@ COPY apt_preferences.{{ base_distro }} /etc/apt/preferences
{# 391A9AA2147192839E9DB0315EDB1B62EC4926EA -- Canonical Cloud Archive Signing Key <ftpmaster@canonical.com> #}
{# 46095ACC8548582C1A2699A9D27D666CD88E42B4 -- Elasticsearch (Elasticsearch Signing Key) <dev_ops@elasticsearch.org> #}
{# 49B07274951063870A8B7EAE7B8AA1A344C05248 -- Opendaylight Signing Key <https://launchpad.net/~odl-team> #}
{# 4D1BB29D63D98E422B2113B19334A25F8507EFA5 -- Percona MySQL Development Team (Packaging key) <mysql-dev@percona.com> #}
{# 58118E89F3A912897C070ADBF76221572C52609D -- Docker Release Tool (releasedocker) <docker@docker.com> #}
{# 4D8EB5FDA37AB55F41A135203BF88A0C6A770882 -- Apache Qpid PPA Signing Key <dev@qpid.apache.org> #}
{# 901F9177AB97ACBE -- Treasure Data, Inc (Treasure Agent Official Signing key) <support@treasure-data.com> #}
@ -355,7 +352,6 @@ COPY apt_preferences.{{ base_distro }} /etc/apt/preferences
'391A9AA2147192839E9DB0315EDB1B62EC4926EA',
'46095ACC8548582C1A2699A9D27D666CD88E42B4',
'49B07274951063870A8B7EAE7B8AA1A344C05248',
'4D1BB29D63D98E422B2113B19334A25F8507EFA5',
'58118E89F3A912897C070ADBF76221572C52609D',
'4D8EB5FDA37AB55F41A135203BF88A0C6A770882',
'901F9177AB97ACBE',
@ -370,7 +366,6 @@ COPY apt_preferences.{{ base_distro }} /etc/apt/preferences
{% elif base_distro == 'debian' %}
{% set base_apt_keys = [
'46095ACC8548582C1A2699A9D27D666CD88E42B4',
'4D1BB29D63D98E422B2113B19334A25F8507EFA5',
] %}
{% set remote_apt_keys = [
'https://download.docker.com/linux/debian/gpg',

View File

@ -1,15 +0,0 @@
[percona-release-$basearch]
name = Percona-Release YUM repository - $basearch
baseurl = https://repo.percona.com/release/$releasever/RPMS/$basearch
enabled = 0
gpgcheck = 1
gpgkey = https://repo.percona.com/yum/RPM-GPG-KEY-Percona
https://repo.percona.com/yum/PERCONA-PACKAGING-KEY
[percona-release-noarch]
name = Percona-Release YUM repository - noarch
baseurl = https://repo.percona.com/release/$releasever/RPMS/noarch
enabled = 0
gpgcheck = 1
gpgkey = https://repo.percona.com/yum/RPM-GPG-KEY-Percona
https://repo.percona.com/yum/PERCONA-PACKAGING-KEY

View File

@ -36,9 +36,5 @@ deb http://ppa.launchpad.net/odl-team/carbon/ubuntu xenial main
# rabbitmq repo
deb https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu/ bionic main
# Percona XtraBackup repo
# NOTE(yoctozepto): enabled only in the xtrabackup image (to spare MariaDB deps and allow Zuul override)
#deb http://repo.percona.com/apt bionic main
# MariaDB repo
deb http://downloads.mariadb.com/MariaDB/mariadb-10.3/repo/ubuntu bionic main

View File

@ -23,19 +23,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% elif base_package_type == 'deb' %}
{% set mariadb_packages = [
'expect'
'expect',
'mariadb-backup',
'mariadb-client',
'mariadb-server'
] %}
{% if base_distro == 'debian' %}
{% set mariadb_packages = mariadb_packages + [
'mariadb-server'
] %}
{% else %}
{% set mariadb_packages = mariadb_packages + [
'mariadb-server',
'mariadb-client',
'mariadb-backup',
] %}
{% endif %}
{% endif %}
{{ macros.install_packages(mariadb_packages | customizable("packages")) }}
@ -53,6 +45,9 @@ RUN chmod 755 /usr/local/bin/kolla_extend_start \
RUN mkdir -p /var/run/mysqld && chown mysql /var/run/mysqld && chmod 755 /var/run/mysqld
{% endif %}
COPY backup.sh /usr/local/bin/kolla_mariadb_backup.sh
RUN chmod 755 /usr/local/bin/kolla_mariadb_backup.sh
{% if use_dumb_init %}
{% block mariadb_entrypoint %}
# NOTE(mgoddard): Override the dumb-init arguments to avoid passing

View File

@ -5,7 +5,7 @@ set -eu
# Execute a full backup
backup_full() {
echo "Taking a full backup"
innobackupex --defaults-file=/etc/mysql/my.cnf \
mariabackup --defaults-file=/etc/mysql/my.cnf \
--no-timestamp \
--stream=xbstream \
--compress \
@ -16,7 +16,7 @@ backup_full() {
# Execute an incremental backup
backup_incremental() {
echo "Taking an incremental backup"
innobackupex --defaults-file=/etc/mysql/my.cnf \
mariabackup --defaults-file=/etc/mysql/my.cnf \
--no-timestamp \
--stream=xbstream \
--compress \
@ -46,4 +46,3 @@ else
echo "You need to specify either full or incremental backup options."
exit 1
fi

View File

@ -1,28 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% block xtrabackup_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if base_package_type == 'rpm' %}
RUN yum-config-manager --enable percona-release-\*
{% endif %}
{% if base_package_type == 'deb' %}
RUN sed -i -e '/percona/ s|^#deb |deb |' /etc/apt/sources.list
{% endif %}
{% if base_package_type in ['rpm', 'deb'] %}
{% set xtrabackup_packages = ['percona-xtrabackup-24', 'qpress'] %}
{% endif %}
{{ macros.install_packages(xtrabackup_packages | customizable("packages")) }}
COPY backup.sh /usr/local/bin/kolla_mariadb_backup.sh
RUN chmod 755 /usr/local/bin/kolla_mariadb_backup.sh
CMD /usr/local/bin/kolla_mariadb_backup.sh
{% block xtrabackup_footer %}{% endblock %}
{% block footer %}{% endblock %}

View File

@ -89,7 +89,6 @@ UNBUILDABLE_IMAGES = {
"opendaylight", # no binary package
"prometheus-mtail", # no aarch64 binary
"telegraf", # no binary package
"xtrabackup", # no binary package
},
'source': {
@ -138,7 +137,6 @@ UNBUILDABLE_IMAGES = {
"qdrouterd",
"sensu-base",
"telegraf", # no binary package
"xtrabackup", # no binary package
},
'ubuntu': {
"cyborg-base",

View File

@ -0,0 +1,5 @@
---
upgrade:
- |
Percona XtraBackup tool got dropped in favour of MariaDB Backup.
"xtrabackup" image is no longer present.

View File

@ -33,7 +33,6 @@ RUN sed -i -e "/^mirrorlist/ d" \
{% if base_distro == "centos" %}
{% endraw %}
## NOTE(yoctozepto): GPG key location is replaced for Percona repo only
## TODO(yoctozepto): CentOS hits external EPEL repo for its repo package (epel-release-*.rpm), should use the mirrored
RUN sed -i \
-e "/^mirrorlist/ d" \
@ -46,7 +45,6 @@ RUN sed -i \
&& sed -i \
-e "s|https://trunk.rdoproject.org|{{ nodepool_rdo_proxy }}|g" \
-e "s|https://cbs.centos.org/repos|{{ nodepool_cbs_centos_proxy }}|g" \
-e "s|https://repo.percona.com|{{ nodepool_percona_proxy }}|g" \
/etc/yum.repos.d/*.repo
{% raw %}
@ -56,7 +54,6 @@ RUN sed -i \
## TODO(yoctozepto): replace base repo earlier as well (like RHEL-based do)
RUN sed -i -e "s|http://archive.ubuntu.com|http://{{ nodepool_mirror_host }}|" \
-e "s|http://ubuntu-cloud.archive.canonical.com/ubuntu|http://{{ nodepool_mirror_host }}/ubuntu-cloud-archive|" \
-e "s|http://repo.percona.com|{{ nodepool_percona_proxy }}|" \
/etc/apt/sources.list \
&& apt-get update

View File

@ -4,4 +4,3 @@ nodepool_pypi_mirror: "http://{{ zuul_site_mirror_fqdn }}:8080/pypi/simple"
nodepool_mirror_host: "{{ zuul_site_mirror_fqdn }}"
nodepool_npmjs_proxy: "http://{{ zuul_site_mirror_fqdn }}:8080/registry.npmjs/"
nodepool_cbs_centos_proxy: "http://{{ zuul_site_mirror_fqdn }}:8080/cbs.centos"
nodepool_percona_proxy: "http://{{ zuul_site_mirror_fqdn }}:8080/percona"