Commissioning a New Server
New server can be added to the mix to increase processing, memory and storage resources anytime as needed.
This method known as horizontal scaling was enabled due to the 'microservice' nature of the system being employed.
Only Linux Debian or Red Hat flavour are supported by this method. Other distro or Oses are not supported.
To add a new server, 2 steps must be perform to set up the server
Preparing the server
1. Install Docker
(install_docker.yml)
- What it is:
Docker is a platform designed to simplify the creation, deployment, and management of applications within lightweight, portable containers. Containers package an application along with its dependencies, ensuring it runs consistently across different environments. - What the playbook does:
This playbook sets up Docker on the target hosts specified under the groupdockerin your inventory. It ensures Docker is installed and configured, enabling containerized applications to run on those hosts. Using this playbook automates the otherwise manual process of installing Docker, verifying its dependencies, and configuring it for production or development.
To install Docker, run the following command:
ansible-playbook -i inventory install_docker.yml
2. Install Python
(install_python.yml)
- What it is:
Python is a high-level programming language used for scripting, application development, and automation. It is a prerequisite for Ansible since Ansible’s tasks rely on Python modules to run commands on target systems. - What the playbook does:
This playbook installs Python on target hosts to enable Ansible to function. Ansible requires Python for its execution engine, so this step ensures that hosts in the grouppythoncan be managed by Ansible scripts. This is a minimal setup focused only on enabling further automation.
To install Python, run the following command:
ansible-playbook -i inventory install_python.yml
3. Install Traefik
(install_traefik.yml)
- What it is:
Traefik is an open-source edge router and reverse proxy that simplifies application networking. It automatically detects and routes traffic to services running in a cluster (e.g., Kubernetes, Docker Swarm) or standalone instances, and provides features like load balancing, HTTPS, and authentication. - What the playbook does:
This playbook installs Traefik on hosts grouped undertraefik. It ensures that the Traefik edge router is set up correctly to act as a reverse proxy and load balancer for applications. Proxy configuration are achieve at application container itself. Not at this traefik container.
To install Traefik, run the following command:
ansible-playbook -i inventory install_traefik.yml
After completion of the above, the server is now ready to be use as target for Trekker Infra or Trekker Client.