The project consists of setting up an infrastructure of different services.
To do this, we must use Kubernetes.
We have to to set up a multi-service cluster.
Each service have to run in a dedicated container.
For performance reasons, containers are built using Alpine Linux.
For pedagogical reasons, it is forbidden to take already built images or use services like DockerHub.
The services required were:
- The kubernetes web dashboard
- A WordPress website listening on port 5050, which will work with a MySQL database in separate containers.
- phpMyAdmin, listening on port 5000 and linked with the MySQL database
- An nginx server listening on ports 80 and 443.
This container allows access to a /wordpress route that makes a redirect 307.
It also allows access to /phpmyadmin with a reverse proxy.
- A FTPS server listening on port 21.
- A Grafana platform, listening on port 3000, linked with an InfluxDB database that monitors all containers, with a dashboard for each one.
- Livenessprobe (automatic restart of individual services in case of failure)
- A bare-metal Load balancer (MetalLB) that is the only entrypoint for the Cluster.
Setup the entire cluster:
./setup.sh
Redeploy one or multiple services:
./setup.sh redeploy [service] ...
Open a shell in one of the containers:
./setup.sh shell [service]
Kill a pod:
./setup.sh kill [service]
Launch a stress test on one or multiple services:
./setup.sh stress [service] ...
Default credentials for most services are:
username: anclarma
password: anclarma
For grafana the credentials are:
username: admin
password: admin