- This is a Helm chart repository for deploying an odoo application to a Kubernetes cluster.
- The repository's CI/CD pipeline is configured to deploy application's Helm chart to Azure Kubernetes Service (AKS).
Kubernetes cluster must be at least version 1.23.x or higher, and be configured with the following:
- An ingress controller with ingressClassName ngnix.
- A CSI provisioner for volumes.
- Optional - configure a public DNS name for your Ingress Controller external IP.
The following tools must be installed on your machine:
- Clone the repository:
git clone https://github.com/sla686/odoo-assignment.git odoo-app
cd odoo-app
- Export KUBECONFIG variable pointing to the kubernetes configuration file:
export KUBECONFIG=/path/to/kubeconfig
- Create a new namespace for your application if you need:
kubectl create namespace <application-namespace>
- To install the application, you have to provide connection credentials so that the application can connect to the database. In addition, you have to provide the host address for your Ingress configuration. You can specify them in your values.yaml file:
odooApp:
ingress:
host: <ingress-controller-dns-name> OR <ingress-controller-public-IP>
odooDB:
credentials:
user: <user>
password: <password>
database: <database>
Note: If you would like to specify external IP of the Ingress Controller, provide it in the following format: x.x.x.x.nip.io
- After that, run the following command to install the application:
helm install --namespace <application-namespace> <application-name> .
You can also provide the connection credentials directly to the command without editing the values.yaml file:
helm install --namespace <application-namespace> \
--set odooDB.credentials.user=<user> \
--set odooDB.credentials.password=<password> \
--set odooDB.credentials.database=<database> \
--set odooApp.ingress.host=<ingress-controller-dns-name> OR <ingress-controller-public-IP> \
<application-name> .
- Check details about your release:
helm status -n <application-namespace> <application-name>
The application will be hosted on the host which is specified on the ingress. Get the hostname of your application:
kubectl get ingress -n <application-namespace> -o=jsonpath='{.items[0].spec.rules[0].host}'
Then use the output as a link and navigate to it in your browser.
You can uninstall the application with the following command:
helm uninstall -n <application-namespace> <application-name>
Don't forget to remove the namespace from your Kubernetes cluster if you don't need it anymore:
kubectl delete namespace <application-namespace>