underpost 2.95.3 → 2.96.0

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.
Files changed (43) hide show
  1. package/README.md +2 -2
  2. package/baremetal/commission-workflows.json +44 -0
  3. package/baremetal/packer-workflows.json +13 -0
  4. package/bin/deploy.js +6 -26
  5. package/cli.md +40 -43
  6. package/conf.js +4 -1
  7. package/examples/{QUICK-REFERENCE.md → static-page/QUICK-REFERENCE.md} +0 -18
  8. package/examples/{README.md → static-page/README.md} +3 -44
  9. package/examples/{STATIC-GENERATOR-GUIDE.md → static-page/STATIC-GENERATOR-GUIDE.md} +0 -50
  10. package/examples/{ssr-components → static-page/ssr-components}/CustomPage.js +0 -13
  11. package/examples/{static-config-simple.json → static-page/static-config-example.json} +1 -1
  12. package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
  13. package/manifests/deployment/dd-test-development/deployment.yaml +2 -2
  14. package/package.json +1 -1
  15. package/packer/images/Rocky9Amd64/Makefile +62 -0
  16. package/packer/images/Rocky9Amd64/QUICKSTART.md +113 -0
  17. package/packer/images/Rocky9Amd64/README.md +122 -0
  18. package/packer/images/Rocky9Amd64/http/rocky9.ks.pkrtpl.hcl +114 -0
  19. package/packer/images/Rocky9Amd64/rocky9.pkr.hcl +160 -0
  20. package/packer/scripts/fuse-nbd +64 -0
  21. package/packer/scripts/fuse-tar-root +63 -0
  22. package/scripts/maas-setup.sh +13 -2
  23. package/scripts/maas-upload-boot-resource.sh +183 -0
  24. package/scripts/packer-init-vars-file.sh +30 -0
  25. package/scripts/packer-setup.sh +52 -0
  26. package/src/cli/baremetal.js +262 -65
  27. package/src/cli/cloud-init.js +11 -5
  28. package/src/cli/cron.js +161 -29
  29. package/src/cli/db.js +59 -92
  30. package/src/cli/env.js +24 -3
  31. package/src/cli/index.js +18 -58
  32. package/src/cli/repository.js +178 -0
  33. package/src/cli/run.js +2 -3
  34. package/src/cli/static.js +99 -194
  35. package/src/client/services/default/default.management.js +7 -0
  36. package/src/index.js +1 -1
  37. package/src/server/backup.js +4 -53
  38. package/src/server/conf.js +3 -4
  39. package/examples/static-config-example.json +0 -183
  40. package/src/client/ssr/pages/404.js +0 -12
  41. package/src/client/ssr/pages/500.js +0 -12
  42. package/src/client/ssr/pages/maintenance.js +0 -14
  43. package/src/client/ssr/pages/offline.js +0 -21
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.95.3)](https://socket.dev/npm/package/underpost/overview/2.95.3) [![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.96.0)](https://socket.dev/npm/package/underpost/overview/2.96.0) [![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.95.3
69
+ ## underpost ci/cd cli v2.96.0
70
70
 
71
71
  ### Usage: `underpost [options] [command]`
72
72
  ```
@@ -0,0 +1,44 @@
1
+ {
2
+ "rpi4mb": {
3
+ "menuentryStr": "UNDERPOST.NET UEFI/GRUB/MAAS RPi4 commissioning (ARM64)",
4
+ "systemProvisioning": "ubuntu",
5
+ "kernelLibVersion": "6.8.0-41-generic",
6
+ "networkInterfaceName": "enabcm6e4ei0",
7
+ "netmask": "255.255.255.0",
8
+ "firmwares": [
9
+ {
10
+ "url": "https://github.com/pftf/RPi4/releases/download/v1.41/RPi4_UEFI_Firmware_v1.41.zip",
11
+ "gateway": "192.168.1.1",
12
+ "subnet": "255.255.255.0"
13
+ }
14
+ ],
15
+ "chronyc": {
16
+ "timezone": "America/New_York",
17
+ "chronyConfPath": "/etc/chrony/chrony.conf"
18
+ },
19
+ "debootstrap": {
20
+ "image": {
21
+ "architecture": "arm64",
22
+ "name": "noble"
23
+ }
24
+ },
25
+ "maas": {
26
+ "image": {
27
+ "architecture": "arm64/ga-24.04",
28
+ "name": "ubuntu/noble"
29
+ }
30
+ },
31
+ "nfs": {
32
+ "mounts": {
33
+ "bind": [
34
+ "/proc",
35
+ "/sys",
36
+ "/run"
37
+ ],
38
+ "rbind": [
39
+ "/dev"
40
+ ]
41
+ }
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "Rocky9Amd64": {
3
+ "dir": "packer/images/Rocky9Amd64",
4
+ "maas": {
5
+ "name": "custom/rocky9",
6
+ "title": "Rocky 9 Custom",
7
+ "architecture": "amd64/generic",
8
+ "base_image": "rhel/9",
9
+ "filetype": "tgz",
10
+ "content": "rocky9.tar.gz"
11
+ }
12
+ }
13
+ }
package/bin/deploy.js CHANGED
@@ -27,6 +27,7 @@ import { buildClient } from '../src/server/client-build.js';
27
27
  import colors from 'colors';
28
28
  import { program } from '../src/cli/index.js';
29
29
  import { timer } from '../src/client/components/core/CommonJs.js';
30
+ import Underpost from '../src/index.js';
30
31
 
31
32
  colors.enable();
32
33
 
@@ -364,23 +365,10 @@ try {
364
365
  break;
365
366
  }
366
367
 
367
- case 'clean-core-repo': {
368
- shellCd(`/home/dd/engine`);
369
- shellExec(`git reset`);
370
- shellExec(`git checkout .`);
371
- shellExec(`git clean -f -d`);
372
- shellCd(`/home/dd/engine/engine-private`);
373
- shellExec(`git reset`);
374
- shellExec(`git checkout .`);
375
- shellExec(`git clean -f -d`);
376
- shellCd(`/home/dd/engine`);
377
- break;
378
- }
379
-
380
368
  case 'version-build': {
381
369
  dotenv.config({ path: `./engine-private/conf/dd-cron/.env.production`, override: true });
382
370
  shellCd(`/home/dd/engine`);
383
- shellExec(`node bin/deploy clean-core-repo`);
371
+ Underpost.repo.clean({ paths: ['/home/dd/engine', '/home/dd/engine/engine-private '] });
384
372
  shellExec(`node bin pull . ${process.env.GITHUB_USERNAME}/engine`);
385
373
  shellExec(`node bin run kill 4001`);
386
374
  shellExec(`node bin run kill 4002`);
@@ -399,7 +387,7 @@ try {
399
387
  break;
400
388
  }
401
389
  shellCd(`/home/dd/engine`);
402
- shellExec(`node bin/deploy clean-core-repo`);
390
+ Underpost.repo.clean({ paths: ['/home/dd/engine', '/home/dd/engine/engine-private '] });
403
391
  const originPackageJson = JSON.parse(fs.readFileSync(`package.json`, 'utf8'));
404
392
  const newVersion = process.argv[3] ?? originPackageJson.version;
405
393
  const node = process.argv[4] ?? 'kind-control-plane';
@@ -483,14 +471,6 @@ try {
483
471
  break;
484
472
  }
485
473
 
486
- case 'private': {
487
- shellExec(`node bin/deploy sync-deploy-envs`);
488
- shellExec(`node bin/build dd conf`);
489
- shellExec(`cd ./engine-private && git add . && node ../bin cmt . build`);
490
- shellExec(`cd ./engine-private && node ../bin push . ${process.env.GITHUB_USERNAME}/engine-private`);
491
- break;
492
- }
493
-
494
474
  case 'version-deploy': {
495
475
  dotenv.config({ path: `./engine-private/conf/dd-cron/.env.production`, override: true });
496
476
  shellExec(
@@ -1046,15 +1026,15 @@ nvidia/gpu-operator \
1046
1026
  case 'update-static-guide': {
1047
1027
  fs.writeFileSync(
1048
1028
  `src/client/public/nexodev/docs/references/Static Site Generator Quick Reference.md`,
1049
- fs.readFileSync(`examples/QUICK-REFERENCE.md`, 'utf8'),
1029
+ fs.readFileSync(`examples/static-page/QUICK-REFERENCE.md`, 'utf8'),
1050
1030
  );
1051
1031
  fs.writeFileSync(
1052
1032
  `src/client/public/nexodev/docs/references/Static Site Generator Examples.md`,
1053
- fs.readFileSync(`examples/README.md`, 'utf8'),
1033
+ fs.readFileSync(`examples/static-page/README.md`, 'utf8'),
1054
1034
  );
1055
1035
  fs.writeFileSync(
1056
1036
  `src/client/public/nexodev/docs/references/Static Generator Guide.md`,
1057
- fs.readFileSync(`examples/STATIC-GENERATOR-GUIDE.md`, 'utf8'),
1037
+ fs.readFileSync(`examples/static-page/STATIC-GENERATOR-GUIDE.md`, 'utf8'),
1058
1038
  );
1059
1039
  break;
1060
1040
  }
package/cli.md CHANGED
@@ -1,4 +1,4 @@
1
- ## underpost ci/cd cli v2.95.3
1
+ ## underpost ci/cd cli v2.96.0
2
2
 
3
3
  ### Usage: `underpost [options] [command]`
4
4
  ```
@@ -268,14 +268,16 @@ Options:
268
268
  Manages Underpost configurations using various operators.
269
269
 
270
270
  Arguments:
271
- operator The configuration operation to perform. Options: set, delete,
272
- get, list, clean.
273
- key Optional: The specific configuration key to manage.
274
- value Optional: The value to set for the configuration key.
271
+ operator The configuration operation to perform. Options: set,
272
+ delete, get, list, clean.
273
+ key Optional: The specific configuration key to manage.
274
+ value Optional: The value to set for the configuration key.
275
275
 
276
276
  Options:
277
- --plain Prints the configuration value in plain text.
278
- -h, --help display help for command
277
+ --plain Prints the configuration value in plain text.
278
+ --filter <keyword> Filters the list by matching key or value (only for list
279
+ operation).
280
+ -h, --help display help for command
279
281
 
280
282
  ```
281
283
 
@@ -563,8 +565,6 @@ Options:
563
565
  --import Imports container backups from specified repositories.
564
566
  --export Exports container backups to specified repositories.
565
567
  --pod-name <pod-name> Comma-separated list of pod names or patterns (supports wildcards like "mariadb-*").
566
- --node-name <node-name> Comma-separated list of node names to filter pods by their node placement.
567
- --label-selector <selector> Kubernetes label selector for filtering pods (e.g., "app=mariadb").
568
568
  --all-pods Target all matching pods instead of just the first one.
569
569
  --primary-pod Automatically detect and use MongoDB primary pod (MongoDB only).
570
570
  --stats Display database statistics (collection/table names with document/row counts).
@@ -640,16 +640,20 @@ Manages cron jobs, including initialization, execution, and configuration
640
640
  updates.
641
641
 
642
642
  Arguments:
643
- deploy-list A comma-separated list of deployment IDs (e.g.,
644
- "default-a,default-b").
645
- job-list A comma-separated list of job IDs. Options: callback,
646
- getRelatedDeployId. Defaults to all available jobs.
643
+ deploy-list A comma-separated list of deployment IDs (e.g.,
644
+ "default-a,default-b").
645
+ job-list A comma-separated list of job IDs. Options:
646
+ callback, initCronJobs, updatePackageScripts,
647
+ getRelatedDeployIdList. Defaults to all available
648
+ jobs.
647
649
 
648
650
  Options:
649
- --itc Executes cron jobs within the container execution context.
650
- --init Initializes cron jobs for the default deployment ID.
651
- --git Uploads cron job configurations to GitHub.
652
- -h, --help display help for command
651
+ --init-pm2-cronjobs Initializes PM2 cron jobs from configuration for
652
+ the specified deployment IDs.
653
+ --git Uploads cron job configurations to GitHub.
654
+ --update-package-scripts Updates package.json start scripts for each
655
+ deploy-id configuration.
656
+ -h, --help display help for command
653
657
 
654
658
  ```
655
659
 
@@ -896,32 +900,25 @@ Manages baremetal server operations, including installation, database setup,
896
900
  commissioning, and user management.
897
901
 
898
902
  Options:
899
- --control-server-install Installs the baremetal control server.
900
- --control-server-uninstall Uninstalls the baremetal control server.
901
- --control-server-db-install Installs up the database for the baremetal
902
- control server.
903
- --control-server-db-uninstall Uninstalls the database for the baremetal
904
- control server.
905
- --commission Init workflow for commissioning a physical
906
- machine.
907
- --nfs-build Builds an NFS root filesystem for a workflow
908
- id config architecture using QEMU emulation.
909
- --nfs-mount Mounts the NFS root filesystem for a workflow
910
- id config architecture.
911
- --nfs-unmount Unmounts the NFS root filesystem for a
912
- workflow id config architecture.
913
- --nfs-sh Copies QEMU emulation root entrypoint shell
914
- command to the clipboard.
915
- --cloud-init-update Updates cloud init for a workflow id config
916
- architecture.
917
- --cloud-init-reset Resets cloud init for a workflow id config
918
- architecture.
919
- --logs <log-id> Displays logs for log id: dhcp, cloud,
920
- machine, cloud-config.
921
- --dev Sets the development context environment for
922
- baremetal operations.
923
- --ls Lists available boot resources and machines.
924
- -h, --help display help for command
903
+ --control-server-install Installs the baremetal control server.
904
+ --control-server-uninstall Uninstalls the baremetal control server.
905
+ --control-server-db-install Installs up the database for the baremetal control server.
906
+ --control-server-db-uninstall Uninstalls the database for the baremetal control server.
907
+ --install-packer Installs Packer CLI.
908
+ --packer-maas-image-template <template-path> Creates a new image folder from canonical/packer-maas template path (requires workflow-id).
909
+ --packer-workflow-id <workflow-id> Specifies the workflow ID for Packer MAAS image operations.
910
+ --packer-maas-image-build Builds a MAAS image using Packer for the workflow specified by --packer-workflow-id.
911
+ --packer-maas-image-upload Uploads an existing MAAS image artifact without rebuilding for the workflow specified by --packer-workflow-id.
912
+ --commission Init workflow for commissioning a physical machine.
913
+ --nfs-build Builds an NFS root filesystem for a workflow id config architecture using QEMU emulation.
914
+ --nfs-mount Mounts the NFS root filesystem for a workflow id config architecture.
915
+ --nfs-unmount Unmounts the NFS root filesystem for a workflow id config architecture.
916
+ --nfs-sh Copies QEMU emulation root entrypoint shell command to the clipboard.
917
+ --cloud-init-update Updates cloud init for a workflow id config architecture.
918
+ --logs <log-id> Displays logs for log id: dhcp, cloud, machine, cloud-config.
919
+ --dev Sets the development context environment for baremetal operations.
920
+ --ls Lists available boot resources and machines.
921
+ -h, --help display help for command
925
922
 
926
923
  ```
927
924
 
package/conf.js CHANGED
@@ -211,7 +211,10 @@ const DefaultConf = /**/ {
211
211
  },
212
212
  cron: {
213
213
  records: { A: [{ host: 'example.com', dns: 'dondominio', api_key: '???', user: '???' }] },
214
- jobs: { dns: { expression: '* * * * *', enabled: true }, backups: { expression: '0 1 * * *', enabled: true } },
214
+ jobs: {
215
+ dns: { expression: '* * * * *', enabled: true, instances: 1 },
216
+ backups: { expression: '0 1 * * *', enabled: true, instances: 1 },
217
+ },
215
218
  },
216
219
  }; /**/
217
220
 
@@ -479,21 +479,3 @@ underpost static --config-file ./config.json
479
479
  ]
480
480
  }
481
481
  ```
482
-
483
- ## Documentation Links
484
-
485
- - [Complete Guide](./STATIC-GENERATOR-GUIDE.md)
486
- - [Example Config](./static-config-example.json)
487
- - [Custom Component Example](./ssr-components/CustomPage.js)
488
- - [Examples README](./README.md)
489
-
490
- ## Tips
491
-
492
- ✅ Use config files for complex setups
493
- ✅ Minify in production
494
- ✅ Use async/defer for scripts
495
- ✅ Include structured data for SEO
496
- ✅ Test on multiple devices
497
- ✅ Validate your JSON configs
498
- ✅ Use semantic HTML in components
499
- ✅ Include accessibility attributes
@@ -10,7 +10,7 @@ This directory contains comprehensive examples and documentation for the Underpo
10
10
 
11
11
  ### Configuration Examples
12
12
 
13
- - **[static-config-example.json](./static-config-example.json)** - Fully documented configuration file template with all available options
13
+ - **[static-config-example.json](./static-page/static-config-example.json)** - Fully documented configuration file template with all available options
14
14
 
15
15
  ### SSR Component Examples
16
16
 
@@ -68,7 +68,7 @@ underpost static \
68
68
 
69
69
  ```bash
70
70
  underpost static \
71
- --page ./examples/ssr-components/CustomPage.js \
71
+ --page ./examples/static-page/ssr-components/CustomPage.js \
72
72
  --output-path ./dist/landing.html \
73
73
  --title "Welcome to My App" \
74
74
  --description "The best app for your needs" \
@@ -83,7 +83,7 @@ Use the provided `static-config-example.json`:
83
83
 
84
84
  ```bash
85
85
  # Copy the example
86
- cp ./examples/static-config-example.json ./my-config.json
86
+ cp ./examples/static-page/static-config-example.json ./my-config.json
87
87
 
88
88
  # Edit with your settings
89
89
  nano ./my-config.json
@@ -404,44 +404,3 @@ for (const page of pages) {
404
404
  });
405
405
  }
406
406
  ```
407
-
408
- ## Troubleshooting
409
-
410
- ### Component Not Found
411
-
412
- **Error:** `Page component does not exist`
413
-
414
- **Solution:** Verify the path is correct and the file exists
415
-
416
- ### Invalid JSON
417
-
418
- **Error:** `Error loading config file: Unexpected token`
419
-
420
- **Solution:** Validate your JSON using a linter or online validator
421
-
422
- ### Missing Metadata
423
-
424
- **Warning:** No metadata generated
425
-
426
- **Solution:** Ensure metadata object is properly configured in your config
427
-
428
- ## Getting Help
429
-
430
- - Read the [Complete Guide](./STATIC-GENERATOR-GUIDE.md)
431
- - Check the [example config](./static-config-example.json)
432
- - Review the [custom page example](./ssr-components/CustomPage.js)
433
- - Check the main project documentation
434
-
435
- ## Contributing
436
-
437
- To add new examples:
438
-
439
- 1. Create your example file
440
- 2. Add comprehensive comments
441
- 3. Update this README
442
- 4. Test your example thoroughly
443
- 5. Submit a pull request
444
-
445
- ## License
446
-
447
- Part of the Underpost framework. See main project license.
@@ -748,30 +748,6 @@ const config = ConfigLoader.load('./config.json');
748
748
  ConfigLoader.save('./config.json', configObject);
749
749
  ```
750
750
 
751
- ---
752
-
753
- ## Troubleshooting
754
-
755
- ### Common Issues
756
-
757
- **Issue: Component not found**
758
- ```
759
- Error: Page component does not exist: ./src/client/ssr/body/Missing.js
760
- ```
761
- **Solution:** Verify the path to your SSR component file.
762
-
763
- **Issue: Output directory doesn't exist**
764
- ```
765
- Error: Output directory does not exist: ./dist/pages
766
- ```
767
- **Solution:** Create the directory first or use a different output path.
768
-
769
- **Issue: Invalid JSON in config file**
770
- ```
771
- Error: Error loading config file: Unexpected token
772
- ```
773
- **Solution:** Validate your JSON syntax using a linter.
774
-
775
751
  ### Debug Mode
776
752
 
777
753
  Use `--dev` flag for development mode with additional logging:
@@ -779,29 +755,3 @@ Use `--dev` flag for development mode with additional logging:
779
755
  ```bash
780
756
  underpost static --config-file ./config.json --dev
781
757
  ```
782
-
783
- ---
784
-
785
- ## Examples Repository
786
-
787
- See the `examples/` directory for complete working examples:
788
-
789
- - `static-config-example.json` - Comprehensive configuration example
790
- - Additional examples coming soon
791
-
792
- ---
793
-
794
- ## Contributing
795
-
796
- To contribute improvements to the static generator:
797
-
798
- 1. Add new features to `src/cli/static.js`
799
- 2. Update this documentation
800
- 3. Add examples to the `examples/` directory
801
- 4. Include JSDoc comments for all new functions
802
-
803
- ---
804
-
805
- ## License
806
-
807
- This is part of the Underpost framework. See main project license.
@@ -5,19 +5,6 @@
5
5
  * @description
6
6
  * This is an example SSR component demonstrating best practices for creating
7
7
  * custom static pages with the Underpost Static Site Generator.
8
- *
9
- * @example
10
- * // Usage with static generator
11
- * underpost static \
12
- * --page ./examples/ssr-components/CustomPage.js \
13
- * --output-path ./dist/custom.html
14
- *
15
- * @example
16
- * // Usage in configuration file
17
- * {
18
- * "page": "./examples/ssr-components/CustomPage.js",
19
- * "outputPath": "./dist/custom.html"
20
- * }
21
8
  */
22
9
 
23
10
  /**
@@ -1,5 +1,5 @@
1
1
  {
2
- "page": "./examples/ssr-components/CustomPage.js",
2
+ "page": "./examples/static-page/ssr-components/CustomPage.js",
3
3
  "outputPath": "./public/default.net/example.html",
4
4
  "env": "production",
5
5
  "minify": true,
@@ -17,7 +17,7 @@ spec:
17
17
  spec:
18
18
  containers:
19
19
  - name: dd-default-development-blue
20
- image: localhost/rockylinux9-underpost:v2.95.3
20
+ image: localhost/rockylinux9-underpost:v2.96.0
21
21
  # resources:
22
22
  # requests:
23
23
  # memory: "124Ki"
@@ -100,7 +100,7 @@ spec:
100
100
  spec:
101
101
  containers:
102
102
  - name: dd-default-development-green
103
- image: localhost/rockylinux9-underpost:v2.95.3
103
+ image: localhost/rockylinux9-underpost:v2.96.0
104
104
  # resources:
105
105
  # requests:
106
106
  # memory: "124Ki"
@@ -18,7 +18,7 @@ spec:
18
18
  spec:
19
19
  containers:
20
20
  - name: dd-test-development-blue
21
- image: localhost/rockylinux9-underpost:v2.95.3
21
+ image: localhost/rockylinux9-underpost:v2.96.0
22
22
 
23
23
  command:
24
24
  - /bin/sh
@@ -103,7 +103,7 @@ spec:
103
103
  spec:
104
104
  containers:
105
105
  - name: dd-test-development-green
106
- image: localhost/rockylinux9-underpost:v2.95.3
106
+ image: localhost/rockylinux9-underpost:v2.96.0
107
107
 
108
108
  command:
109
109
  - /bin/sh
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "type": "module",
3
3
  "main": "src/index.js",
4
4
  "name": "underpost",
5
- "version": "2.95.3",
5
+ "version": "2.96.0",
6
6
  "description": "pwa api rest template",
7
7
  "scripts": {
8
8
  "start": "env-cmd -f .env.production node --max-old-space-size=8192 src/server",
@@ -0,0 +1,62 @@
1
+ #!/usr/bin/make -f
2
+
3
+ include ../scripts/check.mk
4
+
5
+ PACKER ?= packer
6
+ PACKER_LOG ?= 0
7
+ TIMEOUT ?= 1h
8
+ ARCH ?= x86_64
9
+
10
+ # Detect if running on ARM host
11
+ ifeq ($(shell uname -m),aarch64)
12
+ HOST_IS_ARM = true
13
+ else
14
+ HOST_IS_ARM = false
15
+ endif
16
+
17
+ ifeq ($(wildcard /usr/share/OVMF/OVMF_CODE.fd),)
18
+ OVMF_SFX ?= _4M
19
+ else
20
+ OVMF_SFX ?=
21
+ endif
22
+
23
+ export PACKER_LOG
24
+
25
+ # Fallback
26
+ ifeq ($(strip $(ARCH)),amd64)
27
+ ARCH = x86_64
28
+ endif
29
+
30
+ .PHONY: all clean
31
+
32
+ all: rocky9.tar.gz
33
+
34
+ $(eval $(call check_packages_deps))
35
+
36
+ lint:
37
+ packer validate .
38
+ packer fmt -check -diff .
39
+
40
+ format:
41
+ packer fmt .
42
+
43
+ OVMF_VARS.fd: /usr/share/OVMF/OVMF_VARS${OVMF_SFX}.fd
44
+ cp -v $< ${ARCH}_VARS.fd
45
+
46
+ SIZE_VARS.fd:
47
+ ifeq ($(strip $(ARCH)),aarch64)
48
+ truncate -s 64m ${ARCH}_VARS.fd
49
+ else
50
+ truncate -s 2m ${ARCH}_VARS.fd
51
+ endif
52
+
53
+ rocky9.tar.gz: check-deps clean OVMF_VARS.fd SIZE_VARS.fd
54
+ ${PACKER} init rocky9.pkr.hcl && ${PACKER} build \
55
+ -var architecture=${ARCH} \
56
+ -var host_is_arm=${HOST_IS_ARM} \
57
+ -var timeout=${TIMEOUT} \
58
+ -var ovmf_suffix=${OVMF_SFX} \
59
+ rocky9.pkr.hcl
60
+
61
+ clean:
62
+ ${RM} -rf *.fd output-rocky9 rocky9.tar.gz