To simplify the installation on Kubernetes we are currently using Terraform. You can checkout our Terraform modules.
You need to have a Kubernetes cluster (container platform) up and running, like Google Kubernetes Engine (GKE), Red Hat OpenShift or Azure Kubernetes Service (AKS) or MicroK8s (Linux machine).
You need access to the Onify Hub container images located at Google Container Registry (eu.gcr.io
). For this you need a keyfile.json
. Please contact support@onify.co
for more info.
You might also need access to GitHub Container Registry (ghcr.io
). You need a username and a personal access token (PAT) for this.
Installing Onify Hub on a single Linux machine requires MicroK8s and Terraform. Here is script to set everything up:
curl -L https://raw.githubusercontent.com/onify/install/default/hub/kubernetes/install_microk8s.sh | bash
- Create a
.tf
Terraform file (seesetup.example.tf
) - Create a
.tfvars
file for Terraform variables (seesetup.example.tfvars
) - Run
terraform init
to download and initialize Onify Terraform modules - Run
terraform plan
to plan Onify infrastructure (optional) - Run
terraform apply
to apply Onify infrastructure
You can add your own custom cert instead of default Let's Encrypt. Create a Kubernetes secret manifest file container certificate and key. Here is an example:
Create a file called custom_tls_example.yaml
containing:
apiVersion: v1
kind: Secret
metadata:
name: onify-custom
namespace: default
type: kubernetes.io/tls
data:
tls.crt: <base64-encoded-certificate>
tls.key: <base64-encoded-private-key>
Then you need to apply the secret with:
kubectl apply -f custom_tls_example.yaml
And set the tls
variable in the .tf
file:
tls = "onify-custom"
Helix is default true but can be disabled with helix = false
in the .tf
file.
Helix path is default /helix
but can be changed with helix_path
in the .tf
file.
Ingress is default true but can be disabled with ingress = false
in the .tf
file.
You might need to run export KUBECONFIG=kubeconfig
to get kubectl
working.
Use port forwarding to test the app and login with username and password.
kubectl port-forward --address localhost pod/onify-app-0 3000:3000 -n onify-{CLIENT CODE}-{INSTANCE CODE}
Sometimes you will end up with a access denied
error in the Elasticsearch logs related to the folder to store data.
This is often related to access and can be fixed using this command:
chown -R 1000:2000 /usr/share/elasticsearch/data