Skip to content

Commit

Permalink
Use official python docker images
Browse files Browse the repository at this point in the history
Change-Id: I27b1f108584892d64b78366d2bc39f616583af1e
  • Loading branch information
andreykurilin committed May 19, 2023
1 parent e65935a commit 177ad8b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .zuul.d/docker-jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
- job:
name: rally-docker-build
parent: build-docker-image
nodeset: ubuntu-focal
nodeset: ubuntu-jammy
run: tests/ci/playbooks/docker-build-and-check.yaml
post-run: tests/ci/playbooks/fetch-html-and-json-reports.yaml
timeout: 1800
Expand All @@ -37,7 +37,7 @@
- job:
name: rally-docker-build-and-push
parent: build-docker-image
nodeset: ubuntu-focal
nodeset: ubuntu-jammy
run: tests/ci/playbooks/docker-build-check-and-push.yaml
post-run: tests/ci/playbooks/fetch-html-and-json-reports.yaml
timeout: 1800
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ Fixed

`Launchpad-bug #1956956 <https://launchpad.net/bugs/1956956>`_

Changed
~~~~~~~

`xrally/xrally docker image <https://hub.docker.com/r/xrally/xrally>`_ switched
to use python3.9-slim as a base image instead of ubuntu 20.04.

Added
~~~~~

Expand Down
4 changes: 2 additions & 2 deletions DOCKER_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ them in complex tests scenarios that allows to perform all kinds of testing!

# The purpose of xrally image or how to use it

**xrally** image bases on the latest LTS release of *ubuntu* which is 20.04 at
the moment. It provides raw xrally framework with only in-tree plugins (no
**xrally** image bases on the official python3.9-slim docker image.
It provides raw xrally framework with only in-tree plugins (no
pre-installed plugins for Kubernetes, OpenStack, etc).

You can use this image as a base image and extend it with installation of
Expand Down
12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM ubuntu:20.04
FROM python:3.9-slim

RUN sed -i s/^deb-src.*// /etc/apt/sources.list

RUN apt-get update && apt-get install --yes sudo python3-dev python3-pip vim git-core && \
RUN apt-get update && apt-get install --yes sudo vim git-core && \
apt clean && \
pip3 --no-cache-dir install --upgrade pip setuptools && \
python3 -m pip --no-cache-dir install --upgrade pip setuptools && \
useradd -u 65500 -m rally && \
usermod -aG sudo rally && \
echo "rally ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/00-rally-user && \
Expand All @@ -13,8 +11,8 @@ RUN apt-get update && apt-get install --yes sudo python3-dev python3-pip vim git
COPY ./ /rally/source
WORKDIR /rally/source

RUN pip3 install . --constraint upper-constraints.txt --no-cache-dir && \
pip3 install pymysql psycopg2-binary --no-cache-dir && \
RUN python3 -m pip install . --constraint upper-constraints.txt --no-cache-dir && \
python3 -m pip install pymysql psycopg2-binary --no-cache-dir && \
mkdir -p /etc/rally && \
echo "[database]" > /etc/rally/rally.conf && \
echo "connection=sqlite:////home/rally/.rally/rally.db" >> /etc/rally/rally.conf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
- name: "Check availability of {{ rally_plugin_name }} plugin"
shell: docker run {{ docker_image_tag }} plugin show {{ rally_plugin_name }}

- name: Execute the similar wokrloads as `tox -e self`
- name: Execute the similar workloads as `tox -e self`
shell:
cmd: >
python3 {{ rally_project_path }}/tests/ci/rally_self_job.py
Expand Down

0 comments on commit 177ad8b

Please sign in to comment.