Manage and Deploy Code with AWS Developer Tools
Manage and Deploy Code with AWS Developer Tools
End to End Flow of AWS:
Create an AWS account:
→ Go to the Amazon Web Service home page.
→ Choose Sign Up
→ Then give the Email ,password and AWS account name then Click on Continue
→ Enter Our Contact Information and Click on Create Account and Continue
→ Read the AWS Customer Agreement, and then check the box.
→ Enter the Payment Information and click on Secure submit then It will generate one Code and submit the code when AWS team call to register mobile number.
→ Choose Create Account and continue
Create an IAM User
→ Go to AWS Console
→ Go to AWS IAM service
→ Select the Users
→ Select the Add User
→ Enter the User Name & select the Access Type then Click on next
→ Set the Permissions to the User and Click on next
→ Click on Create User
The User is created with Above given Permissions.
Create an IAM Role:
→ Go to AWS Console
→ Go to AWS IAM service
→ Select the IAM Role
→ Click on Create Role
→ Select the type of Trusted Entity (By default AWS service) & Choose the service that will use this role
→ Click on next.
Create an EC2 Instances :
→ Go to AWS Console
→ Go to EC2 service
→ Click on Launch Instance
→ Select the AMI Image
→ Choose Instance type as general purpose and Type must be t2.micro
→ Click on configuration Instance details (choose the no.of instances,choose the network(vpc) ,select any one default subnets , Select the IAM role ) and click on Add storage
→ Give the EBS size as minimum of 8GB and Click on next add Tag
→ Click on Configure security group
→ Configure the security group (give the type ,choose the Source) then Click on review and Launch
→ Click on Launch.
Create an S3 Bucket:
→ Go to AWS console
→ Go to AWS S3 service
→ Click on Create Bucket (give the Bucket name and region) && click on next
→ Give the Configuration properties
→ Set the permissions to the AWS S3 bucket && Click on next
→ Click on create Bucket
Create the DATABASE:
→ Go to AWS console
→ Go to RDS service
→ Click on Create database
→ Select the Database type (like SQL or Oracle etc..) and Click on next
→ Specify the DB details (Give the DB name, master username and password)
(Default specifications 1CPU,1GB RAM and 20GB Harddisk )
→ Click on Next
→ Configure advanced Sittings (give the database name, select availability zone,Select log export ) && Click on Create Database name
Configure the EC2 instance with Database and S3 bucket and also Database to S3 bucket
→ Go to AWS Console
→ Go to IAM Service
→ Select the Policies
→ Search for the “AmazonS3FullAccess” policy name and attach this policy to EC2 instance
→ Search for the “DatabaseAdministrator” policy and attach this policy to EC2 instance
→ Search for the “AmazonS3FullAccess” policy name and attach this policy to Database
Create CLI:
→ Go to command Prompt
→ Run the commands in root user
1
|
$ su # connect to root user
|
→ Install python and check the version
1
|
$ sudo yum install python #to install python
|
1
|
$ python --version
|
→ Download and Install pip
1
|
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
1
|
$ sudo python3 get-pip.py
|
1
|
$ pip --help
|
→ Install the CLI
1
|
$ sudo pip install awscli
|
1
|
$ aws help # Check the awscli
|
Interaction between the AWS CLI to AWS console
→ Connect to AWS console
1
|
$ aws configure # create AWS Access key ,Secrete Access Key , region name
|
→ copy the user Acess key and Secrate Access key
→ Copy the ssh-keygen key to AWS console in IAM users security credentials
Install the tomcat and git on EC2 Instance using AWS CLI
→ Go to AWS CLI and execute the below commands
1
|
$ sudo yum install git #To install git
|
1
|
$ sudo yum install tomcat # to install tomcat
|
Create a repository using CodeCommit and also create a file and commit
→ Go to AWS console
→ Click on CodeCommit service
→ Create a repository (give the Repository name and description)
→ Click on Create repository
→ Click on dropdown and select Create a file by giving required details
→ Click on commit file.
Build the code using CodeBuild in the required format
→ Go to AWS console
→ Go to AWS CodeBuild
→ Select the create project
→ Enter Mandatory fields and click on continue
→ Click on review
→ Click on save and build
→ Give the project name and source version && click on Start build
Deploy the build File into Server using CodeDeploy service
→ Go to AWS console
→ Go to AWS CodeDeploy service
→ Select custom deployment
→ Click on skip walkthrough
→ Create Application by giving below fields
- Like Application name,Give the Compute premises
- Give the deployment group name
- Give the deployment type
- Set the environment configurations
- Give the Service role ARN for a particular role
- Click on create Application
- Deploy code server and access in the browser
No comments:
Post a Comment