diff --git a/container-images/kolla/base/uid_gid_manage.sh b/container-images/kolla/base/uid_gid_manage.sh index ad601aa..718336c 100755 --- a/container-images/kolla/base/uid_gid_manage.sh +++ b/container-images/kolla/base/uid_gid_manage.sh @@ -65,6 +65,7 @@ _SUPPORTED_USERS['ovn-bgp']='ovn-bgp 42486 42486 /var/lib/ovn-bgp kolla' _SUPPORTED_USERS['placement']='placement 42482 42482 /var/lib/placement kolla' _SUPPORTED_USERS['qemu']='qemu 107 107' _SUPPORTED_USERS['rabbitmq']='rabbitmq 42439 42439 /var/lib/rabbitmq kolla' +_SUPPORTED_USERS['rally']='rally 42440 42440 /var/lib/rally kolla' _SUPPORTED_USERS['swift']='swift 42445 42445 /var/lib/swift kolla' _SUPPORTED_USERS['tempest']='tempest 42480 42480 /var/lib/tempest kolla' _SUPPORTED_USERS['tobiko']='tobiko 42495 42495 /var/lib/tobiko kolla' diff --git a/container-images/tcib/base/os/rally/rally.yaml b/container-images/tcib/base/os/rally/rally.yaml new file mode 100644 index 0000000..c8ac67e --- /dev/null +++ b/container-images/tcib/base/os/rally/rally.yaml @@ -0,0 +1,21 @@ +tcib_envs: + USE_EXTERNAL_FILES: true +tcib_actions: +- run: bash /usr/local/bin/uid_gid_manage {{ tcib_user }} +- run: dnf -y install {{ tcib_packages['common'] | join(' ') }} && dnf clean all && rm -rf /var/cache/dnf +- run: cp /usr/share/tcib/container-images/tcib/base/os/rally/rally_sudoers /etc/sudoers.d/rally_sudoers +- run: chmod 440 /etc/sudoers.d/rally_sudoers +- run: mkdir -p /var/lib/rally/external_files +- run: mkdir -p /var/lib/kolla/config_files +- run: chown -R rally.rally /var/lib/rally +- run: touch /var/lib/kolla/config_files/config.json +- run: cp /usr/share/tcib/container-images/tcib/base/os/rally/run_rally.sh /var/lib/rally/run_rally.sh +- run: chmod +x /var/lib/rally/run_rally.sh + +tcib_entrypoint: /var/lib/rally/run_rally.sh + +tcib_packages: + common: + - openstack-rally + +tcib_user: rally diff --git a/container-images/tcib/base/os/rally/rally_sudoers b/container-images/tcib/base/os/rally/rally_sudoers new file mode 100644 index 0000000..a8608d3 --- /dev/null +++ b/container-images/tcib/base/os/rally/rally_sudoers @@ -0,0 +1 @@ +rally ALL=(ALL) NOPASSWD: ALL diff --git a/container-images/tcib/base/os/rally/run_rally.sh b/container-images/tcib/base/os/rally/run_rally.sh new file mode 100644 index 0000000..172e6ba --- /dev/null +++ b/container-images/tcib/base/os/rally/run_rally.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# run_rally.sh +# ============== +# +# This script is executed inside the rally containers defined in the tcib +# repository. The main purpose of this script is executing the rally command +# with correct arguments. The execution of the script can be influenced by +# setting values for environment variables which match the RALLY_* regex. +# +# +# RALLY_* environment variables +# ----------------------------- + +set -x + +HOMEDIR=/var/lib/rally +RALLY_PATH=$HOMEDIR/ +RALLY_DIR=$HOMEDIR/openshift + + +export OS_CLOUD=default + +if [ -e ${RALLY_PATH}clouds.yaml ]; then + mkdir -p $HOME/.config/openstack + cp ${RALLY_PATH}clouds.yaml $HOME/.config/openstack/clouds.yaml +fi + +# at this point, we have everything ready in the container for users to make it +# a sleepy container and jump to it so that they can run their rally commands + +# rally deployment check