Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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: 0 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ Kolla provides images to deploy the following OpenStack projects:
- Skyline (`APIServer <https://docs.openstack.org/skyline-apiserver/latest/>`__ and `Console <https://docs.openstack.org/skyline-console/latest/>`__)
- `Tacker <https://docs.openstack.org/tacker/latest/>`__
- `Trove <https://docs.openstack.org/trove/latest/>`__
- `Venus <https://docs.openstack.org/venus/latest/>`__
- `Watcher <https://docs.openstack.org/watcher/latest/>`__
- `Zun <https://docs.openstack.org/zun/latest/>`__

Expand Down
2 changes: 1 addition & 1 deletion docker/bifrost/bifrost-base/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ RUN apt-get --error-on=any update && \
{%- else %}
RUN echo " " && \
{%- endif %}
bash -c '$VENV/bin/pip install "ansible>=11,<12" && \
bash -c '$VENV/bin/pip install "ansible>=12,<13" && \
$VENV/bin/ansible-galaxy collection install -r /bifrost/ansible-collections-requirements.yml && \
$VENV/bin/ansible-playbook -vvvv -i /bifrost/playbooks/inventory/target \
/bifrost/playbooks/install.yaml \
Expand Down
1 change: 0 additions & 1 deletion docker/horizon/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ COPY extend_start.sh /usr/local/bin/kolla_extend_start
# know to which path symlink should point to.
# NOTE(mnasiadka): pinning setuptools due to https://bugs.launchpad.net/horizon/+bug/2007574
RUN ln -s horizon-source/* horizon \
&& {{ macros.install_pip(['setuptools==67.2.*']) }} \
&& {{ macros.upper_constraints_remove("horizon") }} \
&& {{ macros.install_pip(horizon_pip_packages | customizable("pip_packages")) }} \
&& mkdir -p /etc/openstack-dashboard \
Expand Down
9 changes: 0 additions & 9 deletions docker/horizon/extend_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,6 @@ function config_trove_dashboard {
done
}

function config_venus_dashboard {
for file in ${SITE_PACKAGES}/venus_dashboard/enabled/_*[^__].py; do
config_dashboard "${ENABLE_VENUS:-no}" \
"${SITE_PACKAGES}/venus_dashboard/enabled/${file##*/}" \
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}"
done
}

function config_watcher_dashboard {
for file in ${SITE_PACKAGES}/watcher_dashboard/local/enabled/_*[^__].py; do
config_dashboard "${ENABLE_WATCHER:-no}" \
Expand Down Expand Up @@ -236,7 +228,6 @@ config_neutron_vpnaas_dashboard
config_octavia_dashboard
config_tacker_dashboard
config_trove_dashboard
config_venus_dashboard
config_watcher_dashboard
config_zun_dashboard

Expand Down
2 changes: 1 addition & 1 deletion docker/kolla-toolbox/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ RUN mkdir -p /requirements \
ENV PATH {{ venv_path }}/bin:$PATH

{% set kolla_toolbox_pip_packages = [
'ansible-core==2.18.*',
'ansible-core==2.19.*',
'cmd2',
'influxdb',
'openstacksdk',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM {{ namespace }}/{{ image_prefix }}mariadb-base:{{ tag }}
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}
Expand All @@ -18,6 +18,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build

{% set mariadb_packages = [
'expect',
'mariadb',
'mariadb-backup',
'mariadb-server',
'mariadb-server-galera',
Expand All @@ -34,12 +35,19 @@ RUN ln -s /usr/lib64/galera-4 /usr/lib64/galera
{% set mariadb_packages = [
'expect',
'mariadb-backup',
'mariadb-client',
'mariadb-server'
] %}
{% endif %}

{{ macros.install_packages(mariadb_packages | customizable("packages")) }}

{% block mariadb_healthcheck %}
ENV MARIADB_VERSION=11.4
ADD plugins-archive /
RUN install -m 755 /plugins/mariadb-server-plugin-mariadb-docker-archive*/$MARIADB_VERSION/healthcheck.sh /usr/bin/healthcheck.sh
{% endblock %}

COPY mariadb_sudoers /etc/sudoers.d/kolla_mariadb_sudoers
COPY extend_start.sh /usr/local/bin/kolla_extend_start
COPY security_reset.expect /usr/local/bin/kolla_security_reset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ DEFAULT_MY_CNF="/etc/mysql/my.cnf"
REPLICA_MY_CNF="$(mktemp)"
RETRY_INTERVAL=5 # Interval between retries (in seconds)
MAX_RETRIES=12 # Max retries (12 retries * 5 seconds = 60 seconds)
VERIFY_DB_SERVER_CERT="${VERIFY_DB_SERVER_CERT:=FALSE}"

# Cleanup function to remove the REPLICA_MY_CNF file
cleanup() {
Expand Down Expand Up @@ -74,7 +75,7 @@ retry_mysql_query() {
local attempt=1

while [ ${attempt} -le ${MAX_RETRIES} ]; do
result=$(mysql -h "${HOST}" -u "${USER}" -p"${PASS}" -s -N -e "${query}" 2>/dev/null || true)
result=$(mariadb --ssl-verify-server-cert="${VERIFY_DB_SERVER_CERT}" -h "${HOST}" -u "${USER}" -p"${PASS}" -s -N -e "${query}" 2>/dev/null || true)
if [ -n "${result}" ]; then
echo "${result}"
return 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
: ${MARIADB_LOG_DIR:=/var/log/kolla/mariadb}

function bootstrap_db {
mysqld_safe --wsrep-new-cluster --skip-networking --wsrep-on=OFF --pid-file=/var/lib/mysql/mariadb.pid &
mariadbd-safe --wsrep-new-cluster --skip-networking --wsrep-on=OFF --pid-file=/var/lib/mysql/mariadb.pid &
# Wait for the mariadb server to be "Ready" before starting the security reset with a max timeout
# NOTE(huikang): the location of mysql's socket file varies depending on the OS distributions.
# Querying the cluster status has to be executed after the existence of mysql.sock and mariadb.pid.
Expand All @@ -22,9 +22,9 @@ function bootstrap_db {
sudo -E kolla_security_reset

set +o xtrace
mysql -u root --password="${DB_ROOT_PASSWORD}" -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '${DB_ROOT_PASSWORD}' WITH GRANT OPTION;"
mysql -u root --password="${DB_ROOT_PASSWORD}" -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '${DB_ROOT_PASSWORD}' WITH GRANT OPTION;"
mysqladmin -uroot -p"${DB_ROOT_PASSWORD}" shutdown
mariadb -u root --password="${DB_ROOT_PASSWORD}" -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '${DB_ROOT_PASSWORD}' WITH GRANT OPTION;"
mariadb -u root --password="${DB_ROOT_PASSWORD}" -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '${DB_ROOT_PASSWORD}' WITH GRANT OPTION;"
mariadb-admin -uroot -p"${DB_ROOT_PASSWORD}" shutdown
set -o xtrace
}

Expand All @@ -38,21 +38,21 @@ fi

# This catches all cases of the BOOTSTRAP variable being set, including empty
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
mysql_install_db 2>&1 | tee -a ${MARIADB_LOG_DIR}/mariadb-bootstrap.log
mariadb-install-db 2>&1 | tee -a ${MARIADB_LOG_DIR}/mariadb-bootstrap.log
bootstrap_db 2>&1 | tee -a ${MARIADB_LOG_DIR}/mariadb-bootstrap.log
exit 0
fi

# This catches all cases of the KOLLA_UPGRADE variable being set, including empty
if [[ "${!KOLLA_UPGRADE[@]}" ]]; then
# The mysql_upgrade command treats any directories under /var/lib/mysql as
# The mariadb-upgrade command treats any directories under /var/lib/mysql as
# databases. Somehow we can end up with a .pki directory, which causes the
# command to fail with this error:
# Incorrect database name '#mysql50#.pki' when selecting the database
# There doesn't seem to be anything in the directory, so remove it.
rm -rf /var/lib/mysql/.pki

mysql_upgrade --host=${DB_HOST} --port=${DB_PORT} --user=root --password="${DB_ROOT_PASSWORD}" 2>&1 | tee -a ${MARIADB_LOG_DIR}/mariadb-upgrade.log
mariadb-upgrade --host=${DB_HOST} --port=${DB_PORT} --user=root --password="${DB_ROOT_PASSWORD}" 2>&1 | tee -a ${MARIADB_LOG_DIR}/mariadb-upgrade.log
exit 0
fi

Expand Down
44 changes: 0 additions & 44 deletions docker/mariadb/mariadb-base/Dockerfile.j2

This file was deleted.

19 changes: 0 additions & 19 deletions docker/mariadb/mariadb-clustercheck/Dockerfile.j2

This file was deleted.

11 changes: 0 additions & 11 deletions docker/mariadb/mariadb-clustercheck/extend_start.sh

This file was deleted.

19 changes: 0 additions & 19 deletions docker/mariadb/mariadb-clustercheck/socat_wrapper.sh

This file was deleted.

21 changes: 0 additions & 21 deletions docker/neutron/neutron-linuxbridge-agent/Dockerfile.j2

This file was deleted.

2 changes: 2 additions & 0 deletions docker/neutron/neutron-metadata-agent/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build

{{ macros.kolla_patch_sources() }}

COPY extend_start.sh /usr/local/bin/kolla_extend_start

{% block neutron_metadata_agent_footer %}{% endblock %}
{% block footer %}{% endblock %}

Expand Down
18 changes: 18 additions & 0 deletions docker/neutron/neutron-metadata-agent/extend_start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

if [[ ! -d "/var/log/kolla/neutron" ]]; then
mkdir -p /var/log/kolla/neutron
fi
if [[ $(stat -c %a /var/log/kolla/neutron) != "755" ]]; then
chmod 755 /var/log/kolla/neutron
fi

if [[ "${KOLLA_NEUTRON_WRAPPERS:-false}" == "true" ]]; then
echo "Copying neutron agent wrappers to /usr/local/bin"
sudo -E /usr/local/lib/neutron-wrappers/copy-wrappers
else
echo "Removing neutron agent wrappers from /usr/local/bin"
sudo -E /usr/local/lib/neutron-wrappers/delete-wrappers
fi

. /usr/local/bin/kolla_neutron_extend_start
17 changes: 17 additions & 0 deletions docker/valkey/valkey-base/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}

{% block valkey_base_header %}{% endblock %}

{% import "macros.j2" as macros with context %}

{{ macros.configure_user(name='valkey', homedir='/run/valkey') }}

COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 644 /usr/local/bin/kolla_extend_start

{{ macros.kolla_patch_sources() }}

{% block valkey_base_footer %}{% endblock %}
9 changes: 9 additions & 0 deletions docker/valkey/valkey-base/extend_start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

if [[ ! -d "/var/log/kolla/valkey" ]]; then
mkdir -p /var/log/kolla/valkey
fi

if [[ $(stat -c %a /var/log/kolla/valkey) != "755" ]]; then
chmod 755 /var/log/kolla/valkey
fi
26 changes: 26 additions & 0 deletions docker/valkey/valkey-sentinel/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM {{ namespace }}/{{ image_prefix }}valkey-base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}

{% block valkey_sentinel_header %}{% endblock %}

{% import "macros.j2" as macros with context %}

{% if base_package_type == 'rpm' %}
{{ macros.enable_extra_repos(['epel']) }}
{% set valkey_sentinel_packages = ['valkey'] %}
{% elif base_package_type == 'deb' %}
{% set valkey_sentinel_packages = ['valkey-sentinel'] %}
{% endif %}
{{ macros.install_packages(valkey_sentinel_packages | customizable("packages")) }}

COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 644 /usr/local/bin/kolla_extend_start

{{ macros.kolla_patch_sources() }}

{% block valkey_sentinel_footer %}{% endblock %}
{% block footer %}{% endblock %}

USER valkey
32 changes: 32 additions & 0 deletions docker/valkey/valkey-sentinel/extend_start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

if [[ ! -d "/var/log/kolla/valkey" ]]; then
mkdir -p /var/log/kolla/valkey
fi

if [[ $(stat -c %a /var/log/kolla/valkey) != "755" ]]; then
chmod 755 /var/log/kolla/valkey
fi

# The CONFIG REWRITE command rewrites the valkey.conf
# file the server was started with, applying the minimal
# changes needed to make it reflect the configuration
# currently used by the server, which may be different
# compared to the original one because of the use of
# the CONFIG SET command.
#
# https://valkey.io/commands/config-rewrite/
#
# Because of above behaviour it's needed to
# hack kolla's CMD.
#
# Without this hack
# /usr/local/bin/kolla_set_configs --check
# is always reporting changed.
#
# Therefore valkey-sentinel is always restarted
# even if configuration is not changed from
# kolla-ansible side.
if [ ! -z "${VALKEY_CONF}" ] && [ ! -z ${VALKEY_GEN_CONF} ]; then
cp ${VALKEY_CONF} ${VALKEY_GEN_CONF}
fi
Loading