cyberia 3.2.22 → 3.2.70
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 +127 -68
- package/.github/workflows/cyberia-client.cd.yml +40 -0
- package/.github/workflows/cyberia-server.cd.yml +40 -0
- package/.github/workflows/docker-image.cyberia-client.ci.yml +49 -0
- package/.github/workflows/docker-image.cyberia-client.dev.ci.yml +48 -0
- package/.github/workflows/docker-image.cyberia-server.ci.yml +69 -0
- package/.github/workflows/docker-image.cyberia-server.dev.ci.yml +69 -0
- package/.github/workflows/docker-image.engine-cyberia.ci.yml +52 -0
- package/.github/workflows/docker-image.engine-cyberia.dev.ci.yml +52 -0
- package/.github/workflows/engine-cyberia.cd.yml +33 -24
- package/.github/workflows/engine-cyberia.ci.yml +13 -3
- package/.github/workflows/ghpkg.ci.yml +88 -1
- package/.github/workflows/gitlab.ci.yml +1 -1
- package/.github/workflows/hardhat.ci.yml +1 -1
- package/.github/workflows/npmpkg.ci.yml +10 -7
- package/.github/workflows/publish.ci.yml +2 -2
- package/.github/workflows/publish.cyberia.ci.yml +5 -16
- package/.github/workflows/pwa-microservices-template-page.cd.yml +1 -8
- package/.github/workflows/pwa-microservices-template-test.ci.yml +1 -1
- package/CHANGELOG.md +301 -1
- package/CLI-HELP.md +71 -6
- package/Dockerfile +141 -43
- package/Dockerfile.dev +143 -0
- package/Dockerfile.test +165 -0
- package/README.md +1 -1
- package/baremetal/commission-workflows.json +1 -0
- package/bin/build.js +31 -0
- package/bin/cyberia.js +1080 -184
- package/bin/deploy.js +2 -2
- package/bin/index.js +1080 -184
- package/bump.config.js +1 -0
- package/compose.env +131 -0
- package/conf.js +18 -1
- package/deployment.yaml +2 -2
- package/docker-compose.yml +316 -0
- package/hardhat/hardhat.config.js +2 -2
- package/hardhat/package-lock.json +620 -2041
- package/hardhat/package.json +7 -5
- package/hardhat/scripts/deployObjectLayerToken.js +18 -18
- package/hardhat/test/ObjectLayerToken.js +378 -274
- package/ipfs/configure-ipfs.sh +13 -0
- package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +1 -1
- package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +1 -1
- package/manifests/deployment/dd-cyberia-development/deployment.yaml +2 -2
- package/manifests/deployment/dd-cyberia-development/grpc-service.yaml +17 -0
- package/manifests/deployment/dd-cyberia-development/pv-pvc.yaml +32 -0
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
- package/mongodb/entrypoint.sh +76 -0
- package/nginx.conf +87 -0
- package/package.json +31 -19
- package/pv-pvc.yaml +32 -0
- package/scripts/disk-clean.sh +85 -60
- package/scripts/kubeadm-node-setup.sh +317 -0
- package/scripts/rocky-kickstart.sh +877 -185
- package/scripts/rpmfusion-ffmpeg-setup.sh +26 -50
- package/scripts/test-monitor.sh +3 -5
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.router.js +43 -7
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.service.js +17 -25
- package/src/api/cyberia-action/cyberia-action.controller.js +19 -0
- package/src/api/cyberia-action/cyberia-action.model.js +21 -29
- package/src/api/cyberia-action/cyberia-action.router.js +42 -7
- package/src/api/cyberia-action/cyberia-action.service.js +20 -4
- package/src/api/cyberia-client-hints/cyberia-client-hints.model.js +58 -57
- package/src/api/cyberia-dialogue/cyberia-dialogue.router.js +37 -6
- package/src/api/cyberia-dialogue/cyberia-dialogue.service.js +8 -2
- package/src/api/cyberia-entity/cyberia-entity.router.js +39 -7
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.controller.js +74 -0
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.model.js +67 -0
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.router.js +63 -0
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.service.js +46 -0
- package/src/api/cyberia-instance/cyberia-fallback-world.js +62 -10
- package/src/api/cyberia-instance/cyberia-instance.model.js +32 -2
- package/src/api/cyberia-instance/cyberia-instance.router.js +6 -6
- package/src/api/cyberia-instance/cyberia-world-generator.js +116 -3
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.model.js +3 -0
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.router.js +39 -7
- package/src/api/cyberia-map/cyberia-map.router.js +21 -6
- package/src/api/cyberia-quest/cyberia-quest.controller.js +38 -0
- package/src/api/cyberia-quest/cyberia-quest.router.js +47 -7
- package/src/api/cyberia-quest/cyberia-quest.service.js +59 -4
- package/src/api/cyberia-saga/cyberia-saga.controller.js +74 -0
- package/src/api/cyberia-saga/cyberia-saga.model.js +59 -0
- package/src/api/cyberia-saga/cyberia-saga.router.js +63 -0
- package/src/api/cyberia-saga/cyberia-saga.service.js +42 -0
- package/src/api/cyberia-server-defaults/cyberia-server-defaults.js +551 -129
- package/src/api/cyberia-skill/cyberia-skill.controller.js +74 -0
- package/src/api/cyberia-skill/cyberia-skill.model.js +50 -0
- package/src/api/cyberia-skill/cyberia-skill.router.js +63 -0
- package/src/api/cyberia-skill/cyberia-skill.service.js +42 -0
- package/src/api/ipfs/ipfs.service.js +28 -15
- package/src/api/object-layer/object-layer.router.js +25 -15
- package/src/api/object-layer/object-layer.service.js +15 -20
- package/src/api/object-layer-render-frames/object-layer-render-frames.router.js +39 -7
- package/src/cli/baremetal.js +717 -16
- package/src/cli/cluster.js +80 -5
- package/src/cli/deploy.js +127 -11
- package/src/cli/docker-compose.js +648 -0
- package/src/cli/env.js +11 -2
- package/src/cli/fs.js +75 -30
- package/src/cli/image.js +129 -51
- package/src/cli/index.js +110 -6
- package/src/cli/kickstart.js +142 -20
- package/src/cli/release.js +46 -4
- package/src/cli/repository.js +238 -33
- package/src/cli/run.js +520 -114
- package/src/cli/secrets.js +82 -48
- package/src/cli/ssh.js +234 -0
- package/src/cli/static.js +2 -2
- package/src/client/components/cyberia/ActionEngineCyberia.js +1867 -0
- package/src/client/components/cyberia/EntityEngineCyberia.js +585 -0
- package/src/client/components/cyberia/InstanceEngineCyberia.js +219 -13
- package/src/client/components/cyberia/MapEngineCyberia.js +154 -71
- package/src/client/components/cyberia/ObjectLayerEngineModal.js +40 -63
- package/src/client/components/cyberia/ObjectLayerEngineViewer.js +34 -20
- package/src/client/components/cyberia/SharedDefaultsCyberia.js +195 -4
- package/src/client/components/cyberia-portal/AppShellCyberiaPortal.js +66 -0
- package/src/client/components/cyberia-portal/RouterCyberiaPortal.js +8 -0
- package/src/client/components/cyberia-portal/TranslateCyberiaPortal.js +8 -0
- package/src/client/public/cyberia-docs/ACTION-SYSTEM.md +45 -27
- package/src/client/public/cyberia-docs/CYBERIA-CLI.md +3 -3
- package/src/client/public/cyberia-docs/CYBERIA-CLIENT.md +39 -22
- package/src/client/public/cyberia-docs/CYBERIA-LORE.md +88 -0
- package/src/client/public/cyberia-docs/CYBERIA-SAGA.md +394 -0
- package/src/client/public/cyberia-docs/CYBERIA-SERVER.md +8 -1
- package/src/client/public/cyberia-docs/CYBERIA.md +1 -1
- package/src/client/public/cyberia-docs/QUEST-SYSTEM.md +5 -5
- package/src/client/public/cyberia-docs/ROADMAP.md +1 -1
- package/src/client/public/cyberia-docs/WHITE-PAPER.md +1 -1
- package/src/client/services/cyberia-entity-type-default/cyberia-entity-type-default.service.js +99 -0
- package/src/client/services/cyberia-instance/cyberia-instance.management.js +2 -2
- package/src/client/services/cyberia-map/cyberia-map.management.js +2 -2
- package/src/client/services/cyberia-saga/cyberia-saga.service.js +99 -0
- package/src/client/services/cyberia-skill/cyberia-skill.service.js +99 -0
- package/src/client/services/object-layer/object-layer.management.js +6 -6
- package/src/{server → client-builder}/client-build-docs.js +15 -5
- package/src/{server → client-builder}/client-build-live.js +3 -3
- package/src/{server → client-builder}/client-build.js +25 -22
- package/src/{server → client-builder}/client-dev-server.js +3 -3
- package/src/{server → client-builder}/client-icons.js +2 -2
- package/src/{server → client-builder}/ssr.js +5 -5
- package/src/client.build.js +1 -3
- package/src/client.dev.js +1 -1
- package/src/db/mongo/MongoBootstrap.js +12 -12
- package/src/grpc/cyberia/grpc-server.js +255 -70
- package/src/index.js +12 -1
- package/src/mailer/EmailRender.js +1 -1
- package/src/{server → projects/cyberia}/atlas-sprite-sheet-generator.js +2 -2
- package/src/{server → projects/cyberia}/besu-genesis-generator.js +3 -3
- package/src/projects/cyberia/catalog-cyberia.js +81 -0
- package/src/projects/cyberia/gemini-client.js +175 -0
- package/src/projects/cyberia/generate-saga.js +2107 -0
- package/src/{server → projects/cyberia}/ipfs-client.js +2 -2
- package/src/{server → projects/cyberia}/object-layer.js +12 -108
- package/src/{server → projects/cyberia}/semantic-layer-generator-floor.js +1 -1
- package/src/{server → projects/cyberia}/semantic-layer-generator-resource.js +1 -1
- package/src/{server → projects/cyberia}/semantic-layer-generator-skin.js +1 -1
- package/src/{server → projects/cyberia}/semantic-layer-generator.js +2 -2
- package/src/{server → projects/cyberia}/shape-generator.js +2 -2
- package/src/{server → projects/underpost}/catalog-underpost.js +1 -2
- package/src/runtime/cyberia-client/Dockerfile +27 -61
- package/src/runtime/cyberia-client/Dockerfile.dev +20 -12
- package/src/runtime/cyberia-server/Dockerfile +21 -20
- package/src/runtime/cyberia-server/Dockerfile.dev +17 -8
- package/src/runtime/engine-cyberia/Dockerfile +143 -0
- package/src/runtime/engine-cyberia/Dockerfile.dev +143 -0
- package/src/runtime/engine-cyberia/Dockerfile.test +165 -0
- package/src/runtime/engine-cyberia/compose.env +131 -0
- package/src/runtime/engine-cyberia/docker-compose.yml +316 -0
- package/src/runtime/engine-cyberia/ipfs/configure-ipfs.sh +13 -0
- package/src/runtime/engine-cyberia/mongodb/entrypoint.sh +76 -0
- package/src/runtime/engine-cyberia/nginx.conf +87 -0
- package/src/runtime/express/Express.js +2 -2
- package/src/runtime/nginx/Nginx.js +250 -0
- package/src/server/catalog.js +9 -14
- package/src/server/conf.js +3 -6
- package/src/server/runtime-status.js +18 -1
- package/src/server/start.js +12 -2
- package/src/server.js +6 -2
- package/test/cyberia-instance-conf-defaults.test.js +140 -0
- package/test/deploy-monitor.test.js +26 -10
- package/test/shape-generator.test.js +7 -1
- package/typedoc.dd-cyberia.json +3 -1
- package/typedoc.json +3 -1
- /package/src/client/ssr/{Render.js → RootDocument.js} +0 -0
- /package/src/{server → client-builder}/client-formatted.js +0 -0
package/src/cli/kickstart.js
CHANGED
|
@@ -43,46 +43,168 @@ class UnderpostKickStart {
|
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
* @method kickstartPreVariables
|
|
46
|
-
* @description Generates the variable
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
46
|
+
* @description Generates the shell variable-assignment block injected at the top of the
|
|
47
|
+
* kickstart `%pre` script. These variables drive both the ephemeral commissioning runtime
|
|
48
|
+
* and the unattended disk installer in `scripts/rocky-kickstart.sh`. Passwords are emitted
|
|
49
|
+
* base64-encoded (`*_B64`) and decoded by an in-script `ks_b64d` helper; all other values
|
|
50
|
+
* are single-quote escaped so arbitrary content survives the shell/heredoc layers.
|
|
51
|
+
* @param {object} options - Variable values to bake into the `%pre` block.
|
|
52
|
+
* @param {string} [options.rootPassword=''] - root console password (base64-encoded).
|
|
53
|
+
* @param {string} [options.authorizedKeys=''] - SSH public key(s) installed as authorized_keys.
|
|
54
|
+
* @param {string} [options.adminUsername=''] - Primary (MAAS) admin user (defaults to MAAS_ADMIN_USERNAME).
|
|
55
|
+
* @param {string} [options.adminPassword=''] - Primary admin console password (defaults to rootPassword).
|
|
56
|
+
* @param {string} [options.deployUsername=''] - Optional second (deploy) admin user (e.g. admin).
|
|
57
|
+
* @param {string} [options.deployPassword=''] - Deploy user console password (defaults to rootPassword).
|
|
58
|
+
* @param {string} [options.netIp=''] - Static IPv4 for the deployed OS; empty = DHCP.
|
|
59
|
+
* @param {number} [options.netPrefix=24] - IPv4 prefix length for the static address.
|
|
60
|
+
* @param {string} [options.netGateway=''] - Default gateway for the deployed OS.
|
|
61
|
+
* @param {string} [options.netDns=''] - DNS server for the deployed OS.
|
|
62
|
+
* @param {string} [options.timezone=''] - IANA timezone configured in the deployed OS (e.g. America/Santiago).
|
|
63
|
+
* @param {string} [options.keyboardLayout=''] - Console/X11 keyboard layout for the deployed OS (e.g. es).
|
|
64
|
+
* @param {string} [options.chronyConfPath='/etc/chrony.conf'] - chrony config path written in the deployed OS.
|
|
65
|
+
* @param {string} [options.bootstrapUrl=''] - Base URL of the bootstrap HTTP server for this host (status POSTs).
|
|
66
|
+
* @param {string} [options.workflowId=''] - Workflow identifier reported in status metadata.
|
|
67
|
+
* @param {string} [options.systemId=''] - MAAS system id reported in status metadata (if known).
|
|
68
|
+
* @param {string} [options.targetHostname=''] - Hostname reported in status metadata and set on the deployed OS.
|
|
69
|
+
* @param {number} [options.sshPort=22] - SSH port the ephemeral runtime listens on.
|
|
70
|
+
* @param {string} [options.installDiskHint=''] - Optional explicit target disk (e.g. /dev/nvme0n1); empty = auto-detect.
|
|
71
|
+
* @param {boolean} [options.autoInstall=true] - When true, the ephemeral runtime self-installs after a fallback timeout if no remote trigger arrives.
|
|
51
72
|
* @memberof UnderpostKickStart
|
|
52
|
-
* @returns {string}
|
|
73
|
+
* @returns {string} Newline-joined bash variable assignments.
|
|
53
74
|
*/
|
|
54
|
-
kickstartPreVariables: ({
|
|
75
|
+
kickstartPreVariables: ({
|
|
76
|
+
rootPassword = '',
|
|
77
|
+
authorizedKeys = '',
|
|
78
|
+
adminUsername = '',
|
|
79
|
+
adminPassword = '',
|
|
80
|
+
deployUsername = '',
|
|
81
|
+
deployPassword = '',
|
|
82
|
+
netIp = '',
|
|
83
|
+
netPrefix = 24,
|
|
84
|
+
netGateway = '',
|
|
85
|
+
netDns = '',
|
|
86
|
+
timezone = '',
|
|
87
|
+
keyboardLayout = '',
|
|
88
|
+
chronyConfPath = '/etc/chrony.conf',
|
|
89
|
+
bootstrapUrl = '',
|
|
90
|
+
workflowId = '',
|
|
91
|
+
systemId = '',
|
|
92
|
+
targetHostname = '',
|
|
93
|
+
sshPort = 22,
|
|
94
|
+
installDiskHint = '',
|
|
95
|
+
autoInstall = true,
|
|
96
|
+
}) => {
|
|
55
97
|
const sanitizedKeys = (authorizedKeys || '').trim();
|
|
98
|
+
// Passwords are passed base64-encoded so arbitrary characters (quotes,
|
|
99
|
+
// spaces, $, etc.) survive every shell/heredoc layer intact. base64 output
|
|
100
|
+
// never contains single quotes. Decoding tries `base64` then falls back to
|
|
101
|
+
// python3 so a minimal Anaconda environment can never yield empty passwords.
|
|
102
|
+
const b64 = (v) => Buffer.from(String(v || ''), 'utf8').toString('base64');
|
|
103
|
+
const sq = (v) => `'${String(v || '').replace(/'/g, "'\\''")}'`;
|
|
56
104
|
return [
|
|
57
|
-
`
|
|
58
|
-
`
|
|
59
|
-
`
|
|
105
|
+
`ks_b64d() { printf %s "$1" | base64 -d 2>/dev/null || printf %s "$1" | python3 -c 'import sys,base64;sys.stdout.buffer.write(base64.b64decode(sys.stdin.read().strip()))' 2>/dev/null; }`,
|
|
106
|
+
`ROOT_PASS_B64='${b64(rootPassword)}'`,
|
|
107
|
+
`ADMIN_PASS_B64='${b64(adminPassword || rootPassword)}'`,
|
|
108
|
+
`DEPLOY_PASS_B64='${b64(deployPassword)}'`,
|
|
109
|
+
`ROOT_PASS="$(ks_b64d "$ROOT_PASS_B64")"`,
|
|
110
|
+
`ADMIN_PASS="$(ks_b64d "$ADMIN_PASS_B64")"`,
|
|
111
|
+
`DEPLOY_PASS="$(ks_b64d "$DEPLOY_PASS_B64")"`,
|
|
112
|
+
`AUTHORIZED_KEYS=${sq(sanitizedKeys)}`,
|
|
113
|
+
`ADMIN_USER=${sq(adminUsername || process.env.MAAS_ADMIN_USERNAME || 'maas')}`,
|
|
114
|
+
`DEPLOY_USER=${sq(deployUsername)}`,
|
|
115
|
+
`NET_IP=${sq(netIp)}`,
|
|
116
|
+
`NET_PREFIX='${parseInt(netPrefix, 10) || 24}'`,
|
|
117
|
+
`NET_GATEWAY=${sq(netGateway)}`,
|
|
118
|
+
`NET_DNS=${sq(netDns)}`,
|
|
119
|
+
`TIMEZONE=${sq(timezone)}`,
|
|
120
|
+
`KEYBOARD_LAYOUT=${sq(keyboardLayout)}`,
|
|
121
|
+
`CHRONY_CONF_PATH=${sq(chronyConfPath || '/etc/chrony.conf')}`,
|
|
122
|
+
`BOOTSTRAP_URL=${sq(bootstrapUrl)}`,
|
|
123
|
+
`WORKFLOW_ID=${sq(workflowId)}`,
|
|
124
|
+
`SYSTEM_ID=${sq(systemId)}`,
|
|
125
|
+
`TARGET_HOSTNAME=${sq(targetHostname)}`,
|
|
126
|
+
`SSH_PORT='${sshPort || 22}'`,
|
|
127
|
+
`INSTALL_DISK_HINT=${sq(installDiskHint)}`,
|
|
128
|
+
`AUTO_INSTALL='${autoInstall ? '1' : '0'}'`,
|
|
60
129
|
].join('\n');
|
|
61
130
|
},
|
|
62
131
|
|
|
63
132
|
/**
|
|
64
133
|
* @method kickstartFactory
|
|
65
134
|
* @description Generates a complete kickstart configuration by combining the header,
|
|
66
|
-
* variable
|
|
67
|
-
* @param {object} options
|
|
68
|
-
* @param {string} [options.lang='en_US.UTF-8']
|
|
69
|
-
* @param {string} [options.keyboard='us']
|
|
70
|
-
* @param {string} [options.timezone='America/New_York']
|
|
71
|
-
* @param {string} [options.
|
|
72
|
-
* @param {string} [options.
|
|
135
|
+
* the `%pre` variable-assignment block, and the `scripts/rocky-kickstart.sh` body.
|
|
136
|
+
* @param {object} options - Kickstart generation options.
|
|
137
|
+
* @param {string} [options.lang='en_US.UTF-8'] - System language for the ephemeral runtime.
|
|
138
|
+
* @param {string} [options.keyboard='us'] - Keyboard layout for the ephemeral runtime AND the deployed OS.
|
|
139
|
+
* @param {string} [options.timezone='America/New_York'] - Timezone for the ephemeral runtime AND the deployed OS.
|
|
140
|
+
* @param {string} [options.chronyConfPath='/etc/chrony.conf'] - chrony config path written in the deployed OS.
|
|
141
|
+
* @param {string} [options.rootPassword=process.env.MAAS_ADMIN_PASS] - root console password.
|
|
142
|
+
* @param {string} [options.adminUsername=''] - Primary (MAAS) admin user created in the deployed OS.
|
|
143
|
+
* @param {string} [options.adminPassword=''] - Primary admin console password (defaults to rootPassword).
|
|
144
|
+
* @param {string} [options.deployUsername=''] - Optional second (deploy) admin user (e.g. admin).
|
|
145
|
+
* @param {string} [options.deployPassword=''] - Deploy user console password (defaults to rootPassword).
|
|
146
|
+
* @param {string} [options.netIp=''] - Static IPv4 for the deployed OS; empty = DHCP.
|
|
147
|
+
* @param {number} [options.netPrefix=24] - IPv4 prefix length for the static address.
|
|
148
|
+
* @param {string} [options.netGateway=''] - Default gateway for the deployed OS.
|
|
149
|
+
* @param {string} [options.netDns=''] - DNS server for the deployed OS.
|
|
150
|
+
* @param {string} [options.authorizedKeys=''] - SSH public key(s) installed as authorized_keys.
|
|
151
|
+
* @param {string} [options.bootstrapUrl=''] - Base URL of the bootstrap HTTP server (status POSTs).
|
|
152
|
+
* @param {string} [options.workflowId=''] - Workflow identifier reported in status metadata.
|
|
153
|
+
* @param {string} [options.systemId=''] - MAAS system id reported in status metadata (if known).
|
|
154
|
+
* @param {string} [options.targetHostname=''] - Hostname reported in status metadata and set on the deployed OS.
|
|
155
|
+
* @param {number} [options.sshPort=22] - SSH port the ephemeral runtime listens on.
|
|
156
|
+
* @param {string} [options.installDiskHint=''] - Optional explicit target disk; empty = auto-detect.
|
|
157
|
+
* @param {boolean} [options.autoInstall=true] - When true, the runtime self-installs after a fallback timeout.
|
|
73
158
|
* @memberof UnderpostKickStart
|
|
74
|
-
* @returns {string}
|
|
159
|
+
* @returns {string} The full kickstart (ks.cfg) source.
|
|
75
160
|
*/
|
|
76
161
|
kickstartFactory: ({
|
|
77
162
|
lang = 'en_US.UTF-8',
|
|
78
163
|
keyboard = 'us',
|
|
79
164
|
timezone = 'America/New_York',
|
|
165
|
+
chronyConfPath = '/etc/chrony.conf',
|
|
80
166
|
rootPassword = process.env.MAAS_ADMIN_PASS,
|
|
167
|
+
adminUsername = '',
|
|
168
|
+
adminPassword = '',
|
|
169
|
+
deployUsername = '',
|
|
170
|
+
deployPassword = '',
|
|
171
|
+
netIp = '',
|
|
172
|
+
netPrefix = 24,
|
|
173
|
+
netGateway = '',
|
|
174
|
+
netDns = '',
|
|
81
175
|
authorizedKeys = '',
|
|
176
|
+
bootstrapUrl = '',
|
|
177
|
+
workflowId = '',
|
|
178
|
+
systemId = '',
|
|
179
|
+
targetHostname = '',
|
|
180
|
+
sshPort = 22,
|
|
181
|
+
installDiskHint = '',
|
|
182
|
+
autoInstall = true,
|
|
82
183
|
}) => {
|
|
83
|
-
const
|
|
184
|
+
const resolvedAdminUsername = adminUsername || process.env.MAAS_ADMIN_USERNAME || 'maas';
|
|
84
185
|
const header = UnderpostKickStart.API.kickstartHeader({ lang, keyboard, timezone, rootPassword });
|
|
85
|
-
const variables = UnderpostKickStart.API.kickstartPreVariables({
|
|
186
|
+
const variables = UnderpostKickStart.API.kickstartPreVariables({
|
|
187
|
+
rootPassword,
|
|
188
|
+
authorizedKeys,
|
|
189
|
+
adminUsername: resolvedAdminUsername,
|
|
190
|
+
adminPassword,
|
|
191
|
+
deployUsername,
|
|
192
|
+
deployPassword,
|
|
193
|
+
netIp,
|
|
194
|
+
netPrefix,
|
|
195
|
+
netGateway,
|
|
196
|
+
netDns,
|
|
197
|
+
timezone,
|
|
198
|
+
keyboardLayout: keyboard,
|
|
199
|
+
chronyConfPath,
|
|
200
|
+
bootstrapUrl,
|
|
201
|
+
workflowId,
|
|
202
|
+
systemId,
|
|
203
|
+
targetHostname,
|
|
204
|
+
sshPort,
|
|
205
|
+
installDiskHint,
|
|
206
|
+
autoInstall,
|
|
207
|
+
});
|
|
86
208
|
|
|
87
209
|
const scriptPath = path.resolve(__dirname, '../../scripts/rocky-kickstart.sh');
|
|
88
210
|
const scriptBody = fs.readFileSync(scriptPath, 'utf8');
|
package/src/cli/release.js
CHANGED
|
@@ -117,9 +117,53 @@ const buildVersionBumpTargets = () => [
|
|
|
117
117
|
/(underpost-engine:v)\d+\.\d+\.\d+/g,
|
|
118
118
|
/(type=raw,value=v)\d+\.\d+\.\d+/g,
|
|
119
119
|
/(UNDERPOST_VERSION=)\d+\.\d+\.\d+/g,
|
|
120
|
+
/(UNDERPOST_VERSION:\s*['"]?)\d+\.\d+\.\d+/g,
|
|
120
121
|
],
|
|
121
122
|
},
|
|
122
123
|
|
|
124
|
+
// ── Docker-compose image-tag defaults. Root compose + generator + cyberia runtime compose.
|
|
125
|
+
// Tags live in `${VAR:-vX.Y.Z}` / `VAR=vX.Y.Z` shapes bumpp cannot detect. ──
|
|
126
|
+
{
|
|
127
|
+
file: 'docker-compose.yml',
|
|
128
|
+
patterns: /(_TAG:-v)\d+\.\d+\.\d+/g,
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
file: 'src/cli/docker-compose.js',
|
|
132
|
+
patterns: /(_TAG=v)\d+\.\d+\.\d+/g,
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
file: 'src/runtime/engine-cyberia/docker-compose.yml',
|
|
136
|
+
patterns: /(_TAG:-v)\d+\.\d+\.\d+/g,
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
// ── Cyberia CLI dev image tar/name defaults (bin/cyberia.js). ──
|
|
140
|
+
{
|
|
141
|
+
file: 'bin/cyberia.js',
|
|
142
|
+
patterns: [/(-dev_v)\d+\.\d+\.\d+(?=\.tar)/g, /(-dev:v)\d+\.\d+\.\d+/g],
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
// ── Runtime Dockerfiles: `ARG UNDERPOST_VERSION=X.Y.Z` build-arg defaults. ──
|
|
146
|
+
{
|
|
147
|
+
dir: 'src/runtime',
|
|
148
|
+
match: /^Dockerfile(\.\w+)?$/,
|
|
149
|
+
patterns: /(ARG UNDERPOST_VERSION=)\d+\.\d+\.\d+/g,
|
|
150
|
+
recursive: true,
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
// ── Runtime compose.env shipped tag defaults ──
|
|
154
|
+
{
|
|
155
|
+
dir: 'src/runtime',
|
|
156
|
+
match: /^compose\.env$/,
|
|
157
|
+
patterns: /(_TAG=v)\d+\.\d+\.\d+/g,
|
|
158
|
+
recursive: true,
|
|
159
|
+
},
|
|
160
|
+
|
|
161
|
+
// ── Deploy-monitor smoke-test image default (scripts/test-monitor.sh). ──
|
|
162
|
+
{
|
|
163
|
+
file: 'scripts/test-monitor.sh',
|
|
164
|
+
patterns: /(underpost\/[a-z0-9-]+:v)\d+\.\d+\.\d+/g,
|
|
165
|
+
},
|
|
166
|
+
|
|
123
167
|
// ── engine-private confs (gitignored — bumped only if present). ──
|
|
124
168
|
{
|
|
125
169
|
dir: 'engine-private/conf',
|
|
@@ -448,11 +492,10 @@ class UnderpostRelease {
|
|
|
448
492
|
let commitMsg = message;
|
|
449
493
|
if (!commitMsg) {
|
|
450
494
|
shellCd('/home/dd/engine');
|
|
451
|
-
|
|
495
|
+
commitMsg = shellExec(`node bin cmt --changelog-msg --changelog-no-hash`, {
|
|
452
496
|
stdout: true,
|
|
453
497
|
silent: true,
|
|
454
498
|
}).trim();
|
|
455
|
-
commitMsg = Underpost.repo.sanitizeChangelogMessage(rawMsg);
|
|
456
499
|
shellCd('/home/dd');
|
|
457
500
|
}
|
|
458
501
|
commitMsg = (commitMsg || '').trim() || `Update ${repoName} repository`;
|
|
@@ -492,11 +535,10 @@ class UnderpostRelease {
|
|
|
492
535
|
let commitMsg = message;
|
|
493
536
|
if (!commitMsg) {
|
|
494
537
|
shellCd('/home/dd/engine');
|
|
495
|
-
|
|
538
|
+
commitMsg = shellExec(`node bin cmt --changelog-msg --changelog-no-hash`, {
|
|
496
539
|
stdout: true,
|
|
497
540
|
silent: true,
|
|
498
541
|
}).trim();
|
|
499
|
-
commitMsg = Underpost.repo.sanitizeChangelogMessage(rawMsg);
|
|
500
542
|
}
|
|
501
543
|
commitMsg = (commitMsg || '').trim() || `Update pwa-microservices-template repository`;
|
|
502
544
|
shellCd('/home/dd');
|