Re: [Puppet Users] Re: hiera-eyaml - masterless puppet

2016-10-04 Thread Nathan Jones
hiera-eyaml-kms  is a good 
solution that uses AWS KMS to manage encryption keys. EC2 instances can be 
provisioned with an IAM instance profile that grants access to the required 
keys.


-- 
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/261e20fe-604b-484b-b6e9-94b5550b3932%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Ruby issue for installing "google-api-client" gem

2016-10-04 Thread penchal naidu
Hi All,

I am happy to join the group - Puppet Users

Please help me in below issue(s):

*Issue:*

Unable to install required gems (google-api-client) to use 
custom resource modules. we require some way to handle the ruby issue for 
installing "google-api-client" gem.

*Version details*

Operating System : Ubuntu 16.04

“ sudo /opt/puppetlabs/bin/puppetserver ruby –v “  

jruby 1.7.26 (1.9.3p551) 2016-08-26 69763b8 on OpenJDK 64-Bit Server VM 
1.8.0_91-8u91-b14-   3ubuntu1~16.04.1-b14 +jit [linux-amd64]

“ puppet –V ”

4.7.0

“ puppetserver –v ”

 2.6.0

*Environment:*

The below are the steps to install/configure puppet server/agent.

 

# Puppet -4.7



 

# config directory location - 

# ~/.puppetlabs/etc/puppet

 

# Puppet-Server (2.6)

###

 

wget https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb

sudo dpkg -i puppetlabs-release-pc1-xenial.deb

sudo apt update

sudo apt-get install puppetserver

 

# master settings

##

 

# cat ~/.puppetlabs/etc/puppet/puppet.conf

[main]

certname = puppet4-server-magento.c.graphite-development.internal

server = puppet4-server-magento.c.graphite-development.internal

environment = production

runinterval = 1h

strict_variables = true

autosign = ~/.puppetlabs/etc/puppet

 

[master]

reports = puppetdb

storeconfigs_backend = puppetdb

storeconfigs = true

environment_timeout = unlimited

# EOF

 

# cat ~/.puppetlabs/etc/puppet/autosign.conf

*.c.graphite-development.internal

#EOF

 

service puppetserver start

 

 

# Puppet-Agent

###

 

wget https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb

sudo dpkg -i puppetlabs-release-pc1-xenial.deb

sudo apt update

sudo apt-get -y --force-yes install puppet-agent

 

# cat ~/.puppetlabs/etc/puppet/puppet.conf

[main]

certname = puppet4-agent-magento.c.graphite-development.internal

server = puppet4-server-magento.c.graphite-development.internal

environment = production

runinterval = 1h

 

sudo /opt/puppetlabs/bin/puppet resource service puppet ensure=running 
enable=true

sudo /opt/puppetlabs/bin/puppet agent –test

 

###

# We need to install the below gem in puppet server and agent

###

 

sudo -i puppetserver gem install inifile googleauth google-api-client 
--no-ri --no-rdoc

 

*Points to be considered:*

1.   Puppet will run independent of the ruby version we are using as it 
will have a inbuilt ruby.

Link : https://docs.puppet.com/guides/platforms.html  under section “Ruby 
versions”

2.   The custom google resource modules that we are using will only 
work on ruby version 2.x as the gem ‘google-api-client’ requires the 
same.(as mentioned in custom resource module readme document)

3.   We will not install gems in the puppet-agent as it will only take 
the gems from the puppetserver. 

Link: https://docs.puppet.com/puppetserver/latest/gems.html under section 
“Installing And Removing Gem”

-- 
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/bfb75165-a84c-4201-a747-b1932df1717e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Declare ressources from another stage

2016-10-04 Thread Prunk Dump
Hello puppet users !

My problem is simple. I use the following classes in three different stages 
(setup/main/runtime) :

class { 'apt::client':
  stage => 'setup',
}
...
...
class { 'hostpkg': }
...
...
class { 'extrapkg':
  stage => 'runtime',
}

The idea is that the "apt::client" class configure the Debian apt tools. 
Next the "hostpkg" class install and configure the important packages (ex: 
those needed to allow the connexion of users). And finally the "extrapkg" 
class install the secondary packages (internet browser etc ...). But 
sometimes the "hostpkg" or "extrapkg" packages need some extra apt sources, 
some apt-pinning or the multiarch. So I created three resources/class :

define apt::client::pinning( $package = $title, $pin, $priority, $ensure = 
present)
define apt::client::source( $sourcename = $title, $type = 'deb', $uri, 
$distribution = $apt::client::distribution, $components, $ensure = present)
class apt::client::multiarch

There three resources are contained in the "apt::client" class as they must 
be run before "apt-get update" (near "apt::client::end"). The problem come 
when a package in "extrapkg" need for example the multiarch :

-> From the "extrapkg" class I include the "apt::client::multiarch" class 
to get the multiarch activated
-> As the "extrapkg" class is in the "runtime" stage, the 
"apt::client::multiarch" is contained in the stage
-> I get a circular dependency as "apt::client::multiarch" need to be run 
before "apt::client::end" and so after the beginning of the runtime stage 
as it is included in the "runtime" stage.

How I can declare, inside a stage, a resource or a class that must not be 
contained in the stage. It is just "required" and must be run inside it's 
corresponding stage.

If anyone can help !

Baptiste.

-- 
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/86c3ec6e-2c4a-46ac-a348-4cadf332847a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.