This is an automated email from the ASF dual-hosted git repository.

nixonrodrigues pushed a commit to branch atlas-2.6
in repository https://gitbox.apache.org/repos/asf/atlas.git


The following commit(s) were added to refs/heads/atlas-2.6 by this push:
     new e1457bc7ae ATLAS-5441 Align atlas-docker with master compose flow. 
(#807)
e1457bc7ae is described below

commit e1457bc7ae27336a4255e3ff33b1b9db547da290
Author: Nixon Rodrigues <[email protected]>
AuthorDate: Mon Nov 30 16:22:18 2026 +0530

    ATLAS-5441 Align atlas-docker with master compose flow. (#807)
    
    Run schema initialization via one-shot atlas-db-init, use a plain postgres 
atlas-db service, and document postgres/hbase/REST compose steps in the README.
    
    Co-authored-by: Cursor <[email protected]>
---
 dev-support/atlas-docker/README.md                 | 28 ++++++++++++++++--
 dev-support/atlas-docker/config/init_postgres.sh   | 19 +-----------
 .../atlas-docker/docker-compose.atlas-common.yml   | 12 --------
 .../atlas-docker/docker-compose.atlas-postgres.yml | 34 ++++++++++++++++++++++
 4 files changed, 61 insertions(+), 32 deletions(-)

diff --git a/dev-support/atlas-docker/README.md 
b/dev-support/atlas-docker/README.md
index 9e1d97d7e9..6623d57a0c 100644
--- a/dev-support/atlas-docker/README.md
+++ b/dev-support/atlas-docker/README.md
@@ -68,7 +68,7 @@ Docker files in this folder create docker images and run them 
to build Apache At
 
       ```shell
       export ATLAS_BACKEND=postgres
-      docker compose -f docker-compose.atlas.yml -f 
docker-compose.atlas-hadoop.yml -f docker-compose.atlas-hbase.yml up -d --wait
+      docker compose -f docker-compose.atlas.yml -f 
docker-compose.atlas-postgres.yml up -d --wait
       ```
 
       The Postgres overlay runs `config/init_postgres.sh` as a one-shot 
initialization service before Atlas starts.
@@ -78,9 +78,33 @@ Docker files in this folder create docker images and run 
them to build Apache At
 
       ```shell
       export ATLAS_BACKEND=hbase
-      docker compose -f docker-compose.atlas.yml -f 
docker-compose.atlas-hadoop.yml -f docker-compose.atlas-hive.yml up -d --wait
+      docker compose -f docker-compose.atlas.yml -f 
docker-compose.atlas-hadoop.yml up -d --wait
       ```
 
+   5. To build and start the Atlas REST notification server (`atlas-rest`), 
execute following commands after
+      Atlas is running from step 3 or 4 (Kafka and ZooKeeper from the Atlas 
stack must be up):
+
+      ```shell
+      docker compose -f docker-compose.atlas.yml -f 
docker-compose.atlas-rest.yml up -d --build --wait atlas-rest
+      ```
+
+      If Atlas was started with a backend overlay, include the same compose 
files so services share one project:
+
+      ```shell
+      export ATLAS_BACKEND=postgres
+      docker compose -f docker-compose.atlas.yml -f 
docker-compose.atlas-postgres.yml -f docker-compose.atlas-rest.yml up -d 
--build --wait atlas-rest
+      ```
+
+      ```shell
+      export ATLAS_BACKEND=hbase
+      docker compose -f docker-compose.atlas.yml -f 
docker-compose.atlas-hadoop.yml -f docker-compose.atlas-rest.yml up -d --build 
--wait atlas-rest
+      ```
+
+      The REST server package is produced by the atlas-build step
+      (`dist/apache-atlas-${ATLAS_VERSION}-rest-server.tar.gz`). Hook 
notifications are posted to port **41000**
+      (for example 
`http://localhost:41000/rest/api/atlas/v2/notification/topic/{topicName}`). Use 
the same
+      admin credentials as Atlas (`admin` / `atlasR0cks!`).
+
    Apache Atlas will be installed at /opt/atlas/, and logs are at 
/var/log/atlas directory.
 
 7. Atlas Admin can be accessed at http://localhost:21000 (admin/atlasR0cks!)
diff --git a/dev-support/atlas-docker/config/init_postgres.sh 
b/dev-support/atlas-docker/config/init_postgres.sh
index bb02407ae1..5e77b4cd5b 100755
--- a/dev-support/atlas-docker/config/init_postgres.sh
+++ b/dev-support/atlas-docker/config/init_postgres.sh
@@ -103,27 +103,10 @@ EOSQL
   "${psql_cmd[@]}" --dbname "${database_name}" -c "GRANT ALL ON SCHEMA public 
TO public;"
 }
 
-
-# Start the normal PostgreSQL entrypoint in background
-docker-entrypoint.sh postgres &
-pg_pid=$!
-
-# Wait until PostgreSQL is ready
-until pg_isready -U "${POSTGRES_USER:-postgres}" -d 
"${POSTGRES_DB:-postgres}"; do
-    sleep 1
-done
-
-echo "PostgreSQL is ready"
-
-
 create_role hive "${HIVE_DB_PASSWORD}"
 create_database hive hive
 
 create_role atlas "${ATLAS_DB_PASSWORD}"
 create_database atlas atlas
 
-PGPASSWORD="${ATLAS_DB_PASSWORD}" "${atlas_psql_cmd[@]}" --file 
"${ATLAS_SCHEMA_FILE}"
-
-
-# Keep postgres as the container's main process
-wait "$pg_pid"
+PGPASSWORD="${ATLAS_DB_PASSWORD}" "${atlas_psql_cmd[@]}" --file 
"${ATLAS_SCHEMA_FILE}"
\ No newline at end of file
diff --git a/dev-support/atlas-docker/docker-compose.atlas-common.yml 
b/dev-support/atlas-docker/docker-compose.atlas-common.yml
index cd5159ab60..15375cd2a9 100644
--- a/dev-support/atlas-docker/docker-compose.atlas-common.yml
+++ b/dev-support/atlas-docker/docker-compose.atlas-common.yml
@@ -53,19 +53,7 @@ services:
     networks:
       - atlas
     environment:
-      POSTGRES_HOST: atlas-db
-      POSTGRES_PORT: 5432
-      POSTGRES_USER: postgres
-      POSTGRES_DB: postgres
       POSTGRES_PASSWORD: atlasR0cks!
-      HIVE_DB_PASSWORD: atlasR0cks!
-      ATLAS_DB_PASSWORD: atlasR0cks!
-      ATLAS_SCHEMA_FILE: /tmp/create_schema.sql
-    volumes:
-      - ./config/init_postgres.sh:/tmp/init_postgres.sh:ro
-      - 
../../graphdb/janusgraph-rdbms/src/main/resources/META-INF/postgres/create_schema.sql:/tmp/create_schema.sql:ro
-    command:
-      - /tmp/init_postgres.sh
     healthcheck:
       test: 'su -c "pg_isready -q" postgres'
       interval: 30s
diff --git a/dev-support/atlas-docker/docker-compose.atlas-postgres.yml 
b/dev-support/atlas-docker/docker-compose.atlas-postgres.yml
new file mode 100644
index 0000000000..94531ed51f
--- /dev/null
+++ b/dev-support/atlas-docker/docker-compose.atlas-postgres.yml
@@ -0,0 +1,34 @@
+services:
+  atlas:
+    depends_on:
+      atlas-db-init:
+        condition: service_completed_successfully
+
+  atlas-db-init:
+    image: postgres:13.21
+    container_name: atlas-db-init
+    hostname: atlas-db-init.example.com
+    networks:
+      - atlas
+    depends_on:
+      atlas-backend:
+        condition: service_healthy
+    environment:
+      POSTGRES_HOST: atlas-db
+      POSTGRES_PORT: 5432
+      POSTGRES_USER: postgres
+      POSTGRES_DB: postgres
+      POSTGRES_PASSWORD: atlasR0cks!
+      HIVE_DB_PASSWORD: atlasR0cks!
+      ATLAS_DB_PASSWORD: atlasR0cks!
+      ATLAS_SCHEMA_FILE: /tmp/create_schema.sql
+    volumes:
+      - ./config/init_postgres.sh:/tmp/init_postgres.sh:ro
+      - 
../../graphdb/janusgraph-rdbms/src/main/resources/META-INF/postgres/create_schema.sql:/tmp/create_schema.sql:ro
+    command:
+      - /bin/bash
+      - /tmp/init_postgres.sh
+
+networks:
+  atlas:
+    name: atlasnw
\ No newline at end of file

Reply via email to