[Puppet Users] Re: Possible for each user to have their own testing environment?

2013-08-19 Thread myeazel
Git branching and environments is exactly what we did to solve this 
problem. We are actually using gitolite which allows us to lock down who 
can push to certain branches. So anyone can create their own branch, push 
that up (which creates the proper directories through git hooks) and test 
with --environment [branch_name] and then when they know it works great, 
request a merge into our permanent environments like production and 
testing. Once the new code is merged into its final home, the temporary 
branch is deleted. 

The hard part is the git hooks. We actually have a script that emulates the 
Github WebHook URL functionality and a hook that catches that POST and 
does all the magic. I included the web pages that helped me get our setup 
working how we wanted it to.

https://github.com/metajack/notify-webhook
https://puppetlabs.com/blog/git-workflow-and-puppet-environments/

On Thursday, August 15, 2013 8:14:59 AM UTC-6, Sandra Schlichting wrote:

 Hello all =)

 What I would like is a way so multiple people can make changes to all 
 files in /etc/puppet/, but only after they have tested their changes then 
 they git push so /etc/puppet is updated. The git repo is in /etc/puppet. 
 When I read about environments [1] I get the impression that is only for 
 module development, is that correct?

 Ideally what I would like is each user to have their private environment 
 where they can git pull to. E.g. 

 ssh sandra@puppet
 cd /home/sandra/puppet
 git pull
 # edit files
 exit

 ssh root@node
 puppet agent --environment sandra

 exit


 ssh sandra@puppet
 cd /home/sandra/puppet
 git push

 Can something like this be done? And if so, what would my 
 /etc/puppet/puppet.conf look like?


 Lots of love,

 Sandra =)


 [1]: http://docs.puppetlabs.com/guides/environment.html


-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: configure apache passenger problem

2012-07-08 Thread myeazel
When I was just setting up passenger, I had to alter that line referencing 
mod_passenger.so to our apache modules directory.

# LoadModule passenger_module 
/usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so 

This needed to be changed to /etc/httpd/modules/mod_passenger.so since that 
is where apache has the module for passenger. I think you just need to 
track down where that module is and point the configuration to the right 
place.

On Saturday, July 7, 2012 12:23:29 PM UTC-6, Hai wrote:

 I am configuring apache passenger by following the doc 
 http://projects.reductivelabs.com/projects/puppet/wiki/Using_Passenger 

 I am getting following erros when start httpd: 

 ]# /etc/init.d/httpd start 
 Starting httpd: httpd: Syntax error on line 221 of 
 /etc/httpd/conf/httpd.conf: Syntax error on line 5 of 
 /etc/httpd/conf.d/10_passenger.conf: Cannot load 
 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/ext/apache2/mod_passenger.c 
 into server: 
 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/ext/apache2/mod_passenger.c: 
 invalid ELF header 
[FAILED] 

 the 
 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/ext/apache2/mod_passenger.c 
 is the only thing I found in my system, I cannot find a 
 mod_passenger.so file. 

 here is my config, please help: 
 === 
 # ll 
 total 28 
 -rw-r--r-- 1 root root  861 Jul  7 11:08 10_passenger.conf 
 -rw-r--r-- 1 root root 1299 Jul  7 10:57 rack.conf 
 -rw-r--r-- 1 root root  392 Dec  8  2011 README 
 -rw-r--r-- 1 root root 9473 Dec  8  2009 ssl.conf 
 -rw-r--r-- 1 root root  299 May 20  2009 welcome.conf 

 == 
 # cat 10_passenger.conf 

 # /etc/httpd/conf.d/10_passenger.conf 

 # The passenger module path should match ruby gem version 
 # LoadModule passenger_module 
 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so 
 LoadModule passenger_module 
 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/ext/apache2/mod_passenger.c 
 PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.12 
 PassengerRuby /usr/bin/ruby 

 # Recommended Passenger Configuration 
 PassengerHighPerformance on 
 PassengerUseGlobalQueue on 
 # PassengerMaxPoolSize control number of application instances, 
 # typically 1.5x the number of processor cores. 
 PassengerMaxPoolSize 6 
 # Restart ruby process after handling specific number of request to 
 resolve MRI memory leak. 
 PassengerMaxRequests 4000 
 # Shutdown idle Passenger instances after 30 min. 
 PassengerPoolIdleTime 1800 
 # End of /etc/httpd/conf.d/10_passenger.conf 

 = 
 # cat rack.conf 

 # you probably want to tune these settings 
 PassengerHighPerformance on 
 PassengerMaxPoolSize 12 
 PassengerPoolIdleTime 1500 
 # PassengerMaxRequests 1000 
 PassengerStatThrottleRate 120 
 RackAutoDetect Off 
 RailsAutoDetect Off 

 Listen 8140 

 VirtualHost *:8140 
 SSLEngine on 
 SSLProtocol -ALL +SSLv3 +TLSv1 
 SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP 

 SSLCertificateFile 
 /var/lib/puppet/ssl/certs/hqd-puppet-01.telenav.com.pem 
 SSLCertificateKeyFile 
 /var/lib/puppet/ssl/private_keys/hqd-puppet-01.telenav.com.pem 
 SSLCertificateChainFile /var/lib/puppet/ssl/certs/ca.pem 
 SSLCACertificateFile/var/lib/puppet/ssl/ca/ca_crt.pem 
 # If Apache complains about invalid signatures on the CRL, you 
 can try disabling 
 # CRL checking by commenting the next line, but this is not 
 recommended. 
 SSLCARevocationFile /var/lib/puppet/ssl/ca/ca_crl.pem 
 SSLVerifyClient optional 
 SSLVerifyDepth  1 
 SSLOptions +StdEnvVars 

 DocumentRoot /etc/puppet/rack/public/ 
 RackBaseURI / 
 Directory /etc/puppet/rack/ 
 Options None 
 AllowOverride None 
 Order allow,deny 
 allow from all 
 /Directory 
 /VirtualHost 


 -- 
 Hai Tao 


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/SHGyouoA1-IJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Puppet Beginners: New list suggestion?

2012-04-04 Thread myeazel
I just started using puppet about 4 months ago and I have to say, it was a 
lot to take in. I read through the documentation, downloaded the VM to play 
with, etc. What I found was the documentation was almost overwhelming. Part 
of the problem was I didn't know what I wanted to know. After having gotten 
used to puppet, I don't think the current documentation is in need of 
review - it is exactly what I need and use now. But for a beginner, it was 
difficult to stay on the learning curve, even the getting started section 
seemed to be tons of information. Luckily I had expert puppet users helping 
me but I couldn't imagine trying to learn this without someone to bounce 
silly questions off of. 

What I think could help beginners the most would be maybe an example 
network where a small network with a master and several clients are set up 
and you can see all the files and how they interact. Essentially have a 
description of what the different clients do (apache, dhcp, ntp, 
database, etc) and then have the folder structure of the manifests 
available to look at. The reason I bring this up was because I was reading 
the Learning Puppet material and thinking to myself, Ok, I get that but 
*how* should I do this? The hardest part I think for a beginner is making 
the leap from understanding the concepts to how those concepts are commonly 
executed in real world manifests. I think a simple demo network would be 
great. Just my thoughts having just come from the beginners camp.

On Friday, March 30, 2012 3:00:54 PM UTC-5, Mister IT Guru wrote:

 Good Evening Guys,

 Let me start by saying that I really admire how far puppet has come in the 
 last year or so, with the launch of the Enterprise version, Puppet Forge 
 and the other innovations from within Puppet Labs, and in particular the 
 community participation. I love the mailing list, even though I've been 
 lurking for over a year. It's this inner shame that compels me to raise 
 this issue. I apologise if this is not the place to mention this, but hey, 
 you've already got this far, so keep reading!

 I get stage fright looking at some of the code fragments that people 
 post to the list and then say This is how far I've got and I'm trying to 
 do X where X is something pretty complex/unique doesn't quite seem like 
 best practice or something that you'll find on a general use linux box. 
 While I have no problem or even issue with this, the problem I find is that 
 when I tell my admin geek friends about puppet, they go to google and 
 switch off when they see what they view as buckets of work to just get 
 started.

 In a nutshell the perception and feedback I get and I feel this myself, is 
 that the competency level of those whose regularly participate in this 
 list, and in other internet forums may just be a bit too good. I feel as if 
 puppet is lacking a sort of nursery area. After all, everyone here is 
 already a 'professional' or so we like to think!

 Would it be a good idea to have a puppet beginners list, where people can 
 post dumb questions, and maybe have some patient people posting links to 
 blog entries, you tube videos (something which I noticed is lacking for 
 puppet, again making it hard for me to evangelise about it, to even get 
 clients to look at it), and get up to speed with you guys.

 I would like a Puppet Nursery - Or failing that, can we get a puppet 
 advance list? :)

 I'm just saying - It worked for a different project, that's part of how 
 ubuntu started to take over the world, it just became accessible to the 
 casual user. Well, there are a bucket load of causal professional linux 
 admins, who I fear may dismiss taking up puppet because they just can't get 
 the time together to learn or keep up with those who puppet 24/7

 It's just an observation, with a request thrown in - If I annoyed you, 
 upset you, hurt your ego or made you feel bad in any way, I'm sorry. If you 
 wish to take it up with me personally, no problem, have your people call my 
 people, and we'll set up the meet - I'm a big guy so bring backup! (just 
 kidding, love peace and all that!) - I'm hoping to stimulate some 
 conversation and debate - how can puppet be one of the first thoughts in 
 the mind of someone who wants to manage from a 2 to 2 thousands machines? - 
 Reach a critical mass amount casual users? Worked for Facebook, Twitter - 
 not so much for Nokia but you get the point.

 SO! Techie Admin Genius People!! Let's Debate 


On Friday, March 30, 2012 3:00:54 PM UTC-5, Mister IT Guru wrote:

 Good Evening Guys,

 Let me start by saying that I really admire how far puppet has come in the 
 last year or so, with the launch of the Enterprise version, Puppet Forge 
 and the other innovations from within Puppet Labs, and in particular the 
 community participation. I love the mailing list, even though I've been 
 lurking for over a year. It's this inner shame that compels me to raise 
 this issue. I apologise if this is not the place to 

Re: [Puppet Users] change host file depending on location

2012-04-04 Thread myeazel
Depending on how complex the hosts file needs to be, what LenR may be best 
or I have sometimes also approached this kind of issue by using 
parameterized classes can work well too. You can use a define classname 
($variables_to_pass_to_template) { } and then you don't have to work with 
ERB-type conditionals. Its a matter of preference in my opinion. So it 
would do something like this:

define location-based-hosts ($my_specific_hosts) {

file { etc/hosts:
ensure = present,
content = template(puppet:///hosts/hosts_template.erb),
}
}

Then call it with:

hosts::location-based-hosts { us-west:
my_specific_hosts = list of the important host entries,
}

And finally, in the hosts_template.erb:

127.0.0.1 localhost
%= my_specific_hosts %

The syntax should be good but I may have missed something. Again its all 
matter of preference but I have all my templates set up this way, that way 
my templates look as close to the end file as possible and all the magic 
happens in my manifests. 





-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/-ttLBhVQCiUJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.