diff --git a/README.rst b/README.rst index c3c2624..7636683 100644 --- a/README.rst +++ b/README.rst @@ -20,7 +20,7 @@ Requirements For this workshop, we require the use of a single server, configured as a *seed hypervisor*. This server should be a bare metal node or VM running -Ubuntu Jammy or Rocky 9, with the following minimum requirements: +Ubuntu Noble or Rocky Linux 10, with the following minimum requirements: * 64GB RAM (more is recommended when growing the lab deployment) * 100GB disk @@ -59,7 +59,7 @@ There are four parts to this guide: exercise, and fetching the necessary source code. *Deploying a Seed* includes all instructions necessary to download and install -the Kayobe prerequisites on a plain Rocky 9 or Ubuntu Jammy cloud image, +the Kayobe prerequisites on a plain Rocky Linux 10 or Ubuntu Noble cloud image, including provisioning and configuration of a seed VM. Optionally, snapshot the instance after this step to reduce setup time in the future. @@ -81,15 +81,10 @@ already logged in (e.g. ``ssh rocky@``, or ``ssh ubuntu@``). # Install git and tmux. if $(which dnf 2>/dev/null >/dev/null); then - sudo dnf -y install git tmux + sudo dnf -y install git python3 tmux else sudo apt update - sudo apt -y install git tmux - fi - - # Install Python 3.12 on Rocky Linux 9 - if $(which dnf 2>/dev/null >/dev/null); then - sudo dnf -y install python3.12 + sudo apt -y install git python3 tmux fi # Disable the firewall. @@ -114,12 +109,7 @@ already logged in (e.g. ``ssh rocky@``, or ``ssh ubuntu@``). [[ -d beokay ]] || git clone https://github.com/stackhpc/beokay.git # Use Beokay to bootstrap your control host. - if $(which dnf 2>/dev/null >/dev/null); then - PYTHON_ARG=" --python /usr/bin/python3.12" - else - PYTHON_ARG="" - fi - [[ -d deployment ]] || beokay/beokay.py create --base-path ~/deployment --kayobe-repo https://opendev.org/openstack/kayobe.git --kayobe-branch master --kayobe-config-repo https://github.com/stackhpc/a-universe-from-nothing.git --kayobe-config-branch master $PYTHON_ARG + [[ -d deployment ]] || beokay/beokay.py create --base-path ~/deployment --kayobe-repo https://opendev.org/openstack/kayobe.git --kayobe-branch master --kayobe-config-repo https://github.com/stackhpc/a-universe-from-nothing.git --kayobe-config-branch master # Clone the Tenks repository. cd ~/deployment/src diff --git a/a-universe-from-nothing.sh b/a-universe-from-nothing.sh index 7256505..addc8f3 100755 --- a/a-universe-from-nothing.sh +++ b/a-universe-from-nothing.sh @@ -7,15 +7,10 @@ set -eu # Install git and tmux. if $(which dnf 2>/dev/null >/dev/null); then - sudo dnf -y install git tmux + sudo dnf -y install git python3 tmux else sudo apt update - sudo apt -y install git tmux -fi - -# Install Python 3.12 on Rocky Linux 9 -if $(which dnf 2>/dev/null >/dev/null); then - sudo dnf -y install python3.12 + sudo apt -y install git python3 tmux fi # Disable the firewall. @@ -37,12 +32,7 @@ cd [[ -d beokay ]] || git clone https://github.com/stackhpc/beokay.git # Use Beokay to bootstrap your control host. -if $(which dnf 2>/dev/null >/dev/null); then - PYTHON_ARG=" --python /usr/bin/python3.12" -else - PYTHON_ARG="" -fi -[[ -d deployment ]] || beokay/beokay.py create --base-path ~/deployment --kayobe-repo https://opendev.org/openstack/kayobe.git --kayobe-branch master --kayobe-config-repo https://github.com/stackhpc/a-universe-from-nothing.git --kayobe-config-branch master $PYTHON_ARG +[[ -d deployment ]] || beokay/beokay.py create --base-path ~/deployment --kayobe-repo https://opendev.org/openstack/kayobe.git --kayobe-branch master --kayobe-config-repo https://github.com/stackhpc/a-universe-from-nothing.git --kayobe-config-branch master # Clone the Tenks repository. cd ~/deployment/src @@ -87,6 +77,8 @@ kayobe overcloud hardware inspect kayobe overcloud introspection data save kayobe overcloud provision kayobe overcloud host configure +kayobe overcloud host package update --packages '*' +kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/reboot.yml kayobe overcloud container image pull kayobe overcloud service deploy source ~/deployment/src/kayobe-config/etc/kolla/public-openrc.sh diff --git a/etc/kayobe/ansible/reboot.yml b/etc/kayobe/ansible/reboot.yml new file mode 100644 index 0000000..599c9e4 --- /dev/null +++ b/etc/kayobe/ansible/reboot.yml @@ -0,0 +1,18 @@ +--- +- name: Reboot overcloud hosts if required + hosts: overcloud + tags: + - reboot + tasks: + - block: + - name: Check if hosts need restarting + ansible.builtin.command: + cmd: needs-restarting -r + failed_when: false + register: needs_restarting + + - name: Reboot and wait + become: true + ansible.builtin.reboot: + when: needs_restarting.rc == 1 + when: ansible_facts.os_family == 'RedHat' diff --git a/etc/kayobe/inventory/group_vars/compute/network-interfaces b/etc/kayobe/inventory/group_vars/compute/network-interfaces index 4667b04..f58932c 100644 --- a/etc/kayobe/inventory/group_vars/compute/network-interfaces +++ b/etc/kayobe/inventory/group_vars/compute/network-interfaces @@ -5,7 +5,7 @@ # Controller interface on all-in-one network. aio_interface: "br{{ aio_bridge_ports[0] }}" aio_bridge_ports: - - "{{ 'ens2' if os_distribution == 'ubuntu' else 'eth0' }}" + - "{{ 'ens2' if os_distribution == 'ubuntu' or os_distribution in ['centos', 'rocky'] and (os_release | string).startswith('10') else 'eth0' }}" # Route via the seed-hypervisor to the outside world. aio_gateway: 192.168.33.4 diff --git a/etc/kayobe/inventory/group_vars/controllers/network-interfaces b/etc/kayobe/inventory/group_vars/controllers/network-interfaces index ce72526..4aa082f 100644 --- a/etc/kayobe/inventory/group_vars/controllers/network-interfaces +++ b/etc/kayobe/inventory/group_vars/controllers/network-interfaces @@ -5,7 +5,7 @@ # Controller interface on all-in-one network. aio_interface: "br{{ aio_bridge_ports[0] }}" aio_bridge_ports: - - "{{ 'ens2' if os_distribution == 'ubuntu' else 'eth0' }}" + - "{{ 'ens2' if os_distribution == 'ubuntu' or os_distribution in ['centos', 'rocky'] and (os_release | string).startswith('10') else 'eth0' }}" # Route via the seed-hypervisor to the outside world. aio_gateway: 192.168.33.4 diff --git a/etc/kayobe/inventory/group_vars/seed/network-interfaces b/etc/kayobe/inventory/group_vars/seed/network-interfaces index 52bfa49..5f44193 100644 --- a/etc/kayobe/inventory/group_vars/seed/network-interfaces +++ b/etc/kayobe/inventory/group_vars/seed/network-interfaces @@ -2,7 +2,7 @@ ############################################################################### # Network interface definitions for the seed group. -aio_interface: "{{ 'ens2' if os_distribution == 'ubuntu' else 'eth0' }}" +aio_interface: "{{ 'ens2' if os_distribution == 'ubuntu' or os_distribution in ['centos', 'rocky'] and (os_release | string).startswith('10') else 'eth0' }}" # Route via the seed-hypervisor to the outside world. # FIXME: Circular reference between seed & seed-hypervisor?