Deployment
All Core Components and NLP Services can be deployed into Kubernetes cluster using Helm charts.
Before you start, download core Project from https://github.com/flowstorm/core

Kubernetes Cluster

Before you start with deployment you have to ensure that your Kubernetes cluster is appropriately preconfigured and contains all requested resources, including
  • Ingress component to configure processing of incoming web traffic
  • Certificate Manager and Cluster Issuer for managing issuing and renewal of SSL certificates used by web hosts
  • Secrets containing required configuration files with sensitive

Ingress

We recommend ingress-nginx from Kubernetes
1
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
2
helm repo update
3
kubectl apply -f deploy/nginx-config.yaml # optional: SSL cipher order setup update (stronger first - Alexa requires it)
4
helm install ingress-nginx ingress-nginx/ingress-nginx --set controller.service.loadBalancerIP=35.198.81.12 --set rbac.create=true --set controller.publishService.enabled=true
Copied!

Certificate Manager

1
helm repo add jetstack https://charts.jetstack.io
2
helm repo update
3
# helm v2
4
helm install --name cert-manager --namespace cert-manager --version v1.0.1 --set installCRDs=true jetstack/cert-manager
5
# helm v3
6
helm install cert-manager jetstack/cert-manager --namespace cert-manager --version v1.0.1 --set installCRDs=true
Copied!

Cluster Issuer

Cluster certificate issuer have to be installed (e.g. Let's Encrypt) to issue certificate for ingress resources.
1
kubectl apply -f deploy/clusterissuer-letsencrypt.yaml
Copied!

Secrets

Before Core Components can be deployed using Helm, there must be two secrets in place
  • app-local containing runtime configuration for Core components
  • google-sa containing Google Service Account key

How to deploy secrets

1
kubectl create secret generic google-sa --from-file=google-sa.key
2
kubectl create secret generic app-local --from-file=app.local.properties
Copied!

Example of app.local.properties file

1
database.url=mongodb+srv://user:[email protected]
2
illusionist.url=https://illusionist.flowstorm.ai
3
illusionist.apiKey=xxx
4
aws.secret-key=xxx
5
aws.access-key=xxx
6
mscs.key=xxx
7
mscs.location=xxx
8
mailgun.domain=mg-domain.com
9
mailgun.apikey=xxx
10
mailgun.baseUrl=https://api.eu.mailgun.net/v3/
Copied!
To see all configuration parameters, see project setup page.

Core Services

Helm is the package and deployment manager for Kubernetes.

Helm Chart Variables

Core Components have their Helm charts available as a part of project source code at https://github.com/flowstorm/core/tree/master/deploy.
Following variables can be used to parametrise Kubernetes deployment using Helm charts:
Name
Default
Description
baseDomain
flowstorm.ai
Base domain for ingress host
clusterIssuer
letsencrypt
Cluster certificate issuer
namespace
default
Cluster namespace
imagePullSecrets
promethistai-registry
Secret name of type kubernetes.io/dockerconfigjson
imagePullPolicy
IfNotPresent
Pulling policy
app.image.name
registry.gitlab.com/promethistai/
flowstorm-core/runner/app
registry.gitlab.com/promethistai/
flowstorm-core/builder/app
Docker image
app.image.tag
latest
Docker tag
app.mem
1024 for runner, 512 for builder
Memory limit (-XmX java parameter value in megabytes)
app.resources.requests.cpu
0.01
Minimum CPU requested for pod
app.resources.requests.memory
1024Mi for runner, 512Mi for builder
Minimum memory for pod

URL of core service

If you deploy to the default namespace if will be core.{{ .Values.baseDomain }} (e.g. core.promethist.com). Deployment into any different namespace will result to URL core.{{ .Values.namespace }}.{{ .Values.baseDomain }} (e.g. core.preview.promethist.com).

How to Install and Upgrade

If you want to deploy to different than default namespace, use --set namespace=namespace-name for helm command and -n namespace-name for kubectl command.
1
helm upgrade --install flowstorm-runner deploy/runner/app
2
helm upgrade --install flowstorm-builder deploy/builder/app
Copied!
If you want to check deployed resources
1
kubectl get all -l app=flowstorm-runner
2
kubectl get all -l app=flowstorm-builder
Copied!

NLP Services

TBD @jan.pichl
Last modified 8mo ago