Browse Source

Rework rally-install-* jobs

* use python3
* do not use install_rally.sh script
* check centos-8
* remove postgres packages brom bindep

Change-Id: I00abce40d333352b25848cfe941f845746bffa8c
changes/39/696539/16
Andrey Kurilin 1 week ago
parent
commit
000052f67a
5 changed files with 92 additions and 40 deletions
  1. +15
    -8
      .zuul.d/zuul.yaml
  2. +1
    -4
      bindep.txt
  3. +3
    -1
      tests/ci/playbooks/rally-database-migration/run.yaml
  4. +53
    -0
      tests/ci/playbooks/rally-install/pre.yaml
  5. +20
    -27
      tests/ci/playbooks/rally-install/run.yaml

+ 15
- 8
.zuul.d/zuul.yaml View File

@@ -1,23 +1,29 @@
- job:
name: rally-install-ubuntu-xenial
name: rally-install-base
parent: base
nodeset: ubuntu-xenial
pre-run: tests/ci/playbooks/rally-install/pre.yaml
run: tests/ci/playbooks/rally-install/run.yaml
timeout: 1800

- job:
name: rally-install-ubuntu-xenial
parent: rally-install-base
nodeset: ubuntu-xenial

- job:
name: rally-install-ubuntu-bionic
parent: base
parent: rally-install-base
nodeset: ubuntu-bionic
run: tests/ci/playbooks/rally-install/run.yaml
timeout: 1800

- job:
name: rally-install-centos-7
parent: base
parent: rally-install-base
nodeset: centos-7
run: tests/ci/playbooks/rally-install/run.yaml
timeout: 1800

- job:
name: rally-install-centos-8
parent: rally-install-base
nodeset: centos-8

- job:
name: rally-database-migration
@@ -43,6 +49,7 @@
- rally-install-ubuntu-xenial
- rally-install-ubuntu-bionic
- rally-install-centos-7
- rally-install-centos-8
- rally-tox-self
gate:
jobs:

+ 1
- 4
bindep.txt View File

@@ -7,17 +7,14 @@ gmp-devel [platform:rpm]
libffi-dev [platform:dpkg]
libffi-devel [platform:rpm !platform:opensuse]
libffi48-devel [platform:opensuse]
libpq-dev [platform:dpkg]
libssl-dev [platform:dpkg]
libxml2-dev [platform:dpkg]
libxml2-devel [platform:rpm]
libxslt1-dev [platform:dpkg]
libxslt-devel [platform:rpm]
openssl-devel [platform:rpm]
postgresql-devel [platform:rpm !platform:opensuse]
postgresql93-devel [platform:opensuse]
python-dev [platform:dpkg]
python-devel [platform:rpm]
python3-devel [platform:rpm]
redhat-rpm-config [platform:rpm !platform:suse]
iputils-ping [platform:dpkg]
iputils [platform:rpm]

+ 3
- 1
tests/ci/playbooks/rally-database-migration/run.yaml View File

@@ -61,7 +61,9 @@
echo "Update to the master branch"
git checkout master
sudo pip uninstall rally --yes
sudo pip install --constraint ./upper-constraints.txt ./
# NOTE(andreykurilin): Starting from Rally 3.0.0 there is no
# Python2.7 support
sudo pip3 install --constraint ./upper-constraints.txt ./
rally --version

rally db upgrade

+ 53
- 0
tests/ci/playbooks/rally-install/pre.yaml View File

@@ -0,0 +1,53 @@
- hosts: all
name: Prepare host to install Rally
tasks:
- name: Check whether apt is available
shell:
cmd: "apt-get --version"
executable: /bin/sh
register: apt_get_installed
ignore_errors: True

- name: Check whether dnf is available
shell:
cmd: "dnf --version"
executable: /bin/sh
register: dnf_installed
ignore_errors: True

- name: Check whether yum is available
shell:
cmd: "yum --version"
executable: /bin/sh
register: yum_installed
ignore_errors: True

- name: Install required packages (Centos-7)
when: yum_installed.rc == 0
shell:
cmd: |
sudo yum remove -y python-crypto || true

sudo yum update
sudo yum install -y yum-utils
sudo yum groupinstall -y development

sudo yum install -y https://centos7.iuscommunity.org/ius-release.rpm
sudo yum install -y python36u python36u-devel

curl https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py
sudo python3 /tmp/get-pip.py

- name: Install required packages (Ubuntu)
when: apt_get_installed.rc == 0
shell:
chdir: '{{ zuul.project.src_dir }}'
cmd: |
# NOTE(pabelanger): We run apt-get update to ensure we dont have a stale
# package cache in the gate.
sudo apt-get update

- name: Install bindep
shell:
cmd: |
sudo pip3 install bindep

+ 20
- 27
tests/ci/playbooks/rally-install/run.yaml View File

@@ -1,34 +1,27 @@
- hosts: all
name: a run script for rally-install-ubuntu-xenial and rally-install-centos-7 jobs
name: a run script for rally-install-* jobs
tasks:

- shell:
- name: Get list of packages to install from bindep
command: "bindep -b -f {{ zuul.project.src_dir }}/bindep.txt"
register: bindep_output
ignore_errors: True

- name: Install distro packages from bindep
package:
name: "{{ bindep_output.stdout_lines }}"
state: present
become: yes
when: bindep_output.stdout_lines

- name: Install Rally and check
shell:
cmd: |
sudo yum remove -y python-crypto || true

# NOTE(pabelanger): We run apt-get update to ensure we dont have a stale
# package cache in the gate.
sudo apt-get update || true

sudo ./install_rally.sh --system --yes

rally deployment list
[ -d /etc/bash_completion.d ] && cat /etc/bash_completion.d/rally.bash_completion || true

sudo ./install_rally.sh --system --yes
rally deployment list

sudo ./install_rally.sh --yes -d /tmp/rallytest_root/
/tmp/rallytest_root/bin/rally deployment list
cat /tmp/rallytest_root/etc/bash_completion.d/rally.bash_completion

sudo rm -fr ~/.rally

./install_rally.sh --yes -d /tmp/rallytest_user
/tmp/rallytest_user/bin/rally deployment list

./install_rally.sh --overwrite --dbtype sqlite
# install system wide
sudo pip3 install --constraint ./upper-constraints.txt ./

rally --version
rally db create
rally env list

executable: /bin/sh
chdir: '{{ zuul.project.src_dir }}'

Loading…
Cancel
Save