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

lahirujayathilake pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-custos.git

commit b5ef5142b7422ded45ef2659fbc5aec2aadd7269
Author: lahiruj <[email protected]>
AuthorDate: Tue May 19 17:41:33 2026 -0400

    Add default cluster seed fore development and local env scaffolding
---
 .env.example                              | 18 ++++++++++++++++++
 .gitignore                                |  4 +++-
 dev-ops/compose/seeds/default_cluster.sql | 30 ++++++++++++++++++++++++++++++
 3 files changed, 51 insertions(+), 1 deletion(-)

diff --git a/.env.example b/.env.example
new file mode 100644
index 000000000..032242839
--- /dev/null
+++ b/.env.example
@@ -0,0 +1,18 @@
+# Custos core (cmd/server) configuration.
+#
+# Copy this file to .env and adjust values for your local environment.
+# Load into your shell before `go run ./cmd/server`:
+#
+#   set -a; source .env; set +a
+#
+
+# Required. MariaDB DSN.
+# Local dev creds (admin/admin) come from dev-ops/compose/dbinit/init-db.sh.
+DATABASE_DSN='admin:admin@tcp(localhost:3306)/custos?parseTime=true&charset=utf8mb4&multiStatements=true'
+
+# Optional. Listen address for the HTTP API.wa
+# HTTP_ADDR=:8080
+
+# Optional. Database connection-pool sizing.
+# DB_MAX_OPEN_CONNS=25
+# DB_MAX_IDLE_CONNS=5
diff --git a/.gitignore b/.gitignore
index f7898df4e..ce914f975 100644
--- a/.gitignore
+++ b/.gitignore
@@ -56,4 +56,6 @@ venv/
 
 # Vault
 vault.db
-raft.db
\ No newline at end of file
+raft.db
+
+.env
\ No newline at end of file
diff --git a/dev-ops/compose/seeds/default_cluster.sql 
b/dev-ops/compose/seeds/default_cluster.sql
new file mode 100644
index 000000000..19fae50a3
--- /dev/null
+++ b/dev-ops/compose/seeds/default_cluster.sql
@@ -0,0 +1,30 @@
+-- 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.
+
+-- Dev-only seed: inserts a single default compute_clusters row so a
+-- freshly-wiped dev DB can immediately exercise ClusterAccount creation,
+-- AMIE handler flows, and any future feature that requires a cluster
+-- reference. NOT applied automatically. Apply after core has run its
+-- migrations (which create the compute_clusters table):
+--
+--   docker exec -i custos_db mariadb -u admin -padmin custos \
+--     < dev-ops/compose/seeds/default_cluster.sql
+--
+-- INSERT IGNORE keeps this idempotent — safe to re-apply.
+
+INSERT IGNORE INTO compute_clusters (id, name)
+VALUES ('00000000-0000-0000-0000-000000000001', 'default-cluster');

Reply via email to