AWS Academy Cloud Architecting course capstone project

Summary of the tasks:

  • Step 0: Inspect the archtecture 00:02:23
  • Step 1: Create a Cloud9 IDE 00:05:49
  • Step 2: Get the Project Assets 00:07:51
  • Step 3: Install a LAMP web server on CLoud9 IDE 00:08:49
  • Step 4: Create a MySQL RDS database instance 00:13:15
  • Step 5: Modify Launch Template
  • Step 6: Create an Application Load Balancer 00:20:53
  • Step 7: Importing the data into the RDS database 00:25:18
  • Step 8: Configure the system parameters in Parameter Store Systems Manager 00:38:20

Step 0: Inspect the archtecture

  • Inspect the example VPC.
  • Inspect the subnets.
  • Inspect the Security Groups.
  • Inspect the AMI.

Step 1: Create a Cloud9 IDE

Step 2: Get the Project Assets

  1. Clone the repository:
   git clone https://github.com/baselm/capstoneproject.git
  1. Extract the files to the Apache www folder:
   unzip Example.zip -d /var/www/html/

Step 3: Install a LAMP web server on Amazon Linux 2

LAMP (Linux, Apache HTTP server, MySQL database, and PHP) stack

sudo yum -y update
sudo amazon-linux-extras install -y lamp-mariadb10.2-php7.2 php7.2

sudo yum install -y httpd mariadb-server
sudo systemctl start httpd

sudo systemctl enable httpd
sudo systemctl is-enabled httpd
  • Open port 80 from the security group of the Cloud9 EC2 instance
  • Get the cloud9 EC2 public instance IP address and test that you can access the website

Step 4: Create a MySQL RDS database instance

with the following specifications.

  • Create a db subnet group
  • Databasetype: MySQL
  • Template: Dev/Test
  • DBinstanceidentifier: Example
  • DB instance size: db.t3.micro
  • Storage type: General Purpose (SSD)
  • Allocatedstorage: 20GiB
  • Storageautoscaling: Enabled
  • Standbyinstance: Enabled
  • Virtualprivatecloud: ExampleVPC
  • Databaseauthenticationmethod: Passwordauthentication
  • Initialdatabasename: exampledb
  • Enhancedmonitoring: Disabled

Step 5: Modify Launch Template

#!/bin/bash -ex
sudo yum -y update
amazon-linux-extras install -y lamp-mariadb10.2-php7.2 php7.2
sudo yum install -y httpd mariadb-server
sudo chkconfig httpd on
sudo service httpd start
cd /home/ec2-user
sudo wget https://aws-tc-largeobjects.s3-us-west-2.amazonaws.com/ILT-TF-200-ACACAD-20-EN/capstone-project/Countrydatadump.sql
sudo chown ec2-user:ec2-user Countrydatadump.sql
cd /var/www/html
sudo wget https://aws-tc-largeobjects.s3-us-west-2.amazonaws.com/ILT-TF-200-ACACAD-20-EN/capstone-project/Example.zip
sudo unzip Example.zip -d /var/www/html/
sudo chmod 755 Example
sudo sed -i "2i date.timezone = \"America/New_York\" " /etc/php.ini
sudo service httpd restart
cd /var/www/html/Example
sudo mv * ../

Step 6: Create an Application Load Balancer

  • Create target group
  • Create an auto scaling group
  • Lunch Web Instances in the private subnet

Step 7: Importing the data into the RDS database

_Importing the data into the RDS database instance from CLoud9 or by accessing the web instance via bastion host

  1. get the SQLDump file:

  2. connect to the RDS database, run this command:

mysql -u admin -p --host <rds-endpoint>
  1. Test that you can access the RDS DB
use exampledb;	
show tables; 

  1. Import the data into the RDS database.
mysql -u admin -p exampledb --host <rds-endpoint>  < Countrydatadump.sql       

Test the ALB

  • Test data was imported
 use exampledb;	
show tables; 
select * from countrydata_final; 

Step 8: Configure the system parameters in Parameter Store Systems Manager

Add the following parameters to the Parameter Store and set the correct values:

  1. /example/endpoint

  2. /example/username

  3. /example/password

  4. /example/database


References:
https://github.com/baselm/capstoneproject

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

yrian.c

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值