从git repo克隆nodejs应用程序后,如何使用puppet在其上运行npm安装
请查找我用于克隆git repo的代码:从git repo克隆nodejs应用程序后,如何使用puppet在其上运行npm安装,puppet,Puppet,请查找我用于克隆git repo的代码: package { 'git': ensure => 'latest', } vcsrepo { "/nodejs-helloworld": ensure => latest, provider => git, require => [ Package["git"] ], source => "git@gitlab.dev.abc.net:hello-world/n
package { 'git':
ensure => 'latest',
}
vcsrepo { "/nodejs-helloworld":
ensure => latest,
provider => git,
require => [ Package["git"] ],
source => "git@gitlab.dev.abc.net:hello-world/nodejs-helloworld.git",
revision => 'master',
}
在使用puppet克隆我的git存储库之后,我希望使用puppet运行我的nodejs应用程序(克隆的存储库)
要正常运行我的nodejs应用程序,请执行以下步骤:
cd nodejs_helloworld/
npm install
npm start
有人可以帮助我或建议使用puppet运行nodejs应用程序的链接吗。rough exec可以实现以下功能:
exec { '/usr/bin/npm install; /usr/bin/npm start':
cwd => '/nodejs-helloworld',
subscribe => Vcsrepo['/nodejs-helloworld'],
refreshonly => true,
}