diff options
| author | Michal Nasiadka <mnasiadka@gmail.com> | 2026-10-14 17:41:13 +0200 |
|---|---|---|
| committer | Bartosz Bezak <bartosz@stackhpc.com> | 2026-10-15 11:24:47 +0200 |
| commit | f738a5e56be543fc5be1bfc4e256544db03fc682 (patch) | |
| tree | 32c9bfed6ff8df699b6ced11aa464c37156a12a7 /kolla | |
| parent | ba859a3f0c6c279c502629829d2a395f0ac5b793 (diff) | |
| download | kolla-f738a5e56be543fc5be1bfc4e256544db03fc682.tar.gz kolla-f738a5e56be543fc5be1bfc4e256544db03fc682.zip | |
keystone: Remove keystone container
We completed the keystone-api migration in Ib7ef5526e087429dfeb5a3211e19efda4776b52c
Change-Id: I6dc81171470a9c7fc6385a9d6867b7d4a584dc8e
Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
Signed-off-by: Bartosz Bezak <bartosz@stackhpc.com>
Diffstat (limited to 'kolla')
| -rw-r--r-- | kolla/docker/keystone/keystone/Dockerfile.j2 | 48 | ||||
| -rw-r--r-- | kolla/docker/keystone/keystone/extend_start.sh | 28 | ||||
| -rw-r--r-- | kolla/docker/keystone/keystone/keystone_bootstrap.sh | 66 |
3 files changed, 0 insertions, 142 deletions
diff --git a/kolla/docker/keystone/keystone/Dockerfile.j2 b/kolla/docker/keystone/keystone/Dockerfile.j2 deleted file mode 100644 index df2003f10..000000000 --- a/kolla/docker/keystone/keystone/Dockerfile.j2 +++ /dev/null @@ -1,48 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}keystone-base:{{ tag }} -{% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" -{% endblock %} - -{% block keystone_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{{ macros.kolla_enable_base_repos() }} - -{% if base_package_type == 'rpm' %} - {% set keystone_packages = [ - 'krb5-devel', - ] %} -{% elif base_package_type == 'deb' %} - {% set keystone_packages = [ - 'libkrb5-dev', - ] %} -{% endif %} -{{ macros.install_packages(keystone_packages | customizable("packages")) }} - -{% set keystone_pip_packages = [ - 'requests-kerberos', -] %} - -RUN {{ macros.install_pip(keystone_pip_packages | customizable("pip_packages")) }} - -ADD plugins-archive / - -{% set keystone_plugins_pip_packages = [ - '/plugins/*', -] %} - -COPY keystone_bootstrap.sh /usr/local/bin/kolla_keystone_bootstrap -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -RUN chmod 644 /usr/local/bin/kolla_extend_start \ - && chmod 755 /usr/local/bin/kolla_keystone_bootstrap \ - && if [ "$(ls /plugins)" ]; then \ - {{ macros.install_pip(keystone_plugins_pip_packages) }}; \ - fi - -{{ macros.kolla_patch_sources() }} - -{% block keystone_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ macros.kolla_cleanup_repos() }} diff --git a/kolla/docker/keystone/keystone/extend_start.sh b/kolla/docker/keystone/keystone/extend_start.sh deleted file mode 100644 index 0011c72fd..000000000 --- a/kolla/docker/keystone/keystone/extend_start.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -EXTRA_KEYSTONE_MANAGE_ARGS=${EXTRA_KEYSTONE_MANAGE_ARGS-} -# Upgrade and exit if KOLLA_UPGRADE variable is set. This catches all cases -# of the KOLLA_UPGRADE variable being set, including empty. -if [[ "${!KOLLA_UPGRADE[@]}" ]]; then - # TODO(duonghq): check doctor result here - # TODO: find reason why doctor failed in gate - # sudo -H -u keystone keystone-manage doctor - sudo -H -u keystone keystone-manage ${EXTRA_KEYSTONE_MANAGE_ARGS} db_sync --expand - sudo -H -u keystone keystone-manage ${EXTRA_KEYSTONE_MANAGE_ARGS} db_sync --migrate - exit 0 -fi - -# Contract database and exit if KOLLA_FINISH_UPGRADE variable is set. -# This catches all cases of the KOLLA_FINISH_UPGRADE variable being set, -# including empty. -if [[ "${!KOLLA_FINISH_UPGRADE[@]}" ]]; then - sudo -H -u keystone keystone-manage ${EXTRA_KEYSTONE_MANAGE_ARGS} db_sync --contract - exit 0 -fi - -# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases -# of the KOLLA_BOOTSTRAP variable being set, including empty. -if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - sudo -H -u keystone keystone-manage ${EXTRA_KEYSTONE_MANAGE_ARGS} db_sync - exit 0 -fi diff --git a/kolla/docker/keystone/keystone/keystone_bootstrap.sh b/kolla/docker/keystone/keystone/keystone_bootstrap.sh deleted file mode 100644 index 1b04d99b6..000000000 --- a/kolla/docker/keystone/keystone/keystone_bootstrap.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/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 -# and if anything changed. - -USERNAME=$1 -PASSWORD=$2 -if [ -z "$PASSWORD" ]; then - # Avoid having the password always come in via CLI (which makes - # it show up in things like ara) - PASSWORD="$OS_BOOTSTRAP_PASSWORD" -fi -PROJECT=$3 -ROLE=$4 -if [ $# -ge 8 ]; then - # ignored ADMIN_URL compat mode - # ADMIN_URL=$5 - INTERNAL_URL=$6 - PUBLIC_URL=$7 - REGION=$8 -else - # no ADMIN_URL modern mode - INTERNAL_URL=$5 - PUBLIC_URL=$6 - REGION=$7 -fi - -function fail_json { - echo '{"failed": true, "msg": "'$1'", "changed": true}' - exit 1 -} - -function exit_json { - echo '{"failed": false, "changed": '"${changed}"'}' -} - -changed="false" -# 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-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 - -changed=$(echo "${keystone_bootstrap}" | awk ' - /Domain default already exists, skipping creation./ || - /Project '"${PROJECT}"' already exists, skipping creation./ || - /User '"${USERNAME}"' already exists, skipping creation./ || - /Role '"${ROLE}"' exists, skipping creation./ || - /User '"${USERNAME}"' already has '"${ROLE}"' on '"${PROJECT}"'./ || - /Region '"${REGION}"' exists, skipping creation./ || - /Skipping internal endpoint as already created/ || - /Skipping public endpoint as already created/ {count++} - END { - if (count == 9) changed="false"; else changed="true" - print changed - }' -) - -exit_json |
