Skip to content

Latest commit

 

History

History
129 lines (105 loc) · 4.98 KB

README.md

File metadata and controls

129 lines (105 loc) · 4.98 KB

Teresa

Teresa is an extremely simple platform as a service that runs on top of Kubernetes.

TL;DR;

$ openssl genrsa -out teresa.rsa
$ export TERESA_RSA_PRIVATE=`base64 -w0 teresa.rsa`
$ openssl rsa -in teresa.rsa -pubout > teresa.rsa.pub
$ export TERESA_RSA_PUBLIC=`base64 -w0 teresa.rsa.pub`
$ helm repo add luizalabs http://helm.k8s.magazineluiza.com
$ helm install luizalabs/teresa \
  --set rsa.private=$TERESA_RSA_PRIVATE \
  --set rsa.public=$TERESA_RSA_PUBLIC \
  --set aws.key.access=XXXXXXXXXXXX \
  --set aws.key.secret=XXXXXXXXXXXX \
  --set aws.s3.bucket=teresa \
  --set rbac.enabled=true

Introduction

This chart bootstraps a Teresa deployment on a Kubernetes cluster using the Helm package manager.

Installing the Chart

To install the chart with the release name my-release in namespace my-teresa:

$ openssl genrsa -out teresa.rsa
$ openssl rsa -in teresa.rsa -pubout > teresa.rsa.pub
$ export TERESA_RSA_PRIVATE=`base64 -w0 teresa.rsa`
$ export TERESA_RSA_PUBLIC=`base64 teresa.rsa.pub`

This create a rsa cert and export it in base64 to environment variables.

$ helm repo add luizalabs http://helm.k8s.magazineluiza.com
$ helm install luizalabs/teresa \
  --name my-release \
  --namespace my-teresa \
  --set rsa.private=$TERESA_RSA_PRIVATE \
  --set rsa.public=$TERESA_RSA_PUBLIC \
  --set aws.key.access=XXXXXXXXXXXX \
  --set aws.key.secret=XXXXXXXXXXXX \
  --set aws.s3.bucket=teresa \
  --set rbac.enabled=true

This deploy teresa to cluster with default configuration. The configuration section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Install using minio as storage backend

$ helm repo add luizalabs http://helm.k8s.magazineluiza.com
$ helm install luizalabs/teresa \
  --name my-release \
  --namespace my-teresa \
  --set rsa.private=$TERESA_RSA_PRIVATE \
  --set rsa.public=$TERESA_RSA_PUBLIC \
  --set rbac.enabled=true \
  --set useMinio=true

This will deploy minio using the minio chart and use it as storage backend to teresa.

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release --purge

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following tables lists the configurable parameters of the Teresa chart and their default values.

Parameter Description Default
name Deploy name teresa
service_type Teresa service type LoadBalancer
db.name Database name teresa.sqlite
db.hostname (Optional) Database hostname, if defined use mysql instead of sqlite ""
db.username (Optional) Database username ""
db.password (Optional) Database password ""
storage.type Type of storage s3
aws.s3.force_path_style To force path style instead of subdomain-style false
aws.s3.bucket S3 bucket path ""
aws.s3.endpoint (Optional) AWS Endpoint ""
aws.region AWS Region us-east-1
aws.key.access AWS Access Key ""
aws.key.secret AWS Secret Key ""
rsa.public RSA Public Key ""
rsa.private RSA Private Key ""
tls.crt (Optional) The base64 of TLS Certificate ""
tls.key (Optional) The base64 of TLS Certificate Key ""
docker.registry Docker Registry luizalabs
docker.image Docker Image teresa
docker.tag Docker Tag 0.5.0
build.limits.cpu CPU limit used by build POD 500m
build.limits.memory Memory limit used by build POD 1024Mi
debug If true, print the stack trace on every panic/recover. false
useMinio If true, use minio instead of s3. false
rbac.enabled If true, this configure teresa deployment to use rbac, for now it will use the cluster-admin role false
apps.ingress If true, teresa will create a ingress when expose the app false
apps.check_annother_ingress If true, Teresa will halt exposing an app if an ingress with a different name than the app name exists true
apps.service_type The type used to create the app server LoadBalancer
apps.ingress_class The ingress class to be used ``
slugstore.image The image to be used for the slugstore ""
slugbuilder.image The image to be used for the slugbuilder ""

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

$ helm install luizalabs/teresa --name my-release \
    --set aws.region=us-east-2

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,

$ helm install luizalabs/teresa --name my-release -f values.yaml