1 heat_template_version: 2014-10-16
4 This is the firstboot configuration for kvmfornfv kernel of the compute nodes
5 via cloud-init. To enable this, replace the default
6 mapping of OS::TripleO::NodeUserData in ../overcloud_resource_registry*
11 Name of the kvmfornfv kernel rpm.
12 Example: "kvmfornfv_kernel.rpm"
15 ComputeHostnameFormat:
21 type: OS::Heat::MultipartMime
24 - config: {get_resource: compute_kernel_args}
26 # Verify the logs on /var/log/cloud-init.log on the overcloud node
28 type: OS::Heat::SoftwareConfig
35 FORMAT=$COMPUTE_HOSTNAME_FORMAT
36 if [[ -z $FORMAT ]] ; then
39 # Assumption: only %index% and %stackname% are the variables in Host name format
40 FORMAT=$(echo $FORMAT | sed 's/\%index\%//g' | sed 's/\%stackname\%//g') ;
42 if [[ $(hostname) == *$FORMAT* ]] ; then
43 yum install -y /root/$KVMFORNFV_KERNEL_RPM
44 grub2-mkconfig -o /etc/grub2.cfg
49 $KVMFORNFV_KERNEL_RPM: {get_param: ComputeKernelArgs}
50 $COMPUTE_HOSTNAME_FORMAT: {get_param: ComputeHostnameFormat}
53 # This means get_resource from the parent template will get the userdata, see:
54 # http://docs.openstack.org/developer/heat/template_guide/composition.html#making-your-template-resource-more-transparent
55 # Note this is new-for-kilo, an alternative is returning a value then using
56 # get_attr in the parent template instead.
58 value: {get_resource: userdata}