Skip to content

poringdol/ft_services

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

ft_services

Webserver cluster running with Docker containers and Kubernetes

About

FT Services is a project proposed in the 42 Schools curriculum, consisting on the implementation of a series of web services running on distinct containers orchestrated with Kubernetes and metallb as LoadBalancer.

Installation

Before launching the setup script, the following dependencies must be satisfied:

  • kubectl
  • minikube
  • Docker
  • Virtualbox

To install the cluster on a minikube instance, execute the script as ./setup.sh. This script was tested on Ubuntu Linux 20.04

Running the Cluster

To access your cluster services, go to a broswer and access the IP: 192.168.99.101. In this home page, there will be several links with redirections to other services of the cluster, like the Wordpress blog and the Grafana metrics visualization tool. To access the FTPS service, run Filezilla or other FTP-client on the IP: 192.168.99.103 port: 21 with user: pdemocri and password pdemocri.

The Cluster

img

The Services

NGINX

Cluster main web server, acting as a reverse proxy to the other containers. It also serves static web pages, as the home page for this project, and support SSL connections on port 443. The access via port 80 is redirected to the secure port with code 301. The NGINX server will allow access to the other HTTP applications with the proxy_pass directive, but doesn't allow exposure for the databases and FTP service. Finally, its container can be accessed through SSH connection on port 22. The service is exposed as LoadBalancer type, exposing ports 22, 80 and 443.

MySQL

Relational database to handle data needs for the Wordpress content website. It's possible to update the root password by changing the MYSQL_ROOT_PASSWORD on the Kubernetes manifest file. It's associated pod claims a Persistent Volume with 1Gb storage, mounted on the /data directory. Its service is exposded with ClusterIP type, exposed on the default port 3306.

Wordpress

Cluster content management system, served with lighttpd web server on container port 80. The processing of dynamic web pages is made with the FastCGI module and PHP, with a wordpress table created on the MySQL service. The pod claims a persistent volume on /var/www, with 1Gb storage, to maintain web documents and to share the volume with the FTPS service. The service is exposed as ClusterIP, being available on port 5050.

PHPMyAdmin

Database management system, with graphical user interface on the browser. Doesn't allow access to the root user. Available on port 5000, exposed as a ClusterIP service.

InfluxDB

Time-series database system, which stores cluster metrics data to be available to the Grafana pod as a visualization tool. Requires initilization of the Telegraf process, with support to kubernetes and kube-inventory plugins and with a dedicated service account inside the pod. The telegraf agent gather the cluster metrics through the Kubernetes API. Exposed as a ClusterIP service on the port 8086.

Grafana

Metrics visualization tool, exposed with a WSGI server on port 3000, as a ClusterIP service. The Grafana service allows the visualziation of containers and general cluster metrics, provisiened the correct dashboards and datasets.

FTPS Server

Simple and secure FTP service with SSL security availability, connected to the mounting point on the Wordpress data directory. Therefore, Wordpress users and administrators may upload or download data from the CMS, if the respective permissions were granted. Doesn't allow anonymous users on the FTP server. Runs on passive mode through the port 30000, with connections on ports 20 and 21 as well. Exposed with a dedicated LoadBalancer service type.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published