Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 24 additions & 9 deletions ansible/kayobe-ansible-user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
attempting bootstrap
when: ssh_result.unreachable | default(false)

- name: Ensure python is installed and the Kayobe Ansible user account exists
hosts: kayobe_user_bootstrap_required_True
- name: Ensure Python is installed
hosts: seed-hypervisor:seed:overcloud:infra-vms
gather_facts: no
max_fail_percentage: >-
{{ kayobe_ansible_user_max_fail_percentage |
Expand All @@ -46,14 +46,14 @@
default(100) }}
vars:
ansible_user: "{{ bootstrap_user }}"
# We can't assume that a virtualenv exists at this point, so use the system
# python interpreter.
ansible_python_interpreter: /usr/bin/python3
apt_options:
- "-y"
- "{% if apt_proxy_http %}-o Acquire::http::proxy='{{ apt_proxy_http }}'{% endif %}"
- "{% if apt_proxy_https %}-o Acquire::https::proxy='{{ apt_proxy_https }}'{% endif %}"
dnf_options:
- "-y"
- "{% if 'proxy' in dnf_config %}--setopt=proxy={{ dnf_config['proxy'] }}{% endif %}"
tags:
- kayobe-ansible-user
- ensure-python
tasks:
- name: Check if python is installed
Expand All @@ -62,11 +62,26 @@
failed_when: false
register: check_python

# TODO(priteau): Support apt proxy
- name: Ensure python is installed
raw: "test -e /usr/bin/apt && (sudo apt -y update && sudo apt install -y python3-minimal) || (sudo dnf {{ dnf_options | select | join(' ') }} install python3)"
- name: Ensure Python is installed
raw: "(test -e /usr/bin/apt && sudo apt {{ apt_options | select | join(' ') }} update && sudo apt install {{ apt_options | select | join(' ') }} python3-minimal) || (test -e /usr/bin/dnf && sudo dnf {{ dnf_options | select | join(' ') }} install python3)"
when: check_python.rc != 0

- name: Ensure the Kayobe Ansible user account exists
hosts: kayobe_user_bootstrap_required_True
gather_facts: no
max_fail_percentage: >-
{{ kayobe_ansible_user_max_fail_percentage |
default(host_configure_max_fail_percentage) |
default(kayobe_max_fail_percentage) |
default(100) }}
vars:
ansible_user: "{{ bootstrap_user }}"
# We can't assume that a virtualenv exists at this point, so use the system
# python interpreter.
ansible_python_interpreter: /usr/bin/python3
tags:
- kayobe-ansible-user
tasks:
- import_role:
name: singleplatform-eng.users
vars:
Expand Down
3 changes: 3 additions & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ reno>=3.1.0 # Apache-2.0
sphinx>=2.0.0,!=2.1.0 # BSD
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
whereto>=0.3.0 # Apache-2.0
# NOTE(priteau): pin setuptools
# https://setuptools.pypa.io/en/stable/history.html#v82-0-0
setuptools==81.0.0
18 changes: 15 additions & 3 deletions doc/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Prerequisites
Currently Kayobe supports the following Operating Systems on the Ansible
control host:

- CentOS Stream 9 (since Zed 13.0.0 release)
- CentOS Stream 9 (since Zed 13.0.0 release), using Python 3.12
- CentOS Stream 10 (since Epoxy 18.3.0 release)
- Rocky Linux 9 (since Zed 13.0.0 release)
- Rocky Linux 9 (since Zed 13.0.0 release), using Python 3.12
- Rocky Linux 10 (since Epoxy 18.3.0 release)
- Ubuntu Noble 24.04 (since Dalmatian 17.0.0 release)

Expand All @@ -30,10 +30,14 @@ it is recommended to install Kayobe in a virtualenv. Ensure that the
necessary to install the GCC compiler chain in order to build the extensions of
some of kayobe's python dependencies.

On CentOS/Rocky::
On CentOS Stream/Rocky Linux 10::

$ dnf install -y python3-devel gcc libffi-devel

On CentOS Stream/Rocky Linux 9::

$ dnf install -y python3.12-devel gcc libffi-devel

On Ubuntu::

$ apt install -y python3-dev gcc libffi-dev python3-venv
Expand Down Expand Up @@ -99,6 +103,10 @@ Create a virtualenv for Kayobe::

$ python3 -m venv <base_path>/venvs/kayobe

Or, using Python 3.12 on CentOS Stream/Rocky Linux 9::

$ python3.12 -m venv <base_path>/venvs/kayobe

Activate the virtualenv and update pip::

$ source <base_path>/venvs/kayobe/bin/activate
Expand Down Expand Up @@ -140,6 +148,10 @@ Create a virtualenv for Kayobe::

$ python3 -m venv <base_path>/venvs/kayobe

Or, using Python 3.12 on CentOS Stream/Rocky Linux 9::

$ python3.12 -m venv <base_path>/venvs/kayobe

Activate the virtualenv and update pip::

$ source <base_path>/venvs/kayobe/bin/activate
Expand Down
7 changes: 6 additions & 1 deletion doc/source/support-matrix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,19 @@ Supported Operating Systems

Kayobe supports the following host Operating Systems (OS):

* Rocky Linux 9 (since Zed 13.0.0 release)
* Rocky Linux 9 (since Zed 13.0.0 release), using Python 3.12
* Rocky Linux 10 (since Epoxy 18.3.0 release)
* Ubuntu Noble 24.04 (since Dalmatian 17.0.0 release)

In addition to that CentOS Stream 9/10 host OS is functional, but not
officially supported. Kolla does not publish CentOS Stream 9/10 images to
Docker Hub/Quay.io, therefore users need to build them by themselves.

.. note::

This release of Kayobe requires Python 3.10 or above. On CentOS Stream 9 or
Rocky Linux 9, use Python 3.12 instead of the default Python 3.9.

.. note::

CentOS Stream 9 is no longer supported as a host OS beyond the Epoxy
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
features:
- |
Adds support for bootstrapping Python on Ubuntu through a proxy.
Loading