Giter Club home page Giter Club logo

voxpupuli / puppet-r10k Goto Github PK

View Code? Open in Web Editor NEW
98.0 49.0 169.0 1.5 MB

Setup and configure r10k for use with git based environments in puppet

Home Page: https://forge.puppet.com/puppet/r10k

License: Apache License 2.0

Ruby 67.76% Shell 1.60% Puppet 30.64%
linux-puppet-module puppet hacktoberfest archlinux-puppet-module centos-puppet-module gentoo-puppet-module oraclelinux-puppet-module redhat-puppet-module scientific-puppet-module ubuntu-puppet-module

puppet-r10k's Issues

License

Hi de hi - any chance you could put the code under a license please?

Option to NOT install the r10k package

Ge this horrible broken error when trying to install r10k gem using this module:

Error: Could not update: Execution of '/usr/bin/gem install -v 1.1.0 --no-rdoc --no-ri r10k ' returned 1: ERROR: Can't use --version w/ multiple gems. Use name:ver instead.
Wrapped exception:
Execution of '/usr/bin/gem install -v 1.1.0 --no-rdoc --no-ri r10k ' returned 1: ERROR: Can't use --version w/ multiple gems. Use name:ver instead.
Error: /Stage[main]/R10k::Install/Package[r10k]/ensure: change from 1.3.2 to 1.1.0 failed: Could not update: Execution of '/usr/bin/gem install -v 1.1.0 --no-rdoc --no-ri r10k ' returned 1: ERROR: Can't use --version w/ multiple gems. Use name:ver instead.
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rubygems-bundler' returned 1: Error: No matching Packages to list
Error: /Stage[main]/Ruby::Dev/Package[rubygems-bundler]/ensure: change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list rubygems-bundler' returned 1: Error: No matching Packages to list

It worked fine when I was installing it using my own Puppet package class. Please add an option to NOT install the r10k package.

r10k does not run sometimes

It seems as though r10k doesn't always run. On occasion the output will be

[R10K::Task::Deployment::DeployEnvironments - INFO] Loading environments from all sources
[R10K::Task::Environment::Deploy - NOTICE] Deploying environment master
[R10K::Task::Puppetfile::Sync - INFO] Loading modules from Puppetfile into queue
[SSH] exit-status: 0

I have not found a rhyme or reason to this, but I"m using a jenkins job to redeploy r10k when modules change, and this pretends it did when it actually did not. If I were to re-run this same command, it would most likely do it successfully. The process should either report something that I can grep for that it won't re-deploy, or ensure it happens every time.

Webhook sends incorrect command to r10k if branch name contains /

It's common in, for example, the git-flow workflow to use branch names with slashes in them (e.g. feature/webhook). Unfortunately, due to the way the webhook currently parses the POST requests, only the last part of the branch name gets sent to r10k (in the preceding example, webhook), which then fails because it can't find a branch with that name.

rubygems-update makes r10k non idempotent on fresh install

The R10K module must be invoked twice on fresh RHEL based systems running older releases of rubygems in order for R10K to be properly installed.

When installing R10K > 1.0.0, there is no ordering relationship between the R10K gem, and the inclusion of the puppetlabs-ruby module. On fresh systems, this causes the R10K gem to be installed before the Ruby module is applied.

The ruby module installs and invokes rubygems-update. Among other things, rubygems-updates causes all existing modules (including the newly installed R10K gem) to be removed.

As a result, the R10K module is not idempotent on fresh CentOS installs. The R10K module must be applied twice in order for R10K to be installed, or rubygems-update must be manually installed and invoked before applying the R10K module.

Remove technology stack dependencies from installation process

I am using RVM (Ruby Version Manager) for managing ruby and do not want ruby package dependencies from the os package manager. My ruby environment is fully functional, but our gem provider e.g. forces me to use ruby os packages. Is there any way to get rid of that? This technology stack should be included in the user's profile and not in our r10k module.

Gem install error on Ubuntu 12.04 when specifying the version

Ubuntu 12.04
Puppet: 3.6.2
Ruby: ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
Gem: 2.3.0

Receiving the following gem error when running puppet apply on a basic manifest to install r10k:

returned 1: ERROR:  Can't use --version w/ multiple gems. Use name:ver instead

The manifest looks as follows:

class { 'r10k':
  version           => '1.2.1',
  sources           => {
    'puppet' => {
      'remote'  => 'https://github.com/glarizza/puppet_repository.git',
      'basedir' => "\${::settings::confdir}/environments",
      'prefix'  => false,
    }
  },
  purgedirs         => ["\${::settings::confdir}/environments"],
  manage_modulepath => true,
  modulepath        => "\${::settings::confdir}/environments/\$environment/modules:/opt/puppet/share/puppet/module$
}

Full eror output below:

Notice: /Stage[main]/R10k::Config/File[r10k.yaml]/content: content changed '{md5}9d7efc05dd744e3bb103d5d5a9dd16d4' to '{md5}f2cf801c542cd4ee0d7ea51e62bb2862'
Error: Could not update: Execution of '/usr/bin/gem install -v 1.2.1 --no-rdoc --no-ri r10k ' returned 1: ERROR:  Can't use --version w/ multiple gems. Use name:ver instead.
Wrapped exception:
Execution of '/usr/bin/gem install -v 1.2.1 --no-rdoc --no-ri r10k ' returned 1: ERROR:  Can't use --version w/ multiple gems. Use name:ver instead.
Error: /Stage[main]/R10k::Install/Package[r10k]/ensure: change from absent to 1.2.1 failed: Could not update: Execution of '/usr/bin/gem install -v 1.2.1 --no-rdoc --no-ri r10k ' returned 1: ERROR:  Can't use --version w/ multiple gems. Use name:ver instead.

Documentation issues

Are the alternative installations really appropriate for documentation here? They don't seem to relate to the module really much at all, instead solving problems that might be related to connectivity or firewall issues that, in theory, someone attempting to use this module would already have had to deal with elsewhere.

Furthermore, the samples under the webhook prefix are confusing. What does prefix_command.rb do? What does git_webhook do? abrader-gms is completely undocumented, so the link is only useful in that it tells me where to get the module containing git_webhook.

Missing dependency on webhook after upgrade to PE 3.7.0

I'm not sure if managing the installation of rack is appropriate in webhook.pp because the webhook seemed to work fine before the upgrade to PE 3.7.0

I can submit a PR with the necessary updates unless there is a better place for this.

Error: /Stage[main]/R10k::Webhook/Service[webhook]/ensure: change from stopped to running failed: Could not start Service[webhook]: Execution of '/sbin/service webhook start' returned 1: Starting webhook: /opt/puppet/lib/ruby/1.9.1/rubygems/dependency.rb:247:in to_specs': Could not find rack (~> 1.4) amongst [addressable-2.3.5, autoparse-0.3.3, bigdecimal-1.1.0, builder-3.0.0, colored-1.2, cri-2.5.0, deep_merge-1.0.0, excon-0.14.1, extlib-0.9.16, faraday-0.8.8, faraday_middleware-0.9.1, faraday_middleware-multi_json-0.0.6, fog-1.5.0, formatador-0.2.0, google-api-client-0.6.4, guid-0.1.1, hiera-eyaml-2.0.4, hiera-eyaml-2.0.3, highline-1.6.21, io-console-0.3, json-1.5.5, json_pure-1.8.1, jwt-0.1.8, launchy-2.3.0, log4r-1.1.10, mime-types-1.16, minitest-2.5.1, multi_json-1.8.4, multi_json-1.8.0, multipart-post-1.2.0, net-scp-1.0.4, net-ssh-2.1.4, nokogiri-1.5.10, r10k-1.3.4, r10k-1.3.1, rack-protection-1.5.3, rake-0.9.2.2, rbvmomi-1.3.0, rdoc-3.9.5, ruby-hmac-0.4.0, signet-0.4.5, sinatra-1.4.5, systemu-2.5.2, tilt-1.4.1, trollop-2.0, trollop-1.16.2, uuidtools-2.1.4] (Gem::LoadError) from /opt/puppet/lib/ruby/1.9.1/rubygems/specification.rb:777:inblock in activate_dependencies'
from /opt/puppet/lib/ruby/1.9.1/rubygems/specification.rb:766:in each' from /opt/puppet/lib/ruby/1.9.1/rubygems/specification.rb:766:inactivate_dependencies'
from /opt/puppet/lib/ruby/1.9.1/rubygems/specification.rb:750:in activate' from /opt/puppet/lib/ruby/1.9.1/rubygems.rb:212:inrescue in try_activate'
from /opt/puppet/lib/ruby/1.9.1/rubygems.rb:209:in try_activate' from /opt/puppet/lib/ruby/1.9.1/rubygems/custom_require.rb:59:inrescue in require'
from /opt/puppet/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in require' from /usr/local/bin/webhook:11:in

'
[FAILED]

Add release tag for 2.3.1

The module version was bumped and 2.3.1 appears on Puppet Forge. If the Puppetfile references your github project URL, 2.3.0 is the latest tag available currently.

Require Git

R10k on a brand new system fails if git is not available.

prefix support

unless I've missed something, this module does not support r10k prefixing as a global option. may open PR later today.

Feature Request: Updated doc to use hieradata for sources

This is a feature request to update the documentation to use hieradata for the r10k source configurations. Currently, we have the r10k class on our master and it drops a /etc/r10k.yaml with configuration data. I think it would be easier to maintain the r10k sources if it was externalized in hieradata common file, along with the other r10k config options that are being set.

prerun_command setting has no dependencies

There are many resources in the R10k module that are required for R10k to run, and if any of them fail, r10k commands cannot be executed. The prerun_command, however, will currently be managed regardless of any configuration failures in these critical resources.

This may not be a simple fix by adding a require statement to the r10k::prerun_command resources, since the order in which r10k::prerun_command class is included is up to the user, meaning the required resources may not be available int he catalog yet. If we are comfortable with forcing the user to declare r10k::prerun_command after r10k is declared, or with forcing prerun_command through a parameter to r10k, that would be a quick fix.

Using defined() isn't really an option due to this same parse-ordering problem.

PE 3.7.0 breaks webhook, peadmin cert name changed

Error: Could not start Service[webhook]: Execution of '/sbin/service webhook start' returned 1: Starting webhook: /usr/local/bin/webhook:44:in initialize': No such file or directory - /var/lib/peadmin/.mcollective.d/peadmin-cert.pem (Errno::ENOENT) from /usr/local/bin/webhook:44:inopen'
from /usr/local/bin/webhook:44:in <main>' [FAILED] Wrapped exception: Execution of '/sbin/service webhook start' returned 1: Starting webhook: /usr/local/bin/webhook:44:ininitialize': No such file or directory - /var/lib/peadmin/.mcollective.d/peadmin-cert.pem (Errno::ENOENT)
from /usr/local/bin/webhook:44:in open' from /usr/local/bin/webhook:44:in

'
[FAILED]
Error: /Stage[main]/R10k::Webhook/Service[webhook]/ensure: change from stopped to running failed: Could not start Service[webhook]: Execution of '/sbin/service webhook start' returned 1: Starting webhook: /usr/local/bin/webhook:44:in initialize': No such file or directory - /var/lib/peadmin/.mcollective.d/peadmin-cert.pem (Errno::ENOENT) from /usr/local/bin/webhook:44:inopen'
from /usr/local/bin/webhook:44:in <main>' [FAILED] Notice: Finished catalog run in 12.07 seconds [root@xmaster environments]# /sbin/service webhook start Starting webhook: /usr/local/bin/webhook:44:ininitialize': No such file or directory - /var/lib/peadmin/.mcollective.d/peadmin-cert.pem (Errno::ENOENT)
from /usr/local/bin/webhook:44:in open' from /usr/local/bin/webhook:44:in'


ls -al /var/lib/peadmin/.mcollective.d
dr-x------ 2 peadmin peadmin 4096 Dec 11 00:12 .
drwx------ 5 peadmin peadmin 4096 Dec 11 00:12 ..
-r-------- 1 peadmin peadmin 2139 Dec 11 00:12 ca.cert.pem
-rw------- 1 peadmin peadmin 0 Dec 11 00:12 client.log
-r-------- 1 peadmin peadmin 800 Dec 11 00:12 mcollective-public.pem
-r-------- 1 peadmin peadmin 3243 Dec 11 00:12 peadmin-private.pem
-r-------- 1 peadmin peadmin 800 Dec 11 00:12 peadmin-public.pem

Deploy single environment and prerun_command

Thanks for this awesome module first of all!

I wonder if i can configure prerun_command to deploy a single env?

I have many environments and waiting for all of them to deploy for testing a small fix in one of them makes me crazy.

Versions and the Puppet Forge

I'm concerned somewhat by the fact that six versions were released yesterday (2.3.2, 2.3.3, 2.3.4, 2.4.0, 2.4.1, and 2.4.2). It seems like most if not all of those could have been consolidated into a single release. Furthermore, not all of those versions have been pushed to Puppet Forge, crucially including 2.4.0, which is what is listed in the README as the version supporting r10k. I put 2.4.0 in my Puppetfile and received an error when r10k failed to retrieve it from the Forge.

Would it help if someone else were involved in the release process?

`pe_gem` install of the r10k gem is wonked

Haven't had time to debug this, but an extra space somewhere is causing pe_gem to attempt to install a gem named "", which clearly fails. It's a spurious failure, but it causes dependent resources to not be applied until the next Puppet run.

I'll track it down later.

Error: /Stage[main]/R10k::Install/Package[r10k]/ensure: change from absent to present failed: Execution of '/opt/puppet/bin/gem install --no-rdoc --no-ri r10k ' returned 2: ERROR:  Could not find a valid gem '' (>= 0) in any repository

Invalid path to r10k.ddl

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid relationship: Service[pe-mcollective] { subscribe => File[/opt/puppet/libexec/mcollective/mcollective/application/r10k.ddl] }, because File[/opt/puppet/libexec/mcollective/mcollective/application/r10k.ddl] doesn't seem to be in the catalog

Cannot install on PE3.0

Get the following:

# puppet module install zack/r10k
Notice: Preparing to install into /etc/puppetlabs/puppet/modules ...
Notice: Downloading from https://forge.puppetlabs.com ...
Error: Could not install module 'zack-r10k' (latest: v0.0.2)
  No version of 'puppetlabs-stdlib' will satisfy dependencies
    'puppetlabs-apt' (v1.1.0) requires 'puppetlabs-stdlib' (>= 2.2.1)
    'puppetlabs-auth_conf' (v0.1.6) requires 'puppetlabs-stdlib' (>= 2.5.1)
    'puppetlabs-pe_accounts' (v2.0.1) requires 'puppetlabs-stdlib' (v3.2.x)
    'puppetlabs-pe_mcollective' (v0.1.12) requires 'puppetlabs-stdlib' (v3.2.x)
    'puppetlabs-pe_puppetdb' (v0.0.7) requires 'puppetlabs-stdlib' (>=3.2.0)
    'puppetlabs-postgresql' (v2.3.0) requires 'puppetlabs-stdlib' (>=3.2.0 <5.0.0)
    'puppetlabs-puppet_enterprise' (v3.0.0) requires 'puppetlabs-stdlib' (v3.2.x)
    'puppetlabs-puppetdb' (v1.4.0) requires 'puppetlabs-stdlib' (>= 1.0.0)
    'puppetlabs-request_manager' (v0.0.9) requires 'puppetlabs-stdlib' (v3.2.x)
    'zack-r10k' (v0.0.2) requires 'puppetlabs-stdlib' (>= 4.1.0)
    Use `puppet module install --ignore-dependencies` to install only this module

Looks like a conflict on hard dependency of puppetlabs-pe_accounts/mcollective and zack-r10k modules.

update params.pp to the latest r10k?

I've been using r10k v1.2.x and v1.3.x with this module since they were released. The params.pp still defaults to v1.1.0. What do you think about bumping the default version to 1.3.0?

mco r10k sync leave environment in a broken state

I got rid of all 'forge' modules as a workaround for #65 and replaced them all with 'git' modules
Modules get deployed, but an environment gets corrupted, with modules form "main" repository absent.
and the following error if I try to run r10k again:

[R10K::TaskRunner - ERROR] Task #<R10K::Task::Environment::Deploy:0x000000016ade88> failed while running: Command git clone --reference /var/cache/r10k/[email protected] [email protected]:/bp/puppet-bna.git /etc/puppetlabs/puppet/environments/development exited with 128: fatal: destination path '/etc/puppetlabs/puppet/environments/development' already exists and is not an empty directory.
# cat /etc/r10k.yaml 
:cachedir: /var/cache/r10k
:sources:
  puppet:
    basedir: /etc/puppetlabs/puppet/environments
    remote: [email protected]:/bp/puppet-bna.git

:purgedirs:
  - /etc/puppetlabs/puppet/environments

If I remove environment directory and run r10k again - it works normal until something make environment to break again.

does this module support Puppetfile?

It's either this module doesn't support Puppetfile or I am doing something wrong:

r10k puppetfile check --trace --verbose

Is silent

install command fails with --verbose:

# r10k puppetfile install --trace --verbose

Error while running: #<RuntimeError: Unrecognized options: verbose>
/opt/puppet/lib/ruby/gems/1.9.1/gems/r10k-1.1.0/lib/r10k/task_runner.rb:18:in `initialize'
/opt/puppet/lib/ruby/gems/1.9.1/gems/r10k-1.1.0/lib/r10k/cli/puppetfile.rb:40:in `new'
/opt/puppet/lib/ruby/gems/1.9.1/gems/r10k-1.1.0/lib/r10k/cli/puppetfile.rb:40:in `block (2 levels) in command'
/opt/puppet/lib/ruby/gems/1.9.1/gems/cri-2.4.1/lib/cri/command.rb:298:in `call'
/opt/puppet/lib/ruby/gems/1.9.1/gems/cri-2.4.1/lib/cri/command.rb:298:in `run_this'
/opt/puppet/lib/ruby/gems/1.9.1/gems/cri-2.4.1/lib/cri/command.rb:251:in `run'
/opt/puppet/lib/ruby/gems/1.9.1/gems/cri-2.4.1/lib/cri/command.rb:264:in `run'
/opt/puppet/lib/ruby/gems/1.9.1/gems/cri-2.4.1/lib/cri/command.rb:264:in `run'
/opt/puppet/lib/ruby/gems/1.9.1/gems/r10k-1.1.0/bin/r10k:7:in `<top (required)>'
/usr/bin/r10k:23:in `load'
/usr/bin/r10k:23:in `<main>'

Without --verbose it still does nothing either.

If it can't find what it's looking for, shouldn't verbose or trace output at least something?

Here is my Puppetfile, for reference

mod "vchepkov/puppetlabs-mysql", 
  :git => "git://github.com/vchepkov/puppetlabs-mysql.git",
  :ref => 'percona'

Thanks,
Vadym

Exit status 42. Is that a git not found in path error?

peadmin@enterprise-dev:~$ mco rpc r10k environment -v
Discovering hosts using the mc method for 2 second(s) .... 1

  • [ ============================================================> ] 1 / 1

enterprise-dev.ops.puppetlabs.net : OK
{:output=>"", :error=>"", :status=>42}

---- r10k#environment call stats ----
Nodes: 1 / 1
Pass / Fail: 1 / 0
Start Time: 2013-10-03 10:09:09 -0700
Discovery Time: 2027.80ms
Agent Time: 78.43ms
Total Time: 2106.23ms

Dependency on puppetlabs-ruby constrains use

The puppetlabs-ruby module only supports Debian and Redhat based systems, so when I attempt to use this r10k module on another OS, (e.g. OS X/Darwin), it fails.

It would be a nice enhancement if there was a way to use this r10k module on a broader set of machines....

Missing dependency on service mcollective

Hi,

I am trying to write a bootstrap module to configure puppet environment using r10k module.
It seems some dependency is missing to allow module to be used in standalone mode:

# cat bootstrap.pp
class { 'r10k':
  remote       => '[email protected]:vchepkov/puppet-bootstrap.git',
  mcollective  => true,
}

# puppet apply bootstrap.pp
Notice: Compiled catalog for t100.chepkov.lan in environment production in 2.82 seconds
Error: Could not find dependent Service[pe-mcollective] for File[/opt/puppet/libexec/mcollective/mcollective/application/r10k.rb] at /opt/puppet/share/puppet/modules/r10k/manifests/mcollective.pp:20

Cheers,
Vadym

breaking master when I apply r10k config

We have a fresh install of RHEL 6.4 with PE 3.2.3. I can install the zack-r10k module without any issue, it appears. However, once applying the r10k "setup" manifest to the master it's unable to pass info between client node and master... Even if that node is the master itself. For example, 'puppet agent --test' yields some html output indicating a passenger error:

Warning: Unable to fetch my node definition, but the agent run will continue:�[0m

�[1;31mWarning: Error 500 on SERVER:

...

Additionally, getting, "could not retrieve facts from inventory service 500 'internal server error'" in the console.

Contents of my r10k "setup" manifest are:

# cat r10k_installation.pp

if $::osfamily == 'redhat' {
  class { 'firewall': ensure => stopped, }
}

file { 'r10k environments dir':
  ensure   => directory,
  path     => '/etc/puppetlabs/puppet/environments',
}

class { 'r10k':
  version           => '1.3.0',

  sources           => {
    'puppet' => {
    'remote'  => 'https://bitbucket.org/prolixalias/puppet-r10k-environments',
    'basedir' => "${::settings::confdir}/environments",
    'prefix'  => false,
  },

  'hiera' => {
    'remote'  => 'https://bitbucket.org/prolixalias/puppet-r10k-hiera',
    'basedir' => "${::settings::confdir}/hiera",
    'prefix'  => true,
  }
},

purgedirs         => ["${::settings::confdir}/environments"],
manage_modulepath => true,
modulepath        => "${::settings::confdir}/environments/\$environment/modules:/opt/puppet/share/puppet/modules",
}

exec { 'r10k deploy environment --puppetfile':
  path     => ['/bin','/sbin','/usr/bin','/usr/sbin','/opt/puppet/bin'],
  require  => [Package['git'],File['r10k environments dir'],Class['r10k::install']],
}

ini_setting { 'master module path':
  ensure   => present,
  path     => '/etc/puppetlabs/puppet/puppet.conf',
  section  => 'main',
  setting  => 'modulepath',
  value    => '/etc/puppetlabs/puppet/environments/$environment/modules:/opt/puppet/share/puppet/modules',
}

ini_setting { 'master manifest path':
  ensure   => present,
  path     => '/etc/puppetlabs/puppet/puppet.conf',
  section  => 'main',
  setting  => 'manifest',
  value    => '/etc/puppetlabs/puppet/environments/$environment/manifests/site.pp',
}

NOTE: this all works in Vagrant CentOS and Ubuntu envs.

I'm at a loss on how to diagnose. Any guidance would be great.

r10k::include_prerun_command doesn't apply changes during the current run

I tried to use r10k::include_prerun_command to push changes from git hooks, but it doesn't seem to work as intended. If puppet master is managed by puppet itself it doesn't apply committed changes after the commit.

Here is how I reproduced the problem.

I made this commit:

$ git log -p -1
commit f0ceb4037abb4e95dff11af176f309c5e8215b4a
Author: Vadym Chepkov <[email protected]>
Date:   Sun Aug 10 12:12:25 2014 -0400

    Added debugging statement

diff --git a/manifests/master.pp b/manifests/master.pp
index 5822001..08b187d 100644
--- a/manifests/master.pp
+++ b/manifests/master.pp
@@ -1,4 +1,5 @@
 # puppet master server
 node 't100' {
   include role::puppet_master
+  notify {"Applying catalog":}
 }

I see that agent did a run, but no debug output:

Aug 10 16:12:27 t100 puppet-agent[16198]: Caught USR1; calling reload
Aug 10 16:12:35 t100 puppet-master[24426]: Compiled catalog for t100.chepkov.lan in environment production in 4.02 seconds
Aug 10 16:12:54 t100 puppet-agent[24703]: Finished catalog run in 14.06 seconds

And yet environment has been updated:

# git -C /etc/puppetlabs/puppet/environments/production/ log  -1
commit 67ab4c73ac7dd76686b7a8fb3ffc4b00006539a1
Author: Vadym Chepkov <[email protected]>
Date:   Sun Aug 10 12:12:25 2014 -0400

    Added debugging statement

Only second run produces the result:

Aug 10 16:18:50 t100 puppet-agent[16198]: Caught USR1; calling reload
Aug 10 16:18:59 t100 puppet-master[24426]: Compiled catalog for t100.chepkov.lan in environment production in 4.10 seconds
Aug 10 16:19:07 t100 puppet-agent[26629]: Applying catalog
Aug 10 16:19:07 t100 puppet-agent[26629]: (/Stage[main]/Main/Node[t100]/Notify[Applying catalog]/message) defined 'message' as 'Applying catalog'
Aug 10 16:19:16 t100 puppet-master[27568]: Starting Puppet master version 3.6.2 (Puppet Enterprise 3.3.1)
Aug 10 16:19:19 t100 puppet-agent[26629]: Finished catalog run in 15.76 seconds

I guess the question is, why?

Thanks,
Vadym

trouble with remote ssl posts from stash to the webhook

When using the webhook from a Atlassian stash server, I get the following in the access.log:
[2014-07-17 15:41:31] ERROR OpenSSL::SSL::SSLError: SSL_accept returned=1 errno=0 state=SSLv3 read client certificate A: sslv3 alert certificate unknown /opt/puppet/lib/ruby/1.9.1/openssl/ssl-internal.rb:172:in `accept'

Things work fine when testing with curl from the stash server, but they fail when stash posts directly. The message makes me think that stash is sending a client cert, however the webhook is set to ignore/not ask for client certs.

I've not got the time to debug in detail right now, but I'm making a note here hoping that someone knows the answer off hand, or so that when I figure it out, I can share the info.

Could not find declared class ::ruby at /etc/puppet/modules/r10k/manifests/install/gem.pp:10

Assume for this that /etc/puppet/modules contains:
a.) r10k (latest checkout from github)
b.) deploy_r10k, module which contains a manifests/init.pp that looks like:

cat manifests/init.pp
class { 'r10k':
remote => '[email protected]:org/puppet.git',
}

When trying to install by applying:

puppet apply manifests/init.pp
Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class ::ruby at /etc/puppet/modules/r10k/manifests/install/gem.pp:10 on node puppet01.domain.tld
Wrapped exception:
Could not find declared class ::ruby
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class ::ruby at /etc/puppet/modules/r10k/manifests/install/gem.pp:10 on node puppet01.domain.tld

install fails on PE 3.2.2 due to Puppet Module Tool Bug

On a clean install of PE 3.2.3, RHEL 6.4, I get an error:

error snippet:

Error: No such file or directory - /etc/puppetlabs/puppet/modules/r10k/spec/fixtures/modules/r10k/files

Full stack:

puppet module install zack/r10k --debug --version 1.0.2

Notice: Preparing to install into /etc/puppetlabs/puppet/modules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Debug: HTTP GET https://forgeapi.puppetlabs.com/v3/releases?module=zack-r10k
Debug: HTTP GET https://forgeapi.puppetlabs.com/v3/releases?module=puppetlabs-stdlib
Debug: HTTP GET https://forgeapi.puppetlabs.com/v3/releases?module=puppetlabs-stdlib&limit=20&offset=20
Notice: Found at least one version of puppetlabs-stdlib compatible with PE (3.2.3);
Notice: Skipping versions which don't express PE compatibility. To install
the most recent version of the module regardless of compatibility
with PE, use the '--ignore-requirements' flag.
Debug: HTTP GET https://forgeapi.puppetlabs.com/v3/releases?module=puppetlabs-ruby
Debug: HTTP GET https://forgeapi.puppetlabs.com/v3/releases?module=puppetlabs-gcc
Debug: HTTP GET https://forgeapi.puppetlabs.com/v3/releases?module=puppetlabs-pe_gem
Debug: HTTP GET https://forgeapi.puppetlabs.com/v3/releases?module=mhuffnagle-make
Debug: HTTP GET https://forgeapi.puppetlabs.com/v3/releases?module=puppetlabs-inifile
Notice: Found at least one version of puppetlabs-inifile compatible with PE (3.2.3);
Notice: Skipping versions which don't express PE compatibility. To install
the most recent version of the module regardless of compatibility
with PE, use the '--ignore-requirements' flag.
Debug: HTTP GET https://forgeapi.puppetlabs.com/v3/releases?module=puppetlabs-vcsrepo
Debug: HTTP GET https://forgeapi.puppetlabs.com/v3/releases?module=puppetlabs-git
Debug: HTTP GET https://forgeapi.puppetlabs.com/v3/releases?module=gentoo-portage
Debug: HTTP GET https://forgeapi.puppetlabs.com/v3/releases?module=puppetlabs-concat
Notice: Found at least one version of puppetlabs-concat compatible with PE (3.2.3);
Notice: Skipping versions which don't express PE compatibility. To install
the most recent version of the module regardless of compatibility
with PE, use the '--ignore-requirements' flag.
Debug: HTTP GET https://forgeapi.puppetlabs.com/v3/releases?module=ripienaar-concat
Info: Resolving dependencies ...
Info: Preparing to install ...
Debug: HTTP GET https://forgeapi.puppetlabs.com/v3/files/zack-r10k-1.0.2.tar.gz
Debug: Executing 'tar xzf /var/opt/lib/pe-puppet/puppet-module/cache/zack-r10k20140513-15637-hrn7bv --no-same-owner -C /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-v98unf'
Debug: Executing 'find /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-v98unf -type d -exec chmod 755 {} +'
Debug: Executing 'find /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-v98unf -type f -exec chmod a-wst {} +'
Debug: Executing 'chown -R 0:0 /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-v98unf'
Debug: HTTP GET https://forgeapi.puppetlabs.com/v3/files/puppetlabs-ruby-0.1.0.tar.gz
Debug: Executing 'tar xzf /var/opt/lib/pe-puppet/puppet-module/cache/puppetlabs-ruby20140513-15637-m9b7pl --no-same-owner -C /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-ddp3g4'
Debug: Executing 'find /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-ddp3g4 -type d -exec chmod 755 {} +'
Debug: Executing 'find /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-ddp3g4 -type f -exec chmod a-wst {} +'
Debug: Executing 'chown -R 0:0 /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-ddp3g4'
Debug: HTTP GET https://forgeapi.puppetlabs.com/v3/files/puppetlabs-gcc-0.1.0.tar.gz
Debug: Executing 'tar xzf /var/opt/lib/pe-puppet/puppet-module/cache/puppetlabs-gcc20140513-15637-o9857r --no-same-owner -C /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-y1vi5s'
Debug: Executing 'find /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-y1vi5s -type d -exec chmod 755 {} +'
Debug: Executing 'find /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-y1vi5s -type f -exec chmod a-wst {} +'
Debug: Executing 'chown -R 0:0 /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-y1vi5s'
Debug: HTTP GET https://forgeapi.puppetlabs.com/v3/files/mhuffnagle-make-0.0.2.tar.gz
Debug: Executing 'tar xzf /var/opt/lib/pe-puppet/puppet-module/cache/mhuffnagle-make20140513-15637-1eypmms --no-same-owner -C /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-1sa7ryj'
Debug: Executing 'find /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-1sa7ryj -type d -exec chmod 755 {} +'
Debug: Executing 'find /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-1sa7ryj -type f -exec chmod a-wst {} +'
Debug: Executing 'chown -R 0:0 /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-1sa7ryj'
Debug: HTTP GET https://forgeapi.puppetlabs.com/v3/files/puppetlabs-vcsrepo-0.2.0.tar.gz
Debug: Executing 'tar xzf /var/opt/lib/pe-puppet/puppet-module/cache/puppetlabs-vcsrepo20140513-15637-1adawzc --no-same-owner -C /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-13ktisn'
Debug: Executing 'find /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-13ktisn -type d -exec chmod 755 {} +'
Debug: Executing 'find /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-13ktisn -type f -exec chmod a-wst {} +'
Debug: Executing 'chown -R 0:0 /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-13ktisn'
Debug: HTTP GET https://forgeapi.puppetlabs.com/v3/files/gentoo-portage-2.1.0.tar.gz
Debug: Executing 'tar xzf /var/opt/lib/pe-puppet/puppet-module/cache/gentoo-portage20140513-15637-xlpr8l --no-same-owner -C /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-l2swtt'
Debug: Executing 'find /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-l2swtt -type d -exec chmod 755 {} +'
Debug: Executing 'find /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-l2swtt -type f -exec chmod a-wst {} +'
Debug: Executing 'chown -R 0:0 /var/opt/lib/pe-puppet/puppet-module/cache/tmp-unpacker20140513-15637-l2swtt'
Notice: Installing -- do not interrupt ...
Error: No such file or directory - /etc/puppetlabs/puppet/modules/r10k/spec/fixtures/modules/r10k/files

There is a broken sym link from a test directory.. at this point the ./r10k/files directory doesn't exist.. and

$ ll /etc/puppetlabs/puppet/modules/r10k/spec/fixtures/modules/r10k/files
/etc/puppetlabs/puppet/modules/r10k/spec/fixtures/modules/r10k/files -> ../../../../files

 ll /etc/puppetlabs/puppet/modules/r10k/
drwxr-xr-x 4 root pe-puppet 4096 May 13 08:31 spec

(Feature) webhook should support github secrets

There is an ability of adding a secret to the payload instead of using basic auth I think the webhook should support his as the password stuff is a little weird in github atm for display and updates.

Deploy single environment with Puppetfile

I frequently need to do something like the following:

/var/lib/gems/1.8/bin/r10k deploy environment production -p

To deploy a single environment with its Puppetfile. Its not clear to me how I add support to the agent for this type of work, and my implementation of the MCO agent is basically blocked on this. Is this something we might be able to get added?

Ubuntu 14.04 webhook init fails

When running the PE master and r10k on Ubuntu 14.04 the webhook init script will fail.

Line's 17/18 of the erb template include

Source function library.

. /etc/rc.d/init.d/functions

Is it sufficient to ln -s /lib/lsb/functions to /etc/rc.d/init.d/functions? This appears to allow the code to execute, but I'm not sure it is functionally equivalent.

It might be worth stating that the daemon package has to be installed through apt-get in order to run this code without error as well.

Ruby class is not singleton

For anyone using Ruby in their environments, using the r10k module presents a problem because of the way that ruby is included. It basically means that anyone doing an 'include ruby' anywhere in their puppet code is going to get a duplicate resource error.

Moving the to 'include ruby' here means that people can use ruby elsewhere also, though it doesn't solve the parameter being passed.

Deprecation warning

agent.rb:234:in metadata' r10k.rb:10:inclass:R10k': setting meta data in agents have been deprecated, DDL files are now being used for this information.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.