Opsworks deploy to custom layer

丶灬走出姿态 提交于 2019-12-13 07:18:21

问题


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

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.

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.

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"
        }
    }
}

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!


回答1:


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

Hope this helps.



来源:https://stackoverflow.com/questions/35345664/opsworks-deploy-to-custom-layer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!