Bug 1277416

Summary: Documentation Correction Applying Custom Puppet Configuration section
Product: Red Hat OpenStack Reporter: Anand Nande <anande>
Component: documentationAssignee: Dan Macpherson <dmacpher>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 7.0 (Kilo)CC: adahms, anande, dmacpher, racedoro, saime, yeylon
Target Milestone: y2Keywords: Documentation, ZStream
Target Release: 7.0 (Kilo)   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-25 01:40:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
custom_puppet_config.yaml none

Description Anand Nande 2015-11-03 09:42:33 UTC
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 09:55:41 UTC
Assigning to Dan for review.

Comment 4 Dan Macpherson 2015-11-09 00:13:30 UTC
*** Bug 1278001 has been marked as a duplicate of this bug. ***

Comment 5 Dan Macpherson 2015-11-09 00:15:41 UTC
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 05:42:07 UTC
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 07:29:28 UTC
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-25 01:40:31 UTC
Confirmed with Anand outside of this bug. Closing this bug, but feel free to reopen if further changes are required.