Ask Your Question

Revision history [back]

Ruby issue for installing "google-api-client" gem

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”

  1. 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)

  2. 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”

click to hide/show revision 2
None

Ruby issue for installing "google-api-client" gem

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.

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]

[linux-amd64] “ puppet –V

4.7.0

”

4.7.0

            “ puppetserver –v ”

                          2.6.0

Environment:

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

# Puppet -4.7

#

-4.7 #################### # config directory location -

~/.puppetlabs/etc/puppet

- # ~/.puppetlabs/etc/puppet # Puppet-Server (2.6)

#

(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

puppetserver # master settings

#

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

~/.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

~/.puppetlabs/etc/puppet [master] reports = puppetdb storeconfigs_backend = puppetdb storeconfigs = true environment_timeout = unlimited

EOF

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

*.c.graphite-development.internal

EOF

~/.puppetlabs/etc/puppet/autosign.conf *.c.graphite-development.internal #EOF service puppetserver start

Puppet-Agent

#

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

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

~/.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

1h sudo /opt/puppetlabs/bin/puppet resource service puppet ensure=running enable=true sudo /opt/puppetlabs/bin/puppet agent –test

#

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

#

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

--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”

  1. 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)

  2. 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”