Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
11815ca
Bump OpenStack versions for Stein
markgoddard Oct 25, 2019
23e488d
Add xfsprogs to nova-compute
stuggi Oct 30, 2019
71b5e39
Merge "Add xfsprogs to nova-compute" into stable/stein
Nov 3, 2019
77028db
Merge "Bump OpenStack versions for Stein" into stable/stein
Nov 3, 2019
8e712fa
Add effective and permitted capability to blackbox exporter
ssolkhon Aug 16, 2019
0f320e3
get 'apt_*' options of kolla-build.conf working again
hrw Oct 17, 2019
25890a4
Stein: support mariabackup for backups
hrw Sep 12, 2019
c178127
Merge "get 'apt_*' options of kolla-build.conf working again" into st…
Nov 7, 2019
2692fec
Merge "Stein: support mariabackup for backups" into stable/stein
Nov 7, 2019
eedc780
[manila] Fixes manila-share on debian/ubuntu
dincercelik Nov 7, 2019
8673f02
swift-rsyncd: don't recursively chown /srv/node at startup
mchlumsky Nov 4, 2019
c0f40d8
Merge "[manila] Fixes manila-share on debian/ubuntu" into stable/stein
Nov 13, 2019
b843a1e
Bump OpenStack versions for Stein
hrw Nov 29, 2019
3819192
Install etcd3gw to fix Ubuntu binary tooz coordination
yoctozepto Dec 3, 2019
7934cf7
Fix keystone bootstrap error message display
markgoddard Dec 9, 2019
acbc6e0
Fix monasca-grafana being unbuildable due to old npm
yoctozepto Dec 17, 2019
a7b0f25
Bump versions for Openstack stein
hrw Dec 19, 2019
56772b0
Bump OpenStack versions for Stein
priteau Dec 20, 2019
7d9cd19
create missing apache2 directory on Debian/Ubuntu
hrw May 28, 2019
83273c8
Merge "Bump OpenStack versions for Stein" into stable/stein
Jan 2, 2020
54c98dc
horizon: fix build in stable branches
hrw Jan 7, 2020
28e67a7
Bump versions for Openstack stein
hrw Jan 6, 2020
121f294
neutron: fix build in stable branches
hrw Jan 10, 2020
f2dd450
Stop gzipping logs in post
mnasiadka Jan 9, 2020
15c8c73
Merge "Stop gzipping logs in post" into stable/stein
Jan 10, 2020
f6ad36b
CI: Fix symlinks for failed build logs
markgoddard Jan 10, 2020
0b9485c
Fixes rally db commands
dincercelik Jan 13, 2020
ddc5fea
Merge "CI: Fix symlinks for failed build logs" into stable/stein
Jan 15, 2020
8bc3b19
[stein] Bump versions and pin vmware-nsx
yoctozepto Jan 20, 2020
4549783
config: make kolla work with oslo.config 7.0.0+
hrw Jan 10, 2020
0677706
CI: Fix symlinks to failed logs
yoctozepto Jan 15, 2020
d9c63d7
Fixes swift-object-expirer for Debian and Ubuntu binary images.
dincercelik Jan 19, 2020
0de137f
[stein] Bump versions
dincercelik Jan 21, 2020
2585b05
Merge "Fixes swift-object-expirer for Debian and Ubuntu binary images…
Jan 22, 2020
65e8695
Merge "CI: Fix symlinks to failed logs" into stable/stein
Jan 22, 2020
edc8785
[stein] Bump versions
dincercelik Jan 23, 2020
983bee4
Change fetch_fernet_tokens.py behaviour to check for minimum number o…
mnasiadka Jan 22, 2020
757fe57
nova-libvirt: add UEFI packages to support UEFI instances
chenxingc Sep 16, 2019
1b3d125
[stein] Bump versions
dincercelik Feb 8, 2020
cbfded8
Bump Gnocchi to 4.3.4
priteau Feb 12, 2020
85e1ef6
Bump stein versions
hrw Feb 26, 2020
aabd2ac
Ignore EM releases in version-check.py
markgoddard May 20, 2019
7195b70
Merge "Bump stein versions" into stable/stein
Feb 27, 2020
7c21996
Bump stein versions
priteau Feb 27, 2020
d53ead9
Fix kolla_toolbox_pip_virtualenv_packages override
angeiv Feb 28, 2020
a83173d
Adapt fetch-fernet-tokens script to Python 3
mnasiadka Jan 9, 2020
b12db74
Fix renos
yoctozepto Mar 3, 2020
c139ac5
Add ssh clients to Ironic Conductor container
Feb 5, 2020
a9f759d
Adds python3-systemd for ansible deploy interface
Jan 30, 2020
f611351
Merge "Bump stein versions" into stable/stein
Mar 13, 2020
0d20f1b
Merge "Adds python3-systemd for ansible deploy interface" into stable…
Mar 16, 2020
8400336
kibana, nova-libvirt: handle it properly for non-x86
hrw Mar 16, 2020
6c61b50
CI: Install tox
markgoddard Mar 17, 2020
1a0886f
mariadb: install mariabackup on Debian
hrw Mar 18, 2020
56f0a8b
Merge "CI: Install tox" into stable/stein
Mar 18, 2020
abd8b94
Merge "mariadb: install mariabackup on Debian" into stable/stein
Mar 18, 2020
58a8e81
Bump service versions (Stein)
markgoddard Mar 24, 2020
519eced
Fix multiple CI issues
markgoddard Apr 2, 2020
4696fc0
Fix invalid test in cinder data migration script
gpocentek Mar 10, 2020
fc0967b
Make deploy jobs voting again
markgoddard Apr 6, 2020
8d0af28
Bump versions (Stein)
dincercelik Apr 4, 2020
80caffa
Sensu: Remove ceph and process-checks plugins from client
markgoddard Apr 8, 2020
f7cf4df
Add vitrage-persistor image
Apr 7, 2020
ab8bcf5
Ensure proper JSON in keystone bootstrap
yoctozepto Mar 4, 2020
95e4214
Merge "Add vitrage-persistor image" into stable/stein
Apr 17, 2020
e22fb97
Add nfs dependencies to glance container
rajathere Mar 23, 2020
ebfc0a7
[rally] Fixes Ubuntu binary
dincercelik Apr 26, 2020
3fc92f4
Merge upstream stable/stein
jovial Apr 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docker/aodh/aodh-api/extend_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
# Loading Apache2 ENV variables
. /etc/apache2/envvars
install -d /var/run/apache2/
rm -rf /var/run/apache2/*
else
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
Expand Down
1 change: 1 addition & 0 deletions docker/barbican/barbican-api/extend_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ if [[ "$(whoami)" == 'root' ]]; then
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
# Loading Apache2 ENV variables
. /etc/apache2/envvars
install -d /var/run/apache2/
rm -rf /var/run/apache2/*
else
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
Expand Down
2 changes: 2 additions & 0 deletions docker/base/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,12 @@ COPY sources.list.{{ base_distro }} /etc/apt/sources.list
{% else %}
COPY sources.list.{{ base_distro }}.{{ base_arch }} /etc/apt/sources.list
{% endif %}
COPY sources.list /etc/apt/sources.list.d/kolla-custom.list
{% endblock %}

{% block base_ubuntu_package_apt_preferences %}
COPY apt_preferences.{{ base_distro }} /etc/apt/preferences
COPY apt_preferences /etc/apt/preferences.d/kolla-custom
{% endblock %}

{% set base_apt_packages = [
Expand Down
1 change: 1 addition & 0 deletions docker/base/apt_preferences
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# used for adding custom options by 'apt_preferences' option of kolla-build.conf
29 changes: 29 additions & 0 deletions docker/base/apt_preferences.debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# We do not want packages from this repo
Package: *
Pin: release o=obs://private/home:marcin.juszkiewicz/debian-buster
Pin-Priority: 100

# Unless it is kibana (on aarch64)
Package: kibana
Pin: release o=obs://private/home:marcin.juszkiewicz/debian-buster
Pin-Priority: 600

# on x86-64 use upstream package for kibana
Package: kibana
Pin: release o=elastic,b=amd64
Pin-Priority: 700

# We need fixed libvirt for aarch64
Package: *libvirt*
Pin: release o=obs://private/home:marcin.juszkiewicz/debian-buster
Pin-Priority: 600

# on x86-64 we want libvirt from Debian
Package: *libvirt*
Pin: release o=Debian,b=amd64
Pin-Priority: 700

# on ppc64le we want libvirt from Debian
Package: *libvirt*
Pin: release o=Debian,b=ppc64le
Pin-Priority: 700
1 change: 1 addition & 0 deletions docker/base/sources.list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# used for adding custom repos by 'apt_sources_list' option of kolla-build.conf
3 changes: 3 additions & 0 deletions docker/base/sources.list.debian
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ deb http://buster-stein.debian.net/debian buster-stein-backports-nochange main

# td-agent for fluentd
deb http://packages.treasuredata.com/3/debian/stretch stretch contrib

# kibana for non-x86 and fixed libvirt for aarch64
deb https://obs.linaro.org/repos/home:/marcin.juszkiewicz/debian-buster ./
3 changes: 2 additions & 1 deletion docker/cinder/cinder-api/extend_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
fi

if [[ "${!KOLLA_OSM[@]}" ]]; then
if [[ -z ${MAX_NUMBER} ]]; then
if [[ "${!MAX_NUMBER[@]}" ]]; then
cinder-manage db online_data_migrations --max_count ${MAX_NUMBER}
else
cinder-manage db online_data_migrations
Expand All @@ -24,6 +24,7 @@ if [[ "$(whoami)" == 'root' ]]; then
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
# Loading Apache2 ENV variables
. /etc/apache2/envvars
install -d /var/run/apache2/
rm -rf /var/run/apache2/*
else
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
Expand Down
1 change: 1 addition & 0 deletions docker/cloudkitty/cloudkitty-api/extend_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
# Loading Apache2 ENV variables
. /etc/apache2/envvars
install -d /var/run/apache2/
rm -rf /var/run/apache2/*
else
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
Expand Down
1 change: 1 addition & 0 deletions docker/crane/extend_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ if [[ "$(whoami)" == 'root' ]]; then
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
# Loading Apache2 ENV variables
. /etc/apache2/envvars
install -d /var/run/apache2/
rm -rf /var/run/apache2/*
else
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
Expand Down
1 change: 1 addition & 0 deletions docker/cyborg/cyborg-api/extend_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ fi
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
# Loading Apache2 ENV variables
. /etc/apache2/envvars
install -d /var/run/apache2/
rm -rf /var/run/apache2/*
else
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
Expand Down
1 change: 1 addition & 0 deletions docker/freezer/freezer-api/extend_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ fi
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
# Loading Apache2 ENV variables
. /etc/apache2/envvars
install -d /var/run/apache2/
rm -rf /var/run/apache2/*
else
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
Expand Down
9 changes: 6 additions & 3 deletions docker/glance/glance-api/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% import "macros.j2" as macros with context %}

{% if base_distro in ['centos', 'oraclelinux'] %}
{% set glance_api_packages = ['qemu-img-ev'] %}
{% set glance_api_packages = ['nfs-utils', 'qemu-img-ev'] %}
{% elif base_distro == 'rhel' %}
{% set glance_api_packages = ['qemu-img'] %}
{% set glance_api_packages = ['nfs-utils', 'qemu-img'] %}
{% elif base_package_type == 'deb' %}
{% set glance_api_packages = ['qemu-utils'] %}
{% set glance_api_packages = [
'nfs-common',
'qemu-utils'
] %}
{% endif %}

{{ macros.install_packages(glance_api_packages | customizable("packages")) }}
Expand Down
1 change: 1 addition & 0 deletions docker/gnocchi/gnocchi-api/extend_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
# Loading Apache2 ENV variables
. /etc/apache2/envvars
install -d /var/run/apache2/
rm -rf /var/run/apache2/*
else
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
Expand Down
1 change: 1 addition & 0 deletions docker/heat/heat-base/extend_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ if [[ "$(whoami)" == 'root' ]]; then
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
# Loading Apache2 ENV variables
. /etc/apache2/envvars
install -d /var/run/apache2/
rm -rf /var/run/apache2/*
else
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
Expand Down
2 changes: 2 additions & 0 deletions docker/horizon/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ ADD plugins-archive /
'/plugins/*'
] %}

# NOTE(hrw): to install horizon from unpacked sources we cannot have it in upper-constraints.txt
RUN ln -s horizon-source/* horizon \
&& sed -i /^horizon=/d /requirements/upper-constraints.txt \
&& {{ macros.install_pip(horizon_pip_packages | customizable("pip_packages")) }} \
&& mkdir -p /etc/openstack-dashboard \
&& cp -r /horizon/openstack_dashboard/conf/* /etc/openstack-dashboard/ \
Expand Down
1 change: 1 addition & 0 deletions docker/ironic/ironic-api/extend_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ if [[ "$(whoami)" == 'root' ]]; then
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
# Loading Apache2 ENV variables
. /etc/apache2/envvars
install -d /var/run/apache2/
rm -rf /var/run/apache2/*
else
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
Expand Down
7 changes: 7 additions & 0 deletions docker/ironic/ironic-conductor/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
'e2fsprogs',
'gdisk',
'ipmitool',
'openssh-clients',
'openstack-ironic-conductor',
'openstack-ironic-staging-drivers',
'parted',
Expand Down Expand Up @@ -67,6 +68,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
'gdisk',
'ipmitool',
'ironic-conductor',
'openssh-client',
'parted',
'psmisc',
'python3-ironic-inspector-client',
Expand All @@ -88,6 +90,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
'fuse',
'gdisk',
'ipmitool',
'openssh-clients',
'parted',
'psmisc',
'qemu-img-ev',
Expand All @@ -97,10 +100,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
] %}
{% if distro_python_version.startswith('3') %}
{% set ironic_conductor_packages = ironic_conductor_packages + [
'python3-systemd',
'systemd-udev',
] %}
{% else %}
{% set ironic_conductor_packages = ironic_conductor_packages + [
'systemd-python',
'systemd',
] %}
{% endif %}
Expand All @@ -111,8 +116,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
'e2fsprogs',
'gdisk',
'ipmitool',
'openssh-client',
'parted',
'psmisc',
'python-systemd',
'qemu-utils',
'shellinabox',
'udev',
Expand Down
1 change: 1 addition & 0 deletions docker/ironic/ironic-pxe/extend_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ fi
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
# Loading Apache2 ENV variables
. /etc/apache2/envvars
install -d /var/run/apache2/
rm -rf /var/run/apache2/*
else
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
Expand Down
6 changes: 3 additions & 3 deletions docker/keystone/keystone-fernet/fetch_fernet_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ def has_file(filename_path):


def num_tokens():
_, _, files = os.walk(TOKEN_PATH).next()
_, _, files = next(os.walk(TOKEN_PATH))
return len(files)


def tokens_populated(expected):
return num_tokens() == int(expected)
return num_tokens() >= int(expected)


def token_stale(seconds, filename='0'):
Expand All @@ -71,7 +71,7 @@ def main():
help='Filename of token to check',
default='0')
parser.add_argument('-n', '--number',
help='Number of tokens that should exist',
help='Minimum number of tokens that should exist',
required=True)
args = parser.parse_args()

Expand Down
1 change: 1 addition & 0 deletions docker/keystone/keystone/extend_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
# Loading Apache2 ENV variables
. /etc/apache2/envvars
install -d /var/run/apache2/
rm -rf /var/run/apache2/*
else
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
Expand Down
8 changes: 7 additions & 1 deletion docker/keystone/keystone/keystone_bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -o pipefail

# NOTE(SamYaple): Kolla needs to wraps `keystone-manage bootstrap` to ensure
# any change is reported correctly for idempotency. This script will exit with
# valid json that can be parsed with information about if the task has failed
Expand Down Expand Up @@ -29,7 +31,11 @@ function exit_json {
}

changed="false"
keystone_bootstrap=$(keystone-manage bootstrap --bootstrap-username "${USERNAME}" --bootstrap-password "${PASSWORD}" --bootstrap-project-name "${PROJECT}" --bootstrap-role-name "${ROLE}" --bootstrap-admin-url "${ADMIN_URL}" --bootstrap-internal-url "${INTERNAL_URL}" --bootstrap-public-url "${PUBLIC_URL}" --bootstrap-service-name "keystone" --bootstrap-region-id "${REGION}" 2>&1)
# NOTE(mgoddard): pipe through cat -v to remove unprintable control characters
# which prevent JSON decoding.
# NOTE(yoctozepto): also apply sed to escape double quotation marks
# and backslashes
keystone_bootstrap=$(keystone-manage bootstrap --bootstrap-username "${USERNAME}" --bootstrap-password "${PASSWORD}" --bootstrap-project-name "${PROJECT}" --bootstrap-role-name "${ROLE}" --bootstrap-admin-url "${ADMIN_URL}" --bootstrap-internal-url "${INTERNAL_URL}" --bootstrap-public-url "${PUBLIC_URL}" --bootstrap-service-name "keystone" --bootstrap-region-id "${REGION}" 2>&1 | cat -v | sed 's/\\/\\\\/g' | sed 's/"/\\"/g')
if [[ $? != 0 ]]; then
fail_json "${keystone_bootstrap}"
fi
Expand Down
7 changes: 6 additions & 1 deletion docker/kolla-toolbox/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
'virtualenv'
] %}

RUN {{ macros.install_pip(kolla_toolbox_pip_virtualenv_packages|customizable("pip_packages"), constraints=false) }} \
RUN {{ macros.install_pip(kolla_toolbox_pip_virtualenv_packages | customizable("pip_virtualenv_packages"), constraints=false) }} \
&& virtualenv --system-site-packages {{ virtualenv_path }}

ENV PATH {{ virtualenv_path }}/bin:$PATH
Expand All @@ -64,9 +64,14 @@ ENV PATH {{ virtualenv_path }}/bin:$PATH
'"cmd2<0.9.0"',
'influxdb',
'mysqlclient',
'"openstacksdk<0.28.0"',
'os-client-config==1.29.0',
'pbr==4.0.0',
'pymongo',
'"python-cinderclient<5.0.0"',
'"python-glanceclient<2.17.0"',
'"python-keystoneclient<3.20.0"',
'"python-novaclient<14.0.0"',
'python-openstackclient==3.14.0',
'pytz',
'pyudev',
Expand Down
1 change: 1 addition & 0 deletions docker/manila/manila-api/extend_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ if [[ "$(whoami)" == 'root' ]]; then
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
# Loading Apache2 ENV variables
. /etc/apache2/envvars
install -d /var/run/apache2/
rm -rf /var/run/apache2/*
else
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
Expand Down
1 change: 1 addition & 0 deletions docker/manila/manila-share/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% set manila_share_packages = [
'manila-share',
'ceph-common',
'python3-cephfs',
'python3-rados',
'python3-rbd',
'sqlite3'
Expand Down
4 changes: 4 additions & 0 deletions docker/mariadb/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
] %}
{% if base_distro == 'debian' %}
{% set mariadb_packages = mariadb_packages + [
'mariadb-backup',
'mariadb-server'
] %}
{% else %}
Expand All @@ -52,6 +53,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
Expand Down
48 changes: 48 additions & 0 deletions docker/mariadb/backup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/env bash

set -eu
set -o pipefail

# Execute a full backup
backup_full() {
echo "Taking a full backup"
mariabackup \
--defaults-file=/etc/mysql/my.cnf \
--backup \
--stream=xbstream \
--history=$(date +%d-%m-%Y) | gzip > \
$BACKUP_DIR/mysqlbackup-$(date +%d-%m-%Y-%s).qp.xbc.xbs.gz
}

# Execute an incremental backup
backup_incremental() {
echo "Taking an incremental backup"
mariabackup \
--defaults-file=/etc/mysql/my.cnf \
--backup \
--stream=xbstream \
--incremental-history-name=$(date +%d-%m-%Y) \
--history=$(date +%d-%m-%Y) | gzip > \
$BACKUP_DIR/incremental-$(date +%H)-mysqlbackup-$(date +%d-%m-%Y-%s).qp.xbc.xbs.gz
}

BACKUP_DIR=/backup/
cd $BACKUP_DIR

if [ -n $BACKUP_TYPE ]; then
case $BACKUP_TYPE in
"full")
backup_full
;;
"incremental")
backup_incremental
;;
*)
echo "Only full or incremental options are supported."
exit 1
;;
esac
else
echo "You need to specify either full or incremental backup options."
exit 1
fi
1 change: 1 addition & 0 deletions docker/mistral/mistral-api/extend_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ if [[ "$(whoami)" == 'root' ]]; then
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
# Loading Apache2 ENV variables
. /etc/apache2/envvars
install -d /var/run/apache2/
rm -rf /var/run/apache2/*
else
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
Expand Down
Loading