This project involves the management of two servers, named "Master" and "Slave," both running on Ubuntu. We use Vagrant for automation. A Bash script handles the setup of a LAMP (Linux, Apache, MySQL, PHP) stack and pulls a PHP application from GitHub with all the necessary components. Additionally, the script configures Apache and MySQL.
To make everything run smoothly, we employ Ansible to execute the Bash script on the "Slave" server. There's also a scheduled task (cron job) that checks the server's uptime daily at midnight.
The Bash script is designed to be user-friendly and can be accessed in this repository: GitHub Repository.
We kick off the project by executing the "vagrant-master.sh" script, which sets up both the Ubuntu "Master" and "Slave" machines and creates a Vagrantfile.
The "lamp-master.sh" script deploys Laravel cloned from the GitHub repository at GitHub Repository exclusively on the "Master" node.
The Ansible Playbook can be found in the "ansible-playbook" directory, which contains the following elements:
This file is the central configuration that guides Ansible's behavior, governing all interactions performed by the control node.
The inventory is a list of managed nodes or hosts that Ansible configures. In this project, the inventory carries the IP address of the "Slave" node.
The Ansible Playbook outlines automation tasks for the "Slave" node, enabling actions to be executed with minimal manual effort across various IT solutions.
This directory contains the "lamp-slave.sh" file, which the playbook uses to deploy Laravel cloned from the GitHub repository at GitHub Repository.
Thank you for your time and consideration.