0

Again i got stuck to achive the target to trigger deployment once code is pushed to repo, I search the net but i found only old information github is updated and as per there instruction i setup all values but still not working so its look i am missing something I tried to follow the instruction but it seems old http://bytes.babbel.com/en/articles/2014-01-22-github-service-hook-for-aws-ops-works.html

The interface is confusing and i am confused because there is no connection between repo name and opswork service , so what value webhook should send to opswork service ?

Below is what i understood

  1. Setup webhook and it will trigger and send pay load to CI or services as needed once code is pushed to repo (this part is working and send payload to some where) : But this is failing because its Payload URL should i give the opswork service url generated by git hub ?

  2. Opswork services : This is not working ,

App Given from AWS opswork's app : opswork ID

Stack Given from AWS opswork's stack: opswork ID

Branch name

Here is the confussion again as per github help i need to give the SHA configured for that app in the AWS OpsWorks Console ? Why should i give SHA not the Master or the link of repo ?

GitHub api url

This is optional what should i give here ?

Aws access key No issues

Aws secret access key No issues

GitHub token

Optional : Created token as instructed , Both with token and without token not working.

So If you check opswork is not getting triggered , I thought when i push the changes it may work internally but not.

So its seems web hook and opswork service need to be interact at some level but unable to figure it out :(

I checked git hub help also found nothing for new interface I checked google and stackoverflow too , but not found any thing

Kindly anyone please answer .

P-Kumar
  • 11
  • 1
  • 6

2 Answers2

0

One alternative way would be to set up AWS CodePipeline (CodeDeploy??) to deploy to your AWS Opsworks stack.

CodePipeline is a Continuous Delivery solution from Amazon. Mid 2016 they announced that CodePipeline works with OpsWorks - see their blog announcement: AWS CodePipeline Adds Integration with AWS OpsWorks. There's some walkthroughs there too, depending on what version of OpsWorks your stack is set up for.

(It does feel a bit weird to use a deployment service to deploy to a service that has an existing deployment service... but eh, thought this might help)

RyanWilcox
  • 13,890
  • 1
  • 36
  • 60
  • Hi Ryan, I definitely try this one too, However i found the issue , so posting the answer too :) , Thanks to ALL – P-Kumar Nov 28 '16 at 04:26
0

The problem is with the process of Github and opswork , if there is any error then both do not report user with error.

I contacted to Github support and luckily they responded me back with error message "The security token included in the request is invalid."

Then i recopied the access key and secret key removed "GitHub api url" as blank and branch name to "master" (so it will always deploy the latest version aka head)

Also make sure you need to set permission again in opswork this is separate to IAM permission , Steps -> Goto your stack - Permission and edit -> add user github with permission "IAM Policies Only".

There is no interaction between web hooks and integrations . so you can make use of integration services without web hook :) .

Thanks to Stack overflow , Git-hub both :)

P-Kumar
  • 11
  • 1
  • 6