Choose an Instance Type, in free tier you will get 'General purpose t2. In the details , leave everything default or select as per your requirement, but make sure to select IAM role and select the IAM role which we created in IAM settings and proceed.
Select a new key pair, give a proper name and download the key and keep it safe. You will need this key file to ssh to your EC2 instance. Note : You might need to convert the key file to. Use putty to convert your pem file to ppk. You need to install code deploy agent in your newly created instance. So, ssh to your instance and run the following commands. If this is your first application then select Custom Deployment else select Create Application. If everything worked fine then under Matching instances it will show your EC2 instance and it's current status.
It will be a dropdown so just select the role which you have created in the IAM setting steps. Create or update if already present bitbucket-pipelines. Create a new file appspec. They need not to match the following. Those data are specific to every user. This might come in handy. Skip to content. Star 0. Branches Tags. Could not load branches. Could not load tags. Latest commit. Git stats 7 commits. Failed to load latest commit information. View code. Following steps might help you to do just that.
Getting Started Following are some prerequisites before we can start. Prerequisites AWS Account For this demo purpose I am gonna use a free aws account which you can also get for free for 1 year if it's your first time creating one. And of course a project ready to be deployed or you can clone this very project It's nothing fancy , just a simple hello world app in react Setting up AWS environment For auto-deployment from bit bucket to AWS is done in three stages Push the repository code to AWS S3 storage AWS CodeDeploy will pull the code from s3 and deploy it to an EC2 instance EC2 instance is where the code will compile , build and will be served.
Go to Users tab and click "Add User" Give an appropriate name. Once clicking on the group name , the should look like the following Make sure the new created group is checked and proceed and click Create User on the next page NOTE : This step is very important as you can do it only once. This is a sample build configuration for JavaScript. Only use spaces to indent your. To install Code Deploy Agent execute the following commands:. We need to Update Application Deployment groups to define which EC2 instances will be the target of the deployment.
Your email address will not be published. Save my name, email, and website in this browser for the next time I comment. Setting up a new EC2 instance Install Docker To setup a new EC2 instance, first install Docker in the instance if not installed already : Update packages: sudo apt-get update Intall Docker engine: sudo apt-get install docker-ce docker-ce-cli containerd.
Update Application Deployment groups We need to Update Application Deployment groups to define which EC2 instances will be the target of the deployment.
0コメント