This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* add files for the doc * add doc traefik * add TSimulus & reverse proxy doc #78, #43 * update doc * fix typo
- Loading branch information
1 parent
be663a1
commit ac2974a
Showing
11 changed files
with
176 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
Reverse Proxy | ||
========== | ||
|
||
<p align="left";> | ||
<a href="https://traefik.io/" alt="traefik"> | ||
<img src="/doc/images/logos/traefik-logo.png" width="200px" /> | ||
</a> | ||
</p> | ||
|
||
* [1. Create the Traefik reverse proxy](#1-create-the-traefik-reverse-proxy) | ||
* [2. Configure the various services to use Traefik](#2-configure-the-various-services-to-use-traefik) | ||
|
||
This page provides information on how to configure FADI with the [Traefik](https://traefik.io/) Reverse Proxy. | ||
|
||
> Traefik is an open-source reverse proxy and load balancer for HTTP and TCP-based applications that is easy, dynamic, automatic, fast, full-featured, production proven, provides metrics, and integrates with every major cluster technology... No wonder it's so popular! | ||
Note: other Reverse Proxy than Traefik that could be used with FADI, check the list [here](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/). | ||
|
||
## 1. Create the Traefik reverse proxy | ||
|
||
To create the Traefik reverse proxy, you will need to add the `stable` Helm repository: | ||
|
||
``` | ||
helm repo add stable https://kubernetes-charts.storage.googleapis.com | ||
``` | ||
|
||
You can find information about this Helm chart [here](https://github.com/helm/charts/tree/master/stable/traefik) as the Traefik Helm chart is hosted in the stable helm repository. | ||
|
||
First, you will need to create a `clusterrole` for Traefik: | ||
|
||
``` | ||
kubectl get clusterrole traefik-ingress-controller 2> /dev/null || kubectl create -f ./traefik/rbac-config.yaml | ||
``` | ||
|
||
Take a look at the [sample file](/helm/traefik/rbac-config.yaml). | ||
|
||
Then, you can install Traefik with Helm: (If you want further information, you can follow this [tutorial](https://docs.traefik.io/v1.3/user-guide/kubernetes/#deploy-trfik-using-helm-chart)) | ||
|
||
``` | ||
helm upgrade --install traefik stable/traefik -f ./traefik/values.yaml --namespace kube-system --tiller-namespace tiller | ||
``` | ||
|
||
The values file can be found [here](/helm/traefik/values.yaml). | ||
|
||
``` | ||
loadBalancerIP: "yourLoadBalancerIP" | ||
ssl: | ||
enabled: true | ||
dashboard: | ||
enabled: true | ||
domain: <yourdomain> | ||
serviceType: NodePort | ||
ingress: | ||
annotations: {kubernetes.io/ingress.class: traefik} | ||
path: / | ||
``` | ||
|
||
See the [default values file](https://github.com/helm/charts/blob/master/stable/traefik/values.yaml) from the official repository for more configuration options. | ||
|
||
|
||
## 2. Configure the various services to use Traefik | ||
|
||
You will need to update ingress definitions for each service you want to expose, behind your domain name. | ||
|
||
See https://docs.traefik.io/providers/kubernetes-ingress/ for the documentation. | ||
|
||
Update the FADI `values.yaml` file. You can set all the service types to `ClusterIP` as all services are now exposed through an Ingress. | ||
|
||
For instance, for Grafana: | ||
``` | ||
grafana: | ||
enabled: true | ||
service: | ||
type: ClusterIP | ||
ingress: | ||
enabled: true | ||
annotations: {kubernetes.io/ingress.class: traefik} | ||
path: / | ||
hosts: [grafana.yourdomain] | ||
``` | ||
|
||
You should now be able to access Grafana through the domain name you have chosen: `http(s)://grafana.yourdomain.com` | ||
|
||
Next you will also want to configure SSL access to your services. For that, have a look at the [security documentation](/doc/SECURITY.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Security | ||
========== | ||
|
||
TODO | ||
|
||
* [cert-manager](https://cert-manager.io/docs/installation/kubernetes/). | ||
* ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
TSimulus: Sensors simulation for FADI | ||
========== | ||
|
||
<p align="left";> | ||
<a href="https://tsimulus.readthedocs.io/en/latest" alt="tsimulus"> | ||
<img src="/doc/images/logos/TSimulus-logo.png" width="200px" /> | ||
</a> | ||
</p> | ||
|
||
* [0. Context](#0-context) | ||
* [1. Setup TSimulus](#1-setup-tsimulus) | ||
* [2. How to use TSimulus?](#2-how-to-use-tsimulus) | ||
|
||
## 0. Context | ||
|
||
The TSimulus library is used to simulate various sensors from industrial partners in the context of [many research projects](https://www.cetic.be/FADI). It allows to generate a sufficient amount of data to test the entire FADI platform. It is useful when there was a lack of real time data streams. In that context, TSimulus enables to already work on the analysis part without having the real data from the partners. | ||
|
||
This section explains how to setup TSimulus for FADI and gives the essential links to the documentation on how to use it. | ||
|
||
## 1. Setup TSimulus | ||
|
||
The **TSimulus as a Service** project aims at building a REST API in front of the [TSimulus](https://github.com/cetic/TSimulus) framework, and a set of configurable websocket routes to consume the TSimulus stream. | ||
|
||
The project is structured as a [sbt multiproject](https://www.scala-sbt.org/1.x/docs/Multi-Project.html), each part is runnable as standalone and the top level project orchestrates a complete deployment and coordination of each parts. | ||
|
||
For more information on the implementation, take a look at the documentation of [TSimulus as a Service](https://github.com/cetic/tsimulus-saas). | ||
|
||
To install TSimulus with FADI, you will need to modify a bit the [values.yaml](/helm/values.yaml) file. This will deploy all the TSimulus services (the TSimulus microservice and the [Swagger User Interface](https://swagger.io/tools/swagger-ui/)) on your Kubernetes cluster. | ||
|
||
First of all, update your [values.yaml](/helm/values.yaml) by activating the TSimulus services: | ||
|
||
``` | ||
tsaas: | ||
enabled: true | ||
ingress: | ||
enabled: true | ||
hosts: [api-tsimulus.yourdomain] | ||
swaggerui: | ||
enabled: true | ||
swaggerui : | ||
jsonUrl : https://raw.githubusercontent.com/cetic/tsimulus-saas/master/oas/api-doc/openapi.json | ||
server : | ||
url: http://api-tsimulus.yourdomain | ||
description: "TSIMULUS API" | ||
ingress: | ||
enabled: true | ||
hosts: [swagger-tsimulus.yourdomain] | ||
``` | ||
|
||
You can also setup Ingress parts to use a reverse proxy. See the [previous section](doc/REVERSEPROXY.md). | ||
|
||
Then, run the [deploy.sh](/helm/deploy.sh) script to take the modifications into account: | ||
|
||
``` | ||
cd helm | ||
./deploy.sh | ||
``` | ||
|
||
You should now be able to access the Swagger User Interface (on a minikube setup: `minikube service fadi-swaggerui`): | ||
|
||
 | ||
|
||
## 2. How to use TSimulus? | ||
|
||
* See the [TSimulus Documentation](https://tsimulus.readthedocs.io/en/latest/). | ||
* See the [TSimulus as a Service Documentation](https://github.com/cetic/tsimulus-saas). | ||
* (TODO) See the use cases. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.