ddfd6b6202
Kayobe uses a number of virtual environments on the remote hosts for python dependencies such as shade, python-openstackclient, docker, etc. By default these are stored in /opt/kayobe/venvs/. Typically we do not provide version restrictions when installing these packages, so over the course of time they may become stale and incompatible. This change installs the latest version of packages allowed by OpenStack upper constraints. It also adds a new variable, 'pip_upper_constraints_file', to set the upper constraints file. The existing variable 'kolla_upper_constraints_file' now defaults to the value of 'pip_upper_constraints_file'. Change-Id: I8d2956f95bbc44b5a9e88e7569372048a62f12f5 Story: 2005923 Task: 34193
49 lines
1.8 KiB
YAML
49 lines
1.8 KiB
YAML
---
|
|
# This playbook will ensure that all baremetal compute nodes in the overcloud
|
|
# ironic inventory are manageable. Supported initial states include 'enroll',
|
|
# 'manageable', and 'available'.
|
|
|
|
# We install shade in a virtualenv on one of the controllers, and delegate to
|
|
# it when executing the stackhpc.os-ironic-state role.
|
|
|
|
- name: Ensure baremetal compute nodes are available in ironic
|
|
hosts: controllers[0]
|
|
gather_facts: true
|
|
vars:
|
|
venv: "{{ virtualenv_path }}/shade"
|
|
roles:
|
|
- role: stackhpc.os-shade
|
|
os_shade_venv: "{{ venv }}"
|
|
os_shade_install_epel: "{{ yum_install_epel }}"
|
|
os_shade_state: latest
|
|
os_shade_upper_constraints_file: "{{ pip_upper_constraints_file }}"
|
|
|
|
- role: activate-virtualenv
|
|
activate_virtualenv_path: "{{ venv }}"
|
|
|
|
- name: Ensure baremetal compute nodes are manageable in ironic
|
|
hosts: baremetal-compute
|
|
gather_facts: False
|
|
vars:
|
|
# Whether to wait for the state transition to complete.
|
|
baremetal_compute_wait: True
|
|
# Time to wait for state transition to complete, if baremetal_compute_wait
|
|
# is True.
|
|
baremetal_compute_timeout: 1200
|
|
roles:
|
|
- role: stackhpc.os-ironic-state
|
|
os_ironic_state_auth_type: "{{ openstack_auth_type }}"
|
|
os_ironic_state_auth: "{{ openstack_auth }}"
|
|
os_ironic_state_cacert: "{{ openstack_cacert }}"
|
|
os_ironic_state_name: "{{ inventory_hostname }}"
|
|
os_ironic_state_provision_state: "manage"
|
|
os_ironic_state_wait: "{{ baremetal_compute_wait }}"
|
|
os_ironic_state_timeout: "{{ baremetal_compute_timeout }}"
|
|
os_ironic_state_delegate_to: "{{ groups['controllers'][0] }}"
|
|
|
|
- name: Ensure baremetal compute nodes are available in ironic
|
|
hosts: controllers[0]
|
|
gather_facts: False
|
|
roles:
|
|
- role: deactivate-virtualenv
|