基本上我想要做以下使用傀儡:通过木偶安装失败的NodeJS
1.sudo yum install nodejs npm --enablerepo=epel
setup nodejs evironment(latest stable version) on puppet agent
2.sudo yum install git-(install git)
3.git clone [email protected]:hello-world/nodejs-helloworld.git -(git clone the application repo)
4.Run the application
npm install
npm start
npm test
我是新来的木偶configurtion管理工具。到目前为止,我已经完成了puppet master-agentnt setup。
sudo yum install puppet-server on puppet master node
sudo yum install puppet on agent node
并且能够在我的代理上成功安装apache。
我在RHEL上使用木偶版本3.8.7。作为第一步,我需要在puppet代理上安装nodejs来运行我的应用程序。
安装了puppetlabs-模块的NodeJS
puppet module install puppetlabs-nodejs
主节点上/etc/puppet/manifests/site.pp包括下面的代码:
class { '::nodejs':
nodejs_dev_package_ensure => 'present',
npm_package_ensure => 'present',
repo_class => '::epel',
}
当我在代理运行下面指令i得到此错误:
puppet agent -t
该代码失败,出现以下错误
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError:
Invalid resource type gpg_key at /etc/puppet/modules/nodejs/manifests/repo/nodesource/yum.pp:58 on node ip-**********
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
你试过把版本在单引号?像'6.2.2'? –
感谢您的评论。添加引号后它说:“无法找到类nodejs” - 我编辑了我的问题。 – nadish
你在做木偶吗?有没有高手?在目录环境或模块路径中定义了类“nodejs”吗?我们可以提供更多信息。 –