Kubernetes Build
The Mint System collection of Helm charts.
- 🚀 Install: Install Helm repository and get started with Odoo.
- 🛠️ Develop: Deploy Odoo and Postgres to a local Kubernetes cluster.
- 🏗️ Build: Fork and build your own Helm charts.
Usage
Add this Helm repository.
helm repo add kubernetes-build https://kubernetes.build
Install a chart.
helm install "$NAME" "kubernetes-build/$NAME"
Charts
List of charts:
Develop
Setup a local Kubernetes cluster and deploy the Helm charts.
Requirements
- Install Helm and kubectl
- Setup kind or minikube
- Optional: bash/zsh alias
task='./task'with completion.
Clone the repository:
git clone git@github.com:Mint-System/Kubernetes-Build.git
cd Kubernetes-Build
Start Kubernetes cluster
Start Kubernetes with kind.
task start-kind
Or start Kubernetes with minikube.
task start-minikube
Deploy Odoo chart
Ensure you have kubectl installed and can access the cluster.
Add chart dependencies.
task add-repos
If not already done setup the local hostnames.
task setup-hosts
Template the .env file.
task template-dotenv
Install the Odoo chart:
task install-odoo
The Odoo database will be initialized automtically.
Once the pod is ready, run this command to port forward the service:
task forward-odoo
Setup ingress nginx
Install ingress-nginx in the current cluster.
task install-ingress-nginx
Forward the ingress-nginx port.
task forward-ingress-nginx
Setup haproxy ingress
Install haproxy-ingress in the current cluster.
task install-haproxy-ingress
Forward the haproxy-ingress port.
task forward-haproxy-ingress
Release charts
Adjust the version in the Chart.yaml files.
Create new packages for all charts.
task package-repo
Commit and push the files.
Usage
APPUiO
Setup and deploy the Helm charts with APPUiO.
Login with OpenShift
Open the OpenShift console in your zone.
Click on the username on the top right and select Copy login command.
In the new tab click Display token and copy the Login with this token command.
Run the command in your shell.
Setup project
If not alrady done, create a project with the oc cli.
oc new-project odoo
Create Odoo release
Add this Helm repo to the local index.
task add-repos
Install the Helm release.
task install-odoo exo
Publish Helm charts
In your zone open Helm > Tab Repositories > Create > Repository and enter:
- Name:
kubernetes-build - Display name:
Kubernetes Build - Description:
The Mint System collection of Helm charts. - URL: https://kubernetes.build
Create release from web console
In your zone open Helm > Tab Helm Releases > Create > Helm Release and filter Odoo. Click on the Helm chart and select Create.
Change these values:
ingress:
host: odoo.exo.mintcloud.ch
secure: true
vshnPostgres:
enabled: true
postgres:
enabled: false
Confirm with Create.
Infomaniak
Deploy the Helm charts to Infomaniak Managed Kubernetes service.
Setup project
Create new Kubernetes cluster in the Infomaniak manager. Then add an instance group.
Download the Kubeconfig file and merge it.
KUBECONFIG_FILE=~/Downloads/pck-XXXXXXX-kubeconfig
mkdir -p ~/.kube
KUBECONFIG=$KUBECONFIG_FILE:$KUBECONFIG kubectl config view --merge --flatten > ~/.kube/config
kubectl config get-contexts
Setup ingress nginx
Add all repos and install the ingress nginx.
task add-repos
task install-ingress-nginx
Manage certificate with cert manager.
task install-cert-manager
Create Odoo release
Install the Odoo chart.
task install-odoo chk
Troubleshooting
Debug the Postgres instance
When deploying the Postgres container with this project the client option is enabled.
postgres.client.enabled=true
vshnPostgres.client.enabled=true
You can enter an interactive shell on the client container.
kubectl exec -it postgres-client -- bash
In the shell try to connect to the cluster.
PGPASSWORD=$POSTGRES_PASSWORD psql -h $POSTGRES_HOST -d $POSTGRES_DB -U $POSTGRES_USER
When connection from APPUiO use this command:
psql --set=sslmode=verify-ca --set=sslrootcert=/etc/secret-volume/ca.crt -h $POSTGRESQL_HOST -d $POSTGRESQL_DB -U $POSTGRESQL_USER