使用应用程序和supervisor_service的厨师食谱

时间:2013-02-26 01:10:49

标签: chef

我一直在尝试运行以下食谱配方 - 它使用opscode应用程序和主管烹饪书来安装。

问题是我不想总是运行supervisor和pip安装位,当我改变使用代码示例中注释掉的行时,通知永远不会被执行。它们应该推迟到配方运行之后,但是会丢失。

如果删除了注释行,则“supervisor_service”上的操作为action :nothing

application "testing" do
  repository "git@github.com:..."
  path "/opt/somewhere/testing"

  revision "master"
  notifies :run, "execute[pip-ingestion]", :immediately
  #notifies :enable, "supervisor_service[s3batcher]"
  #notifies :restart, "supervisor_service[s3batcher]"

  deploy_key <<EOF
-----BEGIN RSA PRIVATE KEY-----
....
EOF
end

execute "pip-ingestion" do
  command "pip install -r #{root}/requirements.txt"
  action :run
end

supervisor_service "s3batcher" do
    command "python #{root}/manage.py batch_s3 --settings=#{root}/settings.yaml"
    process_name "s3batcher-%(process_num)s"
    action [:enable, :restart]
    autostart true
    user "root"
    numprocs 1
end

0 个答案:

没有答案