Install required modules for utility env
Since we delegate image uplaod to the utility venv, we also need to have selinux package, otherwise file download and some of the operations may fail Also this installs python mysql binding as we're about to delegate db_setup tasks to the utility venv. Change-Id: Id219ccb227485ffaf4b2cad36e8100672137c1d7 Needed-By: https://review.opendev.org/739646 Needed-By: https://review.opendev.org/733443
This commit is contained in:
parent
706ac12d58
commit
93c242c1be
@ -37,6 +37,7 @@ _utility_devel_distro_packages_debian:
|
||||
|
||||
_utility_devel_distro_packages_redhat:
|
||||
- gcc
|
||||
- libselinux-python3
|
||||
- "{{ ansible_distribution_major_version is version('8', '<') | ternary('python-devel', 'python36-devel') }}"
|
||||
|
||||
# Distribution packages needed for the utility pip package wheel build
|
||||
@ -60,12 +61,15 @@ _utility_distro_openstack_clients_packages:
|
||||
- python3-novaclient
|
||||
- python3-cinderclient
|
||||
- python3-openstackclient
|
||||
- "{{ (ansible_os_family | lower == 'redhat') | ternary('python3-PyMySQL', 'python3-pymysql') }}"
|
||||
|
||||
# Python packages to be installed into the utility container
|
||||
utility_pip_packages:
|
||||
- cryptography
|
||||
- pip
|
||||
- PyMySQL
|
||||
- python-memcached
|
||||
- selinux
|
||||
- setuptools
|
||||
- wheel
|
||||
- openstacksdk
|
||||
|
@ -67,3 +67,7 @@ trove_install_method: distro
|
||||
watcher_install_method: distro
|
||||
zaqar_install_method: distro
|
||||
zun_install_method: distro
|
||||
|
||||
## Delegate all database setup tasks to the utility host, and use the utility venv python interpreter
|
||||
openstack_db_setup_host: "{{ groups['utility_all'][0] }}"
|
||||
openstack_db_setup_python_interpreter: "{{ ansible_python['executable'] }}"
|
||||
|
@ -29,4 +29,8 @@ openstack_repo_git_url: "git://{{ internal_lb_vip_address }}"
|
||||
|
||||
## Delegate all service setup tasks to the utility host, and use the utility venv python interpreter
|
||||
openstack_service_setup_host: "{{ groups['utility_all'][0] }}"
|
||||
openstack_service_setup_host_python_interpreter: "/openstack/venvs/utility-{{ openstack_release }}/bin/python"
|
||||
openstack_service_setup_host_python_interpreter: "/openstack/venvs/utility-{{ openstack_release }}/bin/python"
|
||||
|
||||
## Delegate all database setup tasks to the utility host, and use the utility venv python interpreter
|
||||
openstack_db_setup_host: "{{ openstack_service_setup_host }}"
|
||||
openstack_db_setup_python_interpreter: "{{ openstack_service_setup_host_python_interpreter }}"
|
||||
|
@ -75,6 +75,40 @@
|
||||
utility_distro_packages: "{{ (utility_distro_packages | default([])) + _utility_distro_openstack_clients_packages[utility_distro_openstack_clients_python_version|int] }}"
|
||||
when: install_method == "distro"
|
||||
|
||||
- name: Add EPEL repsitory
|
||||
block:
|
||||
- name: Download EPEL gpg keys
|
||||
get_url:
|
||||
url: "{{ centos_epel_key | default('http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-' ~ ansible_distribution_major_version) }}"
|
||||
dest: /etc/pki/rpm-gpg
|
||||
register: _get_yum_keys
|
||||
until: _get_yum_keys is success
|
||||
retries: 5
|
||||
delay: 2
|
||||
|
||||
- name: Install EPEL gpg keys
|
||||
rpm_key:
|
||||
key: "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}"
|
||||
state: present
|
||||
|
||||
- name: Install the EPEL repository
|
||||
yum_repository:
|
||||
name: epel-utility
|
||||
baseurl: "{{ centos_epel_mirror | default('http://download.fedoraproject.org/pub/epel') ~ '/' ~ ansible_distribution_major_version ~ '/' ~ ansible_architecture }}"
|
||||
description: 'Extra Packages for Enterprise Linux 7 - $basearch'
|
||||
gpgcheck: yes
|
||||
enabled: yes
|
||||
state: present
|
||||
includepkgs: 'python3-PyMySQL python36-PyMySQL'
|
||||
register: install_epel_repo
|
||||
until: install_epel_repo is success
|
||||
retries: 5
|
||||
delay: 2
|
||||
when:
|
||||
- install_method == "distro"
|
||||
- ansible_os_family | lower == 'redhat'
|
||||
- ansible_distribution_major_version is version('8', '<')
|
||||
|
||||
- name: Install distro packages
|
||||
package:
|
||||
name: "{{ utility_distro_packages | default([]) }}"
|
||||
|
Loading…
Reference in New Issue
Block a user