underpost 2.99.4 → 2.99.5

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.development CHANGED
@@ -16,9 +16,6 @@ DEFAULT_DEPLOY_PATH=/
16
16
  MARIADB_HOST=changethis
17
17
  MARIADB_USER=changethis
18
18
  MARIADB_PASSWORD=changethis
19
- DD_LAMPP_TEST_DB_0=changethis
20
- WIFI=changethis
21
- ROUTER=changethis
22
19
  CLOUDINARY_CLOUD_NAME=changethis
23
20
  CLOUDINARY_API_KEY=changethis
24
21
  CLOUDINARY_API_SECRET=changethis
package/.env.production CHANGED
@@ -17,9 +17,7 @@ DEFAULT_DEPLOY_PATH=/
17
17
  MARIADB_HOST=changethis
18
18
  MARIADB_USER=changethis
19
19
  MARIADB_PASSWORD=changethis
20
- DD_LAMPP_TEST_DB_0=changethis
21
- WIFI=changethis
22
- ROUTER=changethis
20
+ WIFI_PASSWORD=changethis
23
21
  CLOUDINARY_CLOUD_NAME=changethis
24
22
  CLOUDINARY_API_KEY=changethis
25
23
  CLOUDINARY_API_SECRET=changethis
package/.env.test CHANGED
@@ -16,9 +16,6 @@ DEFAULT_DEPLOY_PATH=/
16
16
  MARIADB_HOST=changethis
17
17
  MARIADB_USER=changethis
18
18
  MARIADB_PASSWORD=changethis
19
- DD_LAMPP_TEST_DB_0=changethis
20
- WIFI=changethis
21
- ROUTER=changethis
22
19
  CLOUDINARY_CLOUD_NAME=changethis
23
20
  CLOUDINARY_API_KEY=changethis
24
21
  CLOUDINARY_API_SECRET=changethis
package/README.md CHANGED
@@ -18,7 +18,7 @@
18
18
 
19
19
  <!-- badges -->
20
20
 
21
- [![Node.js CI](https://github.com/underpostnet/engine/actions/workflows/docker-image.ci.yml/badge.svg?branch=master)](https://github.com/underpostnet/engine/actions/workflows/docker-image.yml) [![Test](https://github.com/underpostnet/engine/actions/workflows/coverall.ci.yml/badge.svg?branch=master)](https://github.com/underpostnet/engine/actions/workflows/coverall.ci.yml) [![Downloads](https://img.shields.io/npm/dm/underpost.svg)](https://www.npmjs.com/package/underpost) [![Socket Badge](https://socket.dev/api/badge/npm/package/underpost/2.99.4)](https://socket.dev/npm/package/underpost/overview/2.99.4) [![Coverage Status](https://coveralls.io/repos/github/underpostnet/engine/badge.svg?branch=master)](https://coveralls.io/github/underpostnet/engine?branch=master) [![Version](https://img.shields.io/npm/v/underpost.svg)](https://www.npmjs.org/package/underpost) [![License](https://img.shields.io/npm/l/underpost.svg)](https://www.npmjs.com/package/underpost)
21
+ [![Node.js CI](https://github.com/underpostnet/engine/actions/workflows/docker-image.ci.yml/badge.svg?branch=master)](https://github.com/underpostnet/engine/actions/workflows/docker-image.yml) [![Test](https://github.com/underpostnet/engine/actions/workflows/coverall.ci.yml/badge.svg?branch=master)](https://github.com/underpostnet/engine/actions/workflows/coverall.ci.yml) [![Downloads](https://img.shields.io/npm/dm/underpost.svg)](https://www.npmjs.com/package/underpost) [![Socket Badge](https://socket.dev/api/badge/npm/package/underpost/2.99.5)](https://socket.dev/npm/package/underpost/overview/2.99.5) [![Coverage Status](https://coveralls.io/repos/github/underpostnet/engine/badge.svg?branch=master)](https://coveralls.io/github/underpostnet/engine?branch=master) [![Version](https://img.shields.io/npm/v/underpost.svg)](https://www.npmjs.org/package/underpost) [![License](https://img.shields.io/npm/l/underpost.svg)](https://www.npmjs.com/package/underpost)
22
22
 
23
23
  <!-- end-badges -->
24
24
 
@@ -66,7 +66,7 @@ Run dev client server
66
66
  npm run dev
67
67
  ```
68
68
  <!-- -->
69
- ## underpost ci/cd cli v2.99.4
69
+ ## underpost ci/cd cli v2.99.5
70
70
 
71
71
  ### Usage: `underpost [options] [command]`
72
72
  ```
@@ -2,6 +2,7 @@
2
2
  "rpi4mbarm64-iso-ram": {
3
3
  "type": "iso-ram",
4
4
  "osIdLike": "debian ubuntu",
5
+ "architecture": "arm64",
5
6
  "isoUrl": "https://cdimage.ubuntu.com/releases/24.04/release/ubuntu-24.04.3-live-server-arm64.iso",
6
7
  "tftpPrefix": "rpi4mb",
7
8
  "bootstrapHttpServerPort": 8888,
@@ -31,6 +32,7 @@
31
32
  "rpi4mbarm64-chroot": {
32
33
  "type": "chroot-debootstrap",
33
34
  "osIdLike": "debian ubuntu",
35
+ "architecture": "arm64",
34
36
  "tftpPrefix": "rpi4mb",
35
37
  "bootstrapHttpServerPort": 8888,
36
38
  "menuentryStr": "UNDERPOST.NET UEFI/GRUB/MAAS RPi4 CHROOT commissioning (ARM64)",
@@ -65,6 +67,7 @@
65
67
  "rpi4mbarm64-iso-nfs": {
66
68
  "type": "iso-nfs",
67
69
  "osIdLike": "debian ubuntu",
70
+ "architecture": "arm64",
68
71
  "isoUrl": "https://cdimage.ubuntu.com/releases/24.04/release/ubuntu-24.04.3-live-server-arm64.iso",
69
72
  "tftpPrefix": "rpi4mb",
70
73
  "bootstrapHttpServerPort": 8888,
@@ -94,6 +97,7 @@
94
97
  "rpi4mbarm64-chroot-rocky9": {
95
98
  "type": "chroot-container",
96
99
  "osIdLike": "rhel centos fedora",
100
+ "architecture": "arm64",
97
101
  "tftpPrefix": "rpi4mb",
98
102
  "bootstrapHttpServerPort": 8888,
99
103
  "menuentryStr": "UNDERPOST.NET Rocky9 Container CHROOT NFS (ARM64)",
@@ -117,5 +121,53 @@
117
121
  "keyboard": {
118
122
  "layout": "es"
119
123
  }
124
+ },
125
+ "hp-envy-iso-nfs": {
126
+ "type": "iso-nfs",
127
+ "osIdLike": "debian ubuntu",
128
+ "architecture": "amd64",
129
+ "isoUrl": "https://releases.ubuntu.com/releases/24.04/ubuntu-24.04.3-live-server-amd64.iso",
130
+ "tftpPrefix": "envy",
131
+ "bootstrapHttpServerPort": 8888,
132
+ "menuentryStr": "UNDERPOST.NET UEFI/ISO-IPXE/MAAS hp-envy ISO-NFS commissioning (AMD64)",
133
+ "networkInterfaceName": "eth0",
134
+ "chronyc": {
135
+ "timezone": "America/Santiago",
136
+ "chronyConfPath": "/etc/chrony/chrony.conf"
137
+ },
138
+ "firmwares": [],
139
+ "maas": {
140
+ "commissioning": {
141
+ "architecture": "amd64/hwe-24.04-edge",
142
+ "name": "ubuntu/noble"
143
+ }
144
+ },
145
+ "keyboard": {
146
+ "layout": "es"
147
+ }
148
+ },
149
+ "hp-envy-iso-ram": {
150
+ "type": "iso-ram",
151
+ "osIdLike": "debian ubuntu",
152
+ "architecture": "amd64",
153
+ "isoUrl": "https://releases.ubuntu.com/releases/24.04/ubuntu-24.04.3-live-server-amd64.iso",
154
+ "tftpPrefix": "envy",
155
+ "bootstrapHttpServerPort": 8888,
156
+ "menuentryStr": "UNDERPOST.NET UEFI/ISO-IPXE/MAAS hp-envy ISO-RAM commissioning (AMD64)",
157
+ "networkInterfaceName": "eth0",
158
+ "chronyc": {
159
+ "timezone": "America/Santiago",
160
+ "chronyConfPath": "/etc/chrony/chrony.conf"
161
+ },
162
+ "firmwares": [],
163
+ "maas": {
164
+ "commissioning": {
165
+ "architecture": "amd64/hwe-24.04-edge",
166
+ "name": "ubuntu/noble"
167
+ }
168
+ },
169
+ "keyboard": {
170
+ "layout": "es"
171
+ }
120
172
  }
121
173
  }
package/bin/deploy.js CHANGED
@@ -468,7 +468,7 @@ try {
468
468
  shellExec(`node bin new --deploy-id dd-default`);
469
469
  console.log(fs.existsSync(`./engine-private/conf/dd-default`));
470
470
  shellExec(`sudo rm -rf ./engine-private/conf/dd-default`);
471
- shellExec(`node bin/deploy build-env`);
471
+ shellExec(`node bin/deploy build-envs`);
472
472
  break;
473
473
  }
474
474
 
@@ -477,7 +477,7 @@ try {
477
477
  shellExec(
478
478
  `underpost secret underpost --create-from-file /home/dd/engine/engine-private/conf/dd-cron/.env.production`,
479
479
  );
480
- shellExec(`node bin/deploy sync-deploy-envs`);
480
+ shellExec(`node bin/deploy sync-envs`);
481
481
  shellExec(`node bin/build dd conf`);
482
482
  shellExec(`git add . && cd ./engine-private && git add .`);
483
483
  shellExec(`node bin cmt . ci package-pwa-microservices-template 'New release v:${process.argv[3]}'`);
@@ -537,45 +537,6 @@ ${shellExec(`git log | grep Author: | sort -u`, { stdout: true }).split(`\n`).jo
537
537
 
538
538
  break;
539
539
  }
540
- case 'build-env': {
541
- const buildEnv = (privateEnvPath, originEnv, env) => {
542
- const privateEnv = dotenv.parse(fs.readFileSync(privateEnvPath, 'utf8'));
543
- for (const key of Object.keys(privateEnv)) {
544
- if (key in env) {
545
- console.warn(`Key ${key} already exists in origin env`);
546
- continue;
547
- }
548
- if (key in originEnv) {
549
- console.warn(`Key ${key} already exists in origin env`);
550
- env[key] = originEnv[key];
551
- continue;
552
- }
553
- env[key] =
554
- `${key}`.toUpperCase().match('API') ||
555
- `${key}`.toUpperCase().match('KEY') ||
556
- `${key}`.toUpperCase().match('SECRET') ||
557
- `${key}`.toUpperCase().match('TOKEN') ||
558
- `${key}`.toUpperCase().match('PASSWORD') ||
559
- `${key}`.toUpperCase().match('MAC')
560
- ? 'changethis'
561
- : isNaN(parseFloat(privateEnv[key]))
562
- ? `${privateEnv[key]}`.match(`@`)
563
- ? 'admin@default.net'
564
- : 'changethis'
565
- : privateEnv[key];
566
- }
567
- return env;
568
- };
569
- for (let envPath of ['.env.development', '.env.production', '.env.test']) {
570
- const originEnv = dotenv.parse(fs.readFileSync(`./${envPath}`, 'utf8'));
571
-
572
- let env = {};
573
- env = buildEnv(`./engine-private/conf/dd-cron/${envPath}`, originEnv, env);
574
- env = buildEnv(`./engine-private/conf/dd-core/${envPath}`, originEnv, env);
575
- writeEnv(envPath, env);
576
- }
577
- break;
578
- }
579
540
 
580
541
  case 'maas-db': {
581
542
  // DROP, ALTER, CREATE, WITH ENCRYPTED
@@ -1121,20 +1082,67 @@ nvidia/gpu-operator \
1121
1082
  break;
1122
1083
  }
1123
1084
 
1124
- case 'sync-deploy-envs': {
1125
- const envObj = dotenv.parse(fs.readFileSync(`./engine-private/conf/dd-cron/.env.production`));
1085
+ case 'build-envs': {
1086
+ const buildEnv = (privateEnvPath, originEnv, env) => {
1087
+ const privateEnv = dotenv.parse(fs.readFileSync(privateEnvPath, 'utf8'));
1088
+ for (const key of Object.keys(privateEnv)) {
1089
+ if (key in env) {
1090
+ console.warn(`Key ${key} already exists in origin env`);
1091
+ continue;
1092
+ }
1093
+ if (key in originEnv) {
1094
+ console.warn(`Key ${key} already exists in origin env`);
1095
+ env[key] = originEnv[key];
1096
+ continue;
1097
+ }
1098
+ env[key] =
1099
+ `${key}`.toUpperCase().match('API') ||
1100
+ `${key}`.toUpperCase().match('KEY') ||
1101
+ `${key}`.toUpperCase().match('SECRET') ||
1102
+ `${key}`.toUpperCase().match('TOKEN') ||
1103
+ `${key}`.toUpperCase().match('PASSWORD') ||
1104
+ `${key}`.toUpperCase().match('MAC')
1105
+ ? 'changethis'
1106
+ : isNaN(parseFloat(privateEnv[key]))
1107
+ ? `${privateEnv[key]}`.match(`@`)
1108
+ ? 'admin@default.net'
1109
+ : 'changethis'
1110
+ : privateEnv[key];
1111
+ }
1112
+ return env;
1113
+ };
1114
+ for (let envPath of ['.env.development', '.env.production', '.env.test']) {
1115
+ const originEnv = dotenv.parse(fs.readFileSync(`./${envPath}`, 'utf8'));
1116
+
1117
+ let env = {};
1118
+ env = buildEnv(`./engine-private/conf/dd-cron/${envPath}`, originEnv, env);
1119
+ env = buildEnv(`./engine-private/conf/dd-core/${envPath}`, originEnv, env);
1120
+ writeEnv(envPath, env);
1121
+ }
1122
+ break;
1123
+ }
1124
+
1125
+ case 'sync-envs': {
1126
1126
  for (const deployId of ['dd-cron'].concat(
1127
1127
  fs.readFileSync(`./engine-private/deploy/dd.router`, 'utf8').split(','),
1128
1128
  )) {
1129
1129
  for (const env of ['production', 'development', 'test']) {
1130
1130
  const _envObj = dotenv.parse(fs.readFileSync(`./engine-private/conf/${deployId}/.env.${env}`, 'utf8'));
1131
- _envObj.GITHUB_TOKEN = envObj.GITHUB_TOKEN;
1131
+ for (const env of []) {
1132
+ delete _envObj[env];
1133
+ }
1132
1134
  writeEnv(`./engine-private/conf/${deployId}/.env.${env}`, _envObj);
1133
1135
  }
1134
1136
  }
1135
1137
  break;
1136
1138
  }
1137
1139
 
1140
+ case 'envs': {
1141
+ shellExec(`node bin/deploy sync-envs`);
1142
+ shellExec(`node bin/deploy build-envs`);
1143
+ break;
1144
+ }
1145
+
1138
1146
  case 'cyberia': {
1139
1147
  const { CyberiaDependencies } = await import(`../src/client/components/cyberia-portal/CommonCyberiaPortal.js`);
1140
1148
  for (const dep of Object.keys(CyberiaDependencies)) {
@@ -1148,7 +1156,7 @@ nvidia/gpu-operator \
1148
1156
  const help = `node bin/deploy pw <script-path> <from-path-in-pod> [to-path-on-local]`;
1149
1157
  const scriptPath = process.argv[3];
1150
1158
  const fromPath = process.argv[4];
1151
- const toPath = process.argv[5] ? process.argv[5] : fromPath ? `./${fromPath.split('/').pop()}` : '';
1159
+ const toPath = process.argv[5] ? process.argv[5] : fromPath ? `/tmp/${fromPath.split('/').pop()}` : '';
1152
1160
  if (scriptPath === 'help') {
1153
1161
  logger.info(help);
1154
1162
  break;
package/cli.md CHANGED
@@ -1,4 +1,4 @@
1
- ## underpost ci/cd cli v2.99.4
1
+ ## underpost ci/cd cli v2.99.5
2
2
 
3
3
  ### Usage: `underpost [options] [command]`
4
4
  ```
@@ -243,12 +243,6 @@ Options:
243
243
  --manifest <path> Web manifest path.
244
244
  --head-components <paths> Comma-separated SSR head component paths.
245
245
  --body-components <paths> Comma-separated SSR body component paths.
246
- --deploy-id <deploy-id> Build static assets for a specific deployment
247
- ID.
248
- --build Triggers the static build process for the
249
- specified deployment ID.
250
- --build-host <build-host> Sets a custom build host for static documents or
251
- assets.
252
246
  --build-path <build-path> Sets a custom build path for static documents or
253
247
  assets.
254
248
  --env <env> Sets the environment for the static build (e.g.,
@@ -286,6 +280,8 @@ Options:
286
280
  --deploy-id <deploy-id> Sets the deployment configuration ID for the
287
281
  operation context.
288
282
  --build Sets the build context for the operation.
283
+ --copy Copies the configuration value to the clipboard
284
+ (only for get operation).
289
285
  -h, --help display help for command
290
286
 
291
287
  ```
@@ -495,7 +491,7 @@ Manages secrets for various platforms.
495
491
 
496
492
  Arguments:
497
493
  platform The secret management platform. Options:
498
- docker, underpost.
494
+ underpost.
499
495
 
500
496
  Options:
501
497
  --init Initializes the secrets platform
@@ -546,10 +542,6 @@ Options:
546
542
  management.
547
543
  --node-name Set node name for kubeadm or k3s cluster
548
544
  env image context management.
549
- --secrets Includes Dockerfile environment secrets
550
- during the build.
551
- --secrets-path [secrets-path] Specifies a custom path for Dockerfile
552
- environment secrets.
553
545
  --reset Performs a build without using the
554
546
  cache.
555
547
  --dev Use development mode.
@@ -800,7 +792,7 @@ Options:
800
792
  Runs specified scripts using various runners.
801
793
 
802
794
  Arguments:
803
- runner-id The runner ID to run. Options: dev-cluster,metadata,svc-ls,svc-rm,ssh-deploy-info,dev-hosts-expose,dev-hosts-restore,cluster-build,template-deploy,template-deploy-image,clean,pull,release-deploy,ssh-deploy,ide,crypto-policy,sync,stop,ssh-deploy-stop,ssh-deploy-db-rollback,ssh-deploy-db,ssh-deploy-db-status,tz,cron,get-proxy,instance-promote,instance,ls-deployments,host-update,dd-container,ip-info,db-client,git-conf,promote,metrics,cluster,deploy,disk-clean,disk-usage,dev,service,etc-hosts,sh,log,ps,ptls,release-cmt,deploy-test,sync-replica,tf-vae-test,spark-template,rmi,kill,secret,underpost-config,gpu-env,tf-gpu-test,deploy-job.
795
+ runner-id The runner ID to run. Options: dev-cluster,metadata,svc-ls,svc-rm,ssh-deploy-info,dev-hosts-expose,dev-hosts-restore,cluster-build,template-deploy,template-deploy-image,clean,pull,release-deploy,ssh-deploy,ide,crypto-policy,sync,stop,ssh-deploy-stop,ssh-deploy-db-rollback,ssh-deploy-db,ssh-deploy-db-status,tz,cron,get-proxy,instance-promote,instance,ls-deployments,host-update,dd-container,ip-info,db-client,git-conf,promote,metrics,cluster,deploy,disk-clean,disk-devices,disk-usage,dev,service,etc-hosts,sh,log,ps,ptls,release-cmt,deploy-test,sync-replica,tf-vae-test,spark-template,rmi,kill,secret,underpost-config,gpu-env,tf-gpu-test,deploy-job.
804
796
  path The input value, identifier, or path for the operation.
805
797
 
806
798
  Options:
@@ -941,6 +933,7 @@ Options:
941
933
  --mac <mac> Specifies the MAC address for baremetal machine operations. Use "random" for random MAC, "hardware" to use device's actual MAC (no spoofing), or specify a MAC address.
942
934
  --ipxe Chainloads iPXE to normalize identity before commissioning.
943
935
  --ipxe-rebuild Forces rebuild of iPXE binary with embedded boot script.
936
+ --ipxe-build-iso <iso-path> Builds a standalone iPXE ISO with embedded script for the specified workflow ID.
944
937
  --install-packer Installs Packer CLI.
945
938
  --packer-maas-image-template <template-path> Creates a new image folder from canonical/packer-maas template path (requires workflow-id).
946
939
  --packer-workflow-id <workflow-id> Specifies the workflow ID for Packer MAAS image operations.
@@ -966,7 +959,7 @@ Options:
966
959
  --rocky-tools-test Tests rocky linux tools in chroot environment.
967
960
  --bootcmd <bootcmd-list> Comma-separated list of boot commands to execute.
968
961
  --runcmd <runcmd-list> Comma-separated list of run commands to execute.
969
- --logs <log-id> Displays logs for log id: dhcp, cloud, machine, cloud-config.
962
+ --logs <log-id> Displays logs for log id: dhcp,dhcp-lease,dhcp-lan,cloud-init,cloud-init-machine,cloud-init-config
970
963
  --dev Sets the development context environment for baremetal operations.
971
964
  --ls Lists available boot resources and machines.
972
965
  -h, --help display help for command