On Tue, 2020-05-26 at 11:32 +1200, Steve Baker wrote:
Soon nova will be switched off by default on the undercloud and all overcloud deployments will effectively be deployed-server based (either provisioned manually or via the baremetal provision command)
This means that the docs for running firstboot scripts[1] will no longer work, and neither will our collection of firstboot scripts[2]. In this email I'm going to propose what we could do about this situation and if there are still unresolved issues by the PTG it might be worth having a short session on it.
If we had gone the other way around, and done the Heat Stack with "dummy" server resources before deploying baremetal we could have done this seamless, i.e passed these cloud-configs based on the stack to the baremetal provisioning yaml's extention you mention below. But that train departed, long ago ... Do we need to add some deprecation and/or validation? Something that ensure we stop the deployment in case one of the resources OS::TripleO::NodeAdminUserData, OS::TripleO::NodeTimesyncUserData, OS::TripleO::NodeUserData or OS::TripleO::{{role.name}}::NodeUserData is defined in the resource registry, with a pointer to docs on how to move it to the baremetal provisioning yaml, or extraconfig.
The baremetal provisioning implementation already uses cloud-init cloud-config internally for user creation and key injection[3] so I'm going to propose an enhancement the the baremetal provisioning yaml format so that custom cloud-config instructions can be included either inline or as a file path.
++
I think it is worth going through each firstboot script[2] and deciding what its fate should be (other than being deprecated in Ussuri):
https://opendev.org/openstack/tripleo-heat-templates/src/branch/master/first...
This has no parameters, so it could be converted to a standalone cloud-config file, but should it? Can this be achieved with kernel args? Does it require a reboot anyway, and so can be done with extraconfig?
Maybe this could be done using this module in ansible instead: https://docs.ansible.com/ansible/latest/modules/modprobe_module.html#modprob...
https://opendev.org/openstack/tripleo-heat-templates/src/branch/master/first...
I'm not sure why this is implemented as first boot, it seems to consume the parameter NetConfigDataLookup and transforms it to the format os-net-config needs for the file /etc/os-net- config/mapping.yaml. It looks like this functionality should be moved to where os-net-config is actually invoked, and the NetConfigDataLookup parameter should be officially supported.
I agree, I have been thinking about moving this for a while actually.
https://opendev.org/openstack/tripleo-heat-templates/src/branch/master/first...
I suggest deleting this and including a cloud-config version in the baremetal provisioning docs.
+1
https://opendev.org/openstack/tripleo-heat-templates/src/branch/master/first...
Delete this, there is already an abstraction for this built into the baremetal provisioning format[4]
+1
https://opendev.org/openstack/tripleo-heat-templates/src/branch/master/first...
Delete this and include it as an example in the baremetal provisioning docs.
+1
https://opendev.org/openstack/tripleo-heat-templates/src/branch/master/first...
Maybe this could be converted to an extraconfig/all_nodes script[5], but it would be better if this sort of thing could be implemented as an ansible role or playbook, are there any plans for an extraconfig mechanism which uses plain ansible semantics?
cheers
[1] https://docs.openstack.org/project-deploy-guide/tripleo-docs/latest/features...
[2] https://opendev.org/openstack/tripleo-heat-templates/src/branch/master/first...
[3] https://opendev.org/openstack/tripleo-ansible/src/branch/master/tripleo_ansi...
[4] https://opendev.org/openstack/tripleo-ansible/src/branch/master/tripleo_ansi...
https://opendev.org/openstack/tripleo-ansible/src/branch/master/tripleo_ansi...
[5] https://opendev.org/openstack/tripleo-heat-templates/src/branch/master/extra...