Jump to content
Sign in to follow this  
ajoo

stuck at a point in aws codedeploy and bitbucket integration

Recommended Posts

Hi ! 

 

I am trying to deploy the code to aws ec2 server from bitbucket by using the aws codedeploy addon for bitbucket. 

 

I have created the IAM Roles for cross account access as suggested in the codedeploy settings in the bitbucket. I have also created the service role for aws codedeploy.

 

When I now create and configure an EC2 instance, the IAM dropdown remains empty and there is no role for me to select there. That seems odd to me.  

 

So while using the bitbucket add on, does the EC2 instance not require any instance role? 

 

I then created an EC2 aws instance role as suggested in the aws documentation, but still the IAM is un-populated and I am unable to select a value for it. 

 

The aws documentation says that it is absolutely required to select a role at the time of instance creation because it cannot be edited later. 

 

Without an EC2 role I cannot create a codedeploy application that is required to be added to the AWS codedeploy configuration, in bitbucket. 

 

Hope someone can guide the way.

 

Thanks loads !

 

Share this post


Link to post
Share on other sites

Hi Reuinix,

 

Thanks for the response.

 

I am following instructions from the aws codedeploy addon that I installed on bitbucket. I have seen this and this is infact showing the aws codedeploy addon in the settings. This also has the cross-site policy that I created. Rest of the instructions are listed in the code deploy settings. 

 

The "deploying from github" article is different than this one. That's what I thought. 

 

The other link that you gave points to the AWS documentation and I have gone through it. It deals more with deploying from one of the S3 buckets on AWS itself.

In any case I created the instance role, but that did not show up in the dropdown menu when I create the EC2 instance. It shoudl have shown up and I could have proceeded to create the codedeploy application whose name is required to be filled in the codedeploy settings in bitbucket. 

 

That's like the last step needed for deploying code from bitbucket to aws.

Edited by ajoo

Share this post


Link to post
Share on other sites

It's quite a bit harder to figure this out without being in the AWS console...

 

The "deploying from github" article is different than this one. That's what I thought.

Yeah, now that I look more into it, that's not the right one to link to.

 

CodeDeploy supports S3 and GitHub natively and can use them as places to get source files from. It does not support Bitbucket directly.

 

Instead, Bitbucket is the one that supports CodeDeploy. It will push source files into S3 (using the bucket you tell it to use), then it tells CodeDeploy to perform a deployment (deploying the group you tell it to deploy). That deployment itself is configured to use S3, one way or another.

 

So the best set of instructions will be the ones that tell you how to set up a deployment with S3. But that still comes in two flavors: deploying to an existing instance, or deploying to a new instance.

 

I think you're trying to work with an existing instance? That means these instructions.

 

For the IAM I think you need the first link I posted. Check that the one you made followed all the instructions? And supposedly you can change IAM roles after creating the instance, so maybe just create one and try adding the role after it's running.

  • Like 1

Share this post


Link to post
Share on other sites

Hi Requinix, 

 

Thanks loads for your help. The topic,  the first link you posted, you fished out of the mass of documents was very appropriate  :thumb-up:  :thumb-up:   . I had read them earlier and it took quite a bit of hit and trial before I finally got it working !! I have the commits working now  :happy-03:  :happy-03:  !!

 

Thanks loads !

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.