Merge "Update Docker image"
This commit is contained in:
commit
6302212b42
@ -6,7 +6,7 @@
|
||||
- rally-tox-py36
|
||||
- rally-tox-py37
|
||||
- rally-dsvm-tox-functional
|
||||
#- rally-docker-check
|
||||
- rally-docker-check
|
||||
- rally-task-basic-with-existing-users:
|
||||
# use_existing_users key did not trigger proper ansible tasks
|
||||
voting: false
|
||||
@ -65,7 +65,7 @@
|
||||
- rally-tox-py36
|
||||
- rally-tox-py37
|
||||
- rally-dsvm-tox-functional
|
||||
#- rally-docker-check
|
||||
- rally-docker-check
|
||||
- rally-task-simple-job
|
||||
- rally-task-cinder
|
||||
#- rally-task-heat
|
||||
|
@ -16,6 +16,17 @@ Changelog
|
||||
.. Release notes for existing releases are MUTABLE! If there is something that
|
||||
was missed or can be improved, feel free to change it!
|
||||
|
||||
[unreleased]
|
||||
------------
|
||||
|
||||
Changed
|
||||
~~~~~~~
|
||||
|
||||
* `docker image <https://hub.docker.com/r/xrally/xrally-openstack>`_ is
|
||||
switched to use `docker image <https://hub.docker.com/r/xrally/xrally>`_ as
|
||||
a base user that brings use python 3.6 and ubuntu bionic.
|
||||
|
||||
|
||||
[1.7.0] - 2020-12-25
|
||||
--------------------
|
||||
|
||||
|
42
Dockerfile
42
Dockerfile
@ -1,36 +1,14 @@
|
||||
FROM ubuntu:16.04
|
||||
FROM xrally/xrally:3.0.0
|
||||
|
||||
RUN sed -i s/^deb-src.*// /etc/apt/sources.list
|
||||
# "rally" user (which is selected by-default) is owner of "/rally" directory,
|
||||
# so there is no need to call chown or switch the user
|
||||
COPY . /rally/xrally_opentstack
|
||||
WORKDIR /rally/xrally_opentstack
|
||||
|
||||
RUN apt-get update && apt-get install --yes sudo python python-pip vim git-core && \
|
||||
pip install --upgrade pip && \
|
||||
useradd -u 65500 -m rally && \
|
||||
usermod -aG sudo rally && \
|
||||
echo "rally ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/00-rally-user
|
||||
|
||||
COPY . /home/rally/source
|
||||
COPY etc/motd /etc/motd
|
||||
WORKDIR /home/rally/source
|
||||
|
||||
# ensure that we have all system packages installed
|
||||
RUN pip install bindep && apt-get install --yes $(bindep -b | tr '\n' ' ')
|
||||
|
||||
RUN pip install . --constraint upper-constraints.txt && \
|
||||
pip install pymysql && \
|
||||
pip install psycopg2 && \
|
||||
mkdir /etc/rally && \
|
||||
echo "[database]" > /etc/rally/rally.conf && \
|
||||
echo "connection=sqlite:////home/rally/data/rally.db" >> /etc/rally/rally.conf
|
||||
RUN echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd' >> /etc/bash.bashrc
|
||||
# Cleanup pip
|
||||
RUN rm -rf /root/.cache/
|
||||
# to install package system-wide, we need to temporary switch to root user
|
||||
USER root
|
||||
# disabling cache since we do not expect to install other packages
|
||||
RUN pip3 install -U setuptools --no-cache-dir && pip3 install . --no-cache-dir
|
||||
|
||||
# switch back to rally user for avoid permission conflicts
|
||||
USER rally
|
||||
ENV HOME /home/rally
|
||||
RUN mkdir -p /home/rally/data && rally db recreate
|
||||
|
||||
# Docker volumes have specific behavior that allows this construction to work.
|
||||
# Data generated during the image creation is copied to volume only when it's
|
||||
# attached for the first time (volume initialization)
|
||||
VOLUME ["/home/rally/data"]
|
||||
ENTRYPOINT ["rally"]
|
||||
|
@ -1,108 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Standalone _filedir() alternative.
|
||||
# This exempts from dependence of bash completion routines
|
||||
function _rally_filedir()
|
||||
{
|
||||
test "${1}" \
|
||||
&& COMPREPLY=( \
|
||||
$(compgen -f -- "${cur}" | grep -E "${1}") \
|
||||
$(compgen -o plusdirs -- "${cur}") ) \
|
||||
|| COMPREPLY=( \
|
||||
$(compgen -o plusdirs -f -- "${cur}") \
|
||||
$(compgen -d -- "${cur}") )
|
||||
}
|
||||
|
||||
_rally()
|
||||
{
|
||||
declare -A SUBCOMMANDS
|
||||
declare -A OPTS
|
||||
|
||||
OPTS["db_create"]=""
|
||||
OPTS["db_ensure"]=""
|
||||
OPTS["db_recreate"]=""
|
||||
OPTS["db_revision"]=""
|
||||
OPTS["db_show"]="--creds"
|
||||
OPTS["db_upgrade"]=""
|
||||
OPTS["deployment_check"]="--deployment"
|
||||
OPTS["deployment_config"]="--deployment"
|
||||
OPTS["deployment_create"]="--name --fromenv --filename --no-use"
|
||||
OPTS["deployment_destroy"]="--deployment"
|
||||
OPTS["deployment_list"]=""
|
||||
OPTS["deployment_recreate"]="--filename --deployment"
|
||||
OPTS["deployment_show"]="--deployment"
|
||||
OPTS["deployment_use"]="--deployment"
|
||||
OPTS["env_check"]="--env --json --detailed"
|
||||
OPTS["env_create"]="--name --description --extras --spec --json --no-use"
|
||||
OPTS["env_delete"]="--env --force"
|
||||
OPTS["env_destroy"]="--env --skip-cleanup --json --detailed"
|
||||
OPTS["env_info"]="--env --json"
|
||||
OPTS["env_list"]="--json"
|
||||
OPTS["env_show"]="--env --json"
|
||||
OPTS["env_use"]="--env --json"
|
||||
OPTS["plugin_list"]="--name --platform --plugin-base"
|
||||
OPTS["plugin_show"]="--name --platform"
|
||||
OPTS["task_abort"]="--uuid --soft"
|
||||
OPTS["task_delete"]="--force --uuid"
|
||||
OPTS["task_detailed"]="--uuid --iterations-data"
|
||||
OPTS["task_export"]="--uuid --type --to"
|
||||
OPTS["task_import"]="--file --deployment --tag"
|
||||
OPTS["task_list"]="--deployment --all-deployments --status --tag --uuids-only"
|
||||
OPTS["task_report"]="--out --open --html --html-static --json --uuid"
|
||||
OPTS["task_results"]="--uuid"
|
||||
OPTS["task_sla-check"]="--uuid --json"
|
||||
OPTS["task_sla_check"]="--uuid --json"
|
||||
OPTS["task_start"]="--deployment --task --task-args --task-args-file --tag --no-use --abort-on-sla-failure"
|
||||
OPTS["task_status"]="--uuid"
|
||||
OPTS["task_trends"]="--out --open --tasks"
|
||||
OPTS["task_use"]="--uuid"
|
||||
OPTS["task_validate"]="--deployment --task --task-args --task-args-file"
|
||||
OPTS["verify_add-verifier-ext"]="--id --source --version --extra-settings"
|
||||
OPTS["verify_configure-verifier"]="--id --deployment-id --reconfigure --extend --override --show"
|
||||
OPTS["verify_create-verifier"]="--name --type --platform --source --version --system-wide --extra-settings --no-use"
|
||||
OPTS["verify_delete"]="--uuid"
|
||||
OPTS["verify_delete-verifier"]="--id --deployment-id --force"
|
||||
OPTS["verify_delete-verifier-ext"]="--id --name"
|
||||
OPTS["verify_import"]="--id --deployment-id --file --run-args --no-use"
|
||||
OPTS["verify_list"]="--id --deployment-id --tag --status"
|
||||
OPTS["verify_list-plugins"]="--platform"
|
||||
OPTS["verify_list-verifier-exts"]="--id"
|
||||
OPTS["verify_list-verifier-tests"]="--id --pattern"
|
||||
OPTS["verify_list-verifiers"]="--status"
|
||||
OPTS["verify_report"]="--uuid --type --to --open"
|
||||
OPTS["verify_rerun"]="--uuid --deployment-id --failed --tag --concurrency --detailed --no-use"
|
||||
OPTS["verify_show"]="--uuid --sort-by --detailed"
|
||||
OPTS["verify_show-verifier"]="--id"
|
||||
OPTS["verify_start"]="--id --deployment-id --tag --pattern --concurrency --load-list --skip-list --xfail-list --detailed --no-use"
|
||||
OPTS["verify_update-verifier"]="--id --update-venv --version --system-wide --no-system-wide"
|
||||
OPTS["verify_use"]="--uuid"
|
||||
OPTS["verify_use-verifier"]="--id"
|
||||
|
||||
for OPT in ${!OPTS[*]} ; do
|
||||
CMD=${OPT%%_*}
|
||||
CMDSUB=${OPT#*_}
|
||||
SUBCOMMANDS[${CMD}]+="${CMDSUB} "
|
||||
done
|
||||
|
||||
COMMANDS="${!SUBCOMMANDS[*]}"
|
||||
COMPREPLY=()
|
||||
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
local prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
|
||||
if [[ $cur =~ ^(\.|\~|\/) ]] || [[ $prev =~ ^--out(|put-file)$ ]] ; then
|
||||
_rally_filedir
|
||||
elif [[ $prev =~ ^--(task|filename)$ ]] ; then
|
||||
_rally_filedir "\.json|\.yaml|\.yml"
|
||||
elif [ $COMP_CWORD == "1" ] ; then
|
||||
COMPREPLY=($(compgen -W "$COMMANDS" -- ${cur}))
|
||||
elif [ $COMP_CWORD == "2" ] ; then
|
||||
COMPREPLY=($(compgen -W "${SUBCOMMANDS[${prev}]}" -- ${cur}))
|
||||
else
|
||||
COMMAND="${COMP_WORDS[1]}_${COMP_WORDS[2]}"
|
||||
COMPREPLY=($(compgen -W "${OPTS[$COMMAND]}" -- ${cur}))
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
complete -o filenames -F _rally rally
|
@ -41,12 +41,12 @@
|
||||
- name: Create an Environment
|
||||
become: True
|
||||
become_user: root
|
||||
command: docker run -v rally_volume:/home/rally/data xrally/xrally-openstack env create --name "special_env_name"
|
||||
command: docker run -v rally_volume:/home/rally/.rally xrally/xrally-openstack env create --name "special_env_name"
|
||||
|
||||
- name: List all available environments
|
||||
become: True
|
||||
become_user: root
|
||||
command: docker run -v rally_volume:/home/rally/data xrally/xrally-openstack env list
|
||||
command: docker run -v rally_volume:/home/rally/.rally xrally/xrally-openstack env list
|
||||
register: env_list
|
||||
|
||||
# Check availability of that environment (check that volume stores Rally database)
|
||||
@ -58,4 +58,4 @@
|
||||
become: True
|
||||
become_user: root
|
||||
# this plugin was added with rally-openstack 1.1.0
|
||||
command: docker run -v rally_volume:/home/rally/data xrally/xrally-openstack plugin show GnocchiMetric.list_metric
|
||||
command: docker run -v rally_volume:/home/rally/.rally xrally/xrally-openstack plugin show GnocchiMetric.list_metric
|
||||
|
Loading…
Reference in New Issue
Block a user