@namewta/speculo 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/src/kernel.d.ts +23 -2
- package/dist/src/kernel.js +9 -0
- package/dist/src/kernel.js.map +1 -1
- package/dist/src/ops-resources.d.ts +3 -0
- package/dist/src/ops-resources.js +188 -0
- package/dist/src/ops-resources.js.map +1 -0
- package/dist/src/refresh.js +20 -2
- package/dist/src/refresh.js.map +1 -1
- package/dist/src/structured.js +8 -1
- package/dist/src/structured.js.map +1 -1
- package/dist/src/workflows.js +1 -1
- package/dist/src/workflows.js.map +1 -1
- package/package.json +1 -1
- package/template/.speculo/README.md +3 -3
- package/template/.speculo/kernel/README.md +3 -0
- package/template/.speculo/kernel/checkpoint.schema.json +138 -4
- package/template/commands/archive-and-consolidate.md +5 -1
- package/template/commands/status.md +2 -2
- package/template/workflows/ops/D-project-deploy/D-project-deploy.md +34 -0
- package/template/workflows/ops/H-host-manage/H-host-manage.md +30 -0
- package/template/workflows/ops/I-initialize/I-initialize.md +28 -0
- package/template/workflows/ops/INDEX.md +15 -17
- package/template/workflows/ops/README.md +59 -87
- package/template/workflows/ops/_state/status.json +15 -3
- package/template/workflows/ops/common/CAPABILITIES.md +23 -0
- package/template/workflows/ops/common/USAGE.md +112 -0
- package/template/workflows/ops/common/examples/README.md +7 -0
- package/template/workflows/ops/common/examples/binding.example.json +12 -0
- package/template/workflows/ops/common/examples/compose-app.example.json +56 -0
- package/template/workflows/ops/common/examples/credential.example.json +9 -0
- package/template/workflows/ops/common/examples/environment-request.example.json +7 -0
- package/template/workflows/ops/common/examples/register.example.json +44 -0
- package/template/workflows/ops/common/examples/shared-allocation.example.json +37 -0
- package/template/workflows/ops/common/rules/activation-and-memory.md +5 -20
- package/template/workflows/ops/common/rules/persistence-and-secrets.md +27 -0
- package/template/workflows/ops/common/rules/recovery.md +15 -0
- package/template/workflows/ops/common/rules/shared-services.md +13 -0
- package/template/workflows/ops/common/schemas/allocation.schema.json +92 -0
- package/template/workflows/ops/common/schemas/approval.schema.json +41 -21
- package/template/workflows/ops/common/schemas/binding.schema.json +73 -0
- package/template/workflows/ops/common/schemas/deployment.schema.json +244 -0
- package/template/workflows/ops/common/schemas/host.schema.json +88 -0
- package/template/workflows/ops/common/schemas/plan.schema.json +1573 -0
- package/template/workflows/ops/common/schemas/project.schema.json +55 -11
- package/template/workflows/ops/common/schemas/spec.schema.json +1032 -0
- package/template/workflows/ops/common/schemas/status.schema.json +758 -17
- package/template/workflows/ops/common/service-profiles/custom.md +5 -0
- package/template/workflows/ops/common/service-profiles/docker-engine.md +11 -0
- package/template/workflows/ops/common/service-profiles/minio.md +7 -0
- package/template/workflows/ops/common/service-profiles/mysql.md +7 -0
- package/template/workflows/ops/common/service-profiles/redis.md +7 -0
- package/template/workflows/ops/common/templates/CONTROLLER-RECORD.md +13 -0
- package/template/workflows/ops/common/templates/EXECUTION-PLAN.md +15 -0
- package/template/workflows/ops/common/templates/HOST-README.md +11 -0
- package/template/workflows/ops/common/templates/PROJECT-README.md +15 -0
- package/template/workflows/ops/common/tests/test_ops.py +392 -0
- package/template/workflows/ops/common/tools/bootstrap.ps1 +18 -0
- package/template/workflows/ops/common/tools/bootstrap.sh +27 -0
- package/template/workflows/ops/common/tools/demo-local.py +64 -0
- package/template/workflows/ops/common/tools/ops.py +7 -0
- package/template/workflows/ops/common/tools/opslib/__init__.py +2 -0
- package/template/workflows/ops/common/tools/opslib/__pycache__/__init__.cpython-312.pyc +0 -0
- package/template/workflows/ops/common/tools/opslib/__pycache__/core.cpython-312.pyc +0 -0
- package/template/workflows/ops/common/tools/opslib/__pycache__/model.cpython-312.pyc +0 -0
- package/template/workflows/ops/common/tools/opslib/agent.py +510 -0
- package/template/workflows/ops/common/tools/opslib/cli.py +172 -0
- package/template/workflows/ops/common/tools/opslib/core.py +199 -0
- package/template/workflows/ops/common/tools/opslib/docs.py +199 -0
- package/template/workflows/ops/common/tools/opslib/execution.py +248 -0
- package/template/workflows/ops/common/tools/opslib/host_recipes.py +67 -0
- package/template/workflows/ops/common/tools/opslib/model.py +199 -0
- package/template/workflows/ops/common/tools/opslib/native_windows.py +32 -0
- package/template/workflows/ops/common/tools/opslib/planner.py +497 -0
- package/template/workflows/ops/common/tools/opslib/services.py +47 -0
- package/template/workflows/ops/common/tools/opslib/sources.py +27 -0
- package/template/workflows/ops/common/tools/opslib/transport.py +55 -0
- package/template/workflows/ops/common/tools/validate-ops.mjs +32 -991
- package/template/workflows/ops/manifest.json +60 -1
- package/template/workflows/ops/runtime-contract.json +1 -6
- package/template/workflows/ops/A-archive-and-learn/A-archive-and-learn.md +0 -71
- package/template/workflows/ops/A-archive-and-learn/promotion-plan-template.md +0 -41
- package/template/workflows/ops/A-archive-and-learn/retrospective-template.md +0 -53
- package/template/workflows/ops/E-execute-and-stabilize/E-execute-and-stabilize.md +0 -82
- package/template/workflows/ops/E-execute-and-stabilize/attempt-summary-template.md +0 -44
- package/template/workflows/ops/E-execute-and-stabilize/diagnosis-template.md +0 -24
- package/template/workflows/ops/E-execute-and-stabilize/handoff-template.md +0 -32
- package/template/workflows/ops/E-execute-and-stabilize/rollback-template.md +0 -26
- package/template/workflows/ops/E-execute-and-stabilize/verification-state-template.json +0 -30
- package/template/workflows/ops/E-execute-and-stabilize/verification-template.md +0 -55
- package/template/workflows/ops/I-intake-and-assess/I-intake-and-assess.md +0 -73
- package/template/workflows/ops/I-intake-and-assess/change-status-template.json +0 -26
- package/template/workflows/ops/I-intake-and-assess/collector-catalog.md +0 -28
- package/template/workflows/ops/I-intake-and-assess/deployment-dossier-template.md +0 -62
- package/template/workflows/ops/I-intake-and-assess/global-change-status-template.json +0 -26
- package/template/workflows/ops/I-intake-and-assess/project-detection.md +0 -38
- package/template/workflows/ops/I-intake-and-assess/request-template.md +0 -44
- package/template/workflows/ops/I-intake-and-assess/system-report-template.md +0 -34
- package/template/workflows/ops/I-intake-and-assess/target-profile-template.json +0 -24
- package/template/workflows/ops/P-plan-and-approve/P-plan-and-approve.md +0 -72
- package/template/workflows/ops/P-plan-and-approve/plan-review-template.md +0 -78
- package/template/workflows/ops/_state/archive/.gitkeep +0 -1
- package/template/workflows/ops/_state/changes/.gitkeep +0 -1
- package/template/workflows/ops/common/rules/artifact-contract.md +0 -37
- package/template/workflows/ops/common/rules/closure-and-learning.md +0 -25
- package/template/workflows/ops/common/rules/evidence-and-redaction.md +0 -22
- package/template/workflows/ops/common/rules/execution-loop.md +0 -27
- package/template/workflows/ops/common/rules/path-and-scope-contract.md +0 -21
- package/template/workflows/ops/common/rules/plan-and-approval.md +0 -25
- package/template/workflows/ops/common/rules/project-and-change-scope.md +0 -20
- package/template/workflows/ops/common/rules/target-profile-and-release-gates.md +0 -44
- package/template/workflows/ops/common/schemas/attempt.schema.json +0 -42
- package/template/workflows/ops/common/schemas/change-status.schema.json +0 -43
- package/template/workflows/ops/common/schemas/deployment-model.schema.json +0 -26
- package/template/workflows/ops/common/schemas/implementation-plan.schema.json +0 -221
- package/template/workflows/ops/common/schemas/inventory-snapshot.schema.json +0 -31
- package/template/workflows/ops/common/schemas/journal-event.schema.json +0 -22
- package/template/workflows/ops/common/schemas/promotion-approval.schema.json +0 -20
- package/template/workflows/ops/common/schemas/promotion-manifest.schema.json +0 -22
- package/template/workflows/ops/common/schemas/target-profile.schema.json +0 -32
- package/template/workflows/ops/common/schemas/verification-state.schema.json +0 -30
- package/template/workflows/ops/common/tools/close-change.mjs +0 -177
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# 公共服务生命周期
|
|
2
|
+
|
|
3
|
+
Project.kind 为 app 或 shared-service;mysql-main/minio-main/redis-main 与 APP 同级。Allocation 是 provider 内的逻辑资源及 owner/data_group/environment/application credential;Binding 是某部署对该 allocation 的端点/网络/凭据引用。
|
|
4
|
+
|
|
5
|
+
同 APP 的多机副本可引用同一 allocation;不同 APP 默认不同数据库、桶、ACL 和账号。跨 owner 必须 shared_owners 显式批准;跨环境不靠相同账号自动打通。数字 Redis DB/key prefix 不是独立恢复或资源隔离的证明。
|
|
6
|
+
|
|
7
|
+
内置 MySQL/Redis 分配针对受管 Compose provider:管理员与应用账号必须不同,账号名必须与明文账本一致;MySQL 只授本库权限,Redis 只授被批准 key 范围并验证 ACL SAVE。MinIO 使用指定 mc 版本客户端;其创建用户命令短暂暴露应用密码给特权本机进程查看者,必须显式 allow_secret_argv,不隐瞒该风险。需要避开此风险时采用外部已分配并验证的资源。
|
|
8
|
+
|
|
9
|
+
已经存在的未知数据库/用户/桶不自动接管;existing 需要真实授权范围与实际探测。计划记录具体版本和端点;任何密码轮换都不复用原 allocation 创建批准。未知产品不猜安装/备份命令。
|
|
10
|
+
|
|
11
|
+
更新 APP 不升级 provider;退役 APP 不删除 provider、数据、逻辑资源、账号或网络。provider 有 active 消费者时不能退役。维护 provider 必须列全受影响消费者并获确认;控制端和相关服务器文档同步。
|
|
12
|
+
|
|
13
|
+
单 APP 数据恢复与公共实例恢复分开。备份能力不足即阻塞该承诺;不能用共享实例快照覆盖其他 APP 的新数据。迁移单独定义复制、追平、切换、验证和保留旧端点;工作流不假装原子跨主机提交。
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:speculo:ops:allocation:v1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"allocation_id": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
9
|
+
"maxLength": 80
|
|
10
|
+
},
|
|
11
|
+
"provider_deployment_id": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
14
|
+
"maxLength": 80
|
|
15
|
+
},
|
|
16
|
+
"owner_project_id": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
19
|
+
"maxLength": 80
|
|
20
|
+
},
|
|
21
|
+
"environment": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
24
|
+
"maxLength": 80
|
|
25
|
+
},
|
|
26
|
+
"data_group": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
29
|
+
"maxLength": 80
|
|
30
|
+
},
|
|
31
|
+
"resource_kind": {
|
|
32
|
+
"enum": [
|
|
33
|
+
"database",
|
|
34
|
+
"bucket",
|
|
35
|
+
"redis-acl",
|
|
36
|
+
"generic"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"resource_name": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"minLength": 1
|
|
42
|
+
},
|
|
43
|
+
"credential_ref": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*@[1-9][0-9]*$"
|
|
46
|
+
},
|
|
47
|
+
"shared_owners": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"items": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
52
|
+
"maxLength": 80
|
|
53
|
+
},
|
|
54
|
+
"uniqueItems": true
|
|
55
|
+
},
|
|
56
|
+
"status": {
|
|
57
|
+
"enum": [
|
|
58
|
+
"planned",
|
|
59
|
+
"active",
|
|
60
|
+
"retained",
|
|
61
|
+
"retired"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"recovery_scope": {
|
|
65
|
+
"enum": [
|
|
66
|
+
"logical",
|
|
67
|
+
"provider-wide",
|
|
68
|
+
"application-export",
|
|
69
|
+
"unverified"
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"notes": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"minLength": 1
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"required": [
|
|
78
|
+
"allocation_id",
|
|
79
|
+
"provider_deployment_id",
|
|
80
|
+
"owner_project_id",
|
|
81
|
+
"environment",
|
|
82
|
+
"data_group",
|
|
83
|
+
"resource_kind",
|
|
84
|
+
"resource_name",
|
|
85
|
+
"credential_ref",
|
|
86
|
+
"shared_owners",
|
|
87
|
+
"status",
|
|
88
|
+
"recovery_scope",
|
|
89
|
+
"notes"
|
|
90
|
+
],
|
|
91
|
+
"additionalProperties": false
|
|
92
|
+
}
|
|
@@ -1,28 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "urn:speculo:ops:approval:
|
|
4
|
-
"title": "Ops Plan Approval",
|
|
3
|
+
"$id": "urn:speculo:ops:approval:v1",
|
|
5
4
|
"type": "object",
|
|
6
|
-
"required": ["schema_version", "artifact", "scope", "project_id", "approval_id", "change", "plan_path", "plan_digest", "source_revision", "target_fingerprint", "approved_batches", "excluded_batches", "confirmed_global_environment_keys", "conditions", "decision", "decision_summary", "decided_at", "expires_at"],
|
|
7
5
|
"properties": {
|
|
8
|
-
"schema_version": {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
6
|
+
"schema_version": {
|
|
7
|
+
"const": 1
|
|
8
|
+
},
|
|
9
|
+
"artifact": {
|
|
10
|
+
"const": "ops-plan-approval"
|
|
11
|
+
},
|
|
12
|
+
"run_id": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
15
|
+
"maxLength": 80
|
|
16
|
+
},
|
|
17
|
+
"plan_digest": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength": 1
|
|
20
|
+
},
|
|
21
|
+
"approved_by": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 1
|
|
24
|
+
},
|
|
25
|
+
"approved_at": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"minLength": 1
|
|
28
|
+
},
|
|
29
|
+
"decision": {
|
|
30
|
+
"const": "approved"
|
|
31
|
+
},
|
|
32
|
+
"statement": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"minLength": 1
|
|
35
|
+
}
|
|
26
36
|
},
|
|
37
|
+
"required": [
|
|
38
|
+
"schema_version",
|
|
39
|
+
"artifact",
|
|
40
|
+
"run_id",
|
|
41
|
+
"plan_digest",
|
|
42
|
+
"approved_by",
|
|
43
|
+
"approved_at",
|
|
44
|
+
"decision",
|
|
45
|
+
"statement"
|
|
46
|
+
],
|
|
27
47
|
"additionalProperties": false
|
|
28
48
|
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:speculo:ops:binding:v1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"binding_id": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
9
|
+
"maxLength": 80
|
|
10
|
+
},
|
|
11
|
+
"consumer_deployment_id": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
14
|
+
"maxLength": 80
|
|
15
|
+
},
|
|
16
|
+
"mode": {
|
|
17
|
+
"enum": [
|
|
18
|
+
"dedicated",
|
|
19
|
+
"shared",
|
|
20
|
+
"external"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"provider_deployment_id": {
|
|
24
|
+
"type": [
|
|
25
|
+
"string",
|
|
26
|
+
"null"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"allocation_id": {
|
|
30
|
+
"type": [
|
|
31
|
+
"string",
|
|
32
|
+
"null"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"endpoint": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"minLength": 1
|
|
38
|
+
},
|
|
39
|
+
"credential_ref": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*@[1-9][0-9]*$"
|
|
42
|
+
},
|
|
43
|
+
"status": {
|
|
44
|
+
"enum": [
|
|
45
|
+
"planned",
|
|
46
|
+
"active",
|
|
47
|
+
"retired"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"component": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
53
|
+
"maxLength": 80
|
|
54
|
+
},
|
|
55
|
+
"network": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"minLength": 1
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"required": [
|
|
61
|
+
"binding_id",
|
|
62
|
+
"consumer_deployment_id",
|
|
63
|
+
"mode",
|
|
64
|
+
"provider_deployment_id",
|
|
65
|
+
"allocation_id",
|
|
66
|
+
"endpoint",
|
|
67
|
+
"credential_ref",
|
|
68
|
+
"status",
|
|
69
|
+
"component",
|
|
70
|
+
"network"
|
|
71
|
+
],
|
|
72
|
+
"additionalProperties": false
|
|
73
|
+
}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:speculo:ops:deployment:v1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"deployment_id": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
9
|
+
"maxLength": 80
|
|
10
|
+
},
|
|
11
|
+
"project_id": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
14
|
+
"maxLength": 80
|
|
15
|
+
},
|
|
16
|
+
"host_id": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
19
|
+
"maxLength": 80
|
|
20
|
+
},
|
|
21
|
+
"environment": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
24
|
+
"maxLength": 80
|
|
25
|
+
},
|
|
26
|
+
"instance": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
29
|
+
"maxLength": 80
|
|
30
|
+
},
|
|
31
|
+
"layout": {
|
|
32
|
+
"enum": [
|
|
33
|
+
"flat",
|
|
34
|
+
"instances"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"method": {
|
|
38
|
+
"enum": [
|
|
39
|
+
"compose",
|
|
40
|
+
"native"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"version": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1
|
|
46
|
+
},
|
|
47
|
+
"observed_version": {
|
|
48
|
+
"type": [
|
|
49
|
+
"string",
|
|
50
|
+
"null"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"root": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"minLength": 1
|
|
56
|
+
},
|
|
57
|
+
"status": {
|
|
58
|
+
"enum": [
|
|
59
|
+
"planned",
|
|
60
|
+
"running",
|
|
61
|
+
"configured",
|
|
62
|
+
"docs_pending",
|
|
63
|
+
"completed",
|
|
64
|
+
"failed",
|
|
65
|
+
"unknown",
|
|
66
|
+
"retired"
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
"installed_at": {
|
|
70
|
+
"type": [
|
|
71
|
+
"string",
|
|
72
|
+
"null"
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
"updated_at": {
|
|
76
|
+
"type": [
|
|
77
|
+
"string",
|
|
78
|
+
"null"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"run_id": {
|
|
82
|
+
"type": [
|
|
83
|
+
"string",
|
|
84
|
+
"null"
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"compose_name": {
|
|
88
|
+
"type": [
|
|
89
|
+
"string",
|
|
90
|
+
"null"
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
"storage": {
|
|
94
|
+
"type": "array",
|
|
95
|
+
"items": {
|
|
96
|
+
"type": "object",
|
|
97
|
+
"properties": {
|
|
98
|
+
"component": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
101
|
+
"maxLength": 80
|
|
102
|
+
},
|
|
103
|
+
"purpose": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
106
|
+
"maxLength": 80
|
|
107
|
+
},
|
|
108
|
+
"path": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"minLength": 1
|
|
111
|
+
},
|
|
112
|
+
"owner": {
|
|
113
|
+
"type": "string"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"required": [
|
|
117
|
+
"component",
|
|
118
|
+
"purpose",
|
|
119
|
+
"path"
|
|
120
|
+
],
|
|
121
|
+
"additionalProperties": false
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"commands": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"properties": {
|
|
127
|
+
"start": {
|
|
128
|
+
"type": "array",
|
|
129
|
+
"items": {
|
|
130
|
+
"type": "array",
|
|
131
|
+
"items": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"minLength": 1
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"stop": {
|
|
138
|
+
"type": "array",
|
|
139
|
+
"items": {
|
|
140
|
+
"type": "array",
|
|
141
|
+
"items": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"minLength": 1
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"verify": {
|
|
148
|
+
"type": "array",
|
|
149
|
+
"items": {
|
|
150
|
+
"type": "array",
|
|
151
|
+
"items": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"minLength": 1
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"required": [
|
|
159
|
+
"start",
|
|
160
|
+
"stop",
|
|
161
|
+
"verify"
|
|
162
|
+
],
|
|
163
|
+
"additionalProperties": false
|
|
164
|
+
},
|
|
165
|
+
"credential_refs": {
|
|
166
|
+
"type": "array",
|
|
167
|
+
"items": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*@[1-9][0-9]*$"
|
|
170
|
+
},
|
|
171
|
+
"uniqueItems": true
|
|
172
|
+
},
|
|
173
|
+
"backup": {
|
|
174
|
+
"type": "string",
|
|
175
|
+
"minLength": 1
|
|
176
|
+
},
|
|
177
|
+
"recovery": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"minLength": 1
|
|
180
|
+
},
|
|
181
|
+
"notes": {
|
|
182
|
+
"type": "array",
|
|
183
|
+
"items": {
|
|
184
|
+
"type": "string"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"source": {
|
|
188
|
+
"type": "object",
|
|
189
|
+
"properties": {
|
|
190
|
+
"type": {
|
|
191
|
+
"enum": [
|
|
192
|
+
"local",
|
|
193
|
+
"git",
|
|
194
|
+
"image",
|
|
195
|
+
"manual"
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
"location": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"minLength": 1
|
|
201
|
+
},
|
|
202
|
+
"revision": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"minLength": 1
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"required": [
|
|
208
|
+
"type",
|
|
209
|
+
"location",
|
|
210
|
+
"revision"
|
|
211
|
+
],
|
|
212
|
+
"additionalProperties": false
|
|
213
|
+
},
|
|
214
|
+
"service": {
|
|
215
|
+
"type": "object"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"required": [
|
|
219
|
+
"deployment_id",
|
|
220
|
+
"project_id",
|
|
221
|
+
"host_id",
|
|
222
|
+
"environment",
|
|
223
|
+
"instance",
|
|
224
|
+
"layout",
|
|
225
|
+
"method",
|
|
226
|
+
"version",
|
|
227
|
+
"observed_version",
|
|
228
|
+
"root",
|
|
229
|
+
"status",
|
|
230
|
+
"installed_at",
|
|
231
|
+
"updated_at",
|
|
232
|
+
"run_id",
|
|
233
|
+
"compose_name",
|
|
234
|
+
"storage",
|
|
235
|
+
"commands",
|
|
236
|
+
"credential_refs",
|
|
237
|
+
"backup",
|
|
238
|
+
"recovery",
|
|
239
|
+
"notes",
|
|
240
|
+
"source",
|
|
241
|
+
"service"
|
|
242
|
+
],
|
|
243
|
+
"additionalProperties": false
|
|
244
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:speculo:ops:host:v1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"host_id": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
9
|
+
"maxLength": 80
|
|
10
|
+
},
|
|
11
|
+
"display_name": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"minLength": 1
|
|
14
|
+
},
|
|
15
|
+
"platform": {
|
|
16
|
+
"enum": [
|
|
17
|
+
"linux",
|
|
18
|
+
"windows",
|
|
19
|
+
"darwin"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"transport": {
|
|
23
|
+
"enum": [
|
|
24
|
+
"local",
|
|
25
|
+
"ssh"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"root": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"minLength": 1
|
|
31
|
+
},
|
|
32
|
+
"identity": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
35
|
+
},
|
|
36
|
+
"connection": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {
|
|
39
|
+
"hostname": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"minLength": 1
|
|
42
|
+
},
|
|
43
|
+
"username": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1
|
|
46
|
+
},
|
|
47
|
+
"port": {
|
|
48
|
+
"type": "integer",
|
|
49
|
+
"minimum": 1,
|
|
50
|
+
"maximum": 65535
|
|
51
|
+
},
|
|
52
|
+
"known_hosts": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"minLength": 1
|
|
55
|
+
},
|
|
56
|
+
"identity_file": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"minLength": 1
|
|
59
|
+
},
|
|
60
|
+
"python": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"minLength": 1
|
|
63
|
+
},
|
|
64
|
+
"sudo": {
|
|
65
|
+
"type": "boolean"
|
|
66
|
+
},
|
|
67
|
+
"shell": {
|
|
68
|
+
"enum": [
|
|
69
|
+
"posix",
|
|
70
|
+
"powershell"
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"required": [],
|
|
75
|
+
"additionalProperties": false
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"required": [
|
|
79
|
+
"host_id",
|
|
80
|
+
"display_name",
|
|
81
|
+
"platform",
|
|
82
|
+
"transport",
|
|
83
|
+
"root",
|
|
84
|
+
"identity",
|
|
85
|
+
"connection"
|
|
86
|
+
],
|
|
87
|
+
"additionalProperties": false
|
|
88
|
+
}
|