Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用chef recipe运行ruby服务_Ruby_Amazon Ec2_Chef Infra_Chef Recipe - Fatal编程技术网

如何使用chef recipe运行ruby服务

如何使用chef recipe运行ruby服务,ruby,amazon-ec2,chef-infra,chef-recipe,Ruby,Amazon Ec2,Chef Infra,Chef Recipe,我有一个ruby的web服务,我想通过chef recipe运行我的ruby服务。 我已将execute命令用作: execute 'start-ruby' do command 'ruby /opt/certificate.rb start' action :run end 我可以看到我的ruby服务在我的Amazon实例的后台运行,但不知何故,实例安装程序被困在运行安装程序中。 是否有其他方法可以通过chef recipe运行ruby服务。执行资源同步运行其命令,这意味着它会等待命令完成,

我有一个ruby的web服务,我想通过chef recipe运行我的ruby服务。 我已将execute命令用作:

execute 'start-ruby' do
command 'ruby /opt/certificate.rb start'
action :run
end
我可以看到我的ruby服务在我的Amazon实例的后台运行,但不知何故,实例安装程序被困在运行安装程序中。
是否有其他方法可以通过chef recipe运行ruby服务。

执行资源同步运行其命令,这意味着它会等待命令完成,然后再继续使用该配方。我猜您的
start
命令启动了一个前台模式守护进程(它应该是这样工作的),因此它永远不会返回,Chef只是永远等待

分别查看或获取Ruby应用程序部署和通用服务管理的示例