我想在通过弹性beantalk部署的Amazon Linux 1实例上重新启动php-fpm和apache。我正在使用负载平衡的环境,并希望自动化整个部署过程。
有人在this post from aws上有其他信息吗?
我很简单,尝试使用yaml文件在每次部署后也要重新启动这些服务(正常)。
示例:
services:
sysvinit:
myservice:
enabled: true
ensureRunning: true
commands:
- "command name used as trigger"
我真的不确定“ myservices”部分可接受什么输入。会提供任何帮助。
谢谢!
答案 0 :(得分:0)
我尚未验证以下内容,但我的理解如下。由于您必须重新启动php-fpm
和apache
服务,因此您的服务部分可能是:
services:
sysvinit:
php-fpm:
enabled: true
ensureRunning: true
commands:
- 01_some_command_name
apache:
enabled: true
ensureRunning: true
commands:
- 02_some_other_command_name
01_some_command_name
和02_some_other_command_name
是commands部分中命令的名称。例如:
commands:
01_some_command_name:
command: echo "execute command 01"
02_some_other_command_name:
command: echo "execute command 02"
执行这两个命令应该在我看来触发php-fpm
和apache
服务的重启。