Puppet for VM on Windows 7 - confused!

92 views
Skip to first unread message

Karen Ellrick

unread,
May 9, 2015, 5:53:27 AM5/9/15
to puppet...@googlegroups.com
Having already used Puppet a bit by way of a pre-packaged ZIP file created by the PuPHPet online tool, I decided to try building a simpler VM without the tool. I have VirtualBox and Vagrant already installed and happy. What do I do next? I'm getting too many seemingly conflicting instructions.

This looked like a nice simple starting point: https://github.com/miccheng/vagrant-lamp-centos63 It had three git commands, after which I should have been able to run vagrant and have a basic LAMP box.

But the repo said it was deprecated and replaced by this: https://github.com/sgphpug/Vagrant-LAMP-CentOS64 Okay, fine. But the newer one has completely different instructions for installation - gem install of puppet and librarian-puppet, some dependency stuff, etc. I was pleasantly surprised to discover that I do have Ruby installed (I had no idea - this is an ordinary Windows PC), so I opened a command prompt, cd'ed to a logical spot (in case that would matter), and tried the first command: gem install puppet. After about a half hour, with some complaints about not being able to convert some things to UTF-8, it was still trying to do who-knows-what. I looked in several likely spots for some hint that files related to Puppet were being saved somewhere, but couldn't find anything. I have no idea where it was installing anything.

While it still ran in the background, I went back to Google and looked for more info about installing Puppet on Windows. I found this page: https://docs.puppetlabs.com/guides/install_puppet/install_windows.html#automated-installation That describes a completely different sort of thing from Ruby gems, a more typical Windows-ish installation. But the Pre-Install Tasks page talked of a puppet master that must be on a *nix machine somewhere. It said: "Your puppet master(s) should be robust dedicated servers that can handle the amount of agents they’ll need to serve." Hmm, I don't have one of those, but perhaps it will be all right. After all, I had no trouble with the PuPHPet boxes.

So I halted the gem-based task (which still hadn't finished!), downloaded the 64-bit msi file, and ran it. It said: "This will install Puppet (64-bit) 3.7.5 and configure the system to fetch configurations every half hour. This version of Puppet (64-bit) will work with puppet masters running Puppet 3.0 or higher." Hmph! Not only do I not have a puppet master or a place to put one, but I don't want something running constantly on my PC that tries to go to some server every half hour for who knows what. The pre-install page also mentioned Standalone Puppet that doesn't use a master, but it didn't give any hints about how to do that.

The sweet little zip file from PuPHPet did not require any Ruby gems, msi installations, or master servers. Apparently that's yet a third way to run Puppet (perhaps similar to the deprecated Centod63 repo that didn't require anything beyond VirtualBox and vagrant).

So, why am I so confused, and could someone clear my head?

Joseph Karns

unread,
May 10, 2015, 5:52:51 PM5/10/15
to puppet...@googlegroups.com
Hello Karen

If your goal is to be able to run a all-in-one puppet master and have a client connecting to the master, for testing purposes, the best way to handle this is to use virtualbox with vagrant. I know that is sometimes easier said then done, so I would suggest using Jerald Sheets vagrant setup. His github report is located here, https://github.com/cvquesty/vagrant-ss

This will help you get to a point of having a place to test using puppet and being able to destroy your test environment with ease.

Make sure you system your using this setup has at minimum 8gb of memory.

Please reach out to myself if you have any questions on setting any of the pieces up.

Thanks
Joseph Karns
jm...@psu.edu

Rob Reynolds

unread,
May 11, 2015, 8:23:08 PM5/11/15
to puppet...@googlegroups.com
Hi Karen,

On Sat, May 9, 2015 at 12:53 AM, Karen Ellrick <osaka...@gmail.com> wrote:
Having already used Puppet a bit by way of a pre-packaged ZIP file created by the PuPHPet online tool, I decided to try building a simpler VM without the tool. I have VirtualBox and Vagrant already installed and happy. What do I do next? I'm getting too many seemingly conflicting instructions.

This looked like a nice simple starting point: https://github.com/miccheng/vagrant-lamp-centos63 It had three git commands, after which I should have been able to run vagrant and have a basic LAMP box.

But the repo said it was deprecated and replaced by this: https://github.com/sgphpug/Vagrant-LAMP-CentOS64 Okay, fine. But the newer one has completely different instructions for installation - gem install of puppet and librarian-puppet, some dependency stuff, etc. I was pleasantly surprised to discover that I do have Ruby installed (I had no idea - this is an ordinary Windows PC), so I opened a command prompt, cd'ed to a logical spot (in case that would matter), and tried the first command: gem install puppet. After about a half hour, with some complaints about not being able to convert some things to UTF-8, it was still trying to do who-knows-what. I looked in several likely spots for some hint that files related to Puppet were being saved somewhere, but couldn't find anything. I have no idea where it was installing anything.

While it still ran in the background, I went back to Google and looked for more info about installing Puppet on Windows. I found this page: https://docs.puppetlabs.com/guides/install_puppet/install_windows.html#automated-installation That describes a completely different sort of thing from Ruby gems, a more typical Windows-ish installation. But the Pre-Install Tasks page talked of a puppet master that must be on a *nix machine somewhere. It said: "Your puppet master(s) should be robust dedicated servers that can handle the amount of agents they’ll need to serve." Hmm, I don't have one of those, but perhaps it will be all right. After all, I had no trouble with the PuPHPet boxes.

I believe you are referring to this[1]. This is merely meant to state that Windows only has an agent available in a Master/Agent scenario.
 


So I halted the gem-based task (which still hadn't finished!), downloaded the 64-bit msi file, and ran it. It said: "This will install Puppet (64-bit) 3.7.5 and configure the system to fetch configurations every half hour. This version of Puppet (64-bit) will work with puppet masters running Puppet 3.0 or higher." Hmph! Not only do I not have a puppet master or a place to put one, but I don't want something running constantly on my PC that tries to go to some server every half hour for who knows what. The pre-install page also mentioned Standalone Puppet that doesn't use a master, but it didn't give any hints about how to do that.

The MSI is the primary means of installing Puppet on Windows. If you want a standalone Puppet, you just want to pass PUPPET_AGENT_STARTUP_MODE=Disabled to the MSI installer - see Automated Installation[2] and MSI Properties[3]. I see that you found the automated installation section already but perhaps we should draw out more that you can run the standalone puppet by setting that property to disabled in the actual installer.


 

The sweet little zip file from PuPHPet did not require any Ruby gems, msi installations, or master servers. Apparently that's yet a third way to run Puppet (perhaps similar to the deprecated Centod63 repo that didn't require anything beyond VirtualBox and vagrant).

FWIW, the MSI does come with a vendored ruby gems, so you can get past at least Ruby gems and master servers. Unfortunately I haven't gotten you past the need for the MSI though. :)
 

So, why am I so confused, and could someone clear my head?

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/7caa94e7-3f57-48e6-aa27-86c700484c9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Rob Reynolds
Developer, Puppet Labs

PuppetConf 2015 is coming to Portland, Oregon! Join us October 5-9.
Register now to take advantage of the Early Adopter discount save $349!

Rob Reynolds

unread,
May 11, 2015, 8:29:19 PM5/11/15
to puppet...@googlegroups.com
On Mon, May 11, 2015 at 3:22 PM, Rob Reynolds <r...@puppetlabs.com> wrote:
Hi Karen,

On Sat, May 9, 2015 at 12:53 AM, Karen Ellrick <osaka...@gmail.com> wrote:
Having already used Puppet a bit by way of a pre-packaged ZIP file created by the PuPHPet online tool, I decided to try building a simpler VM without the tool. I have VirtualBox and Vagrant already installed and happy. What do I do next? I'm getting too many seemingly conflicting instructions.

This looked like a nice simple starting point: https://github.com/miccheng/vagrant-lamp-centos63 It had three git commands, after which I should have been able to run vagrant and have a basic LAMP box.

But the repo said it was deprecated and replaced by this: https://github.com/sgphpug/Vagrant-LAMP-CentOS64 Okay, fine. But the newer one has completely different instructions for installation - gem install of puppet and librarian-puppet, some dependency stuff, etc. I was pleasantly surprised to discover that I do have Ruby installed (I had no idea - this is an ordinary Windows PC), so I opened a command prompt, cd'ed to a logical spot (in case that would matter), and tried the first command: gem install puppet. After about a half hour, with some complaints about not being able to convert some things to UTF-8, it was still trying to do who-knows-what. I looked in several likely spots for some hint that files related to Puppet were being saved somewhere, but couldn't find anything. I have no idea where it was installing anything.

While it still ran in the background, I went back to Google and looked for more info about installing Puppet on Windows. I found this page: https://docs.puppetlabs.com/guides/install_puppet/install_windows.html#automated-installation That describes a completely different sort of thing from Ruby gems, a more typical Windows-ish installation. But the Pre-Install Tasks page talked of a puppet master that must be on a *nix machine somewhere. It said: "Your puppet master(s) should be robust dedicated servers that can handle the amount of agents they’ll need to serve." Hmm, I don't have one of those, but perhaps it will be all right. After all, I had no trouble with the PuPHPet boxes.

I believe you are referring to this[1]. This is merely meant to state that Windows only has an agent available in a Master/Agent scenario.
 


So I halted the gem-based task (which still hadn't finished!), downloaded the 64-bit msi file, and ran it. It said: "This will install Puppet (64-bit) 3.7.5 and configure the system to fetch configurations every half hour. This version of Puppet (64-bit) will work with puppet masters running Puppet 3.0 or higher." Hmph! Not only do I not have a puppet master or a place to put one, but I don't want something running constantly on my PC that tries to go to some server every half hour for who knows what. The pre-install page also mentioned Standalone Puppet that doesn't use a master, but it didn't give any hints about how to do that.

The MSI is the primary means of installing Puppet on Windows. If you want a standalone Puppet, you just want to pass PUPPET_AGENT_STARTUP_MODE=Disabled to the MSI installer - see Automated Installation[2] and MSI Properties[3]. I see that you found the automated installation section already but perhaps we should draw out more that you can run the standalone puppet by setting that property to disabled in the actual installer.

I followed up with PUP-4554[1] to address possible confusion for the MSI installer.

 


 

The sweet little zip file from PuPHPet did not require any Ruby gems, msi installations, or master servers. Apparently that's yet a third way to run Puppet (perhaps similar to the deprecated Centod63 repo that didn't require anything beyond VirtualBox and vagrant).

FWIW, the MSI does come with a vendored ruby gems, so you can get past at least Ruby gems and master servers. Unfortunately I haven't gotten you past the need for the MSI though. :)
 

So, why am I so confused, and could someone clear my head?

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/7caa94e7-3f57-48e6-aa27-86c700484c9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Rob Reynolds
Developer, Puppet Labs

PuppetConf 2015 is coming to Portland, Oregon! Join us October 5-9.
Register now to take advantage of the Early Adopter discount save $349!

Karen Ellrick

unread,
May 20, 2015, 3:48:58 AM5/20/15
to puppet...@googlegroups.com
Thanks for the response, Rob, and for taking action to clarify the documentation. (And thanks also to Joseph, although he must have not noticed in my OP that I'm already running Vagrant.) Sorry I took so long to get back to working on this - I was pulled away to other things for a while.

I think I figured out something (perhaps obvious to everyone but me). In the VM that PuPHPet made for me, there indeed is a Puppet Master - it's on the VM itself! Apparently Vagrant installs Puppet there as part of its provisioning. There is apparently very little "agent", because as far as I am aware, it did not install a Puppet agent on Windows - I don't think it even knows what host OS I have. To me that seems like a good thing, because naturally the future home of the Puppet configuration built on a Vagrant VM is a production server, which won't involve Vagrant and a host OS.

I'm sure it's obvious that I don't yet understand the interplay between Vagrant and Puppet, and between the Puppet master and whatever agent piece runs on the host. I'd like to understand how PuPHPet managed to provision a VM without having me install anything Puppet-related, but I must be looking in the wrong files for clues - I've tried Vagrantfile, config.yaml, and Puppetfile, but I don't see anything about an agent or anything with a local path. In config.yaml, there is this section under vagrantfile-local/vm:
        provision:
            puppet
:
                manifests_path
: puphpet/puppet
                manifest_file
: site.pp
                module_path
: puphpet/puppet/modules
                options
:
                   
- '--verbose'
                   
- '--hiera_config /vagrant/puphpet/puppet/hiera.yaml'
                   
- '--parser future'

There are no executables in the .../puphpet/puppet directory. In .../Ruby193/bin there is a file called puppet (and a bat file that calls it), which was probably added during the "gem install puppet" that never completed. But the whole Ruby193 directory was created two months after I first used PuPHPet - I think it coincided with when I started using Sass, which is also Ruby based. So PuPHPet apparently doesn't need Ruby on the host machine at all (naturally it's on the VM). Where else should I look for clues?

Karen Ellrick

unread,
May 20, 2015, 9:35:08 AM5/20/15
to puppet...@googlegroups.com
Hmm, perhaps more of the lights are coming on for me, after conferring briefly with the creator of PuPHPet. Here is a question I have not asked before, because I thought I knew: Which machine is the Puppet "agent" to be installed and run on?
  1. The server that is being provisioned? (in my case, a VM with CentOS 6.4)
  2. The computer where Vagrant is running? (in my case, a Windows 7 laptop, which will never be set up as a server)
I was assuming #2, but now I'm starting to think it's #1. If that's so, then the msi has nothing to do with what I'm trying to accomplish. That would explain why PuPHPet didn't need it. Is my thinking now closer to the truth?

Rob Reynolds

unread,
May 20, 2015, 11:03:14 PM5/20/15
to puppet...@googlegroups.com
I'm assuming that #2 is the host that runs the Vagrant process and #1 is the guest machine that Vagrant is provisioning? Then you are correct that it is #1 that needs Puppet and not #2.

 

--
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...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages