fix: redeploy template — merge modify-params into redeploy params (single apply), bump TEST 5.1.14
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
# LUCEE — схема взаимодействия с Postgres
|
||||
|
||||
Ниже статическая SVG-версия схемы (надёжно рендерится в VSCode):
|
||||
|
||||

|
||||
@@ -1,107 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1000" height="420" viewBox="0 0 1000 420" role="img" aria-label="LUCEE схема">
|
||||
<defs>
|
||||
<marker id="arrow" markerWidth="10" markerHeight="7" refX="10" refY="3.5" orient="auto">
|
||||
<path d="M0,0 L10,3.5 L0,7 Z" fill="#333"/>
|
||||
</marker>
|
||||
</defs>
|
||||
<style>
|
||||
.node { fill:#fff; stroke:#333; stroke-width:1.4; }
|
||||
.chip { fill:#f8f9fa; stroke:#333; stroke-width:2; }
|
||||
.app { fill:#eef6ff; stroke:#1f78b4; stroke-width:1.5; }
|
||||
.label { font-family: Arial, Helvetica, sans-serif; font-size:13px; fill:#111; text-anchor:middle; dominant-baseline:middle; }
|
||||
.small { font-family: Arial, Helvetica, sans-serif; font-size:12px; fill:#111; }
|
||||
.line { stroke:#555; stroke-width:1.2; fill:none; marker-end:url(#arrow); }
|
||||
</style>
|
||||
|
||||
<!-- Inputs -->
|
||||
<g id="inputs">
|
||||
<circle cx="140" cy="112" r="8" class="node"/>
|
||||
<text x="170" y="116" class="small">TABLE_NAME</text>
|
||||
|
||||
<circle cx="140" cy="120" r="8" class="node"/>
|
||||
<text x="170" y="124" class="small">TABLE_NAME</text>
|
||||
|
||||
<circle cx="140" cy="184" r="8" class="node"/>
|
||||
<text x="170" y="188" class="small">testds_username</text>
|
||||
|
||||
<circle cx="140" cy="220" r="8" class="node"/>
|
||||
<text x="170" y="224" class="small">testds_password</text>
|
||||
|
||||
<circle cx="140" cy="154" r="8" class="node"/>
|
||||
<text x="170" y="158" class="small">testds_connectionString</text>
|
||||
|
||||
<circle cx="140" cy="188" r="8" class="node"/>
|
||||
<text x="170" y="192" class="small">testds_username</text>
|
||||
|
||||
<circle cx="140" cy="328" r="8" class="node"/>
|
||||
<text x="170" y="332" class="small">testds_validate</text>
|
||||
|
||||
<circle cx="140" cy="364" r="8" class="node"/>
|
||||
<text x="170" y="368" class="small">testds_class</text>
|
||||
</g>
|
||||
|
||||
<!-- Central Postgres chip -->
|
||||
<rect x="370" y="170" width="260" height="120" rx="10" class="chip"/>
|
||||
<text x="500" y="230" class="label">Postgres (БД)</text>
|
||||
|
||||
<text x="880" y="124" class="small">internalMaster</text>
|
||||
<g id="outputs">
|
||||
<circle cx="860" cy="120" r="8" class="node"/>
|
||||
<text x="880" y="158" class="small">vault_users</text>
|
||||
|
||||
<circle cx="860" cy="154" r="8" class="node"/>
|
||||
<text x="880" y="192" class="small">pg_db_name</text>
|
||||
|
||||
<circle cx="860" cy="188" r="8" class="node"/>
|
||||
<text x="880" y="226" class="small">DATABASE_URL</text>
|
||||
|
||||
<circle cx="860" cy="222" r="8" class="node"/>
|
||||
<text x="880" y="260" class="small">PGHOST</text>
|
||||
|
||||
<circle cx="860" cy="256" r="8" class="node"/>
|
||||
<text x="880" y="294" class="small">PGPORT</text>
|
||||
|
||||
<circle cx="860" cy="290" r="8" class="node"/>
|
||||
<text x="880" y="328" class="small">PGUSER</text>
|
||||
|
||||
<circle cx="860" cy="324" r="8" class="node"/>
|
||||
<text x="880" y="362" class="small">PGPASSWORD</text>
|
||||
|
||||
<circle cx="860" cy="358" r="8" class="node"/>
|
||||
<text x="880" y="362" class="small">notification</text>
|
||||
</g>
|
||||
|
||||
<!-- Lucee box -->
|
||||
<rect x="700" y="270" width="200" height="120" rx="10" class="app"/>
|
||||
<text x="800" y="295" class="label">Lucee</text>
|
||||
<text x="800" y="318" class="small">DATABASE_URL</text>
|
||||
<text x="800" y="334" class="small">PGHOST · PGPORT · PGUSER · PGPASSWORD</text>
|
||||
<text x="800" y="350" class="small">TABLE_NAME · testds_class/bundle/version</text>
|
||||
|
||||
<!-- Connections: inputs -> Postgres -->
|
||||
<path d="M140 120 C 260 120 250 170 370 170" class="line"/>
|
||||
<path d="M140 154 C 260 154 250 170 370 170" class="line"/>
|
||||
<path d="M140 188 C 260 188 250 188 370 188" class="line"/>
|
||||
<path d="M140 222 C 260 222 250 210 370 210" class="line"/>
|
||||
<path d="M140 256 C 260 256 250 240 370 240" class="line"/>
|
||||
<path d="M140 290 C 260 290 250 270 370 270" class="line"/>
|
||||
<path d="M140 324 C 260 324 250 300 370 300" class="line"/>
|
||||
<path d="M140 358 C 260 358 250 300 370 300" class="line"/>
|
||||
|
||||
<!-- Connections: Postgres -> outputs -->
|
||||
<path d="M630 170 C 730 170 760 120 860 120" class="line"/>
|
||||
<path d="M630 170 C 730 170 760 150 860 154" class="line"/>
|
||||
<path d="M630 188 C 730 188 760 180 860 188" class="line"/>
|
||||
<path d="M630 210 C 730 210 760 210 860 222" class="line"/>
|
||||
<path d="M630 240 C 730 240 760 240 860 256" class="line"/>
|
||||
<path d="M630 270 C 730 270 760 270 860 290" class="line"/>
|
||||
<path d="M630 300 C 730 300 760 310 860 324" class="line"/>
|
||||
<path d="M630 300 C 730 300 760 330 860 358" class="line"/>
|
||||
|
||||
<!-- Some outputs -> Lucee -->
|
||||
<path d="M860 154 C 820 154 760 240 700 325" class="line"/>
|
||||
<path d="M860 188 C 820 188 760 260 700 325" class="line"/>
|
||||
<path d="M860 290 C 820 290 760 310 700 325" class="line"/>
|
||||
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 4.5 KiB |
@@ -0,0 +1,45 @@
|
||||
# =============================================================================
|
||||
# locals.tf — все настраиваемые значения модуля LUCEE
|
||||
# Никакого хардкода в ресурсах — всё здесь.
|
||||
# =============================================================================
|
||||
|
||||
locals {
|
||||
# ─── PostgreSQL ──────────────────────────────────────────────────────────
|
||||
pg_resource_name = "pglucee001"
|
||||
pg_cpu = 500
|
||||
pg_memory = 512
|
||||
pg_replicas = 1
|
||||
pg_disk = 10
|
||||
pg_version = "17"
|
||||
pg_retain = 14
|
||||
pg_schedule = "0 0 * * *"
|
||||
pg_timeout = "11m"
|
||||
|
||||
# ─── PostgreSQL User ─────────────────────────────────────────────────────
|
||||
pg_username = "user4crudpg"
|
||||
pg_role = "ddl_user"
|
||||
pg_db_name = "db4crudpg"
|
||||
|
||||
# ─── Lucee ───────────────────────────────────────────────────────────────
|
||||
lucee_git_revision = "94e14"
|
||||
lucee_resource_name = "luceeresource"
|
||||
lucee_domain = "tflucee"
|
||||
lucee_version = "5.4"
|
||||
lucee_git_path = "https://gitea.services.ngcloud.ru/Nail/tfluceecrud.git"
|
||||
lucee_cpu = 300
|
||||
lucee_memory = 512
|
||||
lucee_replicas = 1
|
||||
|
||||
# ─── Таблица CRUD ────────────────────────────────────────────────────────
|
||||
crud_table_name = "crud_items"
|
||||
|
||||
# ─── JDBC / БД ───────────────────────────────────────────────────────────
|
||||
jdbc_class = "org.postgresql.Driver"
|
||||
jdbc_bundle_name = "org.postgresql.jdbc"
|
||||
jdbc_bundle_version = "42.6.0"
|
||||
jdbc_conn_limit = "5"
|
||||
jdbc_live_timeout = "15"
|
||||
jdbc_validate = "false"
|
||||
pg_port = "5432"
|
||||
pg_ssl_mode = "require"
|
||||
}
|
||||
+18
-18
@@ -1,51 +1,51 @@
|
||||
locals {
|
||||
pg_host = nubes_postgres.npg_lucee.state_out_flat["internalMaster"]
|
||||
pg_user = nubes_postgres_user.crud_user_0.username
|
||||
pg_pass = jsondecode(nubes_postgres.npg_lucee.vault_secrets["users"]).user4crudpg.password
|
||||
pg_pass = nonsensitive(jsondecode(nubes_postgres.npg_lucee.vault_secrets["users"]).user4crudpg.password)
|
||||
pg_db = nubes_postgres_database.pg_db.db_name
|
||||
}
|
||||
|
||||
resource "nubes_lucee" "applucee" {
|
||||
resource_name = "luceeresource"
|
||||
resource_name = local.lucee_resource_name
|
||||
|
||||
startup_configuration = {
|
||||
resource_realm = var.realm
|
||||
}
|
||||
|
||||
cluster_configuration = {
|
||||
cpu = 300
|
||||
memory = 512
|
||||
replicas = 1
|
||||
cpu = local.lucee_cpu
|
||||
memory = local.lucee_memory
|
||||
replicas = local.lucee_replicas
|
||||
}
|
||||
|
||||
access_configuration = {
|
||||
domain = "tflucee"
|
||||
domain = local.lucee_domain
|
||||
}
|
||||
|
||||
app_configuration = {
|
||||
version = "5.4"
|
||||
git_path = "https://gitea.services.ngcloud.ru/Nail/tfluceecrud.git"
|
||||
version = local.lucee_version
|
||||
git_path = local.lucee_git_path
|
||||
}
|
||||
|
||||
git_revision = "94ebf06"
|
||||
git_revision = local.lucee_git_revision
|
||||
|
||||
json_env = jsonencode({
|
||||
TABLE_NAME = "check_point"
|
||||
testds_class = "org.postgresql.Driver"
|
||||
testds_bundleName = "org.postgresql.jdbc"
|
||||
testds_bundleVersion = "42.6.0"
|
||||
TABLE_NAME = local.crud_table_name
|
||||
testds_class = local.jdbc_class
|
||||
testds_bundleName = local.jdbc_bundle_name
|
||||
testds_bundleVersion = local.jdbc_bundle_version
|
||||
testds_connectionString = "jdbc:postgresql://${local.pg_host}:5432/${local.pg_db}"
|
||||
testds_username = local.pg_user
|
||||
testds_password = local.pg_pass
|
||||
testds_connectionLimit = "5"
|
||||
testds_liveTimeout = "15"
|
||||
testds_validate = "false"
|
||||
testds_connectionLimit = local.jdbc_conn_limit
|
||||
testds_liveTimeout = local.jdbc_live_timeout
|
||||
testds_validate = local.jdbc_validate
|
||||
|
||||
PGHOST = local.pg_host
|
||||
PGPORT = "5432"
|
||||
PGPORT = local.pg_port
|
||||
PGUSER = local.pg_user
|
||||
PGPASSWORD = local.pg_pass
|
||||
PGSSLMODE = "require"
|
||||
PGSSLMODE = local.pg_ssl_mode
|
||||
DATABASE_URL = format(
|
||||
"postgresql://%s:%s@%s:5432/%s",
|
||||
local.pg_user,
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
resource "nubes_postgres" "npg_lucee" {
|
||||
resource_name = "pglucee001"
|
||||
resource_name = local.pg_resource_name
|
||||
|
||||
startup_configuration = {
|
||||
resource_realm = var.realm
|
||||
}
|
||||
|
||||
cluster_configuration = {
|
||||
cpu = 500
|
||||
memory = 512
|
||||
replicas = 1
|
||||
disk = 10
|
||||
cpu = local.pg_cpu
|
||||
memory = local.pg_memory
|
||||
replicas = local.pg_replicas
|
||||
disk = local.pg_disk
|
||||
}
|
||||
|
||||
access_configuration = {
|
||||
@@ -20,7 +20,7 @@ resource "nubes_postgres" "npg_lucee" {
|
||||
}
|
||||
|
||||
postgres_configuration = {
|
||||
version = "17"
|
||||
version = local.pg_version
|
||||
ssl_required = true
|
||||
pooler_master = false
|
||||
pooler_slave = false
|
||||
@@ -33,9 +33,8 @@ resource "nubes_postgres" "npg_lucee" {
|
||||
|
||||
backup_configuration = {
|
||||
s3_uid = var.s3_name
|
||||
# s3_uid = var.s3_user_uid
|
||||
retain = 14
|
||||
schedule = "0 0 * * *"
|
||||
retain = local.pg_retain
|
||||
schedule = local.pg_schedule
|
||||
}
|
||||
|
||||
autoscale_configuration = {
|
||||
@@ -45,6 +44,6 @@ resource "nubes_postgres" "npg_lucee" {
|
||||
quota = 100
|
||||
}
|
||||
|
||||
operation_timeout = "11m"
|
||||
operation_timeout = local.pg_timeout
|
||||
adopt_existing_on_create = true
|
||||
}
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
# =============================================================================
|
||||
# PostgreSQL — пользователи (6 шт.)
|
||||
# PostgreSQL — пользователи и базы данных
|
||||
# =============================================================================
|
||||
resource "nubes_postgres_user" "crud_user_0" {
|
||||
postgres_id = nubes_postgres.npg_lucee.id
|
||||
username = "user4crudpg"
|
||||
role = "ddl_user"
|
||||
username = local.pg_username
|
||||
role = local.pg_role
|
||||
adopt_existing_on_create = true
|
||||
}
|
||||
|
||||
resource "nubes_postgres_database" "pg_db" {
|
||||
postgres_id = nubes_postgres.npg_lucee.id
|
||||
db_name = "db4crudpg"
|
||||
db_name = local.pg_db_name
|
||||
db_owner = nubes_postgres_user.crud_user_0.username
|
||||
adopt_existing_on_create = true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user