### Install pre-commit tool Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/README.md Installs the pre-commit framework, a Python-based tool to manage and execute pre-commit hooks. ```bash pip install pre-commit ``` -------------------------------- ### Install OpenMetadata Helm Chart Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/charts/openmetadata/README.md Installs the OpenMetadata Helm chart from a specified repository. This command deploys OpenMetadata with its default configuration onto a Kubernetes cluster. ```shell helm repo add open-metadata https://helm.open-metadata.org helm install openmetadata open-metadata/openmetadata ``` -------------------------------- ### Deploy OpenMetadata Dependencies with Helm Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/README.md Installs the OpenMetadata dependencies (like MySQL and Elasticsearch) using Helm. It shows the basic installation command and how to provide a custom values file. ```shell helm install openmetadata-dependencies open-metadata/openmetadata-dependencies helm install openmetadata-dependencies open-metadata/openmetadata-dependencies --values <> ``` -------------------------------- ### Install OpenMetadata Helm Chart with Default Configuration Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/charts/deps/README.md Adds the OpenMetadata Helm repository and installs the 'openmetadata-dependencies' chart with default settings. Assumes kubectl context is already configured. ```bash helm repo add open-metadata https://helm.open-metadata.org helm install openmetadata-dependencies open-metadata/openmetadata-dependencies ``` -------------------------------- ### Install OpenMetadata Helm Chart with Custom Values Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/charts/openmetadata/README.md Installs the OpenMetadata Helm chart using a custom `values.yaml` file. This allows for overriding default configurations to tailor the deployment to specific needs. ```shell helm install openmetadata open-metadata/openmetadata --values <> ``` -------------------------------- ### Install chart-testing using Homebrew Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/README.md Installs the chart-testing command-line tool, essential for linting and validating Helm charts, using Homebrew on macOS. ```bash brew install chart-testing ``` -------------------------------- ### Install pre-commit hook Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/README.md Sets up the pre-commit hook in the .git/hooks directory of your repository, enabling automatic execution of defined hooks on commit. ```bash pre-commit install ``` -------------------------------- ### Install OpenMetadata Dependencies using Helm Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/CONTRIBUTING.md Installs the openmetadata-dependencies chart, which contains dependencies required for the OpenMetadata Helm Charts. This is a prerequisite for deploying OpenMetadata. ```shell helm install openmetadata-dependencies open-metadata/openmetadata-dependencies ``` -------------------------------- ### Install OpenMetadata Helm Chart with Custom Values Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/charts/deps/README.md Installs the 'openmetadata-dependencies' Helm chart using a custom 'values.yaml' file for configuration. This allows overriding default settings. ```bash helm install openmetadata-dependencies open-metadata/openmetadata-dependencies --values <> ``` -------------------------------- ### Deploy OpenMetadata using Helm Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/CONTRIBUTING.md Installs the main OpenMetadata Helm chart, deploying the OpenMetadata application into your Kubernetes cluster. Ensure dependencies are met before running this command. ```shell helm install openmetadata open-metadata/openmetadata ``` -------------------------------- ### Add and List Helm Repositories Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/README.md Adds the OpenMetadata Helm repository and then lists all configured Helm repositories to verify the addition. This is a prerequisite for installing OpenMetadata charts. ```shell helm repo add open-metadata https://helm.open-metadata.org/ helm repo list ``` -------------------------------- ### Create Kubernetes Secrets for OpenMetadata Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/charts/openmetadata/README.md Creates Kubernetes secrets required for OpenMetadata, specifically for MySQL and Airflow passwords. These secrets are essential for the secure configuration of the OpenMetadata deployment. ```shell kubectl create secret generic mysql-secrets --from-literal=openmetadata-mysql-password=openmetadata_password kubectl create secret generic airflow-secrets --from-literal=openmetadata-airflow-password=admin ``` -------------------------------- ### Update Helm Dependencies Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/CONTRIBUTING.md Updates the Helm chart dependencies, ensuring that all necessary sub-charts are downloaded and available for installation or testing. This command should be run from the dependency repository. ```shell helm dependency update . ``` -------------------------------- ### Create Kubernetes Secret for Airflow MySQL Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/charts/deps/README.md Creates a Kubernetes generic secret named 'airflow-mysql-secrets' to store the Airflow MySQL password. This is a prerequisite for installing OpenMetadata. ```bash kubectl create secret generic airflow-mysql-secrets --from-literal=airflow-mysql-password=airflow_pass ``` -------------------------------- ### Check Running Pods Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/CONTRIBUTING.md A simple command to list all pods in the current Kubernetes namespace to verify if the OpenMetadata services are running as expected after deployment. ```shell kubectl get pods ``` -------------------------------- ### Dry Run Helm Template with Values Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/CONTRIBUTING.md Tests the Helm chart by rendering templates with specified values in a dry-run mode. This allows you to preview the Kubernetes manifests without actually applying them. ```shell helm template --dry-run openmetadata . --values values.yaml --debug ``` -------------------------------- ### Access Application via Port-Forward for ClusterIP Service (Kubectl) Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/charts/openmetadata/templates/NOTES.txt This method provides access to an application using a ClusterIP service by setting up port forwarding. It identifies a pod associated with the deployment and forwards a local port to the container port. ```shell export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "OpenMetadata.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") echo "Visit http://127.0.0.1:8585 to use your application" kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8585:$CONTAINER_PORT ``` -------------------------------- ### Create Kubernetes Secrets for Passwords Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/CONTRIBUTING.md This snippet demonstrates how to create Kubernetes secrets to store passwords for MySQL and Airflow, which are necessary for testing Open Metadata workflows. ```shell kubectl create secret generic mysql-secrets --from-literal=openmetadata-mysql-password=openmetadata_password kubectl create secret generic airflow-secrets --from-literal=openmetadata-airflow-password=admin kubectl create secret generic airflow-mysql-secrets --from-literal=airflow-mysql-password=airflow_pass ``` -------------------------------- ### Retrieve Application URL via Ingress Hosts (Helm) Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/charts/openmetadata/templates/NOTES.txt This snippet iterates through configured ingress hosts and paths to construct the application URL when ingress is enabled in the Helm chart. It uses Helm templating to dynamically generate the URL. ```go-template {{- if .Values.ingress.enabled }} {{- range $host := .Values.ingress.hosts }} {{- range .paths }} http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} {{- end }} {{- end }} {{- end }} ``` -------------------------------- ### Retrieve Application URL for NodePort Service (Kubectl) Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/charts/openmetadata/templates/NOTES.txt This command sequence retrieves the application URL for a service of type NodePort. It finds the NodePort assigned to the service and the IP address of a Kubernetes node, then combines them to form the URL. ```shell export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "OpenMetadata.fullname" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") echo http://$NODE_IP:$NODE_PORT ``` -------------------------------- ### Expose OpenMetadata UI Locally with Port Forwarding Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/README.md Forwards traffic from a local port to the OpenMetadata service running in the Kubernetes cluster, allowing access to the UI via localhost. ```shell kubectl port-forward deployment/openmetadata 8585:8585 ``` -------------------------------- ### Lint Helm Chart with Values Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/CONTRIBUTING.md Lints the Helm chart in the current directory using a specified values file. This helps identify potential issues and ensures the chart adheres to best practices. ```shell helm lint . --values values.yaml ``` -------------------------------- ### Retrieve Application URL for LoadBalancer Service (Kubectl) Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/charts/openmetadata/templates/NOTES.txt This snippet retrieves the application URL for a LoadBalancer service. It fetches the external IP assigned to the LoadBalancer and combines it with the service port. A note advises monitoring the service status. ```shell NOTE: It may take a few minutes for the LoadBalancer IP to be available. You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "OpenMetadata.fullname" . }}' export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "OpenMetadata.fullname" . }} --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}") echo http://$SERVICE_IP:{{ .Values.service.port }} ``` -------------------------------- ### Manually trigger Helm chart linting Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/README.md Manually initiates the linting process for all Helm charts in the repository using the `ct lint` command. It includes options to disable version increment checks and use `.helmignore` files. ```bash ct lint --all --check-version-increment=false --use-helmignore ``` -------------------------------- ### Uninstall Helm Releases Source: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/CONTRIBUTING.md Removes the deployed OpenMetadata and OpenMetadata dependencies Helm releases from the Kubernetes cluster, effectively cleaning up the deployed resources. ```shell helm uninstall openmetadata helm uninstall openmetadata-dependencies ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.