This repository for showing Automatically deployment Wordpress application on AWS.
Let's see following this
For me I used Linux for install terraform and deployment.
What're you need in linux ?
$ sudo yum install -y yum-utils
$ sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo
$ sudo yum -y install terraform
You have to create user with Role following these policies:
(To make is Easy, Just Allow them to Full Access, but it's not practical in real life)
- EC2FullAccess
- S3FullAccess
- IAMFullAccess
-
Clone this repository.
git clone https://github.com/tumrabert/Cloud_Midterm_Project.git
(Don't forget to change directory
cd Cloud_Midterm_Project
) -
Run
terraform init
to initialize. -
Run
mv terraform.tfvars.example terraform.tfvars
to rename .example in to .tfvars -
Change variables in file
terraform.tfvars
whatever you want.EC2 AMI specfication is Ubuntu Server 22.04 LTS(HVM) 64 bit
(Not Guarantee that If you change AMI, Deployment would be trigger error.)
-
Run
terraform apply
TO Apply module. -
Enter
yes
when this promted was shown.Do you want to perform these actions? Terraform will perform the actions described above. Only 'yes' will be accepted to approve.
-
Wait Wait Wait Until public ip address was show. Use that ip for website url.
http://<public-ip-address-of-webserver-ec2instance>/wp-login.php
Sign in with username and password that you set in terraform.tfvars