Update doc
This commit is contained in:
parent
6035f93868
commit
c4dba88ed6
2 changed files with 80 additions and 9 deletions
|
@ -1,23 +1,68 @@
|
|||
# Kubernetes deployment
|
||||
# Gisaf deployment / installation
|
||||
|
||||
This directory contains files for deployment on Kubernetes.
|
||||
This documentation covers the specifics of Gisaf deployment, but
|
||||
it does no cover application configuration details,
|
||||
the set up of a public facing web server handling dns domain / https security.
|
||||
|
||||
*Gisaf* is shipped as containers for easy and effective installation,
|
||||
and packages to deploy them for different environments.
|
||||
|
||||
There are 4 containers:
|
||||
|
||||
- Frontend (Angular build: static files, served by an nginx process,
|
||||
eventually forwarding requests to the backend)
|
||||
- Backend (Python server)
|
||||
- Postgis database server
|
||||
- Redis server
|
||||
|
||||
Commands below assume that they are run from their respective directories
|
||||
(`deployment/systemd`, `deployment/kubernetes`, ...).
|
||||
|
||||
## Systemd
|
||||
|
||||
With the help of *podman*, systemd can handle starting/restarting services, etc,
|
||||
even with a non-privileged user.
|
||||
|
||||
The 4 containers are in the same *pod*, as it is meant primarily for a lightweight
|
||||
production environment, but this can be easily adapted.
|
||||
|
||||
The `deployment/systemd` directory contains files used for running *Gisaf* with Systemd.
|
||||
Podman is used to facilitate the creation of the relevant services.
|
||||
|
||||
### Deployment
|
||||
|
||||
```sh
|
||||
cp -r * $HOME/.config/containers/systemd/
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user start gisaf-pod.service
|
||||
```
|
||||
|
||||
Environment variables for the Gisaf configuration can be added
|
||||
in the `gisaf-backend.container` file.
|
||||
|
||||
Note that starting on system boot requires the user to be enabled accordingly with:
|
||||
|
||||
```sh
|
||||
sudo loginctl enable-linger <username>
|
||||
```
|
||||
|
||||
## Plain Kubernetes (no Helm)
|
||||
|
||||
The `kubernetes` directory contains files for deployment on Kubernetes.
|
||||
|
||||
The standard installation uses a namespace named `gisaf`.
|
||||
|
||||
Commands below assume that they are run from this directory.
|
||||
The Kubernetes configuration is split in 2 files: `gisaf.yaml` and `config.yaml`
|
||||
|
||||
## Plain Kubernetes
|
||||
|
||||
2 files: `gisaf.yaml` and `config.yaml`
|
||||
|
||||
Deploy on Kubernetes (without Helm)
|
||||
Deployment:
|
||||
|
||||
```sh
|
||||
kubectl create namespace gisaf
|
||||
kubectl apply -f config.yaml
|
||||
kubectl apply -f gisaf.yaml
|
||||
```
|
||||
|
||||
Update after modification:
|
||||
Update after modification on the server (frontend and backend):
|
||||
|
||||
```sh
|
||||
kubectl --namespace gisaf rollout restart deployment gisaf-server-deployment
|
||||
|
@ -29,6 +74,9 @@ The `helm` chart is in the directory named `helm`.
|
|||
|
||||
### Deploy on Kubernetes
|
||||
|
||||
Deploying with Helm on Kubernetes makes it straightforward to
|
||||
run on cloud services.
|
||||
|
||||
```sh
|
||||
kubectl create namespace gisaf
|
||||
helm install gisaf helm
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue