@underpostnet/cyberia 3.3.73 → 3.3.77
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/.env.example +17 -5
- package/.github/workflows/coverall.cyberia.ci.yml +10 -0
- package/.github/workflows/docker-image.cyberia-client.ci.yml +1 -1
- package/.github/workflows/docker-image.cyberia-client.dev.ci.yml +1 -1
- package/.github/workflows/docker-image.cyberia-server.ci.yml +1 -1
- package/.github/workflows/docker-image.cyberia-server.dev.ci.yml +1 -1
- package/.github/workflows/docker-image.engine-cyberia.ci.yml +1 -1
- package/.github/workflows/docker-image.engine-cyberia.dev.ci.yml +1 -1
- package/.github/workflows/engine-cyberia.ci.yml +1 -1
- package/.github/workflows/publish.cyberia.ci.yml +44 -0
- package/AGENTS.md +61 -12
- package/CHANGELOG.md +159 -161
- package/CLI-HELP.md +20 -13
- package/Dockerfile +1 -1
- package/Dockerfile.dev +1 -1
- package/Dockerfile.test +2 -2
- package/README.md +28 -28
- package/bin/build.js +96 -21
- package/bin/cyberia.js +1247 -1373
- package/bin/index.js +1247 -1373
- package/compose.env +17 -5
- package/conf.js +7 -4
- package/deploy/cyberia-client/deploy.sh +10 -11
- package/deploy/cyberia-client/package.sh +0 -1
- package/deploy/cyberia-client/state.sh +3 -2
- package/deploy/cyberia-server/deploy.sh +10 -11
- package/deploy/cyberia-server/package.sh +0 -1
- package/deploy/cyberia-server/state.sh +3 -2
- package/deploy/dd-cyberia/deploy.sh +5 -5
- package/deploy/dd-cyberia/init.sh +15 -14
- package/deploy/dd-cyberia/package.sh +0 -1
- package/deploy/dd-cyberia/state.sh +2 -2
- package/deploy/dd-cyberia/sync-deploy.sh +139 -75
- package/deploy/lib/config.sh +29 -0
- package/deploy/lib/github-actions-logging.sh +92 -76
- package/deploy/lib/host.sh +28 -19
- package/deploy/lib/state.sh +4 -1
- package/deploy/pwa-microservices-template/deploy.sh +10 -8
- package/deploy/release/deploy.sh +0 -2
- package/deployment.yaml +1 -1
- package/docker-compose.yml +23 -17
- package/docs/coverage/cyberia/api/cyberia-instance/cyberia-fallback-capture.js.html +1591 -0
- package/docs/coverage/cyberia/api/cyberia-instance/index.html +116 -0
- package/docs/coverage/cyberia/api/cyberia-server-defaults/cyberia-server-defaults.js.html +4138 -0
- package/docs/coverage/cyberia/api/cyberia-server-defaults/index.html +116 -0
- package/docs/coverage/cyberia/api/object-layer/index.html +116 -0
- package/docs/coverage/cyberia/api/object-layer/object-layer.model.js.html +1393 -0
- package/docs/coverage/cyberia/base.css +362 -0
- package/docs/coverage/cyberia/block-navigation.js +82 -0
- package/docs/coverage/cyberia/favicon.png +0 -0
- package/docs/coverage/cyberia/index.html +161 -0
- package/docs/coverage/cyberia/prettify.css +101 -0
- package/docs/coverage/cyberia/prettify.js +937 -0
- package/docs/coverage/cyberia/projects/cyberia/atlas-sprite-sheet-generator.js.html +1315 -0
- package/docs/coverage/cyberia/projects/cyberia/index.html +176 -0
- package/docs/coverage/cyberia/projects/cyberia/instance-backup.js.html +715 -0
- package/docs/coverage/cyberia/projects/cyberia/instance-data.js.html +2182 -0
- package/docs/coverage/cyberia/projects/cyberia/shape-generator.js.html +3265 -0
- package/docs/coverage/cyberia/projects/cyberia/stat-balance.js.html +328 -0
- package/docs/coverage/cyberia/sort-arrow-sprite.png +0 -0
- package/docs/coverage/cyberia/sorter.js +205 -0
- package/hardhat/package-lock.json +2 -2
- package/hardhat/package.json +1 -1
- package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +1 -1
- package/manifests/cronjobs/dd-cron/dd-cron-vultr.yaml +1 -1
- package/manifests/deployment/dd-cyberia-development/deployment.yaml +1 -1
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
- package/manifests/deployment/mongo-express/deployment.yaml +46 -27
- package/manifests/deployment/mongo-express/kustomization.yaml +9 -0
- package/manifests/deployment/mongo-express/mongo-express-nodeport.yaml +18 -0
- package/manifests/deployment/mongo-express/service.yaml +16 -0
- package/manifests/deployment/mongo-express-no-auth/disable-mongodb-auth.yaml +16 -0
- package/manifests/deployment/mongo-express-no-auth/kustomization.yaml +16 -0
- package/package.json +19 -17
- package/scripts/test-monitor.sh +3 -3
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.controller.js +14 -9
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.model.js +36 -5
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.router.js +5 -0
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.service.js +88 -184
- package/src/api/cyberia-action/cyberia-action.router.js +2 -2
- package/src/api/cyberia-action/cyberia-action.service.js +3 -4
- package/src/api/cyberia-audio/cyberia-audio.controller.js +6 -0
- package/src/api/cyberia-audio/cyberia-audio.model.js +61 -0
- package/src/api/cyberia-audio/cyberia-audio.router.js +21 -0
- package/src/api/cyberia-audio/cyberia-audio.service.js +220 -0
- package/src/api/cyberia-client-hints/cyberia-client-hints.controller.js +1 -3
- package/src/api/cyberia-client-hints/cyberia-client-hints.model.js +10 -19
- package/src/api/cyberia-client-hints/cyberia-client-hints.router.js +12 -34
- package/src/api/cyberia-client-hints/cyberia-client-hints.service.js +15 -32
- package/src/api/cyberia-dialogue/cyberia-dialogue.model.js +1 -1
- package/src/api/cyberia-dialogue/cyberia-dialogue.router.js +1 -1
- package/src/api/cyberia-entity/cyberia-entity.model.js +2 -0
- package/src/api/cyberia-entity/cyberia-entity.service.js +1 -1
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.controller.js +8 -2
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.model.js +31 -20
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.router.js +16 -1
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.service.js +466 -3
- package/src/api/cyberia-instance/cyberia-fallback-capture.js +87 -51
- package/src/api/cyberia-instance/cyberia-fallback-world.js +21 -40
- package/src/api/cyberia-instance/cyberia-instance-boot.service.js +5 -5
- package/src/api/cyberia-instance/cyberia-instance-items.js +98 -0
- package/src/api/cyberia-instance/cyberia-instance-map.service.js +34 -141
- package/src/api/cyberia-instance/cyberia-instance.controller.js +1 -4
- package/src/api/cyberia-instance/cyberia-instance.model.js +0 -14
- package/src/api/cyberia-instance/cyberia-instance.router.js +3 -16
- package/src/api/cyberia-instance/cyberia-instance.service.js +3 -43
- package/src/api/cyberia-instance/cyberia-world-generator.js +8 -13
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.model.js +49 -75
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.service.js +74 -1
- package/src/api/cyberia-map/cyberia-map.service.js +6 -2
- package/src/api/cyberia-map-audio-conf/cyberia-map-audio-conf.controller.js +31 -0
- package/src/api/cyberia-map-audio-conf/cyberia-map-audio-conf.model.js +56 -0
- package/src/api/cyberia-map-audio-conf/cyberia-map-audio-conf.router.js +33 -0
- package/src/api/cyberia-map-audio-conf/cyberia-map-audio-conf.service.js +189 -0
- package/src/api/cyberia-quest/cyberia-quest.router.js +3 -3
- package/src/api/cyberia-quest/cyberia-quest.service.js +3 -3
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.model.js +1 -1
- package/src/api/cyberia-server-defaults/cyberia-server-defaults.js +403 -188
- package/src/api/cyberia-skill/cyberia-skill.model.js +6 -6
- package/src/api/file/file.ref.js +153 -0
- package/src/api/file/file.ref.json +11 -2
- package/src/api/object-layer/object-layer.model.js +47 -12
- package/src/api/object-layer/object-layer.router.js +10 -3
- package/src/api/object-layer/object-layer.service.js +113 -120
- package/src/cli/app.js +12 -1
- package/src/cli/client.js +2 -2
- package/src/cli/cluster.js +80 -18
- package/src/cli/deploy.js +215 -34
- package/src/cli/docker-compose.js +1 -1
- package/src/cli/fs-selection.js +115 -0
- package/src/cli/fs.js +158 -342
- package/src/cli/index.js +22 -10
- package/src/cli/release.js +3 -1
- package/src/cli/repository.js +35 -9
- package/src/cli/run.js +80 -199
- package/src/cli/test.js +4 -0
- package/src/cli/wireguard.js +32 -31
- package/src/client/components/core/Badge.js +0 -1
- package/src/client/components/core/CssCore.js +8 -1
- package/src/client/components/core/Docs.js +77 -100
- package/src/client/components/core/Modal.js +77 -23
- package/src/client/components/core/ToolTip.js +15 -0
- package/src/client/components/cryptokoyn/AppShellCryptokoyn.js +0 -2
- package/src/client/components/cyberia/ActionEngineCyberia.js +12 -36
- package/src/client/components/cyberia/EntityEngineCyberia.js +492 -121
- package/src/client/components/cyberia/InstanceEngineCyberia.js +129 -160
- package/src/client/components/cyberia/InstanceSelectionView.js +7 -1
- package/src/client/components/cyberia/MapEngineCyberia.js +175 -69
- package/src/client/components/cyberia/ObjectLayerEngine.js +1011 -97
- package/src/client/components/cyberia/ObjectLayerEngineModal.js +81 -155
- package/src/client/components/cyberia/ObjectLayerEngineViewer.js +113 -98
- package/src/client/components/cyberia/SharedDefaultsCyberia.js +215 -56
- package/src/client/components/cyberia-portal/AppShellCyberiaPortal.js +0 -34
- package/src/client/components/cyberia-portal/CssCyberiaPortal.js +1 -1
- package/src/client/components/cyberia-portal/MainBodyCyberiaPortal.js +712 -76
- package/src/client/components/cyberia-portal/RouterCyberiaPortal.js +0 -4
- package/src/client/components/cyberia-portal/TranslateCyberiaPortal.js +0 -4
- package/src/client/components/default/AppShellDefault.js +1 -4
- package/src/client/components/itemledger/AppShellItemledger.js +0 -2
- package/src/client/components/underpost/AppShellUnderpost.js +1 -1
- package/src/client/public/cyberia-docs/ARCHITECTURE.md +15 -15
- package/src/client/public/cyberia-docs/CYBERIA-CLI.md +280 -24
- package/src/client/public/cyberia-docs/CYBERIA-CLIENT.md +51 -29
- package/src/client/public/cyberia-docs/CYBERIA-SAGA.md +52 -53
- package/src/client/public/cyberia-docs/CYBERIA-SERVER.md +16 -11
- package/src/client/public/cyberia-docs/CYBERIA.md +28 -28
- package/src/client/public/cyberia-docs/ENTITY-PROFILE.md +11 -5
- package/src/client/public/cyberia-docs/ROADMAP.md +1 -1
- package/src/client/public/cyberia-docs/STATS-PROGRESSION.md +217 -0
- package/src/client/public/cyberia-docs/WHITE-PAPER.md +20 -12
- package/src/client/services/cyberia-audio/cyberia-audio.service.js +99 -0
- package/src/client/services/cyberia-entity-type-default/cyberia-entity-type-default.service.js +38 -0
- package/src/client/services/cyberia-instance/cyberia-instance.management.js +5 -4
- package/src/client/services/cyberia-instance/cyberia-instance.service.js +0 -40
- package/src/client/services/cyberia-map/cyberia-map.management.js +5 -4
- package/src/client/services/cyberia-map-audio-conf/cyberia-map-audio-conf.service.js +138 -0
- package/src/client/services/object-layer/object-layer.management.js +6 -10
- package/src/client/services/object-layer/object-layer.service.js +3 -1
- package/src/client/ssr/views/Cyberia404.js +3 -3
- package/src/client-builder/client-build-docs.js +52 -52
- package/src/client-builder/client-build.js +67 -44
- package/src/client-builder/client-bundle.js +347 -0
- package/src/db/mongo/MongoExpress.js +187 -0
- package/src/grpc/cyberia/grpc-server.js +5 -7
- package/src/index.js +1 -1
- package/src/projects/cyberia/atlas-sprite-sheet-generator.js +143 -146
- package/src/projects/cyberia/atlas-sprite-sheet-store.js +391 -0
- package/src/projects/cyberia/besu-genesis-generator.js +5 -14
- package/src/projects/cyberia/boot-contract-fixtures.js +32 -0
- package/src/projects/cyberia/catalog-cyberia.js +3 -2
- package/src/projects/cyberia/gemini-client.js +3 -3
- package/src/projects/cyberia/generate-saga.js +4 -11
- package/src/projects/cyberia/hot-reload-trigger.js +17 -28
- package/src/projects/cyberia/instance-backup.js +210 -0
- package/src/projects/cyberia/instance-data.js +177 -257
- package/src/projects/cyberia/map-preview-generator.js +32 -68
- package/src/projects/cyberia/object-layer.js +152 -319
- package/src/projects/cyberia/seed-audio.js +139 -0
- package/src/projects/cyberia/semantic-layer-generator-skin.js +2 -8
- package/src/projects/cyberia/semantic-layer-generator.js +2 -18
- package/src/projects/cyberia/stat-balance.js +81 -0
- package/src/projects/cyberia/stat-commands.js +23 -0
- package/src/projects/cyberia/stat-contract-generator.js +101 -0
- package/src/runtime/cyberia-client/Dockerfile +8 -4
- package/src/runtime/cyberia-client/Dockerfile.dev +5 -2
- package/src/runtime/cyberia-server/Dockerfile +9 -2
- package/src/runtime/cyberia-server/Dockerfile.dev +8 -1
- package/src/runtime/engine-cyberia/Dockerfile +1 -1
- package/src/runtime/engine-cyberia/Dockerfile.dev +1 -1
- package/src/runtime/engine-cyberia/Dockerfile.test +2 -2
- package/src/runtime/engine-cyberia/compose.env +17 -5
- package/src/runtime/engine-cyberia/docker-compose.yml +23 -17
- package/src/server/build/coverage.js +113 -42
- package/src/server/build/package.js +55 -12
- package/src/server/build/testing.js +59 -9
- package/src/server/network/middlewares.js +8 -2
- package/src/server/network/underpost-gateway.js +113 -14
- package/src/server/ops/logger.js +70 -35
- package/src/server/runtime/conf.js +40 -9
- package/src/server/runtime/start.js +11 -2
- package/src/server/storage/data-query.js +16 -0
- package/src/server/storage/downloader.js +62 -14
- package/src/server/storage/zip.js +153 -0
- package/test/integration/app/cyberia/atlas-sprite-sheet-store.test.js +402 -0
- package/test/integration/app/cyberia/atlas-sprite-sheet.test.js +86 -0
- package/test/integration/app/cyberia/cyberia-cli-plain-reads.test.js +34 -0
- package/test/integration/app/cyberia/cyberia-entity-type-default.test.js +842 -0
- package/test/integration/app/cyberia/cyberia-instance-conf-coerce.test.js +53 -0
- package/test/integration/app/cyberia/cyberia-instance-conf-defaults.test.js +16 -22
- package/test/integration/app/cyberia/cyberia-instance-items.test.js +90 -0
- package/test/integration/app/cyberia/cyberia-load.test.js +6 -7
- package/test/integration/app/cyberia/cyberia-map-audio-conf.test.js +256 -0
- package/test/integration/app/cyberia/cyberia-stats.test.js +150 -0
- package/test/integration/app/cyberia/fallback-world-capture.test.js +87 -2
- package/test/integration/app/cyberia/object-layer-item-selection.test.js +56 -0
- package/test/integration/app/cyberia/object-layer-natural-key.test.js +32 -0
- package/test/integration/app/cyberia/seed-audio.test.js +275 -0
- package/test/integration/infra/2-network/wireguard-cli.test.js +33 -9
- package/test/integration/infra/2-network/wireguard-edge.test.js +58 -18
- package/test/integration/infra/3-cluster/mongo-express-deploy.test.js +156 -0
- package/test/integration/infra/4-ingress/api-cross-origin.test.js +79 -0
- package/test/integration/infra/4-ingress/underpost-ingress.test.js +1 -1
- package/test/unit/catalog.test.js +13 -2
- package/test/unit/client-build-docs.test.js +97 -70
- package/test/unit/client-bundle.test.js +313 -0
- package/test/unit/conf-resolution.test.js +58 -7
- package/test/unit/coverage-artifact.test.js +120 -29
- package/test/unit/cyberia/instance-backup.test.js +183 -0
- package/test/unit/cyberia/instance-data.test.js +314 -0
- package/test/unit/cyberia/instance-object-layer-items.test.js +46 -0
- package/test/unit/cyberia/publish-workflow.test.js +22 -0
- package/test/unit/cyberia/stat-balance.test.js +69 -0
- package/test/unit/deploy-legacy-gateway-sweep.test.js +63 -0
- package/test/unit/deploy-log-table.test.js +76 -5
- package/test/unit/downloader-integrity.test.js +98 -0
- package/test/unit/file-reference-registry.test.js +141 -0
- package/test/unit/fs-storage-paths.test.js +596 -0
- package/test/unit/gateway-pod-fetch.test.js +95 -0
- package/test/unit/letsencrypt-issuer.test.js +101 -0
- package/test/unit/logger-redaction.test.js +29 -0
- package/test/unit/package.test.js +70 -16
- package/test/unit/prepare-host.test.js +84 -1
- package/test/unit/release-bump.test.js +3 -1
- package/test/unit/start-options.test.js +12 -0
- package/test/unit/test-tiers.test.js +27 -0
- package/test/unit/zip-archive.test.js +142 -0
- package/vitest.config.js +11 -3
- package/src/api/cyberia-instance/cyberia-fallback-default-items.js +0 -63
- package/src/client/components/cyberia/FallbackWorldEngineCyberia.js +0 -368
package/compose.env
CHANGED
|
@@ -43,25 +43,37 @@ VALKEY_PORT=6379
|
|
|
43
43
|
# cyberia-server-* -> stable engine gateway for HTTP and the raw engine runtime
|
|
44
44
|
# for gRPC. The public engine-cyberia name belongs to nginx, avoiding ambiguous
|
|
45
45
|
# Docker DNS while keeping one stable HTTP endpoint for every module.
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
CYBERIA_DATA_SERVER_URL=http://engine-cyberia
|
|
47
|
+
CYBERIA_DATA_SERVER_GRPC=engine-cyberia-runtime:50051
|
|
48
48
|
|
|
49
49
|
# Client-visible Content Authority origin, forwarded to browser/Raylib clients
|
|
50
50
|
# for every engine-cyberia content/asset/metadata request. Host-reachable
|
|
51
51
|
# (Docker publishes the raw engine runtime on host :4005). Unlike the internal
|
|
52
|
-
#
|
|
52
|
+
# CYBERIA_DATA_SERVER_URL, this value is consumed outside the Compose network:
|
|
53
53
|
# the two responsibilities must never overwrite each other.
|
|
54
54
|
ENGINE_PUBLIC_URL=http://localhost:4005
|
|
55
55
|
ENGINE_GRPC_RELOAD_INTERVAL_SEC=300
|
|
56
56
|
|
|
57
|
-
#
|
|
57
|
+
# Shared secret between the engine and every game server. It guards the server
|
|
58
|
+
# registry report (server -> engine) and the hot-reload trigger (engine ->
|
|
59
|
+
# server). Unset disables both: a server then stays out of the public list.
|
|
60
|
+
CYBERIA_SERVER_API_KEY=change_me_dev_server_api_key
|
|
61
|
+
|
|
62
|
+
# Public origin of the server gateway. Each server reports this origin plus its
|
|
63
|
+
# own sub-path, which is the URL a client dials.
|
|
64
|
+
CYBERIA_SERVER_PUBLIC_ORIGIN=http://localhost:8081
|
|
65
|
+
|
|
66
|
+
# --- Browser-facing client runtime config (injected by wasm-driver.py) -----
|
|
58
67
|
# The single WASM bundle resolves its instance from the URL sub-path and builds
|
|
59
68
|
# its endpoints from these origins. HTTP client/API traffic uses nginx on :80;
|
|
60
69
|
# WebSocket traffic uses the dedicated multi-path server gateway on :8081.
|
|
61
70
|
# http://localhost/ -> default, ws://localhost:8081/ws
|
|
62
71
|
# http://localhost/FOREST -> FOREST, ws://localhost:8081/FOREST/ws
|
|
63
72
|
CYBERIA_WS_ORIGIN=ws://localhost:8081
|
|
64
|
-
|
|
73
|
+
# The browser's own route to the Data Server, through nginx on :80. Distinct from the internal
|
|
74
|
+
# CYBERIA_DATA_SERVER_URL above: both name a Data Server origin, but from opposite sides of the
|
|
75
|
+
# Compose network, and one file cannot hold two values under one name.
|
|
76
|
+
CYBERIA_CLIENT_DATA_SERVER_URL=http://localhost
|
|
65
77
|
CYBERIA_DEFAULT_INSTANCE=amethyst-strata-expansion
|
|
66
78
|
|
|
67
79
|
# cyberia-server logging. This is the dev stack, so default to DEBUG. Set
|
package/conf.js
CHANGED
|
@@ -180,7 +180,6 @@ const DefaultConf = /**/ {
|
|
|
180
180
|
'InstanceEngineCyberia',
|
|
181
181
|
'ActionEngineCyberia',
|
|
182
182
|
'EntityEngineCyberia',
|
|
183
|
-
'FallbackWorldEngineCyberia',
|
|
184
183
|
'InstanceSelectionView',
|
|
185
184
|
],
|
|
186
185
|
core: [
|
|
@@ -267,7 +266,6 @@ const DefaultConf = /**/ {
|
|
|
267
266
|
{ path: '/docs', client: 'CyberiaPortal', ssr: 'CyberiaPortal' },
|
|
268
267
|
{ path: '/cyberia-action-engine', client: 'CyberiaPortal', ssr: 'CyberiaPortal' },
|
|
269
268
|
{ path: '/cyberia-entity-engine', client: 'CyberiaPortal', ssr: 'CyberiaPortal' },
|
|
270
|
-
{ path: '/fallback-world-engine', client: 'CyberiaPortal', ssr: 'CyberiaPortal' },
|
|
271
269
|
{ path: '/instance-selection', title: 'Select World', client: 'CyberiaPortal', ssr: 'CyberiaPortal' },
|
|
272
270
|
],
|
|
273
271
|
dists: [
|
|
@@ -765,13 +763,17 @@ const DefaultConf = /**/ {
|
|
|
765
763
|
'cyberia-entity-type-default',
|
|
766
764
|
'cyberia-client-hints',
|
|
767
765
|
'cyberia-saga',
|
|
766
|
+
'cyberia-audio',
|
|
767
|
+
'cyberia-map-audio-conf',
|
|
768
768
|
],
|
|
769
769
|
ws: 'core',
|
|
770
770
|
peer: true,
|
|
771
771
|
docs: {
|
|
772
|
-
coveragePath: './hardhat',
|
|
773
772
|
jsJsonPath: './typedoc.dd-cyberia.json',
|
|
774
|
-
|
|
773
|
+
coverage: [
|
|
774
|
+
{ id: 'cyberia', label: 'Cyberia coverage', suite: 'cyberia' },
|
|
775
|
+
{ id: 'hardhat', label: 'Hardhat coverage', path: './hardhat' },
|
|
776
|
+
],
|
|
775
777
|
references: [
|
|
776
778
|
'./src/client/public/cyberia-docs/CYBERIA.md',
|
|
777
779
|
'./src/client/public/cyberia-docs/WHITE-PAPER.md',
|
|
@@ -779,6 +781,7 @@ const DefaultConf = /**/ {
|
|
|
779
781
|
'./src/client/public/cyberia-docs/QUEST-SYSTEM.md',
|
|
780
782
|
'./src/client/public/cyberia-docs/ACTION-SYSTEM.md',
|
|
781
783
|
'./src/client/public/cyberia-docs/ENTITY-PROFILE.md',
|
|
784
|
+
'./src/client/public/cyberia-docs/STATS-PROGRESSION.md',
|
|
782
785
|
'./src/client/public/cyberia-docs/OFF-CHAIN-ECONOMY.md',
|
|
783
786
|
'./src/client/public/cyberia-docs/HARDHAT-MODULE.md',
|
|
784
787
|
'./src/client/public/cyberia-docs/CYBERIA-SERVER.md',
|
|
@@ -5,18 +5,18 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
5
5
|
source "$SCRIPT_DIR/../lib/github-actions-logging.sh"
|
|
6
6
|
source "$SCRIPT_DIR/../lib/host.sh"
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
DEPLOY_ID=dd-cyberia
|
|
9
|
+
INSTANCE_ID=mmo-client
|
|
10
|
+
TARGET_NODE="${TARGET_NODE:-$WORKER_NODE}"
|
|
11
11
|
|
|
12
12
|
main() {
|
|
13
13
|
deploy_start "Starting remote deploy"
|
|
14
14
|
|
|
15
15
|
prepare_host "$ENGINE_ROOT"
|
|
16
16
|
|
|
17
|
-
deploy_step "Build
|
|
17
|
+
deploy_step "Build $DEPLOY_ID configuration" \
|
|
18
18
|
sudo -n -- /bin/bash -lc \
|
|
19
|
-
"cd $ENGINE_ROOT && node bin/build
|
|
19
|
+
"cd $ENGINE_ROOT && node bin/build $DEPLOY_ID --conf"
|
|
20
20
|
|
|
21
21
|
deploy_step "Wait for target node readiness" \
|
|
22
22
|
sudo -n -- /bin/bash -lc \
|
|
@@ -30,18 +30,17 @@ main() {
|
|
|
30
30
|
sudo -n -- /bin/bash -lc \
|
|
31
31
|
"cd $ENGINE_ROOT && kubectl rollout status deployment/underpost-gateway -n default --timeout=5m"
|
|
32
32
|
|
|
33
|
-
deploy_step "Deploy
|
|
33
|
+
deploy_step "Deploy $DEPLOY_ID $INSTANCE_ID instance" \
|
|
34
34
|
sudo -n -- /bin/bash -lc \
|
|
35
35
|
"cd $ENGINE_ROOT && node bin run instance \
|
|
36
36
|
--kubeadm \
|
|
37
|
+
${TARGET_NODE:+--node-name ${TARGET_NODE}} \
|
|
37
38
|
--gateway-api \
|
|
38
39
|
--image-pull-policy Always \
|
|
39
|
-
--node-name ${TARGET_NODE} \
|
|
40
40
|
--ingress-node ${INGRESS_NODE} \
|
|
41
|
-
--ssh-key-path
|
|
42
|
-
--deploy-id
|
|
43
|
-
--instance-id
|
|
44
|
-
|
|
41
|
+
--ssh-key-path ${DEPLOY_SSH_KEY_PATH} \
|
|
42
|
+
--deploy-id $DEPLOY_ID \
|
|
43
|
+
--instance-id $INSTANCE_ID"
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
main "$@"
|
|
@@ -5,7 +5,6 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
5
5
|
source "$SCRIPT_DIR/../lib/github-actions-logging.sh"
|
|
6
6
|
source "$SCRIPT_DIR/../lib/host.sh"
|
|
7
7
|
|
|
8
|
-
ENGINE_ROOT=/home/dd/engine
|
|
9
8
|
# This runtime is an instance of its parent deployment, and installs that deployment's manifest.
|
|
10
9
|
DEPLOY_ID=dd-cyberia
|
|
11
10
|
|
|
@@ -5,10 +5,11 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
5
5
|
source "$SCRIPT_DIR/../lib/github-actions-logging.sh"
|
|
6
6
|
source "$SCRIPT_DIR/../lib/state.sh"
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
DEPLOY_ID=dd-cyberia
|
|
9
|
+
INSTANCE_ID=mmo-client
|
|
9
10
|
|
|
10
11
|
main() {
|
|
11
|
-
stream_state "$ENGINE_ROOT"
|
|
12
|
+
stream_state "$ENGINE_ROOT" "$DEPLOY_ID" "$INSTANCE_ID"
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
main "$@"
|
|
@@ -5,18 +5,18 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
5
5
|
source "$SCRIPT_DIR/../lib/github-actions-logging.sh"
|
|
6
6
|
source "$SCRIPT_DIR/../lib/host.sh"
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
DEPLOY_ID=dd-cyberia
|
|
9
|
+
INSTANCE_ID=mmo-server
|
|
10
|
+
TARGET_NODE="${TARGET_NODE:-$WORKER_NODE}"
|
|
11
11
|
|
|
12
12
|
main() {
|
|
13
13
|
deploy_start "Starting remote deploy"
|
|
14
14
|
|
|
15
15
|
prepare_host "$ENGINE_ROOT"
|
|
16
16
|
|
|
17
|
-
deploy_step "Build
|
|
17
|
+
deploy_step "Build $DEPLOY_ID configuration" \
|
|
18
18
|
sudo -n -- /bin/bash -lc \
|
|
19
|
-
"cd $ENGINE_ROOT && node bin/build
|
|
19
|
+
"cd $ENGINE_ROOT && node bin/build $DEPLOY_ID --conf"
|
|
20
20
|
|
|
21
21
|
deploy_step "Wait for target node readiness" \
|
|
22
22
|
sudo -n -- /bin/bash -lc \
|
|
@@ -30,18 +30,17 @@ main() {
|
|
|
30
30
|
sudo -n -- /bin/bash -lc \
|
|
31
31
|
"cd $ENGINE_ROOT && kubectl rollout status deployment/underpost-gateway -n default --timeout=5m"
|
|
32
32
|
|
|
33
|
-
deploy_step "Deploy
|
|
33
|
+
deploy_step "Deploy $DEPLOY_ID $INSTANCE_ID instance" \
|
|
34
34
|
sudo -n -- /bin/bash -lc \
|
|
35
35
|
"cd $ENGINE_ROOT && node bin run instance \
|
|
36
36
|
--kubeadm \
|
|
37
|
+
${TARGET_NODE:+--node-name ${TARGET_NODE}} \
|
|
37
38
|
--gateway-api \
|
|
38
39
|
--image-pull-policy Always \
|
|
39
|
-
--node-name ${TARGET_NODE} \
|
|
40
40
|
--ingress-node ${INGRESS_NODE} \
|
|
41
|
-
--ssh-key-path
|
|
42
|
-
--deploy-id
|
|
43
|
-
--instance-id
|
|
44
|
-
|
|
41
|
+
--ssh-key-path ${DEPLOY_SSH_KEY_PATH} \
|
|
42
|
+
--deploy-id $DEPLOY_ID \
|
|
43
|
+
--instance-id $INSTANCE_ID"
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
main "$@"
|
|
@@ -5,7 +5,6 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
5
5
|
source "$SCRIPT_DIR/../lib/github-actions-logging.sh"
|
|
6
6
|
source "$SCRIPT_DIR/../lib/host.sh"
|
|
7
7
|
|
|
8
|
-
ENGINE_ROOT=/home/dd/engine
|
|
9
8
|
# This runtime is an instance of its parent deployment, and installs that deployment's manifest.
|
|
10
9
|
DEPLOY_ID=dd-cyberia
|
|
11
10
|
|
|
@@ -5,10 +5,11 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
5
5
|
source "$SCRIPT_DIR/../lib/github-actions-logging.sh"
|
|
6
6
|
source "$SCRIPT_DIR/../lib/state.sh"
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
DEPLOY_ID=dd-cyberia
|
|
9
|
+
INSTANCE_ID=mmo-server
|
|
9
10
|
|
|
10
11
|
main() {
|
|
11
|
-
stream_state "$ENGINE_ROOT"
|
|
12
|
+
stream_state "$ENGINE_ROOT" "$DEPLOY_ID" "$INSTANCE_ID"
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
main "$@"
|
|
@@ -5,18 +5,18 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
5
5
|
source "$SCRIPT_DIR/../lib/github-actions-logging.sh"
|
|
6
6
|
source "$SCRIPT_DIR/../lib/host.sh"
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
INGRESS_NODE=localhost.localdomain
|
|
8
|
+
DEPLOY_ID=dd-cyberia
|
|
10
9
|
|
|
11
10
|
main() {
|
|
12
11
|
deploy_start "Starting remote deploy"
|
|
13
12
|
|
|
14
13
|
prepare_host "$ENGINE_ROOT"
|
|
15
14
|
|
|
16
|
-
deploy_step "Deploy
|
|
15
|
+
deploy_step "Deploy $DEPLOY_ID" \
|
|
17
16
|
sudo -n -- /bin/bash -lc \
|
|
18
|
-
"cd $ENGINE_ROOT && node bin run deploy
|
|
19
|
-
|
|
17
|
+
"cd $ENGINE_ROOT && node bin run deploy $DEPLOY_ID \
|
|
18
|
+
--gateway-api \
|
|
19
|
+
--ingress-node ${INGRESS_NODE}"
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
main "$@"
|
|
@@ -5,49 +5,50 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
5
5
|
source "$SCRIPT_DIR/../lib/github-actions-logging.sh"
|
|
6
6
|
source "$SCRIPT_DIR/../lib/host.sh"
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
DEPLOY_ID=dd-cyberia
|
|
9
|
+
DEPLOY_ENV="${DEPLOY_ENV:-production}"
|
|
10
10
|
|
|
11
11
|
main() {
|
|
12
|
-
deploy_start "Starting init deploy"
|
|
12
|
+
deploy_start "Starting remote init deploy"
|
|
13
13
|
|
|
14
14
|
prepare_host "$ENGINE_ROOT"
|
|
15
15
|
|
|
16
|
-
deploy_step "Build
|
|
16
|
+
deploy_step "Build $DEPLOY_ID configuration" \
|
|
17
17
|
sudo -n -- /bin/bash -lc \
|
|
18
|
-
"cd $ENGINE_ROOT && node bin/build
|
|
18
|
+
"cd $ENGINE_ROOT && node bin/build $DEPLOY_ID --conf"
|
|
19
19
|
|
|
20
20
|
local pod_cmd
|
|
21
|
-
pod_cmd="$(pod_bootstrap_cmd
|
|
21
|
+
pod_cmd="$(pod_bootstrap_cmd $DEPLOY_ID $DEPLOY_ENV), \
|
|
22
|
+
underpost start $DEPLOY_ID $DEPLOY_ENV --build --run --skip-pull-repo-base"
|
|
22
23
|
|
|
23
|
-
deploy_step "Deploy
|
|
24
|
+
deploy_step "Deploy $DEPLOY_ID $DEPLOY_ENV" \
|
|
24
25
|
sudo -n -- /bin/bash -lc \
|
|
25
|
-
"cd $ENGINE_ROOT && node bin deploy
|
|
26
|
+
"cd $ENGINE_ROOT && node bin deploy $DEPLOY_ID $DEPLOY_ENV \
|
|
26
27
|
--versions green \
|
|
27
28
|
--replicas 1 \
|
|
28
29
|
--kubeadm \
|
|
29
|
-
--timeout-response
|
|
30
|
+
--timeout-response 10000ms \
|
|
30
31
|
--gateway-api \
|
|
31
32
|
--ingress-node ${INGRESS_NODE} \
|
|
32
33
|
--sync \
|
|
33
34
|
--build-manifest \
|
|
34
35
|
--cmd '${pod_cmd}'"
|
|
35
36
|
|
|
36
|
-
deploy_step "Clean
|
|
37
|
+
deploy_step "Clean $DEPLOY_ID working tree" \
|
|
37
38
|
sudo -n -- /bin/bash -lc \
|
|
38
|
-
"cd $ENGINE_ROOT && node bin deploy
|
|
39
|
+
"cd $ENGINE_ROOT && node bin deploy $DEPLOY_ID $DEPLOY_ENV \
|
|
39
40
|
--kubeadm \
|
|
40
41
|
--gateway-api \
|
|
41
42
|
--ingress-node ${INGRESS_NODE} \
|
|
42
43
|
--disable-update-proxy \
|
|
43
44
|
--git-clean"
|
|
44
45
|
|
|
45
|
-
deploy_step "Promote
|
|
46
|
+
deploy_step "Promote $DEPLOY_ID deployment" \
|
|
46
47
|
sudo -n -- /bin/bash -lc \
|
|
47
|
-
"cd $ENGINE_ROOT && node bin monitor
|
|
48
|
+
"cd $ENGINE_ROOT && node bin monitor $DEPLOY_ID $DEPLOY_ENV \
|
|
48
49
|
--ready-deployment \
|
|
49
50
|
--promote \
|
|
50
|
-
--timeout-response
|
|
51
|
+
--timeout-response 10000ms \
|
|
51
52
|
--versions green \
|
|
52
53
|
--replicas 1"
|
|
53
54
|
}
|
|
@@ -5,10 +5,10 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
5
5
|
source "$SCRIPT_DIR/../lib/github-actions-logging.sh"
|
|
6
6
|
source "$SCRIPT_DIR/../lib/state.sh"
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
DEPLOY_ID=dd-cyberia
|
|
9
9
|
|
|
10
10
|
main() {
|
|
11
|
-
stream_state "$ENGINE_ROOT"
|
|
11
|
+
stream_state "$ENGINE_ROOT" "$DEPLOY_ID"
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
main "$@"
|
|
@@ -5,112 +5,176 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
5
5
|
source "$SCRIPT_DIR/../lib/github-actions-logging.sh"
|
|
6
6
|
source "$SCRIPT_DIR/../lib/host.sh"
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
DEPLOY_ID=dd-cyberia
|
|
9
|
+
DEPLOY_ENV="${DEPLOY_ENV:-production}"
|
|
10
|
+
TARGET_NODE="${TARGET_NODE:-$HOST_NODE}"
|
|
11
|
+
DEPLOY_IMAGE="${DEPLOY_IMAGE:-underpost/engine-cyberia:latest}"
|
|
12
|
+
# The source the pod bootstraps from, and the private configuration each side reads: the host
|
|
13
|
+
# takes the monorepo conf, the pod takes this deploy's own conf repository.
|
|
14
|
+
ENGINE_SRC_REPO="${ENGINE_SRC_REPO:-underpostnet/engine-test-cyberia}"
|
|
15
|
+
ENGINE_SRC_PRIVATE_REPO="${ENGINE_SRC_PRIVATE_REPO:-underpostnet/engine-private}"
|
|
16
|
+
POD_SRC_PRIVATE_REPO="${POD_SRC_PRIVATE_REPO:-underpostnet/engine-cyberia-private}"
|
|
11
17
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
18
|
+
CYBERIA_ASSETS=src/client/public/cyberia
|
|
19
|
+
UNDERPOST_ASSETS=src/client/public/underpost
|
|
20
|
+
|
|
21
|
+
# Bundle mode: the host builds the client once and uploads the zip parts, and the pod restores
|
|
22
|
+
# that artifact instead of compiling the client itself. Set BUNDLE_MODE=0 to have the pod build
|
|
23
|
+
# from source, which is the behaviour this script had before bundle mode existed.
|
|
24
|
+
BUNDLE_MODE="${BUNDLE_MODE:-1}"
|
|
25
|
+
BUNDLE_SPLIT="${BUNDLE_SPLIT:-8}"
|
|
26
|
+
# Where push-bundle records the uploaded keys, relative to a conf checkout root.
|
|
27
|
+
BUNDLE_MANIFEST_PATH="conf/$DEPLOY_ID/storage.bundle.json"
|
|
28
|
+
# `mv` into a directory that already exists nests the checkout inside it rather than replacing
|
|
29
|
+
# it, and the pod would then load whatever conf the image carried.
|
|
30
|
+
POD_SRC_PRIVATE_DIR="${POD_SRC_PRIVATE_REPO##*/}"
|
|
31
|
+
# Sibling of the engine checkout, so the publish work tree is never part of it.
|
|
32
|
+
POD_PRIVATE_CHECKOUT="../$POD_SRC_PRIVATE_DIR"
|
|
15
33
|
|
|
16
34
|
main() {
|
|
17
35
|
deploy_start "Starting remote sync and deploy"
|
|
18
|
-
|
|
36
|
+
|
|
19
37
|
prepare_host "$ENGINE_ROOT"
|
|
20
|
-
|
|
21
|
-
# deploy_step "Run tests" \
|
|
22
|
-
# sudo -n -- /bin/bash -lc \
|
|
23
|
-
# "cd $ENGINE_ROOT && npm run test"
|
|
24
|
-
|
|
38
|
+
|
|
25
39
|
deploy_step "Clean cyberia public assets" \
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
40
|
+
sudo -n -- /bin/bash -lc \
|
|
41
|
+
"cd $ENGINE_ROOT && node bin run clean $CYBERIA_ASSETS"
|
|
42
|
+
|
|
29
43
|
deploy_step "Clean underpost public assets" \
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
44
|
+
sudo -n -- /bin/bash -lc \
|
|
45
|
+
"cd $ENGINE_ROOT && node bin run clean $UNDERPOST_ASSETS"
|
|
46
|
+
|
|
33
47
|
deploy_step "Initialize cyberia assets repository" \
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
48
|
+
sudo -n -- /bin/bash -lc \
|
|
49
|
+
"cd $ENGINE_ROOT && node bin cmt $CYBERIA_ASSETS --init-repo"
|
|
50
|
+
|
|
37
51
|
deploy_step "Initialize underpost assets repository" \
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
52
|
+
sudo -n -- /bin/bash -lc \
|
|
53
|
+
"cd $ENGINE_ROOT && node bin cmt $UNDERPOST_ASSETS --init-repo"
|
|
54
|
+
|
|
41
55
|
deploy_step "Pull cyberia public assets" \
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
56
|
+
sudo -n -- /bin/bash -lc \
|
|
57
|
+
"cd $ENGINE_ROOT && node bin fs $CYBERIA_ASSETS \
|
|
58
|
+
--deploy-id $DEPLOY_ID \
|
|
59
|
+
--pull \
|
|
60
|
+
--tracked"
|
|
61
|
+
|
|
45
62
|
deploy_step "Pull underpost public assets" \
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
--deploy-id
|
|
63
|
+
sudo -n -- /bin/bash -lc \
|
|
64
|
+
"cd $ENGINE_ROOT && node bin fs $UNDERPOST_ASSETS \
|
|
65
|
+
--deploy-id $DEPLOY_ID \
|
|
49
66
|
--pull \
|
|
50
|
-
--
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if [ "$(has_changes
|
|
67
|
+
--tracked \
|
|
68
|
+
--storage-id underpost"
|
|
69
|
+
|
|
70
|
+
if [ "$(has_changes $CYBERIA_ASSETS "$ENGINE_ROOT")" = "1" ]; then
|
|
54
71
|
deploy_step "Commit cyberia public assets" \
|
|
55
|
-
|
|
56
|
-
|
|
72
|
+
sudo -n -- /bin/bash -lc \
|
|
73
|
+
"cd $ENGINE_ROOT && git -C $CYBERIA_ASSETS add . && node bin cmt $CYBERIA_ASSETS feat 'Update cyberia public assets'"
|
|
57
74
|
fi
|
|
58
|
-
|
|
59
|
-
if [ "$(has_changes
|
|
75
|
+
|
|
76
|
+
if [ "$(has_changes $UNDERPOST_ASSETS "$ENGINE_ROOT")" = "1" ]; then
|
|
60
77
|
deploy_step "Commit underpost public assets" \
|
|
61
|
-
|
|
62
|
-
|
|
78
|
+
sudo -n -- /bin/bash -lc \
|
|
79
|
+
"cd $ENGINE_ROOT && git -C $UNDERPOST_ASSETS add . && node bin cmt $UNDERPOST_ASSETS feat 'Update underpost public assets'"
|
|
63
80
|
fi
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
sudo -n -- /bin/bash -lc \
|
|
67
|
-
"cd $ENGINE_ROOT && npm run fix"
|
|
68
|
-
|
|
81
|
+
|
|
82
|
+
|
|
69
83
|
deploy_step "Reinstall dependencies" \
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
deploy_step "Install
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
84
|
+
sudo -n -- /bin/bash -lc \
|
|
85
|
+
"cd $ENGINE_ROOT && npm install"
|
|
86
|
+
|
|
87
|
+
deploy_step "Install $DEPLOY_ID catalog dependencies" \
|
|
88
|
+
sudo -n -- /bin/bash -lc \
|
|
89
|
+
"cd $ENGINE_ROOT && node bin package $DEPLOY_ID --install"
|
|
90
|
+
|
|
77
91
|
deploy_step "Clean build artifacts" \
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
deploy_step "Load
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
92
|
+
sudo -n -- /bin/bash -lc \
|
|
93
|
+
"cd $ENGINE_ROOT && node bin run clean"
|
|
94
|
+
|
|
95
|
+
deploy_step "Load $DEPLOY_ID $DEPLOY_ENV environment" \
|
|
96
|
+
sudo -n -- /bin/bash -lc \
|
|
97
|
+
"cd $ENGINE_ROOT && node bin app load --env $DEPLOY_ENV --args deploy-id=$DEPLOY_ID"
|
|
98
|
+
|
|
85
99
|
deploy_step "Build cyberia manifests" \
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
100
|
+
sudo -n -- /bin/bash -lc \
|
|
101
|
+
"cd $ENGINE_ROOT && node bin/cyberia run-workflow build-manifest"
|
|
102
|
+
|
|
103
|
+
# Follows the manifest step: the client renders from the conf.ssr.json that build-manifest
|
|
104
|
+
# writes, so a bundle pushed before it would ship the previous SSR views. The uploaded keys
|
|
105
|
+
# are recorded in engine-private/conf/$DEPLOY_ID/storage.bundle.json, which the pod reads
|
|
106
|
+
# back through its own conf repository.
|
|
107
|
+
if [ "$BUNDLE_MODE" = "1" ]; then
|
|
108
|
+
deploy_step "Push $DEPLOY_ID client bundle" \
|
|
109
|
+
sudo -n -- /bin/bash -lc \
|
|
110
|
+
"cd $ENGINE_ROOT && node bin run push-bundle \
|
|
111
|
+
--deploy-id $DEPLOY_ID \
|
|
112
|
+
--split $BUNDLE_SPLIT"
|
|
113
|
+
|
|
114
|
+
# push-bundle records the keys in the host's own conf checkout, but the pod replaces
|
|
115
|
+
# ./engine-private with a clone of its conf repository — so the manifest is published
|
|
116
|
+
# there too, or the pod reads an empty one and restores nothing. Cloning from the engine
|
|
117
|
+
# root keeps `underpost clone` reading this checkout's credentials, and the work tree is
|
|
118
|
+
# then moved out so it is never part of the engine checkout.
|
|
119
|
+
deploy_step "Stage $DEPLOY_ID bundle manifest" \
|
|
120
|
+
sudo -n -- /bin/bash -lc \
|
|
121
|
+
"cd $ENGINE_ROOT && rm -rf $POD_PRIVATE_CHECKOUT \
|
|
122
|
+
&& node bin clone $POD_SRC_PRIVATE_REPO \
|
|
123
|
+
&& mv ./$POD_SRC_PRIVATE_DIR $POD_PRIVATE_CHECKOUT \
|
|
124
|
+
&& mkdir -p $POD_PRIVATE_CHECKOUT/conf/$DEPLOY_ID \
|
|
125
|
+
&& cp ./engine-private/$BUNDLE_MANIFEST_PATH $POD_PRIVATE_CHECKOUT/$BUNDLE_MANIFEST_PATH"
|
|
126
|
+
|
|
127
|
+
# A rerun that uploads the same keys leaves the manifest byte-identical, and committing
|
|
128
|
+
# nothing fails the step.
|
|
129
|
+
if [ "$(has_changes $POD_PRIVATE_CHECKOUT "$ENGINE_ROOT")" = "1" ]; then
|
|
130
|
+
deploy_step "Publish $DEPLOY_ID bundle manifest" \
|
|
131
|
+
sudo -n -- /bin/bash -lc \
|
|
132
|
+
"cd $ENGINE_ROOT && node bin cmt $POD_PRIVATE_CHECKOUT feat 'Update $DEPLOY_ID bundle manifest' \
|
|
133
|
+
&& node bin push $POD_PRIVATE_CHECKOUT $POD_SRC_PRIVATE_REPO"
|
|
134
|
+
fi
|
|
135
|
+
fi
|
|
136
|
+
|
|
89
137
|
# Two commands, one bootstrap: `pod_bootstrap_cmd` replaces the image's engine with this
|
|
90
138
|
# deploy's source and repoints the global bin at it — without that, the first step needing
|
|
91
139
|
# the current CLI answered `unknown command 'app'`. `start --build` then owns the rest
|
|
92
|
-
# (
|
|
93
|
-
# it the source
|
|
140
|
+
# (dependencies, `app load`, client bundle), while `--skip-pull-repo-base` and
|
|
141
|
+
# `--skip-pull-private-repo` tell it the source and the conf are already in place, so each is
|
|
142
|
+
# fetched exactly once. The conf is cloned here rather than left to `--build` because the
|
|
143
|
+
# steps below it — `app load` and every `bin/cyberia` import — read that conf first.
|
|
94
144
|
local pod_cmd
|
|
95
|
-
|
|
96
|
-
|
|
145
|
+
# In bundle mode `--pull-bundle` replaces the pod's client build with a download of the
|
|
146
|
+
# artifact the host just pushed; without it `--build` compiles the client in the pod.
|
|
147
|
+
local start_flags="--build --run --skip-pull-repo-base --skip-pull-private-repo"
|
|
148
|
+
if [ "$BUNDLE_MODE" = "1" ]; then
|
|
149
|
+
start_flags="$start_flags --pull-bundle"
|
|
150
|
+
fi
|
|
151
|
+
pod_cmd="$(pod_bootstrap_cmd $DEPLOY_ID $DEPLOY_ENV "$ENGINE_SRC_REPO"), \
|
|
152
|
+
underpost clone ${POD_SRC_PRIVATE_REPO}, \
|
|
153
|
+
sudo rm -rf ./engine-private, \
|
|
154
|
+
sudo mv ./${POD_SRC_PRIVATE_DIR} ./engine-private, \
|
|
155
|
+
underpost app load --env $DEPLOY_ENV --args deploy-id=$DEPLOY_ID, \
|
|
156
|
+
node bin/cyberia ol --drop --env-path .env, \
|
|
157
|
+
node bin/cyberia run-workflow drop-db --env-path .env, \
|
|
158
|
+
node bin/cyberia instance amethyst-strata-expansion --import --env-path .env, \
|
|
159
|
+
node bin/cyberia instance FOREST --import --env-path .env, \
|
|
160
|
+
node bin/cyberia instance TEST --import --env-path .env, \
|
|
161
|
+
underpost start $DEPLOY_ID $DEPLOY_ENV $start_flags"
|
|
97
162
|
|
|
98
|
-
deploy_step "Sync
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
--deploy-id
|
|
163
|
+
deploy_step "Sync $DEPLOY_ID cluster" \
|
|
164
|
+
sudo -n -- /bin/bash -lc \
|
|
165
|
+
"cd $ENGINE_ROOT && node bin run sync \
|
|
166
|
+
--deploy-id $DEPLOY_ID \
|
|
102
167
|
--replicas 1 \
|
|
103
|
-
--image
|
|
168
|
+
--image '${DEPLOY_IMAGE}' \
|
|
104
169
|
--kubeadm \
|
|
105
170
|
--deploy-id-cron-jobs none \
|
|
106
|
-
--timeout-response
|
|
107
|
-
|
|
171
|
+
--timeout-response 10000ms \
|
|
172
|
+
${TARGET_NODE:+--node-name ${TARGET_NODE}} \
|
|
108
173
|
--gateway-api \
|
|
109
174
|
--ingress-node ${INGRESS_NODE} \
|
|
110
|
-
--ssh-key-path
|
|
175
|
+
--ssh-key-path ${DEPLOY_SSH_KEY_PATH} \
|
|
111
176
|
--image-pull-policy Always \
|
|
112
177
|
--cmd '${pod_cmd}'"
|
|
113
|
-
|
|
114
178
|
}
|
|
115
179
|
|
|
116
180
|
main "$@"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Shared deploy constants for deploy/<deploy-id>/*.sh. Sourced by lib/host.sh and lib/state.sh,
|
|
2
|
+
# never executed directly.
|
|
3
|
+
#
|
|
4
|
+
# One home for every value more than one deploy script needs, so renaming a node or moving a
|
|
5
|
+
# checkout is a single edit instead of a sweep. Every name here resolves from the environment
|
|
6
|
+
# first, which is how a run is retargeted without editing a script.
|
|
7
|
+
|
|
8
|
+
# The engine checkout every step runs in. The library helpers take it as an argument and fall
|
|
9
|
+
# back to this, so a caller driving a second checkout passes that one explicitly.
|
|
10
|
+
ENGINE_ROOT="${ENGINE_ROOT:-/home/dd/engine}"
|
|
11
|
+
|
|
12
|
+
# The fleet's nodes, named once. A deploy pins its own placement in TARGET_NODE, declared beside
|
|
13
|
+
# its deploy id and left empty where the CLI resolves the node itself.
|
|
14
|
+
#
|
|
15
|
+
# `node bin deploy` publishes that flag as `--node` while `run sync` and `run instance` publish
|
|
16
|
+
# it as `--node-name`. Both are public option names, so a script holds the value once and spells
|
|
17
|
+
# the flag the way the command it drives publishes it.
|
|
18
|
+
HOST_NODE="${HOST_NODE:-localhost.localdomain}"
|
|
19
|
+
WORKER_NODE="${WORKER_NODE:-hp-envy-iso-ram-rocky9}"
|
|
20
|
+
|
|
21
|
+
# The node carrying the shared host-network ingress.
|
|
22
|
+
INGRESS_NODE="${INGRESS_NODE:-$HOST_NODE}"
|
|
23
|
+
|
|
24
|
+
# The key the sync and instance steps ship volume data with.
|
|
25
|
+
DEPLOY_SSH_KEY_PATH="${DEPLOY_SSH_KEY_PATH:-/home/dd/tmp/897as9dxhaskd9}"
|
|
26
|
+
|
|
27
|
+
# The published image the WordPress deploys run. Pinned rather than derived from the checkout's
|
|
28
|
+
# version: a tag is only deployable once the release workflow has published it.
|
|
29
|
+
DEPLOY_WP_IMAGE="${DEPLOY_WP_IMAGE:-underpost/wp:v3.3.77}"
|