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. # Compute node configuration.
# User with which to access the computes via SSH during bootstrap, in order # User with which to access the compute nodes via SSH during bootstrap, in
# to setup the Kayobe user account. Default is {{ os_distribution }}. # order to setup the Kayobe user account. Default is 'cloud-user' if
compute_bootstrap_user: "{{ os_distribution }}" # 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. # Compute network interface configuration.

View File

@@ -3,8 +3,9 @@
# Controller node configuration. # Controller node configuration.
# User with which to access the controllers via SSH during bootstrap, in order # 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
controller_bootstrap_user: "{{ os_distribution }}" # is set to centos, otherwise 'os_distribution'.
controller_bootstrap_user: "{{ 'cloud-user' if os_distribution == 'centos' else os_distribution }}"
############################################################################### ###############################################################################
# Controller groups. # Controller groups.

View File

@@ -86,8 +86,9 @@ infra_vm_machine:
# Infrastructure VM node configuration. # Infrastructure VM node configuration.
# User with which to access the infrastructure vm via SSH during bootstrap, in # User with which to access the infrastructure vm 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
infra_vm_bootstrap_user: "{{ os_distribution }}" # 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. # Infrastructure VM network interface configuration.

View File

@@ -3,7 +3,8 @@
# Monitoring node configuration. # Monitoring node configuration.
# User with which to access the monitoring nodes via SSH during bootstrap, in # 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 }}" monitoring_bootstrap_user: "{{ controller_bootstrap_user }}"
############################################################################### ###############################################################################

View File

@@ -3,8 +3,9 @@
# Seed node configuration. # Seed node configuration.
# User with which to access the seed via SSH during bootstrap, in order to # 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
seed_bootstrap_user: "{{ os_distribution }}" # set to centos, otherwise 'os_distribution'.
seed_bootstrap_user: "{{ 'cloud-user' if os_distribution == 'centos' else os_distribution }}"
############################################################################### ###############################################################################
# Seed network interface configuration. # Seed network interface configuration.

View File

@@ -3,8 +3,9 @@
# Seed hypervisor node configuration. # Seed hypervisor node configuration.
# User with which to access the seed hypervisor via SSH during bootstrap, in # 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
seed_hypervisor_bootstrap_user: "{{ os_distribution }}" # 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. # Seed hypervisor network interface configuration.

View File

@@ -2,9 +2,10 @@
############################################################################### ###############################################################################
# Storage node configuration. # Storage node configuration.
# User with which to access the storages via SSH during bootstrap, in order # User with which to access the storage nodes via SSH during bootstrap, in
# to setup the Kayobe user account. Default is {{ os_distribution }}. # order to setup the Kayobe user account. Default is 'cloud-user' if
storage_bootstrap_user: "{{ os_distribution }}" # 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. # 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 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 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. 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 ``rocky`` or ``ubuntu``. This user defaults to the ``os_distribution``
``os_distribution`` variable, but may be set via the following variables: variable, except for CentOS which uses ``cloud-user``, but may be set via the
following variables:
* ``seed_hypervisor_bootstrap_user`` * ``seed_hypervisor_bootstrap_user``
* ``seed_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 * at least one network interface that has Internet access
You will need access to a user account with passwordless sudo. The default user 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 sufficient. This user will be used to run Kayobe commands. It will also be used
by Kayobe to bootstrap other user accounts. by Kayobe to bootstrap other user accounts.

View File

@@ -219,11 +219,11 @@ or ``rocky`` if using Rocky Linux..
os_distribution: "ubuntu" os_distribution: "ubuntu"
Kayobe uses a bootstrap user to create a ``stack`` user account. By default, 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, this user is ``cloud-user`` on CentOS, ``rocky`` on Rocky and ``ubuntu`` on
in line with the default user in the official cloud images. If you are using Ubuntu, in line with the default user in the official cloud images. If you are
a different bootstrap user, set the ``controller_bootstrap_user`` variable in using a different bootstrap user, set the ``controller_bootstrap_user``
``etc/kayobe/controllers.yml``. For example, to set it to ``cloud-user`` (as variable in ``etc/kayobe/controllers.yml``. For example, to set it to
seen in MAAS): ``cloud-user`` (as seen in MAAS):
.. code-block:: yaml .. code-block:: yaml
:caption: ``etc/kayobe/controllers.yml`` :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 hardware inspect
kayobe overcloud provision kayobe overcloud provision
The controller VM is now accessible via SSH as the bootstrap user (``centos`` The controller VM is now accessible via SSH as the bootstrap user
or ``ubuntu``) at ``192.168.33.3``. (``cloud-user``, ``rocky`` or ``ubuntu``) at ``192.168.33.3``.
The machines and networking created by Tenks can be cleaned up via The machines and networking created by Tenks can be cleaned up via
``dev/tenks-teardown-overcloud.sh``:: ``dev/tenks-teardown-overcloud.sh``::

View File

@@ -2,8 +2,9 @@
############################################################################### ###############################################################################
# Compute node configuration. # Compute node configuration.
# User with which to access the computes via SSH during bootstrap, in order # User with which to access the compute nodes via SSH during bootstrap, in
# 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'.
#compute_bootstrap_user: #compute_bootstrap_user:
############################################################################### ###############################################################################

View File

@@ -3,7 +3,8 @@
# Controller node configuration. # Controller node configuration.
# User with which to access the controllers via SSH during bootstrap, in order # 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: #controller_bootstrap_user:
############################################################################### ###############################################################################

View File

@@ -68,7 +68,8 @@
# Infrastructure VM node configuration. # Infrastructure VM node configuration.
# User with which to access the infrastructure vm via SSH during bootstrap, in # 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: #infra_vm_bootstrap_user:
############################################################################### ###############################################################################

View File

@@ -3,7 +3,8 @@
# Monitoring node configuration. # Monitoring node configuration.
# User with which to access the monitoring nodes via SSH during bootstrap, in # 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: #monitoring_bootstrap_user:
############################################################################### ###############################################################################

View File

@@ -3,7 +3,8 @@
# Seed hypervisor node configuration. # Seed hypervisor node configuration.
# User with which to access the seed hypervisor via SSH during bootstrap, in # 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: #seed_hypervisor_bootstrap_user:
############################################################################### ###############################################################################

View File

@@ -3,7 +3,8 @@
# Seed node configuration. # Seed node configuration.
# User with which to access the seed via SSH during bootstrap, in order to # 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: #seed_bootstrap_user:
############################################################################### ###############################################################################

View File

@@ -2,8 +2,9 @@
############################################################################### ###############################################################################
# Storage node configuration. # Storage node configuration.
# User with which to access the storages via SSH during bootstrap, in order # User with which to access the storage nodes via SSH during bootstrap, in
# 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'.
#storage_bootstrap_user: #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.