diff --git a/ansible/inventory/group_vars/all/compute b/ansible/inventory/group_vars/all/compute index 6e0dd86c7..30878e069 100644 --- a/ansible/inventory/group_vars/all/compute +++ b/ansible/inventory/group_vars/all/compute @@ -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. diff --git a/ansible/inventory/group_vars/all/controllers b/ansible/inventory/group_vars/all/controllers index b1fa12b07..5d2f2b804 100644 --- a/ansible/inventory/group_vars/all/controllers +++ b/ansible/inventory/group_vars/all/controllers @@ -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. diff --git a/ansible/inventory/group_vars/all/infra-vms b/ansible/inventory/group_vars/all/infra-vms index 65f5b9bce..2105c5e3e 100644 --- a/ansible/inventory/group_vars/all/infra-vms +++ b/ansible/inventory/group_vars/all/infra-vms @@ -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. diff --git a/ansible/inventory/group_vars/all/monitoring b/ansible/inventory/group_vars/all/monitoring index 56da639e9..ee1fa4ebc 100644 --- a/ansible/inventory/group_vars/all/monitoring +++ b/ansible/inventory/group_vars/all/monitoring @@ -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 }}" ############################################################################### diff --git a/ansible/inventory/group_vars/all/seed b/ansible/inventory/group_vars/all/seed index f5b1bd38d..37d4497d9 100644 --- a/ansible/inventory/group_vars/all/seed +++ b/ansible/inventory/group_vars/all/seed @@ -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. diff --git a/ansible/inventory/group_vars/all/seed-hypervisor b/ansible/inventory/group_vars/all/seed-hypervisor index 9b9cf889f..0c2a0e6f9 100644 --- a/ansible/inventory/group_vars/all/seed-hypervisor +++ b/ansible/inventory/group_vars/all/seed-hypervisor @@ -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. diff --git a/ansible/inventory/group_vars/all/storage b/ansible/inventory/group_vars/all/storage index ff4f20d5f..429c0e816 100644 --- a/ansible/inventory/group_vars/all/storage +++ b/ansible/inventory/group_vars/all/storage @@ -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. diff --git a/doc/source/configuration/reference/hosts.rst b/doc/source/configuration/reference/hosts.rst index 6b08e84ab..edda6514a 100644 --- a/doc/source/configuration/reference/hosts.rst +++ b/doc/source/configuration/reference/hosts.rst @@ -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`` diff --git a/doc/source/configuration/scenarios/all-in-one/index.rst b/doc/source/configuration/scenarios/all-in-one/index.rst index 750a2487d..1c7e33d71 100644 --- a/doc/source/configuration/scenarios/all-in-one/index.rst +++ b/doc/source/configuration/scenarios/all-in-one/index.rst @@ -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. diff --git a/doc/source/configuration/scenarios/all-in-one/overcloud.rst b/doc/source/configuration/scenarios/all-in-one/overcloud.rst index 2992877ab..2677df323 100644 --- a/doc/source/configuration/scenarios/all-in-one/overcloud.rst +++ b/doc/source/configuration/scenarios/all-in-one/overcloud.rst @@ -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`` diff --git a/doc/source/contributor/automated.rst b/doc/source/contributor/automated.rst index 8db00d530..316588b4a 100644 --- a/doc/source/contributor/automated.rst +++ b/doc/source/contributor/automated.rst @@ -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``:: diff --git a/etc/kayobe/compute.yml b/etc/kayobe/compute.yml index 5572bbe00..f27522349 100644 --- a/etc/kayobe/compute.yml +++ b/etc/kayobe/compute.yml @@ -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: ############################################################################### diff --git a/etc/kayobe/controllers.yml b/etc/kayobe/controllers.yml index d974cc6b1..caa03a6ff 100644 --- a/etc/kayobe/controllers.yml +++ b/etc/kayobe/controllers.yml @@ -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: ############################################################################### diff --git a/etc/kayobe/infra-vms.yml b/etc/kayobe/infra-vms.yml index 994f82d96..abbd24e68 100644 --- a/etc/kayobe/infra-vms.yml +++ b/etc/kayobe/infra-vms.yml @@ -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: ############################################################################### diff --git a/etc/kayobe/monitoring.yml b/etc/kayobe/monitoring.yml index 5468936d3..5a19d7023 100644 --- a/etc/kayobe/monitoring.yml +++ b/etc/kayobe/monitoring.yml @@ -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: ############################################################################### diff --git a/etc/kayobe/seed-hypervisor.yml b/etc/kayobe/seed-hypervisor.yml index dd8fbca23..cded893f9 100644 --- a/etc/kayobe/seed-hypervisor.yml +++ b/etc/kayobe/seed-hypervisor.yml @@ -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: ############################################################################### diff --git a/etc/kayobe/seed.yml b/etc/kayobe/seed.yml index 48bcfb878..9f4f7055b 100644 --- a/etc/kayobe/seed.yml +++ b/etc/kayobe/seed.yml @@ -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: ############################################################################### diff --git a/etc/kayobe/storage.yml b/etc/kayobe/storage.yml index 2cdac5bed..1866e6df3 100644 --- a/etc/kayobe/storage.yml +++ b/etc/kayobe/storage.yml @@ -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: ############################################################################### diff --git a/releasenotes/notes/centos-bootstrap-user-4ee02dee551c62a6.yaml b/releasenotes/notes/centos-bootstrap-user-4ee02dee551c62a6.yaml new file mode 100644 index 000000000..045a74b19 --- /dev/null +++ b/releasenotes/notes/centos-bootstrap-user-4ee02dee551c62a6.yaml @@ -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.