refactor: restructure project — separate tools, config, generated, provider

TOOLS/        — generators + scripts + config + ARCHITECTURE.md
  ├── yaml-generator/    (code)
  ├── resource-generator/ (code)
  ├── docs-generator/    (code)
  ├── scripts/           (← devops/*.sh)
  ├── config/            (← devops/profiles/ + devops/config/)
  │   ├── test/          profile.env, services_list.txt, operation_timeouts.json
  │   ├── prod/
  │   └── dev/
  └── ARCHITECTURE.md    (← devops/ARCHITECTURE.md)

generated/    — pipeline output only (gitignored)
  ├── test/resources_yaml/, go/, docs/, provider_build/
  ├── prod/
  └── dev/

provider/     — code only, no generated files
  resources_yaml/        — DELETED (generated)
  internal/resources_gen/ — DELETED (generated)

devops/       — removed (replaced by TOOLS/scripts + TOOLS/config + generated/)

Generators now fail if NUBES_*_DIR not set (no defaults to provider/).
Provider requires pipeline to populate resources_gen/ before build.
This commit is contained in:
“Naeel”
2026-07-06 09:06:09 +04:00
parent c34db5e5e3
commit dd56bcda83
1285 changed files with 84004 additions and 1910 deletions
@@ -0,0 +1,43 @@
# Resource nubes_nodejs
Service ID: `95`
Service Name: NodeJS
[Manual](nodejs.md) | [Create params](nodejs_params_create.md) | [Modify params](nodejs_params_modify.md) | [Output params](nodejs_outputs.md) | [Operations](nodejs_ops.md) | [Example](nodejs_example.md)
## Create params
**Обязательные параметры (вводимые пользователем)**
<table class="resource-table resource-table-compact resource-table-required">
<thead><tr><th>ID</th><th>Code</th><th>Type</th><th>Description</th><th>Constraints</th></tr></thead>
<tbody>
<tr><td>151</td><td><strong><code class="code-no-wrap">health_path</code></strong></td><td><code>string</code></td><td>Путь до healtcheck для запуска пода в Kubernetes, который отдаст 200 код. Если оставить пустым, healtcheck&#39;а не будет</td><td></td></tr>
<tr><td>152</td><td><strong><code class="code-no-wrap">json_env</code></strong></td><td><code>json</code></td><td>Массив переменных, будут переданы в env приложения</td><td></td></tr>
<tr><td>156</td><td><strong><code class="code-no-wrap">resource_realm</code></strong></td><td><code>string</code></td><td>Платформа для развертывания</td><td>func=getAvailableResourceRealms</td></tr>
</tbody></table>
**Параметры, имеющие значение по умолчанию, если не меняете - эти параметры не обязательно прописывать в манифесте**
<table class="resource-table resource-table-compact">
<thead><tr><th>ID</th><th>Code</th><th>Type</th><th>Default</th><th>Description</th><th>Constraints</th></tr></thead>
<tbody>
<tr><td>149</td><td><strong><code class="code-no-wrap">domain</code></strong></td><td><code>string</code></td><td><code>web01</code></td><td>Наименование поддомена, будет добавлено в nodejs.dev.nubes.ru</td><td>regex=^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$</td></tr>
<tr><td>150</td><td><strong><code class="code-no-wrap">git_path</code></strong></td><td><code>string</code></td><td><code>https://github.com/xahys/testnode.git</code></td><td>Путь до Git, который будет webroot для сайта</td><td></td></tr>
<tr><td>153</td><td><strong><code class="code-no-wrap">resource_cpu</code></strong></td><td><code>integer</code></td><td><code>500</code></td><td>Квота ядра пода (milicores). 1000Mili = 1 Ядро</td><td>minvalue=100; maxvalue=4000</td></tr>
<tr><td>154</td><td><strong><code class="code-no-wrap">resource_memory</code></strong></td><td><code>integer</code></td><td><code>1024</code></td><td>Квота памяти пода (MBytes)</td><td>minvalue=128; maxvalue=8192</td></tr>
<tr><td>155</td><td><strong><code class="code-no-wrap">resource_instances</code></strong></td><td><code>integer</code></td><td><code>1</code></td><td>Количество узлов в сети</td><td>minvalue=1; maxvalue=7</td></tr>
<tr><td>270</td><td><strong><code class="code-no-wrap">app_version</code></strong></td><td><code>string</code></td><td><code>23</code></td><td>Версия приложения</td><td>regex=^(\d){2}$; value_list=18, 20, 22, 23</td></tr>
</tbody></table>
<div class="lifecycle-note">
<strong>Параметры поведения (кратко)</strong><br/>
По умолчанию: `suspend_on_destroy = True`, `adopt_existing_on_create = False`.<br/>
При `terraform destroy` или удалении ресурса из манифеста:<br/>
- `suspend_on_destroy=true` — инстанс переводится в `Suspend` (не удаляется).<br/>
- `suspend_on_destroy=false` — Terraform удаляет ресурс только из state.<br/>
При `apply` флаг `adopt_existing_on_create` работает как авто-`import`:<br/>
- `false` — если ресурс уже есть, будет ошибка.<br/>
- `true` — Terraform может взять существующий инстанс под управление (`running` → adopt, `suspended` → resume+adopt при совпадении параметров).<br/>
Важно: один инстанс должен быть только в одном state. Иначе получите конфликт управления.
</div>