Re: [Puppet Users] Active - passive Puppetserver setup with puppet5.1

2018-01-31 Thread Poil

Hey,

Puppet is scalable don't do this !

Use DNS SRV records to balance around your Puppet Servers
Use a version control software like GIT for managing and deploying your 
code between your Puppet Servers. You can search for R10K


This documentation haven't been rewrited for Puppet4 but is still valid.
https://docs.puppet.com/puppet/3/scaling_multiple_masters.html

Best regards

Le 30/01/2018 à 11:52, Mathew Jose a écrit :
I want to setup 2 centos servers to act as puppetservers with 
active-passive mode.


I am not sure  the below plan is good to go , can any of you have a 
look in to it and suggest me ?



  * One puppet server is the CA master  (Uses the Name :puppet )
  * A second Puppet master  ( Name :Puppet-passive ) using the CA
master (Name:puppet) for SSL

  * Each puppet master has a cron to regularly do a 'git pull' of the
puppet environment git repos to /etc/puppetlabs/code/environments
so all agents use the same code.

On the first puppetmaster (puppet)  that will also be the CA master

a)Install puppetserver

b) In its /etc/puppetlabs/puppet/puppet.conf [main] section:

  o server = 
  o ca_server = 
  * Startup puppetserver on it
  * Put  code into /etc/puppetlabs/code/environments
  * Configure it to be an agent to itself and ensure it successfully
runs before proceeding

On other master ( puppet-passive ):

  * Install puppetserver
  * Setup the git repos into /etc/puppetlabs/code/environments as you
did for the CA master
  * In its /etc/puppetlabs/puppet/puppet.conf [main] section:
  o server = 
  o ca_server = 
  * In its [agent] section, make its 'server' be the CA master and set
the correct environment
  * Run the agent successfully (against the CA master), then make
'server' be its own FQDN, then run it successfully again

But I am not sure how to failover from the active master server to 
passive one in case of a requirement.




--
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/6fcffed5-ed0f-432e-b953-cc01c0da7d1e%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.



--
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/64eb1763-13ae-03c8-90f6-ffcb3fd5cc68%40quake.fr.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Error starting PuppetDB

2018-01-31 Thread Martin Alfke
Hi Sundar,

java.lang.OutOfMemoryError

How much RAM does the system have?
Usually PuppetDB needs at least 512 up to 1024 MB RAM.

Best,
Martin


> On 30. Jan 2018, at 15:55, Sundar Win  wrote:
> 
> Hi Ken,
> 
> Could you please help me for the below issue like same.
> I have checked "service puppetdb status" it will show first "puppetdb dead 
> but pid file exists" after restart the service again it will show the same 
> status. 
> 
> and I also collected log file in "/var/log/puppetdb/puppetdb-daemon.log"
> 
> java.lang.OutOfMemoryError: Java heap space
> Dumping heap to /var/log/puppetdb/puppetdb-oom.hprof ...
> Heap dump file created [242992896 bytes in 2.068 secs]
> #
> # java.lang.OutOfMemoryError: Java heap space
> # -XX:OnOutOfMemoryError="kill -9 %p"
> #   Executing /bin/sh -c "kill -9 1865"...
> java.lang.OutOfMemoryError: Java heap space
> Dumping heap to /var/log/puppetdb/puppetdb-oom.hprof ...
> Heap dump file created [245345206 bytes in 2.554 secs]
> #
> # java.lang.OutOfMemoryError: Java heap space
> # -XX:OnOutOfMemoryError="kill -9 %p"
> #   Executing /bin/sh -c "kill -9 12582"...
> java.lang.OutOfMemoryError: GC overhead limit exceeded
> Dumping heap to /var/log/puppetdb/puppetdb-oom.hprof ...
> Heap dump file created [244769451 bytes in 2.038 secs]
> #
> # java.lang.OutOfMemoryError: GC overhead limit exceeded
> # -XX:OnOutOfMemoryError="kill -9 %p"
> #   Executing /bin/sh -c "kill -9 7720"...
> 
> Thanks,
> Sundar
> 
> 
> On Monday, May 26, 2014 at 5:54:13 AM UTC+5:30, Ken Barber wrote:
> No problem, the error messages as exceptions are - somewhat not helpful. The 
> trick for a user to reading JVM stack traces is to ignore the stack trace, 
> and focus on the errors only - its the noise that makes it hard.
> 
> Just thank your stars you aren't forced to read an erlang stack trace *wink*.
> 
> ken.
> 
> 
> On Sat, May 24, 2014 at 3:48 PM, Miguel Angel Coa M.  
> wrote:
> Hi Ken,
> in fact i had duplicate entry "jetty port" in file database.ini and jetty.ini 
> . I delete entry of database.ini and restart my puppetdb service and this run 
> ok. 
> 
> Thanks for you help.
> 
> 
> 2014-05-24 8:48 GMT-04:00 Ken Barber :
> > 2014-05-24 02:07:01,260 ERROR [p.t.logging] Uncaught exception
> > java.lang.IllegalArgumentException: Duplicate configuration entry: [:jetty
> > :port]
> 
> So this is caused by, well a duplicate entry in your configuration (in
> this case /etc/puppetdb/conf.d).
> 
> One good trick to find this kind of thing:
> 
> cd /etc/puppetdb/conf.d
> grep '' *.ini | grep port
> 
> There should be only 1 'port' declaration in the [jetty] block
> (usually in jetty.ini).
> 
> Here are my results:
> 
> root@puppetdb1:/etc/puppetdb/conf.d# grep '' *.ini | grep port
> database.ini:# For PostgreSQL: //host:port/databaseName
> jetty.ini:port = 8080
> jetty.ini:# The port to listen on for HTTPS connections
> jetty.ini:ssl-port = 8081
> repl.ini:# What port the REPL should listen on
> repl.ini:port = 8082
> 
> So 1 port entry in the [jetty] block and 1 port entry in the [repl] block.
> 
> ken.
> 
> --
> You received this message because you are subscribed to a topic in the Google 
> Groups "Puppet Users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/puppet-users/bOdQJX0UAoU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> puppet-users...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/CAE4bNTnkkRwoKA9y_O8RUtCyuH54Kz1_5UWh1kBFEKn_-Wd3DA%40mail.gmail.com.
> 
> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> 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/CALkCwJC9AKzZRBaXu9iUV9fHYNMo2BdMNUio3mGepE6Z1y4MRA%40mail.gmail.com.
> 
> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> 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/be6f3e16-7c3e-42e7-b93b-10bf2eca0f92%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/EDB9E0EA-4458-41BB-A5C5-716F5575FDC8%40gmail.com.
For 

[Puppet Users] Active - passive Puppetserver setup with puppet5.1

2018-01-31 Thread Mathew Jose
I want to setup 2 centos servers to act as puppetservers with 
active-passive mode.

I am not sure  the below plan is good to go , can any of you have a look in 
to it and suggest me ?



   - One puppet server is the CA master  (Uses the Name :puppet ) 
   - A second Puppet master  ( Name :Puppet-passive ) using the CA master  
   (Name:puppet) for SSL 

 

   - Each puppet master has a cron to regularly do a 'git pull' of the 
   puppet environment git repos to /etc/puppetlabs/code/environments so all 
   agents use the same code. 

 On the first puppetmaster (puppet)  that will also be the CA master

a)Install puppetserver

b) In its /etc/puppetlabs/puppet/puppet.conf [main] section:

   - server =  
  - ca_server =  
   - Startup puppetserver on it 
   - Put  code into /etc/puppetlabs/code/environments 
   - Configure it to be an agent to itself and ensure it successfully runs 
   before proceeding 

On other master ( puppet-passive ):

   - Install puppetserver 
   - Setup the git repos into /etc/puppetlabs/code/environments as you did 
   for the CA master 
   - In its /etc/puppetlabs/puppet/puppet.conf [main] section: 
  - server =  
  - ca_server =  
   - In its [agent] section, make its 'server' be the CA master and set the 
   correct environment 
   - Run the agent successfully (against the CA master), then make 'server' 
   be its own FQDN, then run it successfully again 

But I am not sure how to failover from the active master server to passive 
one in case of a requirement.



-- 
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/6fcffed5-ed0f-432e-b953-cc01c0da7d1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] How to deploy a new module in existing env (using r10 and puppetfile)

2018-01-31 Thread maxicrazzyboy
Hi Please help to deploy new module in testing environment of master server

-- 
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/ca15718b-0a78-4e6d-89cb-ee9797907451%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Error starting PuppetDB

2018-01-31 Thread Sundar Win
Hi Ken,

Could you please help me for the below issue like same.
I have checked "service puppetdb status" it will show first "puppetdb dead 
but pid file exists" after restart the service again it will show the same 
status. 

and I also collected log file in "/var/log/puppetdb/puppetdb-daemon.log"

java.lang.OutOfMemoryError: Java heap space
Dumping heap to /var/log/puppetdb/puppetdb-oom.hprof ...
Heap dump file created [242992896 bytes in 2.068 secs]
#
# java.lang.OutOfMemoryError: Java heap space
# -XX:OnOutOfMemoryError="kill -9 %p"
#   Executing /bin/sh -c "kill -9 1865"...
java.lang.OutOfMemoryError: Java heap space
Dumping heap to /var/log/puppetdb/puppetdb-oom.hprof ...
Heap dump file created [245345206 bytes in 2.554 secs]
#
# java.lang.OutOfMemoryError: Java heap space
# -XX:OnOutOfMemoryError="kill -9 %p"
#   Executing /bin/sh -c "kill -9 12582"...
java.lang.OutOfMemoryError: GC overhead limit exceeded
Dumping heap to /var/log/puppetdb/puppetdb-oom.hprof ...
Heap dump file created [244769451 bytes in 2.038 secs]
#
# java.lang.OutOfMemoryError: GC overhead limit exceeded
# -XX:OnOutOfMemoryError="kill -9 %p"
#   Executing /bin/sh -c "kill -9 7720"...

Thanks,
Sundar


On Monday, May 26, 2014 at 5:54:13 AM UTC+5:30, Ken Barber wrote:
>
> No problem, the error messages as exceptions are - somewhat not helpful. 
> The trick for a user to reading JVM stack traces is to ignore the stack 
> trace, and focus on the errors only - its the noise that makes it hard.
>
> Just thank your stars you aren't forced to read an erlang stack trace 
> *wink*.
>
> ken.
>
>
> On Sat, May 24, 2014 at 3:48 PM, Miguel Angel Coa M.  > wrote:
>
>> Hi Ken,
>> in fact i had duplicate entry "jetty port" in file database.ini and 
>> jetty.ini . I delete entry of database.ini and restart my puppetdb service 
>> and this run ok. 
>>
>> Thanks for you help.
>>
>>
>> 2014-05-24 8:48 GMT-04:00 Ken Barber :
>>
>>> > 2014-05-24 02:07:01,260 ERROR [p.t.logging] Uncaught exception
>>> > java.lang.IllegalArgumentException: Duplicate configuration entry: 
>>> [:jetty
>>> > :port]
>>>
>>> So this is caused by, well a duplicate entry in your configuration (in
>>> this case /etc/puppetdb/conf.d).
>>>
>>> One good trick to find this kind of thing:
>>>
>>> cd /etc/puppetdb/conf.d
>>> grep '' *.ini | grep port
>>>
>>> There should be only 1 'port' declaration in the [jetty] block
>>> (usually in jetty.ini).
>>>
>>> Here are my results:
>>>
>>> root@puppetdb1:/etc/puppetdb/conf.d# grep '' *.ini | grep port
>>> database.ini:# For PostgreSQL: //host:port/databaseName
>>> jetty.ini:port = 8080
>>> jetty.ini:# The port to listen on for HTTPS connections
>>> jetty.ini:ssl-port = 8081
>>> repl.ini:# What port the REPL should listen on
>>> repl.ini:port = 8082
>>>
>>> So 1 port entry in the [jetty] block and 1 port entry in the [repl] 
>>> block.
>>>
>>> ken.
>>>
>>> --
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "Puppet Users" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/puppet-users/bOdQJX0UAoU/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> puppet-users...@googlegroups.com .
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/puppet-users/CAE4bNTnkkRwoKA9y_O8RUtCyuH54Kz1_5UWh1kBFEKn_-Wd3DA%40mail.gmail.com
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> -- 
>> 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/CALkCwJC9AKzZRBaXu9iUV9fHYNMo2BdMNUio3mGepE6Z1y4MRA%40mail.gmail.com
>>  
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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/be6f3e16-7c3e-42e7-b93b-10bf2eca0f92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.