- 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: Create an Application Load Balancer 00:20:53
- Step 6: Importing the data into the RDS database 00:25:18
- Step 7: Configure the system parameters in Parameter Store Systems Manager 00:38:20
- Inspect the example VPC.
- Inspect the subnets.
- Inspect the Security Groups.
- Inspect the AMI.
- Clone the repository:
git clone https://github.com/baselm/capstoneproject.git
or
wget https://aws-tc-largeobjects.s3-us-west-2.amazonaws.com/ILT-TF-200-ACACAD-20-EN/capstone-project/Example.zip
- Extract the files to the Apache www folder:
chown ec2-user Example.zip
unzip Example.zip -d /var/www/html/
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
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
- Create target group
- Create an auto scaling group
- Lunch Web Instances in the private subnet
_Importing the data into the RDS database instance from CLoud9 or by accessing the web instance via bastion host
-
get the SQLDump file:
-
connect to the RDS database, run this command:
mysql -u admin -p --host <rds-endpoint>
- Test that you can access the RDS DB
use exampledb;
show tables;
- Import the data into the RDS database.
mysql -u admin -p exampledb --host <rds-endpoint> < Countrydatadump.sql
- Test data was imported
use exampledb;
show tables;
select * from countrydata_final;
Add the following parameters to the Parameter Store and set the correct values:
-
/example/endpoint
-
/example/username
-
/example/password
-
/example/database exampledb