Website URL: https://brainstorm.ayodele.cloud
Before you begin, ensure you have met the following requirements:
- AWS Account
- AWS CLI
- Terraform installed locally.
- Ansible installed locally.
- SSH key pair for AWS access.
To get the project up and running locally, follow these steps:
-
Clone the repository:
git clone https://github.com/ayodele-ademeso/brainstorm-task.git cd brainstorm-task cd terraform
-
Create a
terraform.tfvars
file with the variables listed invariables.tf
-
Initialize Terraform to download provider plugins from HashiCorp's official registry:
terraform init
-
Run
terraform plan
-
Then run
terraform apply
Enter
yes
when prompted.
- CD into the ansible folder. Ansible configures the server by installing NGINX, PHP, MySQL, and SSL.
- Modify the
inventory.yaml
andansible.cfg
files to update the hosts IP, and the ssh-key file. - Run the ansible playbook command
ansible-playbook -i inventory.yaml lemp-config.yaml
There is a Github action that copies your updated wordpress files in wordpress whenever a change is made.
Certain sensitive files have been excluded from this repository, including:
.pem files in the root folder and ansible folder. You should create your SSH key pairs and update the Terraform and Ansible configurations accordingly.