Posts

Simple Web-application deployment on EC2 using AWS CodeDeploy & S3 services

  Prerequisite AWS CLI Installations: –   Click Here Configure Service Role for S3. Go to  IAM Click on  Role . Select  AWS services –> Ec2 . Click on  Next Permission. Select  S3FullAccess  Click on Tag (optional)–>Click on Review. Define  Role Name  –> Click on Create. Configure Service Role for CodeDeploy. Go to IAM Click on  Role . Select AWS services  –> CodeDeploy Select your  Use Case  –> CodeDeploy Click  on Next Permission. Click on Tag(optional)–>Click on Review. 5. Define  Role Name  –>  mycodedeployrole .Click on Create.  Steps to Deployment of Web Application 1. Create an EC-2 Instance. Choose an Amazon Machine Image (AMI), find the Amazon Linux AMI  at the top of the list and choose Select. Choose an Instance Type, choose Next: Configure Instance Details. Configure Instance Details, choose Network, and then choose the entry for your default VPC. It should look something like vpc-xxxxxxx (172.31.0.0/16) (default). Choose Subnet, and then choose a subne

Deploy Django website using AWS Elastic Beanstalk CLI in windows

Image
  Prerequisites: Python pip virtualenv awsebcli To deploy a Django website, first create a virtual environment using below commands in cmd terminal… >mkdir demo >cd demo demo> virtualenv  <name_virtualenv> demo> %HOME_Path%\  <name_virtualenv>  \Scripts\activate To check enviroment is now active like below: ( <name_virtualenv> ) C:\> Now, Install django in virtual environment ( <name_virtualenv> ) C:\>  pip install django ( <name_virtualenv> ) C:\>  pip freeze Next step is to create django project ( <name_virtualenv> ) C:\>  django-admin startproject  <project-name> After this execution you will find below directory in project folder 2. cd  <project-name> 3. python manage.py startapp  <folder-name> After this execution you will find below directory in project folder 4. python manage.py runserver 5. pip freeze > requirements.txt 6. mkdir .ebextensions 7. In the .ebextensions directory, add a configuration f

Install Cloudwatch agent on on-premises Windows server

Image
  First, create an IAM user with programmatic access and attach below mentioned policy: CloudWatchAgentAdminPolicy AmazonSSMManagedInstanceCore Now, create a credentials file as per the below image: Now download and install Amazon Cloudwatch agent from the below link: https://s3.amazonaws.com/amazoncloudwatch-agent/windows/amd64/latest/amazon-cloudwatch-agent.msi Update the common-config.toml file: The file is located at C:\ProgramData\Amazon\AmazonCloudWatchAgent Open the file in any editor and change the credentials file as you see below. Here I created the credentials file on the desktop. Now, configure aws cli from the cmd: If you don’t have aws cli in windows then download and install from the below link: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-windows.html Now in cmd enter  aws configure  command and enter the access key and secret key which you created earlier. Now, In AWS console create IAM role: In the IAM console click create the role. Then click on EC2

Deployment of Website Using AWS CICD pipeline & Fargate

Image
  Prerequisite   We have to have a website in PHP/HTML with a database connection in PHP format. Here we have used HTML for the website designing the form which contains the registration of the student and in the form, we have provided the action of the PHP which contain the basic configuration of the database which is required to store the information. And most important of having AWS Account to deploy the website and host using AWS Fargate and Github credentials. Services Used in AWS AWS CodeCommit:  to commit the files of php and others for deployment AWS CodeBuild:  to build the files which are stored in CodeCommit AWS CodePipeline:  to automatedly deploy a website AWS ECR:  repository to store the image AWS Fargate:  to creating a cluster of the image AWS RDS:  for database storage Following are the steps to implement As we have made files and also deployed using Ubuntu OS so the all the below command is written in it 1. Now we have deployed on AWS via GitHub credentials Before de