| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| version: "3.9" |
| |
| name: hive-gravitino-rest-catalog-integration |
| |
| services: |
| keycloak: |
| image: quay.io/keycloak/keycloak:25.0.1 |
| container_name: keycloak |
| environment: |
| KEYCLOAK_ADMIN: admin |
| KEYCLOAK_ADMIN_PASSWORD: admin |
| volumes: |
| - ./keycloak/realm-export.json:/opt/keycloak/data/import/realm-export.json |
| ports: |
| - "8080:8080" |
| networks: |
| - hive-net |
| command: [ |
| "start-dev", |
| "--import-realm", |
| "--health-enabled=true" |
| ] |
| healthcheck: |
| test: "exec 3<>/dev/tcp/localhost/9000 && \ |
| echo -e 'GET /health/ready HTTP/1.1\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n' >&3 && \ |
| cat <&3 | grep -q '200 OK'" |
| interval: 5s |
| timeout: 2s |
| retries: 15 |
| |
| gravitino: |
| image: apache/gravitino-iceberg-rest:1.0.0 |
| container_name: gravitino |
| environment: |
| JAVA_OPTS: "-Dlog4j2.formatMsgNoLookups=true" |
| volumes: |
| - ./gravitino:/tmp/gravitino |
| - warehouse:/warehouse |
| ports: |
| - "9001:9001" |
| networks: |
| - hive-net |
| entrypoint: /bin/bash /tmp/gravitino/init.sh |
| healthcheck: |
| test: [ "CMD", "/tmp/gravitino/healthcheck.sh" ] |
| interval: 5s |
| timeout: 60s |
| retries: 5 |
| start_period: 20s |
| |
| hive: |
| image: apache/hive:${HIVE_VERSION} |
| container_name: hive |
| depends_on: |
| keycloak: |
| condition: service_healthy |
| gravitino: |
| condition: service_healthy |
| environment: |
| SERVICE_NAME: hiveserver2 |
| volumes: |
| - ./hive/hive-site.xml:/opt/hive/conf/hive-site.xml |
| - warehouse:/warehouse |
| ports: |
| - "10001:10000" |
| networks: |
| - hive-net |
| entrypoint: '/bin/sh -c "/opt/hive/bin/schematool -dbType derby -initOrUpgradeSchema && /entrypoint.sh"' |
| |
| init: |
| image: alpine/curl |
| container_name: init |
| user: "0:0" # run as root |
| environment: |
| - WAREHOUSE=/warehouse |
| - HIVE_USER_ID=1000 |
| volumes: |
| - ./common/:/common |
| - warehouse:/warehouse |
| entrypoint: '/bin/sh -c /common/init.sh' |
| |
| networks: |
| hive-net: |
| driver: bridge |
| |
| volumes: |
| warehouse: |