Rework rally-install-* jobs

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

Change-Id: I00abce40d333352b25848cfe941f845746bffa8c
This commit is contained in:
Andrey Kurilin 2020-02-13 14:27:30 +02:00
parent 1e501a6e21
commit 000052f67a
5 changed files with 91 additions and 39 deletions

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:

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]

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

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

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:
- 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
- shell:
- 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 }}'