5fc7707938
Installing ceph-ansible in the virtualenv on CentOS 8 fails with: ModuleNotFoundError: No module named 'setuptools_rust' This error appeared following the release of cryptography 3.4, which now includes Rust code. It can be installed without Rust using a Python wheel, but only with more recent pip than version 9.0.3 available as RPM on CentOS 8. The cryptography bug report [1] recommends pip>=19.1.1. This change upgrades pip in the virtualenv before installing ceph-ansible. [1] https://github.com/pyca/cryptography/issues/5753 Change-Id: I47473de6f71c422db2238d653c2d8f379c55e79b
30 lines
907 B
Bash
Executable File
30 lines
907 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -o xtrace
|
|
set -o errexit
|
|
|
|
# Enable unbuffered output for Ansible in Jenkins.
|
|
export PYTHONUNBUFFERED=1
|
|
|
|
function setup_ceph_ansible {
|
|
# Prepare virtualenv for ceph-ansible deployment
|
|
python3 -m venv --system-site-packages ~/ceph-venv
|
|
# NOTE(mgoddard): We need a recent pip to install the latest cryptography
|
|
# library. See https://github.com/pyca/cryptography/issues/5753
|
|
~/ceph-venv/bin/pip install -I 'pip>=19.1.1'
|
|
~/ceph-venv/bin/pip install -Ir requirements.txt
|
|
~/ceph-venv/bin/pip install -IU selinux
|
|
}
|
|
|
|
function deploy_ceph_ansible {
|
|
RAW_INVENTORY=/etc/kolla/ceph-inventory
|
|
|
|
. ~/ceph-venv/bin/activate
|
|
|
|
cp site-container.yml.sample site-container.yml
|
|
ansible-playbook -i ${RAW_INVENTORY} -e @/etc/kolla/ceph-ansible.yml -vvv site-container.yml --skip-tags=with_pkg &> /tmp/logs/ansible/deploy-ceph
|
|
}
|
|
|
|
setup_ceph_ansible
|
|
deploy_ceph_ansible
|