Opsworks Custom Layer deployment

amazon-web-serviceschefdeploymentgit

I am trying to use a custom layer in AWS Opsworks to add a nginx webserver.

I have successfully created the layer, I added my app via GIT (no password on repo), but when I deploy the command is "successful" but I don't see any of my code on my server.

In the custom layer, the only deploy recipe is "deploy::default".

Do I need a custom recipe to handle the deployment? Is this via the custom cookbook (If so, can someone please help me out with an example)

Also, how do I configure "where" the deployment goes? I'd prefer to chose my document root rather than using what location Opsworks otherwise seems to always deploy to.

Thanks for ANY help on this.

Best Answer

If you're using a Custom Layer, you basically need to configure it to use Custom Cookbooks.

We're not big on link-only answers here, but as chef cookbooks tend to be massive code chunks, and I'm pretty sure the AWS documentation is gonna be reasonably stable I'm gonna leave it as-is.

The two pages I linked to contain ample example configurations about how to use custom cookbooks. You'll need a reasonable understanding of how Chef works, though.

You should be able to configure where stuff gets deployed to as part of the recipes in your custom cookbooks, just as if you were writing your own for a non-OpsWorks deployment.

Related Topic