The assessment:
Section 1: Linux Proficiency
Install AlmaLinux 9.6 on your virtual machine.
Configure networking, set up static IP address, set Google DNS settings, and use custom local hostname.
Set up basic firewall configuration.
Update the system and reboot
Install a package using the package manager YUM. For this test, Install Docker
Section 2: Docker Proficiency
Pull a Docker image that has both Apache and latest version of PHP on it. This will be our Web server image.
Run the Web server image with published port of 80 and 443 with its volume bind to a writable directory on the host.
Pull a Docker image with latest MySQL or MariaDB on it. This will be our Database server image.
Run the Database server image with published port of 3306 with it's volume bind to a writable directory on the host.
Configure the container's network so they will be on one network.
Section 3: Web and Database Servers
Connect to your Web server container.
Ensure that PHP and Apache are running latest versions on Web server container.
Connect to your Database server container.
Ensure that MySQL or MariaDB are running latest versions on Database server container.
Section 4: DevOps
Download and extract Wordpress files to where the host directory is bound to the container.
Initialize a Git repository for the web directory.
Once Wordpress is installed and configuration is created, push the changes to the remote repository.
Create a CI/CD pipeline using Jenkins or GitLab CI that pulls code from a repository, and downloads the Wordpress files to the new directory installation.
Section 5: Infrastructure as Code (Terraform)
Objective: Automate the provisioning of Docker-based WordPress infrastructure using Terraform.
Install Terraform on your system.
Define infrastructure in code:
Create Terraform configurations for:
A Docker network for container communication.
A MySQL/MariaDB container with persistent storage.
An Apache/PHP container with WordPress bind-mounted volumes.
Ensure containers are linked on the same network.
Use CI/CD to validate your Terraform code
Initialize and apply the Terraform configuration to deploy the infrastructure.
Automatically apply Terraform changes in a controlled environment.
Verify that WordPress is accessible and can connect to the database.
Modify and reapply:
Update the Terraform config (e.g., change PHP version or MySQL config).
Run terraform apply to enforce the new state.
Run automated tests (e.g., check if WordPress is accessible, DB connectivity).
Destroy resources using terraform destroy for cleanup.