Install uWSGI from PyPI to repair CentOS 8 support

CentOS 8 does not have uWSGI, not even in EPEL:
https://bugzilla.redhat.com/show_bug.cgi?id=1757157

Since it's installable from PyPI, let's do it instead.
Also update SELinux to enable uWSGI+nginx to operate.

Change-Id: I44d0582e221e24404f427b261bf6d366f5c32775
This commit is contained in:
Dmitry Tantsur
2020-06-03 11:30:48 +02:00
parent 508899cc6b
commit 8593f2378b
10 changed files with 62 additions and 12 deletions

View File

@@ -284,3 +284,30 @@
- name: "Remove uwsgi sysvinit init script"
command: update-rc.d -f uwsgi remove
ignore_errors: yes
- block:
- name: "Explicitly allow keystone port (TCP) on selinux"
seport:
ports: "5000"
proto: tcp
setype: http_port_t
state: present
- name: Copy keystone policy file to temporary directory
copy:
src: keystone_policy.te
dest: /tmp/keystone_policy.te
- name: Check keystone policy module
command: checkmodule -M -m -o /tmp/keystone_policy.mod /tmp/keystone_policy.te
- name: Package keystone policy module
command: semodule_package -m /tmp/keystone_policy.mod -o /tmp/keystone_policy.pp
- name: Include keystone policy module
command: semodule -i /tmp/keystone_policy.pp
- name: Enable keystone policy module
command: semodule -e keystone_policy
when: (ansible_os_family == 'RedHat' or ansible_os_family == 'Suse') and
ansible_selinux.status == 'enabled' and ansible_selinux.mode == "enforcing"

View File

@@ -45,6 +45,14 @@
- skip_install is not defined
- enable_venv | bool == true
- name: "Install uWSGI in venv if using"
include: pip_install.yml
package=uWSGI
virtualenv=bifrost_venv_dir
when:
- skip_install is not defined
- enable_venv | bool == true
- name: "Install python-openstackclient in venv if using"
include: pip_install.yml
package=python-openstackclient