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