Opsworks部署到自定义层 [英] Opsworks deploy to custom layer

查看:99
本文介绍了Opsworks部署到自定义层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Opsworks的新手,希望这是一个非常简单的问题!

I'm new to Opsworks, so hopefully this is a very easy question!

我的设置是S3捆绑包中的自定义PHP/Apache AMI(Amazon Linux)服务器层,RDS层和名为"abc_app"的PHP应用程序.

My setup is a custom PHP/Apache AMI (Amazon Linux) server layer, an RDS layer, and a PHP app named "abc_app" in an S3 bundle.

我尝试将应用程序部署到服务器实例.它的部署成功完成,但是代码不在服务器上的任何位置,并且/var/www/html目录中没有任何内容.部署日志不是很有帮助,只是其中没有提及"abc-app".我不确定是否应该有它.

I tried to deploy the app to a server instance. It deployment finished successfully, but the code is not anywhere on the server, and nothing was in the /var/www/html directory where I expected it to be. The deploy log was not very helpful except that there was no mention of "abc-app" in it. I'm not sure if it should have it though.

因此,接下来我创建了以下JSON,以明确设置"deploy_to"属性,如

So next I created the following JSON which explicitly sets the "deploy_to" attribute as described at http://docs.aws.amazon.com/opsworks/latest/userguide/attributes-json-deploy.html

{
    "deploy" : {
        "abc_app" : {
            "deploy_to" : "/var/www/html"
        }
    }
}

再次,部署成功完成,但是代码仍然不在/var/www/html或其他任何地方.

Once again, the deployment finished successfully, but the code is still not at /var/www/html or anywhere else.

任何想法或建议将不胜感激!

Any ideas or suggestions would be very much appreciated!

推荐答案

这里的问题是您使用的是自定义层,这绝对可以,您只需要一个自定义部署配方即可告诉opsworks如何部署您的应用程序

The issue here is that you're using a custom layer, which is absolutely ok, you just need a custom deploy recipe which tells opsworks how to deploy your application.

要将应用程序部署到自定义层,必须实现自定义部署配方,这些配方将从存储库中下载应用程序的文件到实例上的适当位置.但是,您通常可以使用内置的部署指南来处理部署的某些方面,从而限制必须编写的代码量.

To deploy apps to a custom layer, you must implement custom Deploy recipes that download the app's files from a repository to the appropriate location on the instance. However, you can often limit the amount of code you must write by using the built-in deploy cookbook to handle some aspects of deployment.

http://docs.aws.amazon. com/opsworks/latest/userguide/create-custom-deploy.html

希望这会有所帮助.

这篇关于Opsworks部署到自定义层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆