Skip to content

Commit

Permalink
Merge pull request #177 from kopecmartin/rally
Browse files Browse the repository at this point in the history
Init openstack-rally image
  • Loading branch information
openshift-merge-bot[bot] authored Jun 24, 2024
2 parents 26ea7ba + f5031d7 commit 68015b5
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 0 deletions.
1 change: 1 addition & 0 deletions container-images/kolla/base/uid_gid_manage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
21 changes: 21 additions & 0 deletions container-images/tcib/base/os/rally/rally.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions container-images/tcib/base/os/rally/rally_sudoers
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rally ALL=(ALL) NOPASSWD: ALL
31 changes: 31 additions & 0 deletions container-images/tcib/base/os/rally/run_rally.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 68015b5

Please sign in to comment.