Can I automate an application deployment via webhook to OpsWorks?
Asked Answered
A

3

14

I want to set up an webhook from our Github account so it automatically starts an deployment task in OpsWorks. It seems to be possible according to the documentation - but can't find any examples or smart lib which is unusual for the Internets. ;)

Ancheta answered 4/10, 2013 at 22:0 Comment(0)
P
23

This process is much simpler now. All you have to do is provide the required values per the Webhook, and it will be done for you. opsworks webhook details

Steps :

  1. GitHub repository -> Settings
  2. Webhooks & Services
  3. AWS Opsworks
  4. Provide AWS::IAM keys, Stack and App ID , and branch you want to deploy.

Be aware that by this process you deploy a specific app to ALL the layers in a stack. This means that if you have custom layers with ruby, they will also deploy the specific app to those layers too. Useful for worker layer, however, increased deployment time when you have multiple rails apps in different layers.

Ensure that your user has proper permissions to deploy on the specific stack. enter image description here

Putdown answered 9/3, 2014 at 22:44 Comment(6)
Thanks, I did a comment on my old answer with the same thing but this answer now describes it much better.Ancheta
I set this up too, but I don't think I know what it does. When building an app for deployment in OpsWorks, you already specify which Github repo to pull from the deploy the app. Is this supposed to trigger a redeploy on push?Goldengoldenberg
@Goldengoldenberg - for a given branch name on github, it will auto deploy to AWS OPSWORKS for the configured stack and app id, using the AWS access key and secret key that is given on screen.Putdown
@ImranAhmed We have testing it On github, it says okay. We have set both sides correct (opsworks and github). I am not sure how am I gonna test this auto deployment. Everything looks ready. I am changing index.php and then press commit button on github built in application. And then waiting for a deployment process. But nothing happen. What am I doing wrong?Kraigkrait
@Kraigkrait make sure your user has permission to do deploys for the specific stack. That is controlled under the "Permissions" area.Putdown
Is there a way to debug this? I got it all set up but it won't triggerImperishable
A
3

Internets saved me once again: http://blog.codeship.io/2013/09/18/how-to-deploy-to-amazon-opsworks-using-codeship.html

Ancheta answered 9/10, 2013 at 2:41 Comment(3)
For anyone interested, now there's a built-in web hook in github for deploying directly to AWS Opsworks. Very very convenient!Ancheta
Could you add the link to the github / opsworks webhook?Fabozzi
Since the list of web hooks are only available for the owner I can't link to it but here are a screenshot so you know what to look for. The information needed to enter are all available in your stack and layers in Opsworks: cl.ly/image/2a2h000k0S2nAncheta
T
0

Small addition to Imran answer: now on github it called Integration & Services.

Triumvir answered 26/2, 2018 at 10:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.