ajoo Posted July 23, 2017 Share Posted July 23, 2017 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 ! Quote Link to comment https://forums.phpfreaks.com/topic/304395-stuck-at-a-point-in-aws-codedeploy-and-bitbucket-integration/ Share on other sites More sharing options...
requinix Posted July 23, 2017 Share Posted July 23, 2017 Are you following instructions from someplace? Did you do this step? Seen this? AWS also has a tutorial for deploying from GitHub which should about the same with Bitbucket. Quote Link to comment https://forums.phpfreaks.com/topic/304395-stuck-at-a-point-in-aws-codedeploy-and-bitbucket-integration/#findComment-1548773 Share on other sites More sharing options...
ajoo Posted July 23, 2017 Author Share Posted July 23, 2017 (edited) 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 July 23, 2017 by ajoo Quote Link to comment https://forums.phpfreaks.com/topic/304395-stuck-at-a-point-in-aws-codedeploy-and-bitbucket-integration/#findComment-1548779 Share on other sites More sharing options...
Solution requinix Posted July 23, 2017 Solution Share Posted July 23, 2017 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. 1 Quote Link to comment https://forums.phpfreaks.com/topic/304395-stuck-at-a-point-in-aws-codedeploy-and-bitbucket-integration/#findComment-1548782 Share on other sites More sharing options...
ajoo Posted July 24, 2017 Author Share Posted July 24, 2017 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 . 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 !! Thanks loads ! Quote Link to comment https://forums.phpfreaks.com/topic/304395-stuck-at-a-point-in-aws-codedeploy-and-bitbucket-integration/#findComment-1548803 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.