-
Notifications
You must be signed in to change notification settings - Fork 34
Description
Or some other static deployment method. We ran into an issue in our environment where certain systems (usually assembly floor gear) does not have internet access, but still needs puppet installed. This is problematic because choria currently wants to download a few rubygems directly from the internet. You can disable this functionality, but it doesn't solve the problem.
Others have fixed this by using Nexus or Artifactory, but those are both non-trivial in a geographically distributed multi-site environment. For our purposes, it didn't make sense to pay for a whole other project for 3 rubygems, when we are not a ruby shop.
I've worked around this issue by implementing the following code on my side. I believe something similar could be done in puppet-choria's puppet modules (and in fact, have seen this model used before by the logstash::plugins module here: https://github.com/elastic/puppet-logstash/blob/master/manifests/plugin.pp)
As a workaround for anyone else who comes across this issue, here's the code I used to solve it for myself:
file {
"${tmpdir}/systemu-2.6.5.gem":
mode => "644",
source => "puppet:///binaries/mcollective/systemu-2.6.5.gem",
before => Package['systemu'];
"${tmpdir}/choria-mcorpc-support-2.21.0.gem":
mode => "644",
source => "puppet:///binaries/mcollective/choria-mcorpc-support-2.21.0.gem",
before => Package['choria-mcorpc-support'];
"${tmpdir}/nats-pure-0.6.2.gem":
mode => "644",
source => "puppet:///binaries/mcollective/nats-pure-0.6.2.gem",
before => Package['nats-pure'];
}
package {
'systemu':
ensure => 'installed',
install_options => ['--clear-sources', '--no-document', '--local'],
provider => puppet_gem,
source => "${tmpdir}/systemu-2.6.5.gem";
'nats-pure':
ensure => 'installed',
install_options => ['--clear-sources', '--no-document', '--local'],
provider => puppet_gem,
source => "${tmpdir}/nats-pure-0.6.2.gem",
require => Package['systemu'];
'choria-mcorpc-support':
ensure => 'installed',
install_options => ['--clear-sources', '--no-document', '--local'],
provider => puppet_gem,
source => "${tmpdir}/choria-mcorpc-support-2.21.0.gem",
require => Package['nats-pure'];
}
Package['choria-mcorpc-support'] -> Mcollective::Module_plugin <| |>