I hear your frustration, Karen.  I'm sorry this is proving to be such a 
hassle for you.

On Wednesday, February 25, 2015 at 4:35:11 PM UTC-6, Karen Ellrick wrote:
>
>
> It's understandable if the PuPHPet project does not support hand editing 
>> its output...
>>
>
> If that was the case, Juan wouldn't have told me in 
> https://github.com/puphpet/puphpet/issues/1352#issuecomment-72649784 
> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fpuphpet%2Fpuphpet%2Fissues%2F1352%23issuecomment-72649784&sa=D&sntz=1&usg=AFQjCNEWv6mQcrfpkcV-JFSj7iFzz43pLw>
>  
> that I need to work with Puppet to do what I want. He seems to be saying 
> that the generated files can indeed be edited.
>
>

I'm trying not to bad-mouth Juan, but I read that github thread already, 
and it sounds to me as if he's brushing you off.  Yes, in principle you can 
edit the Puppet code and data that PuPHPet outputs to achieve any result 
you want.  By that same principle, you can also write Puppet code from 
scratch to do what you want.  Saying so doesn't get you any closer.  I am 
honestly uncertain whether starting from the PuPHPet output is any 
advantage to you, given that it doesn't provide everything you want, and 
you are not already well versed in Puppet.

 

> As PuPHPet developer, Juan is in a better position to give such advice, or 
>> at least to tell you about how the generated code and data are organized, 
>> which would help the rest of us advise you about what changes to make.
>>
>
> When I asked Juan for help understanding the structure of the generated 
> code so that I'd know where to customize (
> https://github.com/puphpet/puphpet/issues/1352#issuecomment-72766107), 
> there was no response. He apparently doesn't have time to get into 
> specifics.
>


I'm sorry.  I don't have the much more time that I would need to analyze 
the code before I could spend time telling you what Juan already knows.  
Perhaps this thread will yet be noticed by someone who has already gone 
through that, or by someone who has the time and inclination to do all that 
analysis.  If PuPHPet has some kind of organized user community then that 
might be a richer environment for finding such a person.

Otherwise, all I can think to recommend is to either (a) learn Puppet well 
enough to take the lead yourself on sorting it out (we can help in more 
narrowly-scoped ways), or (b) hire a consultant.  If you're willing to do 
the former, then I've always found Puppet's online docs 
<https://docs.puppetlabs.com/puppet/3/reference/> to be quite good.  There 
are good books about Puppet out there, too, though Puppet moves fast enough 
that those fall out of date unfortunately swiftly.

 

> The one I have been asking about all along is not really "software" per 
> se, but nginx configuration file content. So far no one has suggested 
> anything (even a link for more info) about how one gets that kind of thing 
> into Puppet. I'm using a PHP framework called Phalcon that needs some 
> special web server settings (
> http://docs.phalconphp.com/en/latest/reference/nginx.html#configuration-by-host)
>  
> - I have it working on a VM, but I don't know how to get Puppet to create 
> it the next time.
>


Usually, files will be managed in Puppet via 'file' resources.  Very 
likely, your generated Puppet code has that wrapped in a class; a typical 
name for a class for that purpose would be "nginx::config".  In a 
hand-turned Puppet manifest set you would expect to find a class of that 
name in file <confdir>/modules/nginx/manifests/config.pp.  Chances are good 
that such a File resource relies on an ERB template to define the file 
content; possibly you would find that in 
<confdir>/modules/nginx/templates/nginx.conf.erb.  Class and template 
likely one or both rely on data recorded in one or more YAML files 
somewhere central among the Puppet files.

I cannot say more without undertaking the analysis I described earlier, and 
you will have recognized that even what I did say is variously vague, 
uncertain, or both.  PuPHPet is in no way constrained to generate Puppet 
code that adheres to the same norms as hand-turned code, and in any case, 
most of the key bits involve details that I cannot hope to guess from 
here.  All this is multiplied by each thing you need to customize, and I am 
uncertain what it will take to carry any of it forward to future VMs.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1ccd004b-5d1c-4be2-aad9-04d85f5a1c72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to