Merge "Install required modules for utility env"
This commit is contained in:
commit
562b96b597
@ -37,6 +37,7 @@ _utility_devel_distro_packages_debian:
|
|||||||
|
|
||||||
_utility_devel_distro_packages_redhat:
|
_utility_devel_distro_packages_redhat:
|
||||||
- gcc
|
- gcc
|
||||||
|
- libselinux-python3
|
||||||
- "{{ ansible_distribution_major_version is version('8', '<') | ternary('python-devel', 'python36-devel') }}"
|
- "{{ ansible_distribution_major_version is version('8', '<') | ternary('python-devel', 'python36-devel') }}"
|
||||||
|
|
||||||
# Distribution packages needed for the utility pip package wheel build
|
# Distribution packages needed for the utility pip package wheel build
|
||||||
@ -60,12 +61,15 @@ _utility_distro_openstack_clients_packages:
|
|||||||
- python3-novaclient
|
- python3-novaclient
|
||||||
- python3-cinderclient
|
- python3-cinderclient
|
||||||
- python3-openstackclient
|
- python3-openstackclient
|
||||||
|
- "{{ (ansible_os_family | lower == 'redhat') | ternary('python3-PyMySQL', 'python3-pymysql') }}"
|
||||||
|
|
||||||
# Python packages to be installed into the utility container
|
# Python packages to be installed into the utility container
|
||||||
utility_pip_packages:
|
utility_pip_packages:
|
||||||
- cryptography
|
- cryptography
|
||||||
- pip
|
- pip
|
||||||
|
- PyMySQL
|
||||||
- python-memcached
|
- python-memcached
|
||||||
|
- selinux
|
||||||
- setuptools
|
- setuptools
|
||||||
- wheel
|
- wheel
|
||||||
- openstacksdk
|
- openstacksdk
|
||||||
|
@ -67,3 +67,7 @@ trove_install_method: distro
|
|||||||
watcher_install_method: distro
|
watcher_install_method: distro
|
||||||
zaqar_install_method: distro
|
zaqar_install_method: distro
|
||||||
zun_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'] }}"
|
||||||
|
@ -30,3 +30,7 @@ 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
|
## 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: "{{ 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] }}"
|
utility_distro_packages: "{{ (utility_distro_packages | default([])) + _utility_distro_openstack_clients_packages[utility_distro_openstack_clients_python_version|int] }}"
|
||||||
when: install_method == "distro"
|
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
|
- name: Install distro packages
|
||||||
package:
|
package:
|
||||||
name: "{{ utility_distro_packages | default([]) }}"
|
name: "{{ utility_distro_packages | default([]) }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user