diff --git a/docker/local-metadata/Dockerfile b/docker/local-metadata/Dockerfile index 22311b2e65e..ef1e8b8d017 100644 --- a/docker/local-metadata/Dockerfile +++ b/docker/local-metadata/Dockerfile @@ -1,6 +1,6 @@ FROM openjdk:11 -EXPOSE 8585 3306 +EXPOSE 8585 RUN apt-get update -y && \ apt-get install --no-install-recommends wget -y && \ diff --git a/docker/local-metadata/docker-compose-dev.yml b/docker/local-metadata/docker-compose-dev.yml index f42f106d777..619d8b24772 100644 --- a/docker/local-metadata/docker-compose-dev.yml +++ b/docker/local-metadata/docker-compose-dev.yml @@ -15,7 +15,7 @@ version: "3.9" services: - db: + mysql: platform: linux/x86_64 image: mysql:latest restart: always diff --git a/docker/local-metadata/docker-compose.yml b/docker/local-metadata/docker-compose.yml index dc51c8d1023..90f45a08c95 100644 --- a/docker/local-metadata/docker-compose.yml +++ b/docker/local-metadata/docker-compose.yml @@ -15,7 +15,7 @@ version: "3.9" services: - db: + mysql: build: context: . dockerfile: Dockerfile_mysql @@ -55,7 +55,7 @@ services: ports: - 8585:8585 depends_on: - - db + - mysql networks: app_net: ipv4_address: 172.16.239.13 @@ -68,7 +68,7 @@ services: context: ../../. dockerfile: ingestion/Dockerfile depends_on: - - db + - mysql expose: - 8080 ports: diff --git a/docker/local-metadata/openmetadata-start.sh b/docker/local-metadata/openmetadata-start.sh index 6aa3a09db07..29679601e11 100644 --- a/docker/local-metadata/openmetadata-start.sh +++ b/docker/local-metadata/openmetadata-start.sh @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -while ! wget -O /dev/null -o /dev/null localhost:3306; do sleep 5; done +while ! wget -O /dev/null -o /dev/null mysql:3306; do sleep 5; done mv /openmetadata.yaml /openmetadata-*/conf/openmetadata.yaml cd /openmetadata-*/ ./bootstrap/bootstrap_storage.sh migrate diff --git a/docker/local-metadata/openmetadata.yaml b/docker/local-metadata/openmetadata.yaml index b65fac895de..81a373587c3 100644 --- a/docker/local-metadata/openmetadata.yaml +++ b/docker/local-metadata/openmetadata.yaml @@ -112,7 +112,7 @@ database: user: openmetadata_user password: openmetadata_password # the JDBC URL; the database is called openmetadata_db - url: jdbc:mysql://localhost/openmetadata_db?allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=UTC + url: jdbc:mysql://mysql:3306/openmetadata_db?allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=UTC elasticsearch: diff --git a/docker/metadata/Dockerfile b/docker/metadata/Dockerfile index 790731a4bfc..bf663f26068 100644 --- a/docker/metadata/Dockerfile +++ b/docker/metadata/Dockerfile @@ -1,6 +1,6 @@ FROM openjdk:11 -EXPOSE 8585 3306 +EXPOSE 8585 RUN apt-get update -y && \ apt-get install --no-install-recommends curl wget -y && \ diff --git a/docker/metadata/docker-compose.yml b/docker/metadata/docker-compose.yml index 22933c4625d..e8bb4a119a5 100644 --- a/docker/metadata/docker-compose.yml +++ b/docker/metadata/docker-compose.yml @@ -15,7 +15,7 @@ version: "3.9" services: - db: + mysql: platform: linux/x86_64 image: openmetadata/db:latest restart: always @@ -49,7 +49,7 @@ services: ports: - 8585:8585 depends_on: - - db + - mysql networks: app_net: ipv4_address: 172.16.239.13 @@ -60,7 +60,7 @@ services: ingestion: image: openmetadata/ingestion:latest depends_on: - - db + - mysql expose: - 8080 ports: diff --git a/docker/metadata/openmetadata-start.sh b/docker/metadata/openmetadata-start.sh index de4536279ec..8fb8cb4b60c 100644 --- a/docker/metadata/openmetadata-start.sh +++ b/docker/metadata/openmetadata-start.sh @@ -16,7 +16,7 @@ # limitations under the License. # -while ! wget -O /dev/null -o /dev/null localhost:3306; do sleep 5; done +while ! wget -O /dev/null -o /dev/null mysql:3306; do sleep 5; done cp /openmetadata.yaml /openmetadata-*/conf/openmetadata.yaml cd /openmetadata-*/ ./bootstrap/bootstrap_storage.sh migrate diff --git a/docker/metadata/openmetadata.yaml b/docker/metadata/openmetadata.yaml index cf5e1b7b961..244a49c5e1d 100644 --- a/docker/metadata/openmetadata.yaml +++ b/docker/metadata/openmetadata.yaml @@ -112,7 +112,7 @@ database: user: openmetadata_user password: openmetadata_password # the JDBC URL; the database is called openmetadata_db - url: jdbc:mysql://localhost/openmetadata_db?allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=UTC + url: jdbc:mysql://mysql:3306/openmetadata_db?allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=UTC elasticsearch: diff --git a/ingestion/Dockerfile b/ingestion/Dockerfile index 0b2d5a54063..550c5ade865 100644 --- a/ingestion/Dockerfile +++ b/ingestion/Dockerfile @@ -9,4 +9,5 @@ RUN pip install 'openmetadata-ingestion[sample-data,elasticsearch,mysql]' apache COPY ./ingestion /ingestion RUN pip install '.[sample-data,elasticsearch,mysql]' RUN chmod 755 ingestion_dependency.sh +EXPOSE 8080 CMD [ "./ingestion_dependency.sh" ] diff --git a/ingestion/examples/airflow/airflow.cfg b/ingestion/examples/airflow/airflow.cfg index 65b5f6c635c..e0f280d05fb 100644 --- a/ingestion/examples/airflow/airflow.cfg +++ b/ingestion/examples/airflow/airflow.cfg @@ -27,7 +27,7 @@ executor = LocalExecutor # SqlAlchemy supports many different database engines. # More information here: # http://airflow.apache.org/docs/apache-airflow/stable/howto/set-up-database.html#database-uri -sql_alchemy_conn = mysql+pymysql://airflow_user:airflow_pass@localhost/airflow_db +sql_alchemy_conn = mysql+pymysql://airflow_user:airflow_pass@mysql/airflow_db # The encoding for the databases sql_engine_encoding = utf-8 diff --git a/ingestion/ingestion_dependency.sh b/ingestion/ingestion_dependency.sh index 40ae37232c1..96d67487314 100755 --- a/ingestion/ingestion_dependency.sh +++ b/ingestion/ingestion_dependency.sh @@ -16,7 +16,7 @@ # limitations under the License. # -while ! wget -O /dev/null -o /dev/null localhost:3306; do sleep 5; done +while ! wget -O /dev/null -o /dev/null mysql:3306; do sleep 5; done export AIRFLOW_HOME=/airflow airflow db init echo "AUTH_ROLE_PUBLIC = 'Admin'" >> /airflow/webserver_config.py