Couchdb 在puppet 4中配置http_后端

Couchdb 在puppet 4中配置http_后端,couchdb,puppet,hiera,Couchdb,Puppet,Hiera,我在配置Puppet 4 master以处理HTTP请求时遇到问题,因此我可以使用CouchDB for hiera。 以下是我迄今为止所做的步骤: 使用test数据库创建了新的CouchDB 创建了名为common gem安装hiera-http-1.0.0 将http\u backend.rb文件放入/opt/puppetlabs/code/environments/production/mpdules/hiera\u http和/opt/puppetlabs/puppet/lib/ruby

我在配置Puppet 4 master以处理HTTP请求时遇到问题,因此我可以使用CouchDB for hiera。 以下是我迄今为止所做的步骤:

  • 使用
    test
    数据库创建了新的CouchDB
  • 创建了名为
    common
  • gem安装hiera-http-1.0.0
  • http\u backend.rb
    文件放入
    /opt/puppetlabs/code/environments/production/mpdules/hiera\u http
    /opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/hiera http
  • 当我运行
    gem list
    时,我可以看到:

    Hiera (3.2.0)
    Hiera-http (1.0.0)
    
    现在,当我尝试运行
    hiera common
    或任何其他程序时,我得到错误:

    'require' : cannot load such file -- lookup_http (LoadError)
    
    我的
    hiera.yaml
    看起来像:

    :backends: 
    - http
    
    当然,还有所有必需的设置(主机、端口…)

    当我在我得到的代理上运行
    puppet代理-t

    cannot load backend http: no such file to load -- hiera/backend/http_backend at site.pp
    
    您的步骤3和4:

    • gem安装hiera-http-1.0.0
    • http\u backend.rb文件
      放入
      /opt/puppetlabs/code/environments/production/mpdules/hiera\u http
      /opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/hiera http
    需要替换为:

    • /opt/puppetlabs/puppet/bin/gem安装hiera http
    这将确保hiera http hiera后端gem自动正确安装并为puppet使用的ruby配置

    如果您想使用ruby for puppet系统,以便它识别从系统gem安装的hiera http,那么您需要使用gem安装puppet、facter和hiera,而不是安装OS软件包管理器