If you prefer to use Apache Airflow as the orchestrator (e.g., for existing Airflow investments or complex DAG requirements), follow the configuration below.
Using Airflow requires additional infrastructure: persistent volumes with ReadWriteMany access, the openmetadata-dependencies Helm chart, and more complex configuration.
Persistent Volumes with ReadWriteMany Access Modes
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 workaround is to create nfs-server disk on Google Kubernetes Engine and use that as the persistent claim and deploy OpenMetadata by implementing the following steps in order.
Since airflow pods run as non root users, they would not have write access on the nfs server volumes. In order to fix the permission here, spin up a pod with persistent volumes attached and run it once.
For more information on airflow helm chart values, please refer to airflow-helm.When deploying openmeteadata dependencies helm chart, use the below command -
Create CloudSQL and Elasticsearch credentials as Kubernetes Secrets, as described here.Also, disable MySQL and Elasticsearch from OpenMetadata Dependencies Helm Charts as described in the FAQ.
Pods are stuck in Pending State due to Persistent Volume Creation Failure
If you came across invalid access type while creating the pvc, and the permission pod is stuck in “pending” state.The above error might have occurred due to the pvc volumes not setup or pvc volumes are not mounted properly.Please validate:
If your openmetadata pods are not in ready state at any point in time and the openmetadata pod logs speaks about the below issue -
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "AsyncAppender-Worker-async-file-appender"Exception in thread "pool-5-thread-1" java.lang.OutOfMemoryError: Java heap spaceException in thread "AsyncAppender-Worker-async-file-appender" java.lang.OutOfMemoryError: Java heap spaceException in thread "dw-46" java.lang.OutOfMemoryError: Java heap spaceException in thread "AsyncAppender-Worker-async-console-appender" java.lang.OutOfMemoryError: Java heap space
This is due to the default JVM Heap Space configuration (1 GiB) being not enough for your workloads. In order to resolve this issue, head over to your custom openmetadata helm values and append the below environment variable
The flag Xmx specifies the maximum memory allocation pool for a Java virtual machine (JVM), while Xms specifies the initial memory allocation pool.Upgrade the helm charts with the above changes using the following command helm upgrade --install openmetadata open-metadata/openmetadata --values <values.yml> --namespace <namespaceName>. Update this command your values.yml filename and namespaceName where you have deployed OpenMetadata in Kubernetes.
1. Create a Dockerfile based on docker.open-metadata.org/openmetadata/server
OpenMetadata helm charts uses official published docker images from DockerHub.
A typical scenario will be to install organization certificates for connecting with inhouse systems.For Example -
FROM docker.open-metadata.org/openmetadata/server:x.y.zWORKDIR /home/COPY <my-organization-certs> .RUN update-ca-certificates
where docker.open-metadata.org/openmetadata/server:x.y.z needs to point to the same version of the OpenMetadata server, for example docker.open-metadata.org/openmetadata/server:1.3.1.
This image needs to be built and published to the container registry of your choice.
The OpenMetadata Application gets installed as part of openmetadata helm chart. In this step, update the custom helm values using YAML file to point the image created in the previous step. For example, create a helm values file named values.yaml with the following contents -
...image: repository: <your repository> # Overrides the image tag whose default is the chart appVersion. tag: <your tag>...
One possible use case for a custom ingestion image is a custom connector. Build and test the package with the same openmetadata-ingestion version as your deployment. After your code is ready, follow these steps:
1. Create a Dockerfile based on docker.open-metadata.org/openmetadata/ingestion:
For example -
FROM docker.open-metadata.org/openmetadata/ingestion:x.y.zUSER airflow# Let's use the home directory of airflow userWORKDIR /home/airflow# Install our custom connectorCOPY <your_package> <your_package>COPY setup.py .RUN pip install --no-deps .
where docker.open-metadata.org/openmetadata/ingestion:x.y.z needs to point to the same version of the OpenMetadata server, for example docker.open-metadata.org/openmetadata/ingestion:1.3.1.
This image needs to be built and published to the container registry of your choice.
2. Update the airflow in openmetadata dependencies values YAML
The ingestion containers (which is the one shipping Airflow) gets installed in the openmetadata-dependencies helm chart. In this step, we use
our own custom values YAML file to point to the image we just created on the previous step. You can create a file named values.deps.yaml with the
following contents:
airflow: airflow: image: repository: <your repository> # by default, openmetadata/ingestion tag: <your tag> # by default, the version you are deploying, e.g., 1.1.0 pullPolicy: "IfNotPresent"
How to disable MySQL and ElasticSearch from OpenMetadata Dependencies Helm Charts ?
If you are using MySQL and ElasticSearch externally, you would want to disable the local installation of mysql and elasticsearch while installing OpenMetadata Dependencies Helm Chart. You can disable the MySQL and ElasticSearch Helm Dependencies by setting enabled: false value for each dependency. Below is the command to set helm values from Helm CLI -
How to configure external database like PostgreSQL with OpenMetadata Helm Charts ?
OpenMetadata Supports PostgreSQL as one of the Database Dependencies. OpenMetadata Helm Charts by default does not include PostgreSQL as Database Dependencies. In order to configure Helm Charts with External Database like PostgreSQL, follow the below guide to make the helm values change and upgrade / install OpenMetadata helm charts with the same.
Upgrade Airflow Helm Dependencies Helm Charts to connect to External Database like PostgreSQL
We ship airflow-helm as one of OpenMetadata Dependencies with default values to connect to MySQL Database as part of externalDatabase configurations.You can find more information on setting the externalDatabase as part of helm values here.With OpenMetadata Dependencies Helm Charts, your helm values would look something like below -
For the above code, it is assumed you are creating a kubernetes secret for storing Airflow Database login Credentials. A sample command to create the secret will be kubectl create secret generic airflow-postgresql-secrets --from-literal=airflow-postgresql-password=<password>.
Upgrade OpenMetadata Helm Charts to connect to External Database like PostgreSQL
Update the openmetadata.config.database.* helm values for OpenMetadata Application to connect to External Database like PostgreSQL.With OpenMetadata Helm Charts, your helm values would look something like below -
For the above code, it is assumed you are creating a kubernetes secret for storing OpenMetadata Database login Credentials. A sample command to create the secret will be kubectl create secret generic openmetadata-postgresql-secrets --from-literal=openmetadata-postgresql-password=<password>.Once you make the above changes to your helm values, run the below command to install/upgrade helm charts -
If you are looking to customize the deployments of any of the above dependencies, please refer to the above links for customizations of helm values for further references.By default, OpenMetadata Dependencies helm chart provides initial generic customization of these helm values in order to get you started quickly. You can refer to the openmetadata-dependencies helm charts default values here.