Bug 1277416 - Documentation Correction Applying Custom Puppet Configuration section
Documentation Correction Applying Custom Puppet Configuration section
Status: CLOSED CURRENTRELEASE
Product: Red Hat OpenStack
Classification: Red Hat
Component: documentation (Show other bugs)
7.0 (Kilo)
All Linux
high Severity high
: y2
: 7.0 (Kilo)
Assigned To: Dan Macpherson
: Documentation, ZStream
: 1278001 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-03 04:42 EST by Anand Nande
Modified: 2016-01-24 20:40 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-24 20:40:31 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
custom_puppet_config.yaml (514 bytes, text/plain)
2015-11-03 04:42 EST, Anand Nande
no flags Details

  None (edit)
Description Anand Nande 2015-11-03 04:42:33 EST
Created attachment 1088850 [details]
custom_puppet_config.yaml

Description of problem:

When following the example provided in the OSP 7.0 Documentation:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/7/html/Director_Installation_and_Usage/sect-Applying_Custom_Puppet_Configuration.html

"section 8.4. Applying Custom Puppet Configuration", the deployment is not successful.

When creating the /home/stack/templates/custom_puppet_config.yaml file,  the beginning of the file must contain the heat template version (for ex.: heat_template_version: 2014-10-16).  It should also contain a template description, and the parameter used later in the example (servers) must be defined at the top of the file.  With these in place, the example should look like the attached file (custom_puppet_conifg.yaml).

Additionally, the example says to include the template using "-e ~/templates/custom_puppet_config.yaml", however this will cause a resource definition error.  To include this template, the deploy command should use "-e ~/templates/puppet_post_config.yaml" instead, which defines the resource.

Also, it appears that relative or absolute paths need to be used in the puppet_post_config.yaml and custom_puppet_config.yaml files.  

If we use ~/templates/, the following error is returned ERROR: openstack Could not fetch contents for file:///home/stack/templates/~/templates/custom_puppet_config.yaml


Version-Release number of selected component (if applicable): osp7


How reproducible: always


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 2 Andrew Dahms 2015-11-03 04:55:41 EST
Assigning to Dan for review.
Comment 4 Dan Macpherson 2015-11-08 19:13:30 EST
*** Bug 1278001 has been marked as a duplicate of this bug. ***
Comment 5 Dan Macpherson 2015-11-08 19:15:41 EST
Comment from Sebatian Aime from BZ#1278001:

Another mistake in the same section of the documentation.The example YAML template provided in the doc does not work. Here is what we have successfully used with our customer today: 

$ cat /home/stack/templates/custom_puppet_config.yaml

heat_template_version: 2014-10-16

description: >
  Example extra config for post-deployment
parameters:
  servers:
    type: json

resources:
  ExtraConfig:
    type: OS::Heat::SoftwareConfig
    properties:
      config: {get_file: motd.pp}
      group: puppet
      options:
        enable_hiera: True
        enable_facter: False
  ExtraDeployments:
    type: OS::Heat::SoftwareDeployments
    properties:
      servers:  {get_param: servers}
      config: {get_resource: ExtraConfig}

Ths commit in comment #3 should rectify this.
Comment 7 Dan Macpherson 2015-11-20 00:42:07 EST
Hi Anand,

This should be live now:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/7/html/Director_Installation_and_Usage/sect-Applying_Custom_Puppet_Configuration.html

How does it look? Any further changes required?
Comment 8 Anand Nande 2015-11-27 02:29:28 EST
Dan,

two things still missing:

1. The heat template is still missing a template description like in the attached file.

---
description: >
  Run Puppet extra configuration to set new MOTD
---

2. The doc is still using relative path:

  -e ~/templates/puppet_post_config.yaml

 Can we change that to something like:

  -e /home/stack/templates/puppet_post_config.yaml

Regards
--Anand
Comment 12 Dan Macpherson 2016-01-24 20:40:31 EST
Confirmed with Anand outside of this bug. Closing this bug, but feel free to reopen if further changes are required.

Note You need to log in before you can comment on or make changes to this bug.