diff --git a/ansible/inventory/group_vars/all/bifrost b/ansible/inventory/group_vars/all/bifrost index d780cfb108fe31082dd316cdff0bba55ffb0d03d..d222da3b6affb028f0efe7969743b98d55f8f23b 100644 --- a/ansible/inventory/group_vars/all/bifrost +++ b/ansible/inventory/group_vars/all/bifrost @@ -71,6 +71,10 @@ kolla_bifrost_deploy_image_filename: "deployment_image.qcow2" # Default is none. kolla_bifrost_deploy_image_rootfs: +# Custom cloud-init user-data passed to deploy of the deployment image. +# Default is an empty string. +kolla_bifrost_deploy_image_user_data_content: '' + ############################################################################### # Ironic configuration. diff --git a/ansible/kolla-bifrost-hostvars.yml b/ansible/kolla-bifrost-hostvars.yml index e43bcd7e6b64aede86e45b9a626c5ff8ad403849..2439bd9682a63bd09afdd47a8dba06cbaf71d935 100644 --- a/ansible/kolla-bifrost-hostvars.yml +++ b/ansible/kolla-bifrost-hostvars.yml @@ -26,6 +26,7 @@ ipv4_nameserver: "{{ resolv_nameservers }}" network_mtu: "{{ admin_oc_net_name | net_mtu or '1500' }}" vlan_id: "{{ '' if admin_oc_net_name == provision_oc_net_name else (admin_oc_net_name | net_vlan) }}" + user_data_content: "{{ kolla_bifrost_deploy_image_user_data_content }}" tasks: - block: - name: Ensure the Bifrost host variables directory exists diff --git a/doc/source/configuration/reference/bifrost.rst b/doc/source/configuration/reference/bifrost.rst index 8e37bf18e7f8e449a8def107a21aa2d18489036f..7d3b71025c83c12e93afb921bbbe1831982a9048 100644 --- a/doc/source/configuration/reference/bifrost.rst +++ b/doc/source/configuration/reference/bifrost.rst @@ -197,6 +197,24 @@ The name of the root disk image to deploy can be configured via the Kayobe inventory. This can be used to provision different images across the overcloud. +It can be necessary to deploy overcloud hosts with custom settings which can be +configured during provision by the cloud-init user-data configured via the +``kolla_bifrost_deploy_image_user_data_content`` option. The defaults is an +empty string. + +.. code-block:: yaml + :caption: ``bifrost.yml`` + + kolla_bifrost_deploy_image_user_data_content: | + users: + name: myuser + sudo: ALL=(ALL) NOPASSWD:ALL + shell: /bin/bash + passwd: <HASH_OF_MY_PASSWORD> + lock_passwd: false + + timezone: "Europe/Paris" + While only a single disk image can be built with Bifrost, starting from the Yoga 12.0.0 release, Kayobe supports building multiple disk images directly through Diskimage builder. Consult the :ref:`overcloud host disk image build diff --git a/etc/kayobe/bifrost.yml b/etc/kayobe/bifrost.yml index a9eba19dd394151e4febc270ba18b7ca7f4c524a..158ccf5882384ad54e2d079fa113c62794a1d0d2 100644 --- a/etc/kayobe/bifrost.yml +++ b/etc/kayobe/bifrost.yml @@ -71,6 +71,10 @@ # Default is none. #kolla_bifrost_deploy_image_rootfs: +# Custom cloud-init user-data passed to deploy of the deployment image. +# Default is an empty string. +#kolla_bifrost_deploy_image_user_data_content: + ############################################################################### # Ironic configuration. diff --git a/releasenotes/notes/add-custom-user-data-content-d188c7c197b50acb.yaml b/releasenotes/notes/add-custom-user-data-content-d188c7c197b50acb.yaml new file mode 100644 index 0000000000000000000000000000000000000000..748e81c1deaefa460ba947a7fbcb1ab6915f9f70 --- /dev/null +++ b/releasenotes/notes/add-custom-user-data-content-d188c7c197b50acb.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Adds a new ``kolla_bifrost_deploy_image_user_data_content`` variable used + to define the custom user_data content used by the cloud-init for overcloud + provision.