deployment

No menu items for this category

Openmetadata Deployment on Azure Kubernetes Service Cluster

Openmetadata can be deployed on Azure Kubernetes Service. It however requires certain cloud specific configurations with regards to setting up storage accounts for Airflow which is one of its dependencies.

It is recommended to use Azure SQL and Elastic Cloud on Azure for Production Deployments.

We support

  • Azure SQL (MySQL) engine version 8 or higher
  • Azure SQL (PostgreSQL) engine version 12 or higher
  • Elastic Cloud (ElasticSearch version 8.10.2)

Once you have the Azure SQL and Elastic Cloud on Azure configured, you can update the environment variables below for OpenMetadata kubernetes deployments to connect with Database and ElasticSearch.

We recommend -

  • Azure SQL to be Multi Zone Available and Production Workload Environment
  • Elastic Cloud Environment with multiple zones and minimum 2 nodes

Make sure to create database and elastic cloud credentials as Kubernetes Secrets mentioned here.

Also, disable MySQL and ElasticSearch from OpenMetadata Dependencies Helm Charts as mentioned in the FAQs here.

If you are deploying on a new cluster set the EnableAzureDiskFileCSIDriver=true to enable container storage interface storage drivers.

For existing cluster it is important to enable the CSI storage drivers

OpenMetadata helm chart depends on Airflow and Airflow expects a persistent disk that support ReadWriteMany (the volume can be mounted as read-write by many nodes). The Azure CSI storage drivers we enabled earlier support the provisioning of the disks in ReadWriteMany mode,.

Create the volume claims by applying the manifest.

Airflow pods run as non-root user and lack write access to our persistent volumes. To fix this we create a job permissions_pod.yaml that runs a pod that mounts volumnes into the persistent volume claim and updates the owner of the mounted folders /airflow-dags and /airflow-logs to user id 5000, which is the default linux user id of Airflow pods.

Start the job by applying the manifest in permissions_pod.yaml.

It is recommeded to use external database and search for production deplyoments. The following implementation uses external postgresql DB from Azure Database. Any of the popular databases can be used. The default implementation uses mysql.

For production deployments connecting external postgresql database provide external database connection details by settings up appropriate secrets as below to use in manifests.

The values-dependencies-yaml is used to overwride default values in the official helm chart and must be configured for customizing for use cases. Uncomment the externalDatabase section with meaningful values to connect to external database for production deployments. We set sensitive information like host address, DB name and DB username through the CLI.

We overwrite some of the default values in the official openmetadata-dependencies helm chart with the values-dependencies.yaml to include an external postgresql db. And it's important to turn the mysql.enable flag to false if you are not using the default mysql db. This can be done both through the yaml file or as shown by setting variable values in the helm install command.

For more information on airflow helm chart values, please refer to airflow-helm

It takes a few minutes for all the pods to be correctly set-up and running.

Finally install Openmetadata optionally customizing the values provided in the official chart here using the values.yaml file.

Give it again a few seconds for the pod to get ready. And when its ready, the service can be accessed by forwarding port 8585 of the cluster ip to you local host port.

If you are using Airflow with Azure Blob Storage as PersistentVolume as explained in Storage class using blobfuse, you may encounter the following error after a few days:

Moreover, the Executor pods would actually be using old files. This behaviour is caused by the recommended config by the mentioned documentation:

Disabling the cache will help here. In this case it won't have any negative impact, since the .py and .json files are small enough and not heavily used.

The same configuration without cache:

You can find more information about this error here, and similar discussions here and here.