Ask Your Question

puppet questions

asked 2015-04-20 08:29:32 -0600

devesh.mehta gravatar image

I have several initial questions. Here is our scenario: We have open source puppetmaster installed with Foreman as the dashboard. All instances so far being managed by puppetmaster are in AWS cloud. So new ones spin up and down regularly. - Since puppetmaster still displays instances that are no longer running, how would we update puppetmaster to display ONLY those instances that are still running? - Can we use Puppetmaster through Foreman as a way to instantiate an AWS instance with puppet agent? - I have an instance with puppet agent on it, and it phones home – uppet agent –test – to register itself with puppetmaster. I have several test configurations on the puppetmaster, like apache, kibana, and would like to know how I ran the puppet agent command to tag it to automatically download the needed configuration using tags. Please provide examples. - If we can not use foreman to clear all server instances no longer in use, how would you do that on the puppetmaster using command line? - Where is there a repository of Accenture approved Puppet classes/modules I can download to the puppet master for use with the client? - How would I automate this with Jenkins? I want Jenkins, after testing a puppet module, to start an instance or vagrant and install the puppet class/module on that instance. How would I do that?

edit retag flag offensive close merge delete


I don't have any experience with Foreman or with AWS. However, to have a better chance of getting responses, you may want to reformat your question to be more readable. At a minimum: put blank lines between paragraphs; put each list entry on a new line; indent list entries to create sub-lists.

JohnsonEarls gravatar imageJohnsonEarls ( 2015-04-24 08:50:30 -0600 )edit

2 Answers

Sort by » oldest newest most voted

answered 2016-04-19 10:37:51 -0600

loriss gravatar image

You can use hammer CLI to purge your unresponsive instances, using "hammer host" command, but if you need to do it automatically I suggest use AWS Cloudwatch to monitor your instances's states and delete the instances that are no longer responding. I think is only the start of your question.

edit flag offensive delete link more

answered 2016-04-20 07:54:50 -0600

DarylW gravatar image

We have a similar problem, but not with forman... our 'stale certs' build up (when you run puppet cert list --all) and if a machine comes up and reuses an IP from within our VPC, it gets a cert collision and fails. We don't have a sophisticated solution, but we have a script that runs, gets a list of all of our instances using the AWS API, gets a list of all the certs, and if we have a cert but don't have an instance in a non terminated state, we remove it.

We currently have that running once a day in a cron run, but you may be able to use lifecycle events to trigger lambda to do some sort of cleanup like that. I'm not familiar with forman, but if it has some sort of rest API you could use that directly from lambda, or like I previously mentioned, some sort of task that would run on your forman host that could clean up nodes no longer listed under aws ec2 describe-instances.

If you have any more questions, let me know!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2015-04-20 08:29:32 -0600

Seen: 397 times

Last updated: Apr 20 '16