?? Create High Availability Architecture with AWS CLI ??

?? Create High Availability Architecture with AWS CLI ??

?The architecture includes- 
- Webserver configured on EC2 Instance
- Document Root(/var/www/html) made persistent by mounting on EBS Block Device.
- Static objects used in code such as pictures stored in S3
- Setting up Content Delivery Network using CloudFront and using the origin domain
  as S3 bucket.
-Finally place the Cloud Front URL on the webapp code for security and low latency.

?? We have to launch EC2 Instance for configure the Apache Webserver using AWS CLI.

aws ec2 run-instances  --image-id <img_id>  --instance-type <type>  --count 1      --subnet-id <subnet_id>  --security-group-ids  <Sgroup_id>  --key-name <key_id>
No alt text provided for this image
No alt text provided for this image

?? Command for create EBS volume :-

aws ec2 create-volume --volume-type <volume_type> --size <volume_size>             --availability-zone <zone_type>
No alt text provided for this image
No alt text provided for this image

?? Command to Attach EBS Volume to EC2 Instance :-

aws ec2  attach-volume   --volume-id <volume_id>  --instance-id <instance-id>  
    --device /dev/sdf
No alt text provided for this image
No alt text provided for this image

?? We have to install and start httpd service to configure webserver :-

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

?? Create Partition :-

No alt text provided for this image

Command to create partition :-

fdisk /dev/xvdf
No alt text provided for this image
No alt text provided for this image

?? Command to format partition :-

Command to formatting the partition :-

mkfs.ext4 /dev/xvdf1

?? Document Root(/var/www/html) made persistent by mounting on EBS Block Device :-

mount /dev/xvdf1 /var/www/html
No alt text provided for this image

?? Static objects used in code such as pictures stored in S3.

?? Create S3 bucket :-

aws s3api create-bucket --bucket <bucket_name> --region <select_region>           --create-bucket-configuration LocationConstraint=ap-south-1 --acl public-read

No alt text provided for this image
No alt text provided for this image

?? Uploading image to S3 bucket :-

aws s3 cp <local_directory_file_path>  s3://<bucket_name>  --acl public-read
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

Write HTML code for Displaying image :-

File Name - lw.html

Folder Name - /var/www/html

No alt text provided for this image

Now we can see on browser using URL : <public_IP of instance>/<file_name>.html

No alt text provided for this image

? Here we are using S3 URL. We see that => Image displayed with low speed and high latency. To avoid this problem we have to use the concept of Cloud Front.

?? Setting up Content Delivery Network using Cloud Front and using the origin domain as S3 bucket.

?? Create Cloud Front :-

aws cloudfront create-distribution --origin-domain-name  <domain_name>
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

?? Finally place the Cloud Front URL on the webapp code for security and low latency.

No alt text provided for this image

Now we can see on browser using URL : https://domain_name/<image_name>

No alt text provided for this image

? Here we can see that => Image displayed with High speed and Low latency.


??????So We have we have successfully performed the task??????

Thanks Mr.Vimal Daga (Mentor) for giving such a challenging task which helps to me to explore my core concepts of Cloud Computing .


要查看或添加评论,请登录

Chandrahas Patel的更多文章

  • How Kubernetes is used in Industries

    How Kubernetes is used in Industries

    Kubernetes is an open source container orchestration engine for automating deployment, scaling, and management of…

  • How industries are solving challenges using Ansible

    How industries are solving challenges using Ansible

    ?? What is Ansible? Ansible is an open source software provisioning, Configuration Management and Deployment tool…

    1 条评论
  • Limiting The Storage In Hadoop Cluster By Data Node

    Limiting The Storage In Hadoop Cluster By Data Node

    TASK DESCRIPTION: ??In a Hadoop cluster, find how to contribute limited/specific amount of storage as slave to the…

  • ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

    ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

    Artificial Intelligence and Machine Learning is a popular topic in the tech industry. Perhaps more than our daily lives…

  • Building basic Cloud Infrastructure using AWS Cloud

    Building basic Cloud Infrastructure using AWS Cloud

    Description ?? Create a key pair? ?? Create a security group? ?? Launch an instance using the above created key pair…

  • Big Data

    Big Data

    What is Big Data? ->Big Data is also data but with a huge size. Big Data is a term used to describe a collection of…

社区洞察

其他会员也浏览了