如何使用 puppet 模块部署 r10k-webhook?

问题描述 投票:0回答:1

我正在遵循此模块 puppet-r10k 来部署 r10k 环境设置。

我的配置如下:

node 'puppet-,master.example.com' {
  class { 'r10k':
    sources => {
      'puppet' => {
        'remote'  => '[email protected]:puppet/control-repository.git',
        'basedir' => "${::settings::codedir}/environments",
        'prefix'  => false,
      },
    },
  }

  class { 'r10k::webhook':
    ensure => true,
    server => {
      protected => false,
    },
  }
}

正如你所看到的,我对 r10k 本身和 webhook 进行了设置。现在的问题是网络钩子(我不太明白它是如何工作的)。它创建两个文件:

root@puppet-master:~# cat /etc/voxpupuli/webhook.yml
---
server:
  protected: false
chatops:
  enabled: false
  service:
  channel:
  user:
  auth_token:
  server_uri:
r10k:
  command_path: "/opt/puppetlabs/puppet/bin/r10k"
  config_path: "/etc/puppetlabs/r10k/r10k.yaml"
  default_branch: production
  prefix:
  allow_uppercase: false
  verbose: true
  deploy_modules: true
  generate_types: true



root@puppet-master:~# cat /etc/puppetlabs/r10k/r10k.yaml
---
pool_size: 2
deploy:
  generate_types: true
  exclude_spec: true
cachedir: "/opt/puppetlabs/puppet/cache/r10k"
sources:
  puppet:
    remote: [email protected]:puppet/control-repository.git
    basedir: "/etc/puppetlabs/code/environments"
    prefix: false

现在,在我的 gitlab 服务器(192.168.1.50)上,我添加了一个新的 webhook,其 URL:http://192.168.1.52:8088/payload 但出现错误

Hook execution failed: Failed to open TCP connection to 192.168.1.52:8088 (Connection refused - connect(2) for "192.168.1.52" port 8088)

我有什么遗漏的吗?有什么我应该先做的吗?

感谢您的帮助:)

git gitlab webhooks puppet r10k
1个回答
0
投票

我也正在为此苦苦挣扎。 (在我的例子中与 ruby/gems 版本冲突) 你有运行 webhook 服务吗?

© www.soinside.com 2019 - 2024. All rights reserved.