I apologize in advance if this question is too general - I'm happy to share specifics as needed. I'll attach a couple key files as a start on that.
I used the online tool PuPHPet to create a CentOS box that was close to meeting my needs, but because of that, my Puppet files are apparently more complex than they need to be (all examples I have seen in tutorials are far simpler).
Then, because I was completely new to all this, I made changes to my actual server (by SSHing into my VM and rummaging around) while having absolutely no idea how to reflect those changes in the Puppet files.
I have completely rewritten PuPHPet to take advantage of a built-in configuration tool for Puppet called Hiera. Simply look inside your downloaded folder and openpuppet/hieradata/common.yaml. This is the magical file that controls everything!
puphpet/puppet/manifest.pp alone is 920 lines! I'm pretty sure most of that, as well as many of the other files, is unneeded code (I keep seeing things like "if $::osfamily == 'debian'...", for example). But the syntax is new to me, so I'm afraid to start slashing chunks of it.
A key piece of work I remember doing was on the nginx configuration, so I'll throw it out as a concrete example. A tree of the VM's /etc/nginx/ is as follows, with sizes and dates (as you can probably guess, I made the box in February last year and then fiddled with it off and on over the next couple months):├── [      4096 Mar 6 2014] conf.d
│  ├── [       888 Feb 13 2014] default.conf
│  ├── [       427 Feb 11 2014] example_ssl.conf
│  ├── [       415 Feb 13 2014] proxy.conf
│  └── [      1469 Apr 26 2014] vhost_autogen.conf
├── [      4096 Feb 13 2014] conf.mail.d
├── [       963 Mar 6 2014] fastcgi_params
├── [      4096 Mar 6 2014] includes.d
│  └── [      1127 Mar 25 2014] fastcgi_common
├── [      2837 Feb 11 2014] koi-utf
├── [      2223 Feb 11 2014] koi-win
├── [      3463 Feb 11 2014] mime.types
├── [       565 Apr 19 2014] nginx.conf
├── [       596 Feb 11 2014] scgi_params
├── [       623 Feb 11 2014] uwsgi_params
└── [      3610 Feb 11 2014] win-utf
Most of the work I remember doing is in vhost_autogen.conf, but the string "autogen" doesn't appear in manifest.pp, so I don't know what code created that file. Perhaps I'm hopelessly ignorant, but can someone point me in the right direction? It's too bad that it isn't possible to create a Puppet manifest from an existing server... ;-)
In particular, I am uncertain whether Puppet has any role in managing a PuPHPet-generated server configuration after it is initially created, or in initializing new VMs.
(docs) "I have completely rewritten PuPHPet to take advantage of a built-in configuration tool for Puppet called Hiera. Simply look inside your downloaded folder and openpuppet/hieradata/common.yaml. This is the magical file that controls everything!"
You are right that the manifest is more general than you need it to be, but it appears to be a generated file. It is not intended to be maintained manually. Indeed, I suppose that the idea is for you to use PuPHPet to generate an altogether new one if needed.
In any event, it doesn't look like trimming it back would help you solve your immediate problem.
 The basics of the language are not hard to learn, if you're interested.
As I already noted, one of the things that appears to be causing confusion is that you're not looking at all the relevant files. There is a veritable host of relevant Puppet manifest files that do not appear in your listing, plus the key Hiera data file that PuPHPet's online help references. The default location for such files would be either /etc/puppet or ~someuser/.puppet, depending on how Puppet is being run. Perhaps you could 'find' the 'hieradata' directory, the 'common.yaml' file, or a 'puppet.conf' file.
The task before you is to figure out how to record your customizations in the form of Hiera data.
Moreover, you need to be aware that although you can probably extract the needed data and present it to Puppet, the config files it generates when you have successfully done so are likely to be equivalent rather than identical. I'm afraid that will complicate the verification process.
Addendum: I got a chance to talk to someone at a PHP user's group gathering with my computer in front of me, and he explained a lot of fundamentals I was missing. I am better informed now about the different roles of Vagrant and Puppet, and what PuPHPet was doing for me. My main configuration file for PuPHPet was not manifest.pp at all, but config.yaml - once I saw what was in there, things starting making more sense. And I discovered that PuPHPet has grown a lot since I used it a year ago - it still can't do everything I need, but I now understand why you saw it as having a more active ongoing role. Since it can accept my current config.yaml as a starting point so that I don't have to go through all the steps again, I'm going to have it make me another server (so that I get the newest, best version of the PuPHPet-generated code) and work from there. I may still end up with a simplified Puppet setup (sans PuPHPet) long term, but since I'm such a newbie, it's nice to be able to reference example code that a Puppet expert wrote, even if it's more complex than it needs to be.
Thanks again for your help.
jcbollinger - you're right in that PuPHPet has changed drastically since your original archive was created.
Hope your current VM is running smoothly, though!
Hi, Juan! It's great to hear from you here. As you can see, John felt that my question was more of a PuPHPet question than a Puppet one. After a little more work on my own I then posted on PuPHPet Issues (https://github.com/puphpet/puphpet/issues/1352), and you told me that it was a Puppet question. I felt a little like a ping pong ball... :( So I'm glad the loop is closing a bit.
I'm still stuck at the overall question I tried to ask here and on github, which is how to modify either the PuPHPet config.yaml or the Puppet files to handle things beyond PuPHPet's GUI. Naturally it would be good to include as much of it in config.yaml as possible so that it won't be lost if I go back to the PuPHPet GUI later, but so far I have only figured out a few other places to put particular things - see https://github.com/puphpet/puphpet/issues/1352#issuecomment-72766107 for a list of mods I have done so far, which are scattered in four places. I have not gotten any farther - I still don't know how to include nginx config changes and installation of things that don't have a yum repo, like LaTeX and specialty files I'll need. Help from Juan, John, or anyone else is appreciated.
It's understandable if the PuPHPet project does not support hand editing its output...
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.
With regard to LaTeX specifically, there are packages in CentOS's standard repositories, so you shouldn't need to configure a custom repository for it.
If you in fact do need to manage software that's not available pre-packaged from any public repository...
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 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.
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.
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.
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 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.
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.
Â
With regard to LaTeX specifically, there are packages in CentOS's standard repositories, so you shouldn't need to configure a custom repository for it.
The flavor I need is upTeX (https://www.ctan.org/pkg/uptex), which is a bit non-standard, but I see that there are more repos for texlive stuff than there were the last time I installed it, so I'll continue to investigate that. I thought I was clever when I found a Puppet module for texlive (https://github.com/andschwa/puppet-latex), but I apparently don't understand how to use it. In Puppetfile I putbut all I get is the module downloaded and unpacked, not installed. I also tried putting the contents of that github repo in puphpet/puppet/modules, but that didn't help.
ÂIf you in fact do need to manage software that's not available pre-packaged from any public repository...
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.
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 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.