Change default centos bootstrap user to cloud-user

This matches the default user in CentOS GenericCloud images.

Change-Id: I3a4279178a39a4ad9f834832f3616acaff092212
Signed-off-by: Pierre Riteau <pierre@stackhpc.com>
This commit is contained in:
Pierre Riteau
2025-09-19 14:34:02 +02:00
parent 44163326ed
commit d6273899b4
19 changed files with 59 additions and 34 deletions

View File

@@ -2,9 +2,10 @@
###############################################################################
# Compute node configuration.
# User with which to access the computes via SSH during bootstrap, in order
# to setup the Kayobe user account. Default is {{ os_distribution }}.
compute_bootstrap_user: "{{ os_distribution }}"
# User with which to access the compute nodes via SSH during bootstrap, in
# order to setup the Kayobe user account. Default is 'cloud-user' if
# os_distribution is set to centos, otherwise 'os_distribution'.
compute_bootstrap_user: "{{ 'cloud-user' if os_distribution == 'centos' else os_distribution }}"
###############################################################################
# Compute network interface configuration.

View File

@@ -3,8 +3,9 @@
# Controller node configuration.
# User with which to access the controllers via SSH during bootstrap, in order
# to setup the Kayobe user account. Default is {{ os_distribution }}.
controller_bootstrap_user: "{{ os_distribution }}"
# to setup the Kayobe user account. Default is 'cloud-user' if os_distribution
# is set to centos, otherwise 'os_distribution'.
controller_bootstrap_user: "{{ 'cloud-user' if os_distribution == 'centos' else os_distribution }}"
###############################################################################
# Controller groups.

View File

@@ -86,8 +86,9 @@ infra_vm_machine:
# Infrastructure VM node configuration.
# User with which to access the infrastructure vm via SSH during bootstrap, in
# order to setup the Kayobe user account. Default is {{ os_distribution }}.
infra_vm_bootstrap_user: "{{ os_distribution }}"
# order to setup the Kayobe user account. Default is 'cloud-user' if
# os_distribution is set to centos, otherwise 'os_distribution'.
infra_vm_bootstrap_user: "{{ 'cloud-user' if os_distribution == 'centos' else os_distribution }}"
###############################################################################
# Infrastructure VM network interface configuration.

View File

@@ -3,7 +3,8 @@
# Monitoring node configuration.
# User with which to access the monitoring nodes via SSH during bootstrap, in
# order to setup the Kayobe user account.
# order to setup the Kayobe user account. Default is 'cloud-user' if
# os_distribution is set to centos, otherwise 'os_distribution'.
monitoring_bootstrap_user: "{{ controller_bootstrap_user }}"
###############################################################################

View File

@@ -3,8 +3,9 @@
# Seed node configuration.
# User with which to access the seed via SSH during bootstrap, in order to
# setup the Kayobe user account. Default is {{ os_distribution }}.
seed_bootstrap_user: "{{ os_distribution }}"
# setup the Kayobe user account. Default is 'cloud-user' if os_distribution is
# set to centos, otherwise 'os_distribution'.
seed_bootstrap_user: "{{ 'cloud-user' if os_distribution == 'centos' else os_distribution }}"
###############################################################################
# Seed network interface configuration.

View File

@@ -3,8 +3,9 @@
# Seed hypervisor node configuration.
# User with which to access the seed hypervisor via SSH during bootstrap, in
# order to setup the Kayobe user account. Default is {{ os_distribution }}.
seed_hypervisor_bootstrap_user: "{{ os_distribution }}"
# order to setup the Kayobe user account. Default is 'cloud-user' if
# os_distribution is set to centos, otherwise 'os_distribution'.
seed_hypervisor_bootstrap_user: "{{ 'cloud-user' if os_distribution == 'centos' else os_distribution }}"
###############################################################################
# Seed hypervisor network interface configuration.

View File

@@ -2,9 +2,10 @@
###############################################################################
# Storage node configuration.
# User with which to access the storages via SSH during bootstrap, in order
# to setup the Kayobe user account. Default is {{ os_distribution }}.
storage_bootstrap_user: "{{ os_distribution }}"
# User with which to access the storage nodes via SSH during bootstrap, in
# order to setup the Kayobe user account. Default is 'cloud-user' if
# os_distribution is set to centos, otherwise 'os_distribution'.
storage_bootstrap_user: "{{ 'cloud-user' if os_distribution == 'centos' else os_distribution }}"
###############################################################################
# Storage network interface configuration.

View File

@@ -79,8 +79,9 @@ is ``stack``.
Typically, the image used to provision these hosts will not include this user
account, so Kayobe performs a bootstrapping step to create it, as a different
user. In cloud images, there is often a user named after the OS distro, e.g.
``centos``, ``rocky`` or ``ubuntu``. This user defaults to the
``os_distribution`` variable, but may be set via the following variables:
``rocky`` or ``ubuntu``. This user defaults to the ``os_distribution``
variable, except for CentOS which uses ``cloud-user``, but may be set via the
following variables:
* ``seed_hypervisor_bootstrap_user``
* ``seed_bootstrap_user``

View File

@@ -30,7 +30,7 @@ It also requires a single host running a :ref:`supported operating system
* at least one network interface that has Internet access
You will need access to a user account with passwordless sudo. The default user
in a cloud image (e.g. ``centos`` or ``rocky`` or ``ubuntu``) is typically
in a cloud image (e.g. ``cloud-user`` or ``rocky`` or ``ubuntu``) is typically
sufficient. This user will be used to run Kayobe commands. It will also be used
by Kayobe to bootstrap other user accounts.

View File

@@ -219,11 +219,11 @@ or ``rocky`` if using Rocky Linux..
os_distribution: "ubuntu"
Kayobe uses a bootstrap user to create a ``stack`` user account. By default,
this user is ``centos`` on CentOS, ``rocky`` on Rocky and ``ubuntu`` on Ubuntu,
in line with the default user in the official cloud images. If you are using
a different bootstrap user, set the ``controller_bootstrap_user`` variable in
``etc/kayobe/controllers.yml``. For example, to set it to ``cloud-user`` (as
seen in MAAS):
this user is ``cloud-user`` on CentOS, ``rocky`` on Rocky and ``ubuntu`` on
Ubuntu, in line with the default user in the official cloud images. If you are
using a different bootstrap user, set the ``controller_bootstrap_user``
variable in ``etc/kayobe/controllers.yml``. For example, to set it to
``cloud-user`` (as seen in MAAS):
.. code-block:: yaml
:caption: ``etc/kayobe/controllers.yml``

View File

@@ -309,8 +309,8 @@ It is now possible to discover, inspect and provision the controller VM::
kayobe overcloud hardware inspect
kayobe overcloud provision
The controller VM is now accessible via SSH as the bootstrap user (``centos``
or ``ubuntu``) at ``192.168.33.3``.
The controller VM is now accessible via SSH as the bootstrap user
(``cloud-user``, ``rocky`` or ``ubuntu``) at ``192.168.33.3``.
The machines and networking created by Tenks can be cleaned up via
``dev/tenks-teardown-overcloud.sh``::

View File

@@ -2,8 +2,9 @@
###############################################################################
# Compute node configuration.
# User with which to access the computes via SSH during bootstrap, in order
# to setup the Kayobe user account. Default is {{ os_distribution }}.
# User with which to access the compute nodes via SSH during bootstrap, in
# order to setup the Kayobe user account. Default is 'cloud-user' if
# os_distribution is set to centos, otherwise 'os_distribution'.
#compute_bootstrap_user:
###############################################################################

View File

@@ -3,7 +3,8 @@
# Controller node configuration.
# User with which to access the controllers via SSH during bootstrap, in order
# to setup the Kayobe user account. Default is {{ os_distribution }}.
# to setup the Kayobe user account. Default is 'cloud-user' if os_distribution
# is set to centos, otherwise 'os_distribution'.
#controller_bootstrap_user:
###############################################################################

View File

@@ -68,7 +68,8 @@
# Infrastructure VM node configuration.
# User with which to access the infrastructure vm via SSH during bootstrap, in
# order to setup the Kayobe user account.
# order to setup the Kayobe user account. Default is 'cloud-user' if
# os_distribution is set to centos, otherwise 'os_distribution'.
#infra_vm_bootstrap_user:
###############################################################################

View File

@@ -3,7 +3,8 @@
# Monitoring node configuration.
# User with which to access the monitoring nodes via SSH during bootstrap, in
# order to setup the Kayobe user account.
# order to setup the Kayobe user account. Default is 'cloud-user' if
# os_distribution is set to centos, otherwise 'os_distribution'.
#monitoring_bootstrap_user:
###############################################################################

View File

@@ -3,7 +3,8 @@
# Seed hypervisor node configuration.
# User with which to access the seed hypervisor via SSH during bootstrap, in
# order to setup the Kayobe user account. Default is {{ os_distribution }}.
# order to setup the Kayobe user account. Default is 'cloud-user' if
# os_distribution is set to centos, otherwise 'os_distribution'.
#seed_hypervisor_bootstrap_user:
###############################################################################

View File

@@ -3,7 +3,8 @@
# Seed node configuration.
# User with which to access the seed via SSH during bootstrap, in order to
# setup the Kayobe user account. Default is {{ os_distribution }}.
# setup the Kayobe user account. Default is 'cloud-user' if os_distribution is
# set to centos, otherwise 'os_distribution'.
#seed_bootstrap_user:
###############################################################################

View File

@@ -2,8 +2,9 @@
###############################################################################
# Storage node configuration.
# User with which to access the storages via SSH during bootstrap, in order
# to setup the Kayobe user account. Default is {{ os_distribution }}.
# User with which to access the storage nodes via SSH during bootstrap, in
# order to setup the Kayobe user account. Default is 'cloud-user' if
# os_distribution is set to centos, otherwise 'os_distribution'.
#storage_bootstrap_user:
###############################################################################

View File

@@ -0,0 +1,10 @@
---
upgrade:
- |
The default bootstrap user has been changed to ``cloud-user`` if
``os_distribution`` is set to ``centos``. Set ``*_bootstrap_user``
variables to ``centos`` to retain existing behaviour.
fixes:
- |
The default bootstrap user has been changed to ``cloud-user`` if
``os_distribution`` is set to ``centos``, to match official cloud images.