cloudfall 0.2.0__py3-none-any.whl
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.
- cloudfall/__init__.py +19 -0
- cloudfall/__main__.py +5 -0
- cloudfall/_bundled/schemas/v1/alert-rule.schema.json +63 -0
- cloudfall/_bundled/schemas/v1/application.schema.json +60 -0
- cloudfall/_bundled/schemas/v1/artifact.schema.json +71 -0
- cloudfall/_bundled/schemas/v1/backup-receipt.schema.json +58 -0
- cloudfall/_bundled/schemas/v1/common.schema.json +115 -0
- cloudfall/_bundled/schemas/v1/component.schema.json +234 -0
- cloudfall/_bundled/schemas/v1/deployment-receipt.schema.json +53 -0
- cloudfall/_bundled/schemas/v1/domain.schema.json +208 -0
- cloudfall/_bundled/schemas/v1/environment-receipt.schema.json +55 -0
- cloudfall/_bundled/schemas/v1/logging-stack.schema.json +473 -0
- cloudfall/_bundled/schemas/v1/observed-domain.schema.json +158 -0
- cloudfall/_bundled/schemas/v1/observed-server.schema.json +627 -0
- cloudfall/_bundled/schemas/v1/operator-policy.schema.json +97 -0
- cloudfall/_bundled/schemas/v1/operator-proposal.schema.json +253 -0
- cloudfall/_bundled/schemas/v1/release-receipt.schema.json +66 -0
- cloudfall/_bundled/schemas/v1/server-type.schema.json +289 -0
- cloudfall/_bundled/schemas/v1/server.schema.json +146 -0
- cloudfall/_bundled/schemas/v1/service.schema.json +222 -0
- cloudfall/_bundled/schemas/v1/ssh-public-key.schema.json +55 -0
- cloudfall/agent_tools.py +868 -0
- cloudfall/arguments.py +92 -0
- cloudfall/audit.py +905 -0
- cloudfall/authoring.py +341 -0
- cloudfall/cli.py +1748 -0
- cloudfall/commands.py +257 -0
- cloudfall/cutover.py +370 -0
- cloudfall/dashboard.py +407 -0
- cloudfall/dashboard_server.py +201 -0
- cloudfall/domain.py +1157 -0
- cloudfall/importer.py +906 -0
- cloudfall/inventory.py +2116 -0
- cloudfall/lifecycle.py +874 -0
- cloudfall/mcp_server.py +704 -0
- cloudfall/migrate.py +730 -0
- cloudfall/observation.py +143 -0
- cloudfall/operations.py +1228 -0
- cloudfall/operator.py +1099 -0
- cloudfall/project.py +841 -0
- cloudfall/py.typed +0 -0
- cloudfall/render_api.py +338 -0
- cloudfall/resources.py +67 -0
- cloudfall/secrets.py +262 -0
- cloudfall/service_evidence.py +659 -0
- cloudfall/validation.py +1340 -0
- cloudfall-0.2.0.dist-info/METADATA +408 -0
- cloudfall-0.2.0.dist-info/RECORD +165 -0
- cloudfall-0.2.0.dist-info/WHEEL +4 -0
- cloudfall-0.2.0.dist-info/entry_points.txt +4 -0
- cloudfall-0.2.0.dist-info/licenses/LICENSE +661 -0
- cloudfall_engine/__init__.py +5 -0
- cloudfall_engine/__main__.py +5 -0
- cloudfall_engine/_bundled/ansible/ansible.cfg +7 -0
- cloudfall_engine/_bundled/ansible/playbooks/backup.yml +86 -0
- cloudfall_engine/_bundled/ansible/playbooks/baseline.yml +35 -0
- cloudfall_engine/_bundled/ansible/playbooks/bootstrap.yml +24 -0
- cloudfall_engine/_bundled/ansible/playbooks/data.yml +28 -0
- cloudfall_engine/_bundled/ansible/playbooks/deploy.yml +35 -0
- cloudfall_engine/_bundled/ansible/playbooks/domains.yml +21 -0
- cloudfall_engine/_bundled/ansible/playbooks/health.yml +31 -0
- cloudfall_engine/_bundled/ansible/playbooks/inspect.yml +15 -0
- cloudfall_engine/_bundled/ansible/playbooks/logging.yml +35 -0
- cloudfall_engine/_bundled/ansible/playbooks/restart.yml +31 -0
- cloudfall_engine/_bundled/ansible/playbooks/rollback.yml +33 -0
- cloudfall_engine/_bundled/ansible/playbooks/services.yml +37 -0
- cloudfall_engine/_bundled/ansible/playbooks/time.yml +9 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_access/defaults/main.yml +2 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_access/handlers/main.yml +5 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_access/meta/argument_specs.yml +34 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_access/meta/main.yml +13 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_access/tasks/main.yml +59 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_bootstrap/defaults/main.yml +11 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_bootstrap/meta/argument_specs.yml +52 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_bootstrap/meta/main.yml +13 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_bootstrap/tasks/main.yml +99 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_data_migration/defaults/main.yml +15 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_data_migration/meta/argument_specs.yml +36 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_data_migration/meta/main.yml +13 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_data_migration/tasks/main.yml +201 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_deploy/defaults/main.yml +10 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_deploy/meta/argument_specs.yml +125 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_deploy/meta/main.yml +13 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_deploy/tasks/health.yml +3 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_deploy/tasks/health_gate.yml +37 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_deploy/tasks/main.yml +285 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_deploy/tasks/restart.yml +17 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_deploy/tasks/rollback.yml +52 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_deploy/templates/component.service.j2 +24 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_firewall/defaults/main.yml +2 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_firewall/handlers/main.yml +5 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_firewall/meta/argument_specs.yml +33 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_firewall/meta/main.yml +13 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_firewall/tasks/main.yml +51 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_firewall/templates/nftables.conf.j2 +31 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_inspect/defaults/main.yml +6 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_inspect/meta/argument_specs.yml +24 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_inspect/meta/main.yml +13 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_inspect/tasks/main.yml +643 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_backend/defaults/main.yml +6 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_backend/handlers/main.yml +29 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_backend/meta/argument_specs.yml +227 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_backend/meta/main.yml +11 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_backend/tasks/main.yml +487 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_backend/templates/alertmanager-defaults.j2 +2 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_backend/templates/alertmanager.yaml.j2 +33 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_backend/templates/grafana.ini.j2 +20 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_backend/templates/loki-datasource.yml.j2 +11 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_backend/templates/loki-systemd-override.conf.j2 +3 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_backend/templates/loki.yaml.j2 +49 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_backend/templates/nginx-loki-gateway.conf.j2 +45 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_backend/templates/prometheus-datasource.yml.j2 +11 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_backend/templates/prometheus-defaults.j2 +2 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_backend/templates/prometheus-rules.yaml.j2 +20 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_backend/templates/prometheus.yaml.j2 +24 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_collector/defaults/main.yml +7 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_collector/handlers/main.yml +6 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_collector/meta/argument_specs.yml +122 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_collector/meta/main.yml +11 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_collector/tasks/main.yml +224 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_collector/templates/alloy-systemd-override.conf.j2 +3 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_logging_collector/templates/config.alloy.j2 +127 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_nginx_site/defaults/main.yml +4 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_nginx_site/handlers/main.yml +5 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_nginx_site/meta/argument_specs.yml +69 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_nginx_site/meta/main.yml +13 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_nginx_site/tasks/main.yml +212 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_nginx_site/templates/domain-site.conf.j2 +54 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_postgresql/defaults/main.yml +6 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_postgresql/handlers/main.yml +9 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_postgresql/meta/argument_specs.yml +91 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_postgresql/meta/main.yml +13 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_postgresql/tasks/main.yml +295 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_postgresql/templates/backup.service.j2 +11 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_postgresql/templates/backup.sh.j2 +17 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_postgresql/templates/backup.timer.j2 +10 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_postgresql/templates/cloudfall.conf.j2 +3 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_postgresql/templates/restore-check.service.j2 +11 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_postgresql/templates/restore-check.sh.j2 +27 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_postgresql/templates/restore-check.timer.j2 +10 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_redis/defaults/main.yml +2 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_redis/handlers/main.yml +6 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_redis/meta/argument_specs.yml +68 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_redis/meta/main.yml +13 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_redis/tasks/main.yml +148 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_redis/templates/backup.service.j2 +11 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_redis/templates/backup.sh.j2 +14 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_redis/templates/backup.timer.j2 +10 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_redis/templates/cloudfall.conf.j2 +6 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_redis/templates/restore-check.service.j2 +11 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_redis/templates/restore-check.sh.j2 +15 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_redis/templates/restore-check.timer.j2 +10 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_time/defaults/main.yml +2 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_time/meta/argument_specs.yml +10 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_time/meta/main.yml +13 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_time/tasks/main.yml +119 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_unattended_upgrades/defaults/main.yml +3 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_unattended_upgrades/meta/argument_specs.yml +8 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_unattended_upgrades/meta/main.yml +13 -0
- cloudfall_engine/_bundled/ansible/roles/cloudfall_unattended_upgrades/tasks/main.yml +37 -0
- cloudfall_engine/ansible_inventory.py +253 -0
- cloudfall_engine/artifact.py +258 -0
- cloudfall_engine/cli.py +273 -0
- cloudfall_engine/playbook.py +175 -0
- cloudfall_engine/py.typed +0 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://cloudfall.internal/schemas/v1/operator-policy.schema.json",
|
|
4
|
+
"title": "Cloudfall operator autonomy policy",
|
|
5
|
+
"x-cloudfall-kind": "OperatorPolicy",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"apiVersion": {
|
|
9
|
+
"$ref": "common.schema.json#/$defs/apiVersion"
|
|
10
|
+
},
|
|
11
|
+
"kind": {
|
|
12
|
+
"const": "OperatorPolicy"
|
|
13
|
+
},
|
|
14
|
+
"metadata": {
|
|
15
|
+
"$ref": "common.schema.json#/$defs/metadata"
|
|
16
|
+
},
|
|
17
|
+
"spec": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"environment": {
|
|
21
|
+
"$ref": "common.schema.json#/$defs/resourceId"
|
|
22
|
+
},
|
|
23
|
+
"autonomy": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"properties": {
|
|
26
|
+
"operations": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"minItems": 1,
|
|
29
|
+
"uniqueItems": true,
|
|
30
|
+
"items": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": {
|
|
33
|
+
"kind": {
|
|
34
|
+
"enum": [
|
|
35
|
+
"converge-services",
|
|
36
|
+
"converge-baseline"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"requiredVerifiedRuns": {
|
|
40
|
+
"type": "integer",
|
|
41
|
+
"minimum": 1,
|
|
42
|
+
"maximum": 1000
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"required": [
|
|
46
|
+
"kind",
|
|
47
|
+
"requiredVerifiedRuns"
|
|
48
|
+
],
|
|
49
|
+
"additionalProperties": false
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"maxAutonomousPerHour": {
|
|
53
|
+
"type": "integer",
|
|
54
|
+
"minimum": 1,
|
|
55
|
+
"maximum": 100
|
|
56
|
+
},
|
|
57
|
+
"quietHours": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"properties": {
|
|
60
|
+
"start": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$"
|
|
63
|
+
},
|
|
64
|
+
"end": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"required": [
|
|
70
|
+
"start",
|
|
71
|
+
"end"
|
|
72
|
+
],
|
|
73
|
+
"additionalProperties": false
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"required": [
|
|
77
|
+
"operations",
|
|
78
|
+
"maxAutonomousPerHour"
|
|
79
|
+
],
|
|
80
|
+
"additionalProperties": false
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"required": [
|
|
84
|
+
"environment",
|
|
85
|
+
"autonomy"
|
|
86
|
+
],
|
|
87
|
+
"additionalProperties": false
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"required": [
|
|
91
|
+
"apiVersion",
|
|
92
|
+
"kind",
|
|
93
|
+
"metadata",
|
|
94
|
+
"spec"
|
|
95
|
+
],
|
|
96
|
+
"additionalProperties": false
|
|
97
|
+
}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://cloudfall.internal/schemas/v1/operator-proposal.schema.json",
|
|
4
|
+
"title": "Cloudfall operator proposal receipt",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"apiVersion": {
|
|
8
|
+
"$ref": "common.schema.json#/$defs/apiVersion"
|
|
9
|
+
},
|
|
10
|
+
"kind": {
|
|
11
|
+
"const": "OperatorProposal"
|
|
12
|
+
},
|
|
13
|
+
"metadata": {
|
|
14
|
+
"$ref": "common.schema.json#/$defs/metadata"
|
|
15
|
+
},
|
|
16
|
+
"spec": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"properties": {
|
|
19
|
+
"createdAt": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "date-time"
|
|
22
|
+
},
|
|
23
|
+
"status": {
|
|
24
|
+
"enum": [
|
|
25
|
+
"proposed",
|
|
26
|
+
"executed",
|
|
27
|
+
"verified",
|
|
28
|
+
"failed"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"trigger": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"properties": {
|
|
34
|
+
"kind": {
|
|
35
|
+
"enum": [
|
|
36
|
+
"alert",
|
|
37
|
+
"drift"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"fingerprint": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"pattern": "^[a-f0-9]{16}$"
|
|
43
|
+
},
|
|
44
|
+
"alert": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"properties": {
|
|
47
|
+
"name": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"minLength": 1,
|
|
50
|
+
"maxLength": 200
|
|
51
|
+
},
|
|
52
|
+
"cloudfallRule": {
|
|
53
|
+
"$ref": "common.schema.json#/$defs/resourceId"
|
|
54
|
+
},
|
|
55
|
+
"severity": {
|
|
56
|
+
"enum": [
|
|
57
|
+
"warning",
|
|
58
|
+
"critical"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
"environment": {
|
|
62
|
+
"$ref": "common.schema.json#/$defs/resourceId"
|
|
63
|
+
},
|
|
64
|
+
"server": {
|
|
65
|
+
"$ref": "common.schema.json#/$defs/resourceId"
|
|
66
|
+
},
|
|
67
|
+
"service": {
|
|
68
|
+
"$ref": "common.schema.json#/$defs/resourceId"
|
|
69
|
+
},
|
|
70
|
+
"activeAt": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"minLength": 1,
|
|
73
|
+
"maxLength": 64
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"required": [
|
|
77
|
+
"name",
|
|
78
|
+
"cloudfallRule",
|
|
79
|
+
"severity",
|
|
80
|
+
"environment",
|
|
81
|
+
"server",
|
|
82
|
+
"service",
|
|
83
|
+
"activeAt"
|
|
84
|
+
],
|
|
85
|
+
"additionalProperties": false
|
|
86
|
+
},
|
|
87
|
+
"drift": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"properties": {
|
|
90
|
+
"server": {
|
|
91
|
+
"$ref": "common.schema.json#/$defs/resourceId"
|
|
92
|
+
},
|
|
93
|
+
"checks": {
|
|
94
|
+
"type": "array",
|
|
95
|
+
"items": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"minLength": 1,
|
|
98
|
+
"maxLength": 200
|
|
99
|
+
},
|
|
100
|
+
"minItems": 1
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"required": [
|
|
104
|
+
"server",
|
|
105
|
+
"checks"
|
|
106
|
+
],
|
|
107
|
+
"additionalProperties": false
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"required": [
|
|
111
|
+
"kind",
|
|
112
|
+
"fingerprint"
|
|
113
|
+
],
|
|
114
|
+
"oneOf": [
|
|
115
|
+
{
|
|
116
|
+
"required": [
|
|
117
|
+
"alert"
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"required": [
|
|
122
|
+
"drift"
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
"additionalProperties": false
|
|
127
|
+
},
|
|
128
|
+
"diagnosis": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"properties": {
|
|
131
|
+
"summary": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"minLength": 1,
|
|
134
|
+
"maxLength": 1000
|
|
135
|
+
},
|
|
136
|
+
"evidence": {
|
|
137
|
+
"type": "array",
|
|
138
|
+
"items": {
|
|
139
|
+
"type": "string",
|
|
140
|
+
"minLength": 1,
|
|
141
|
+
"maxLength": 500
|
|
142
|
+
},
|
|
143
|
+
"minItems": 1
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"required": [
|
|
147
|
+
"summary",
|
|
148
|
+
"evidence"
|
|
149
|
+
],
|
|
150
|
+
"additionalProperties": false
|
|
151
|
+
},
|
|
152
|
+
"operation": {
|
|
153
|
+
"type": "object",
|
|
154
|
+
"properties": {
|
|
155
|
+
"kind": {
|
|
156
|
+
"enum": [
|
|
157
|
+
"converge-services",
|
|
158
|
+
"converge-baseline"
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
"server": {
|
|
162
|
+
"$ref": "common.schema.json#/$defs/resourceId"
|
|
163
|
+
},
|
|
164
|
+
"service": {
|
|
165
|
+
"$ref": "common.schema.json#/$defs/resourceId"
|
|
166
|
+
},
|
|
167
|
+
"command": {
|
|
168
|
+
"type": "array",
|
|
169
|
+
"items": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"minLength": 1,
|
|
172
|
+
"maxLength": 500
|
|
173
|
+
},
|
|
174
|
+
"minItems": 1
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"required": [
|
|
178
|
+
"kind",
|
|
179
|
+
"server",
|
|
180
|
+
"command"
|
|
181
|
+
],
|
|
182
|
+
"additionalProperties": false
|
|
183
|
+
},
|
|
184
|
+
"approval": {
|
|
185
|
+
"type": "object",
|
|
186
|
+
"properties": {
|
|
187
|
+
"mode": {
|
|
188
|
+
"enum": [
|
|
189
|
+
"human",
|
|
190
|
+
"autonomous"
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
"policy": {
|
|
194
|
+
"$ref": "common.schema.json#/$defs/resourceId"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"required": [
|
|
198
|
+
"mode"
|
|
199
|
+
],
|
|
200
|
+
"additionalProperties": false
|
|
201
|
+
},
|
|
202
|
+
"outcome": {
|
|
203
|
+
"type": "object",
|
|
204
|
+
"properties": {
|
|
205
|
+
"executedAt": {
|
|
206
|
+
"type": "string",
|
|
207
|
+
"format": "date-time"
|
|
208
|
+
},
|
|
209
|
+
"verifiedAt": {
|
|
210
|
+
"type": [
|
|
211
|
+
"string",
|
|
212
|
+
"null"
|
|
213
|
+
]
|
|
214
|
+
},
|
|
215
|
+
"result": {
|
|
216
|
+
"enum": [
|
|
217
|
+
"verified",
|
|
218
|
+
"failed"
|
|
219
|
+
]
|
|
220
|
+
},
|
|
221
|
+
"detail": {
|
|
222
|
+
"type": "string",
|
|
223
|
+
"minLength": 1,
|
|
224
|
+
"maxLength": 1000
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"required": [
|
|
228
|
+
"executedAt",
|
|
229
|
+
"verifiedAt",
|
|
230
|
+
"result",
|
|
231
|
+
"detail"
|
|
232
|
+
],
|
|
233
|
+
"additionalProperties": false
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"required": [
|
|
237
|
+
"createdAt",
|
|
238
|
+
"status",
|
|
239
|
+
"trigger",
|
|
240
|
+
"diagnosis",
|
|
241
|
+
"operation"
|
|
242
|
+
],
|
|
243
|
+
"additionalProperties": false
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"required": [
|
|
247
|
+
"apiVersion",
|
|
248
|
+
"kind",
|
|
249
|
+
"metadata",
|
|
250
|
+
"spec"
|
|
251
|
+
],
|
|
252
|
+
"additionalProperties": false
|
|
253
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://cloudfall.internal/schemas/v1/release-receipt.schema.json",
|
|
4
|
+
"title": "Cloudfall component release receipt",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"apiVersion": {
|
|
8
|
+
"$ref": "common.schema.json#/$defs/apiVersion"
|
|
9
|
+
},
|
|
10
|
+
"kind": {
|
|
11
|
+
"const": "ReleaseReceipt"
|
|
12
|
+
},
|
|
13
|
+
"metadata": {
|
|
14
|
+
"$ref": "common.schema.json#/$defs/metadata"
|
|
15
|
+
},
|
|
16
|
+
"spec": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"properties": {
|
|
19
|
+
"component": {
|
|
20
|
+
"$ref": "common.schema.json#/$defs/resourceId"
|
|
21
|
+
},
|
|
22
|
+
"server": {
|
|
23
|
+
"$ref": "common.schema.json#/$defs/resourceId"
|
|
24
|
+
},
|
|
25
|
+
"release": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"pattern": "^[0-9]{8}T[0-9]{6}Z-[0-9a-f]{7,40}$"
|
|
28
|
+
},
|
|
29
|
+
"artifactSha256": {
|
|
30
|
+
"$ref": "common.schema.json#/$defs/sha256"
|
|
31
|
+
},
|
|
32
|
+
"deployedAt": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"format": "date-time"
|
|
35
|
+
},
|
|
36
|
+
"previousRelease": {
|
|
37
|
+
"type": [
|
|
38
|
+
"string",
|
|
39
|
+
"null"
|
|
40
|
+
],
|
|
41
|
+
"pattern": "^[0-9]{8}T[0-9]{6}Z-[0-9a-f]{7,40}$"
|
|
42
|
+
},
|
|
43
|
+
"healthCheckPassed": {
|
|
44
|
+
"const": true
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"required": [
|
|
48
|
+
"component",
|
|
49
|
+
"server",
|
|
50
|
+
"release",
|
|
51
|
+
"artifactSha256",
|
|
52
|
+
"deployedAt",
|
|
53
|
+
"previousRelease",
|
|
54
|
+
"healthCheckPassed"
|
|
55
|
+
],
|
|
56
|
+
"additionalProperties": false
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"required": [
|
|
60
|
+
"apiVersion",
|
|
61
|
+
"kind",
|
|
62
|
+
"metadata",
|
|
63
|
+
"spec"
|
|
64
|
+
],
|
|
65
|
+
"additionalProperties": false
|
|
66
|
+
}
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://cloudfall.internal/schemas/v1/server-type.schema.json",
|
|
4
|
+
"title": "Cloudfall server type",
|
|
5
|
+
"x-cloudfall-kind": "ServerType",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"apiVersion": {
|
|
9
|
+
"$ref": "common.schema.json#/$defs/apiVersion"
|
|
10
|
+
},
|
|
11
|
+
"kind": {
|
|
12
|
+
"const": "ServerType"
|
|
13
|
+
},
|
|
14
|
+
"metadata": {
|
|
15
|
+
"$ref": "common.schema.json#/$defs/metadata"
|
|
16
|
+
},
|
|
17
|
+
"spec": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"os": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"properties": {
|
|
23
|
+
"distribution": {
|
|
24
|
+
"const": "Debian"
|
|
25
|
+
},
|
|
26
|
+
"versions": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"items": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"pattern": "^[0-9]+$"
|
|
31
|
+
},
|
|
32
|
+
"minItems": 1,
|
|
33
|
+
"uniqueItems": true
|
|
34
|
+
},
|
|
35
|
+
"serviceManager": {
|
|
36
|
+
"const": "systemd"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"required": [
|
|
40
|
+
"distribution",
|
|
41
|
+
"versions",
|
|
42
|
+
"serviceManager"
|
|
43
|
+
],
|
|
44
|
+
"additionalProperties": false
|
|
45
|
+
},
|
|
46
|
+
"storage": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"properties": {
|
|
49
|
+
"softwareRaid": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"properties": {
|
|
52
|
+
"level": {
|
|
53
|
+
"enum": [
|
|
54
|
+
"raid0",
|
|
55
|
+
"raid1",
|
|
56
|
+
"raid5",
|
|
57
|
+
"raid6",
|
|
58
|
+
"raid10"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
"minimumActiveDevices": {
|
|
62
|
+
"type": "integer",
|
|
63
|
+
"minimum": 1
|
|
64
|
+
},
|
|
65
|
+
"minimumUsableBytes": {
|
|
66
|
+
"type": "integer",
|
|
67
|
+
"minimum": 1
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"required": [
|
|
71
|
+
"level",
|
|
72
|
+
"minimumActiveDevices",
|
|
73
|
+
"minimumUsableBytes"
|
|
74
|
+
],
|
|
75
|
+
"additionalProperties": false
|
|
76
|
+
},
|
|
77
|
+
"mounts": {
|
|
78
|
+
"type": "array",
|
|
79
|
+
"items": {
|
|
80
|
+
"type": "object",
|
|
81
|
+
"properties": {
|
|
82
|
+
"path": {
|
|
83
|
+
"$ref": "common.schema.json#/$defs/absolutePath"
|
|
84
|
+
},
|
|
85
|
+
"filesystem": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"minLength": 1,
|
|
88
|
+
"maxLength": 30
|
|
89
|
+
},
|
|
90
|
+
"minimumBytes": {
|
|
91
|
+
"type": "integer",
|
|
92
|
+
"minimum": 1
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"required": [
|
|
96
|
+
"path",
|
|
97
|
+
"filesystem",
|
|
98
|
+
"minimumBytes"
|
|
99
|
+
],
|
|
100
|
+
"additionalProperties": false
|
|
101
|
+
},
|
|
102
|
+
"uniqueItems": true
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"required": [
|
|
106
|
+
"mounts"
|
|
107
|
+
],
|
|
108
|
+
"additionalProperties": false
|
|
109
|
+
},
|
|
110
|
+
"packages": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"properties": {
|
|
113
|
+
"required": {
|
|
114
|
+
"type": "array",
|
|
115
|
+
"items": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"properties": {
|
|
118
|
+
"name": {
|
|
119
|
+
"$ref": "common.schema.json#/$defs/packageName"
|
|
120
|
+
},
|
|
121
|
+
"version": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"minLength": 1
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"required": [
|
|
127
|
+
"name"
|
|
128
|
+
],
|
|
129
|
+
"additionalProperties": false
|
|
130
|
+
},
|
|
131
|
+
"uniqueItems": true
|
|
132
|
+
},
|
|
133
|
+
"forbidden": {
|
|
134
|
+
"type": "array",
|
|
135
|
+
"items": {
|
|
136
|
+
"$ref": "common.schema.json#/$defs/packageName"
|
|
137
|
+
},
|
|
138
|
+
"uniqueItems": true
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"required": [
|
|
142
|
+
"required",
|
|
143
|
+
"forbidden"
|
|
144
|
+
],
|
|
145
|
+
"additionalProperties": false
|
|
146
|
+
},
|
|
147
|
+
"firewall": {
|
|
148
|
+
"type": "object",
|
|
149
|
+
"properties": {
|
|
150
|
+
"policy": {
|
|
151
|
+
"const": "default-deny"
|
|
152
|
+
},
|
|
153
|
+
"allowedInbound": {
|
|
154
|
+
"type": "array",
|
|
155
|
+
"items": {
|
|
156
|
+
"type": "object",
|
|
157
|
+
"properties": {
|
|
158
|
+
"port": {
|
|
159
|
+
"$ref": "common.schema.json#/$defs/networkPort"
|
|
160
|
+
},
|
|
161
|
+
"protocol": {
|
|
162
|
+
"$ref": "common.schema.json#/$defs/networkProtocol"
|
|
163
|
+
},
|
|
164
|
+
"description": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9 ._-]{0,199}$"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"required": [
|
|
170
|
+
"port",
|
|
171
|
+
"protocol"
|
|
172
|
+
],
|
|
173
|
+
"additionalProperties": false
|
|
174
|
+
},
|
|
175
|
+
"uniqueItems": true
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"required": [
|
|
179
|
+
"policy",
|
|
180
|
+
"allowedInbound"
|
|
181
|
+
],
|
|
182
|
+
"additionalProperties": false
|
|
183
|
+
},
|
|
184
|
+
"services": {
|
|
185
|
+
"type": "object",
|
|
186
|
+
"properties": {
|
|
187
|
+
"required": {
|
|
188
|
+
"type": "array",
|
|
189
|
+
"items": {
|
|
190
|
+
"type": "object",
|
|
191
|
+
"properties": {
|
|
192
|
+
"name": {
|
|
193
|
+
"$ref": "common.schema.json#/$defs/systemdUnitName"
|
|
194
|
+
},
|
|
195
|
+
"state": {
|
|
196
|
+
"enum": [
|
|
197
|
+
"running",
|
|
198
|
+
"stopped"
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
"status": {
|
|
202
|
+
"enum": [
|
|
203
|
+
"enabled",
|
|
204
|
+
"disabled",
|
|
205
|
+
"static",
|
|
206
|
+
"indirect"
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"required": [
|
|
211
|
+
"name",
|
|
212
|
+
"state",
|
|
213
|
+
"status"
|
|
214
|
+
],
|
|
215
|
+
"additionalProperties": false
|
|
216
|
+
},
|
|
217
|
+
"uniqueItems": true
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"required": [
|
|
221
|
+
"required"
|
|
222
|
+
],
|
|
223
|
+
"additionalProperties": false
|
|
224
|
+
},
|
|
225
|
+
"configuration": {
|
|
226
|
+
"type": "object",
|
|
227
|
+
"properties": {
|
|
228
|
+
"files": {
|
|
229
|
+
"type": "array",
|
|
230
|
+
"items": {
|
|
231
|
+
"type": "object",
|
|
232
|
+
"properties": {
|
|
233
|
+
"path": {
|
|
234
|
+
"$ref": "common.schema.json#/$defs/absolutePath"
|
|
235
|
+
},
|
|
236
|
+
"capture": {
|
|
237
|
+
"enum": [
|
|
238
|
+
"metadata",
|
|
239
|
+
"hash"
|
|
240
|
+
]
|
|
241
|
+
},
|
|
242
|
+
"owner": {
|
|
243
|
+
"type": "string",
|
|
244
|
+
"minLength": 1
|
|
245
|
+
},
|
|
246
|
+
"group": {
|
|
247
|
+
"type": "string",
|
|
248
|
+
"minLength": 1
|
|
249
|
+
},
|
|
250
|
+
"mode": {
|
|
251
|
+
"$ref": "common.schema.json#/$defs/fileMode"
|
|
252
|
+
},
|
|
253
|
+
"sha256": {
|
|
254
|
+
"$ref": "common.schema.json#/$defs/sha256"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"required": [
|
|
258
|
+
"path",
|
|
259
|
+
"capture"
|
|
260
|
+
],
|
|
261
|
+
"additionalProperties": false
|
|
262
|
+
},
|
|
263
|
+
"uniqueItems": true
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"required": [
|
|
267
|
+
"files"
|
|
268
|
+
],
|
|
269
|
+
"additionalProperties": false
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
"required": [
|
|
273
|
+
"os",
|
|
274
|
+
"storage",
|
|
275
|
+
"packages",
|
|
276
|
+
"services",
|
|
277
|
+
"configuration"
|
|
278
|
+
],
|
|
279
|
+
"additionalProperties": false
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"required": [
|
|
283
|
+
"apiVersion",
|
|
284
|
+
"kind",
|
|
285
|
+
"metadata",
|
|
286
|
+
"spec"
|
|
287
|
+
],
|
|
288
|
+
"additionalProperties": false
|
|
289
|
+
}
|