mirror of
				https://github.com/open-metadata/OpenMetadata.git
				synced 2025-10-31 10:39:30 +00:00 
			
		
		
		
	Added fix for Sample_Usage not being ingested in Local docker (#3650)
This commit is contained in:
		
							parent
							
								
									4577f12bfd
								
							
						
					
					
						commit
						351db56687
					
				| @ -17,7 +17,7 @@ RUN  apk update \ | |||||||
|   && apk upgrade \ |   && apk upgrade \ | ||||||
|   && apk add --update wget curl bash openjdk11 \ |   && apk add --update wget curl bash openjdk11 \ | ||||||
|   && rm -rf /var/cache/apk/* |   && rm -rf /var/cache/apk/* | ||||||
| COPY docker/metadata/openmetadata-start.sh docker/metadata/openmetadata.yaml ./ | COPY docker/metadata/openmetadata-start.sh ./ | ||||||
| COPY openmetadata-dist/target/openmetadata-*.tar.gz / | COPY openmetadata-dist/target/openmetadata-*.tar.gz / | ||||||
| RUN tar zxvf openmetadata-*.tar.gz && \ | RUN tar zxvf openmetadata-*.tar.gz && \ | ||||||
|     rm openmetadata-*.tar.gz |     rm openmetadata-*.tar.gz | ||||||
|  | |||||||
| @ -17,6 +17,8 @@ services: | |||||||
|       dockerfile: docker/local-metadata/Dockerfile_mysql |       dockerfile: docker/local-metadata/Dockerfile_mysql | ||||||
|     container_name: openmetadata_mysql |     container_name: openmetadata_mysql | ||||||
|     restart: always |     restart: always | ||||||
|  |     depends_on: | ||||||
|  |       - elasticsearch | ||||||
|     environment: |     environment: | ||||||
|       MYSQL_ROOT_PASSWORD: password |       MYSQL_ROOT_PASSWORD: password | ||||||
|     expose: |     expose: | ||||||
| @ -71,7 +73,9 @@ services: | |||||||
|     ports: |     ports: | ||||||
|       - 8585:8585 |       - 8585:8585 | ||||||
|     depends_on: |     depends_on: | ||||||
|  |       - elasticsearch | ||||||
|       - mysql |       - mysql | ||||||
|  |       - ingestion | ||||||
|     networks: |     networks: | ||||||
|       local_app_net: |       local_app_net: | ||||||
|         ipv4_address: 172.16.239.13 |         ipv4_address: 172.16.239.13 | ||||||
| @ -86,6 +90,7 @@ services: | |||||||
|     container_name: openmetadata_ingestion |     container_name: openmetadata_ingestion | ||||||
|     depends_on: |     depends_on: | ||||||
|       - mysql |       - mysql | ||||||
|  |       - elasticsearch | ||||||
|     expose: |     expose: | ||||||
|       - 8080 |       - 8080 | ||||||
|     ports: |     ports: | ||||||
|  | |||||||
| @ -14,7 +14,6 @@ MYSQL="${MYSQL_HOST:-mysql}":"${MYSQL_PORT:-3306}" | |||||||
| while ! wget -O /dev/null -o /dev/null "${MYSQL}"; | while ! wget -O /dev/null -o /dev/null "${MYSQL}"; | ||||||
|   do echo "Trying to connect to ${MYSQL}"; sleep 5; |   do echo "Trying to connect to ${MYSQL}"; sleep 5; | ||||||
| done | done | ||||||
| cp /openmetadata.yaml /openmetadata-*/conf/openmetadata.yaml |  | ||||||
| cd /openmetadata-*/ | cd /openmetadata-*/ | ||||||
| ./bootstrap/bootstrap_storage.sh migrate-all | ./bootstrap/bootstrap_storage.sh migrate-all | ||||||
| ./bin/openmetadata-server-start.sh conf/openmetadata.yaml | ./bin/openmetadata-server-start.sh conf/openmetadata.yaml | ||||||
|  | |||||||
| @ -16,10 +16,43 @@ cd ../ && mvn -DskipTests clean package | |||||||
| echo "Prepare Docker volume for the operators" | echo "Prepare Docker volume for the operators" | ||||||
| cd docker/local-metadata | cd docker/local-metadata | ||||||
| echo "Starting Local Docker Containers" | echo "Starting Local Docker Containers" | ||||||
|  | 
 | ||||||
| docker compose down && docker compose up --build -d | docker compose down && docker compose up --build -d | ||||||
|  | 
 | ||||||
|  | until curl -s -f -o /dev/null "http://localhost:9200/_cat/indices/team_search_index"; do | ||||||
|  |   printf '.' | ||||||
|  |   sleep 5 | ||||||
|  | done | ||||||
|  | until curl -s -f -o /dev/null --header 'Authorization: Basic YWRtaW46YWRtaW4=' "http://localhost:8080/api/v1/dags/sample_data"; do | ||||||
|  |   printf '.' | ||||||
|  |   sleep 5 | ||||||
|  | done | ||||||
|  | curl --location --request PATCH 'localhost:8080/api/v1/dags/sample_data' \ | ||||||
|  |   --header 'Authorization: Basic YWRtaW46YWRtaW4=' \ | ||||||
|  |   --header 'Content-Type: application/json' \ | ||||||
|  |   --data-raw '{ | ||||||
|  |         "is_paused": false | ||||||
|  |       }' | ||||||
| until curl -s -f -o /dev/null "http://localhost:8585/api/v1/tables/name/bigquery_gcp.shopify.fact_sale"; do | until curl -s -f -o /dev/null "http://localhost:8585/api/v1/tables/name/bigquery_gcp.shopify.fact_sale"; do | ||||||
|   printf '.' |   printf '.' | ||||||
|   sleep 2 |   sleep 2 | ||||||
| done | done | ||||||
| curl -u "admin:admin" --data '{"dag_run_id":"es_index_1"}' -H "Content-type: application/json" -X POST http://localhost:8080/api/v1/dags/index_metadata/dagRuns | sleep 5 | ||||||
| tput setaf 2; echo "✔ OpenMetadata is up and running" | curl --location --request PATCH 'localhost:8080/api/v1/dags/sample_usage' \ | ||||||
|  |   --header 'Authorization: Basic YWRtaW46YWRtaW4=' \ | ||||||
|  |   --header 'Content-Type: application/json' \ | ||||||
|  |   --data-raw '{ | ||||||
|  |       "is_paused": false | ||||||
|  |       }' | ||||||
|  | sleep 5 | ||||||
|  | curl --location --request PATCH 'localhost:8080/api/v1/dags/index_metadata' \ | ||||||
|  |   --header 'Authorization: Basic YWRtaW46YWRtaW4=' \ | ||||||
|  |   --header 'Content-Type: application/json' \ | ||||||
|  |   --data-raw '{ | ||||||
|  |       "is_paused": false | ||||||
|  |       }' | ||||||
|  | sleep 2 | ||||||
|  | tput setaf 2 | ||||||
|  | echo "✔ OpenMetadata is up and running" | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | |||||||
| @ -77,7 +77,7 @@ with DAG( | |||||||
|     default_args=default_args, |     default_args=default_args, | ||||||
|     description="An example DAG which runs a OpenMetadata ingestion workflow", |     description="An example DAG which runs a OpenMetadata ingestion workflow", | ||||||
|     start_date=days_ago(1), |     start_date=days_ago(1), | ||||||
|     is_paused_upon_creation=False, |     is_paused_upon_creation=True, | ||||||
|     catchup=False, |     catchup=False, | ||||||
| ) as dag: | ) as dag: | ||||||
|     ingest_task = PythonOperator( |     ingest_task = PythonOperator( | ||||||
|  | |||||||
| @ -69,7 +69,7 @@ with DAG( | |||||||
|     default_args=default_args, |     default_args=default_args, | ||||||
|     description="An example DAG which runs a OpenMetadata ingestion workflow", |     description="An example DAG which runs a OpenMetadata ingestion workflow", | ||||||
|     start_date=days_ago(1), |     start_date=days_ago(1), | ||||||
|     is_paused_upon_creation=False, |     is_paused_upon_creation=True, | ||||||
|     catchup=False, |     catchup=False, | ||||||
| ) as dag: | ) as dag: | ||||||
|     ingest_task = PythonOperator( |     ingest_task = PythonOperator( | ||||||
|  | |||||||
| @ -87,7 +87,7 @@ with DAG( | |||||||
|     description="An example DAG which runs a OpenMetadata ingestion workflow", |     description="An example DAG which runs a OpenMetadata ingestion workflow", | ||||||
|     schedule_interval=timedelta(days=1), |     schedule_interval=timedelta(days=1), | ||||||
|     start_date=days_ago(1), |     start_date=days_ago(1), | ||||||
|     is_paused_upon_creation=False, |     is_paused_upon_creation=True, | ||||||
|     catchup=False, |     catchup=False, | ||||||
| ) as dag: | ) as dag: | ||||||
|     ingest_task = PythonOperator( |     ingest_task = PythonOperator( | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Ayush Shah
						Ayush Shah