underpost 2.8.82 → 2.8.84

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.
@@ -58,8 +58,8 @@ jobs:
58
58
  - name: Set git global credentials
59
59
  run: |
60
60
  git config --global credential.helper ""
61
- git config --global user.name 'underpost.net'
62
- git config --global user.email 'admin@underpost.net'
61
+ git config --global user.name 'underpostnet'
62
+ git config --global user.email 'fcoverdugoa@underpost.net'
63
63
 
64
64
  - name: Clone and Push to github package repository
65
65
  run: |
@@ -70,8 +70,8 @@ jobs:
70
70
  git config --global --add safe.directory /__w/pwa-microservices-template/pwa-microservices-template
71
71
  git remote set-url origin git@github.com:underpostnet/pwa-microservices-template-ghpkg.git
72
72
  git init
73
- git config user.name 'underpost.net'
74
- git config user.email 'admin@underpost.net'
73
+ git config user.name 'underpostnet'
74
+ git config user.email 'fcoverdugoa@underpost.net'
75
75
  git add .
76
76
  git status
77
77
  underpost cmt . ci package-pwa-microservices-template-ghpkg 'Update github repo package'
@@ -41,8 +41,8 @@ jobs:
41
41
  - name: Set git global credentials
42
42
  run: |
43
43
  git config --global credential.helper ""
44
- git config --global user.name 'underpost.net'
45
- git config --global user.email 'admin@underpost.net'
44
+ git config --global user.name 'underpostnet'
45
+ git config --global user.email 'fcoverdugoa@underpost.net'
46
46
 
47
47
  - name: Clone github package repository
48
48
  run: |
@@ -52,8 +52,8 @@ jobs:
52
52
  cd ../pwa-microservices-template
53
53
  git remote set-url origin git@github.com:underpostnet/pwa-microservices-template.git
54
54
  git add .
55
- git config user.name 'underpost.net'
56
- git config user.email 'admin@underpost.net'
55
+ git config user.name 'underpostnet'
56
+ git config user.email 'fcoverdugoa@underpost.net'
57
57
  underpost cmt . ci package-pwa-microservices-template-ghpkg 'Update npm repo package'
58
58
  underpost push . underpostnet/pwa-microservices-template
59
59
  # cd ../engine
@@ -6,7 +6,6 @@
6
6
  "eamodio.gitlens",
7
7
  "esbenp.prettier-vscode",
8
8
  "formulahendry.code-runner",
9
- "foxundermoon.shell-format",
10
9
  "github.codespaces",
11
10
  "github.vscode-github-actions",
12
11
  "golang.go",
@@ -31,6 +30,7 @@
31
30
  "scala-lang.scala",
32
31
  "scala-lang.scala-snippets",
33
32
  "scalameta.metals",
33
+ "shakram02.bash-beautify",
34
34
  "shardulm94.trailing-spaces",
35
35
  "streetsidesoftware.code-spell-checker",
36
36
  "tamasfe.even-better-toml",
@@ -81,50 +81,7 @@
81
81
  "[xml]": {
82
82
  "editor.defaultFormatter": "redhat.vscode-xml"
83
83
  },
84
- "docwriter.style": "Auto-detect",
85
- "docwriter.progress.trackFunctions": false,
86
- "docwriter.progress.trackMethods": false,
87
- "files.exclude": {
88
- "**/.git": true, // this is a default value
89
- "**/.DS_Store": true, // this is a default value
90
84
 
91
- "**/node_modules": true, // this excludes all folders
92
- // named "node_modules" from
93
- // the explore tree
94
-
95
- // alternative version
96
- "node_modules": true, // this excludes the folder
97
- // only from the root of
98
- // your workspace
99
- "public": true,
100
- "engine-private": true,
101
- "conf": true,
102
- "tmp": true,
103
- "bkt": true,
104
- "logs": true,
105
- "build": true,
106
- "coverage": true,
107
- "prometheus_data": true,
108
- "grafana_data": true,
109
- ".nyc_output": true
110
- },
111
- "[solidity]": {
112
- "editor.defaultFormatter": "JuanBlanco.solidity"
113
- },
114
- "[dockerfile]": {
115
- "editor.defaultFormatter": "foxundermoon.shell-format"
116
- },
117
- "[ignore]": {
118
- "editor.defaultFormatter": "foxundermoon.shell-format"
119
- },
120
- "docwriter.progress.trackTypes": true,
121
- "docwriter.hotkey.mac": "⌘ + .",
122
- "[dotenv]": {
123
- "editor.defaultFormatter": "foxundermoon.shell-format"
124
- },
125
- "[shellscript]": {
126
- "editor.defaultFormatter": "foxundermoon.shell-format"
127
- },
128
85
  "files.watcherExclude": {
129
86
  "**/target": true
130
87
  }
package/README.md CHANGED
@@ -22,7 +22,23 @@ template
22
22
 
23
23
  <div align="center">
24
24
 
25
- [![Node.js CI](https://github.com/underpostnet/engine/actions/workflows/docker-image.yml/badge.svg?branch=master)](https://github.com/underpostnet/engine/actions/workflows/docker-image.yml) [![Test](https://github.com/underpostnet/engine/actions/workflows/coverall.yml/badge.svg?branch=master)](https://github.com/underpostnet/engine/actions/workflows/coverall.yml) [![Downloads](https://img.shields.io/npm/dm/underpost.svg)](https://www.npmjs.com/package/underpost) [![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)
25
+
26
+
27
+
28
+
29
+
30
+ <!-- badges -->
31
+
32
+
33
+ [![Node.js CI](https://github.com/underpostnet/engine/actions/workflows/docker-image.yml/badge.svg?branch=master)](https://github.com/underpostnet/engine/actions/workflows/docker-image.yml) [![Test](https://github.com/underpostnet/engine/actions/workflows/coverall.yml/badge.svg?branch=master)](https://github.com/underpostnet/engine/actions/workflows/coverall.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.8.84)](https://socket.dev/npm/package/underpost/overview/2.8.84) [![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)
34
+
35
+
36
+ <!-- end-badges -->
37
+
38
+
39
+
40
+
41
+
26
42
 
27
43
  </div>
28
44
 
@@ -68,7 +84,7 @@ Run dev client server
68
84
  npm run dev
69
85
  ```
70
86
  <!-- -->
71
- ## underpost ci/cd cli v2.8.82
87
+ ## underpost ci/cd cli v2.8.84
72
88
 
73
89
  ### Usage: `underpost [options] [command]`
74
90
  ```
@@ -98,6 +114,7 @@ Commands:
98
114
  fs [options] [path] Manages file storage, defaulting to file upload operations.
99
115
  test [options] [deploy-list] Manages and runs tests, defaulting to the current Underpost default test suite.
100
116
  monitor [options] <deploy-id> [env] Manages health server monitoring for specified deployments.
117
+ run [options] <runner-id> [path] Runs a script from the specified path.
101
118
  lxd [options] Manages LXD containers and virtual machines.
102
119
  baremetal [options] [workflow-id] [hostname] [ip-address] Manages baremetal server operations, including installation, database setup, commissioning, and user management.
103
120
  help [command] display help for command
package/bin/deploy.js CHANGED
@@ -744,7 +744,7 @@ try {
744
744
  fs.readFileSync(`./src/index.js`, 'utf8').replaceAll(`${version}`, `${newVersion}`),
745
745
  'utf8',
746
746
  );
747
- shellExec(`node bin/deploy cli-docs`);
747
+ shellExec(`node bin/deploy cli-docs ${version} ${newVersion}`);
748
748
  shellExec(`node bin/deploy update-dependencies`);
749
749
  shellExec(`auto-changelog`);
750
750
  shellExec(`node bin/build dd`);
@@ -1014,6 +1014,29 @@ EOF`);
1014
1014
  break;
1015
1015
  }
1016
1016
 
1017
+ case 'maas-db': {
1018
+ // DROP, ALTER, CREATE, WITH ENCRYPTED
1019
+ // sudo -u <user> -h <host> psql <db-name>
1020
+ shellExec(`DB_PG_MAAS_NAME=${process.env.DB_PG_MAAS_NAME}`);
1021
+ shellExec(`DB_PG_MAAS_PASS=${process.env.DB_PG_MAAS_PASS}`);
1022
+ shellExec(`DB_PG_MAAS_USER=${process.env.DB_PG_MAAS_USER}`);
1023
+ shellExec(`DB_PG_MAAS_HOST=${process.env.DB_PG_MAAS_HOST}`);
1024
+ shellExec(
1025
+ `sudo -i -u postgres psql -c "CREATE USER \"$DB_PG_MAAS_USER\" WITH ENCRYPTED PASSWORD '$DB_PG_MAAS_PASS'"`,
1026
+ );
1027
+ shellExec(
1028
+ `sudo -i -u postgres psql -c "ALTER USER \"$DB_PG_MAAS_USER\" WITH ENCRYPTED PASSWORD '$DB_PG_MAAS_PASS'"`,
1029
+ );
1030
+ const actions = ['LOGIN', 'SUPERUSER', 'INHERIT', 'CREATEDB', 'CREATEROLE', 'REPLICATION'];
1031
+ shellExec(`sudo -i -u postgres psql -c "ALTER USER \"$DB_PG_MAAS_USER\" WITH ${actions.join(' ')}"`);
1032
+ shellExec(`sudo -i -u postgres psql -c "\\du"`);
1033
+
1034
+ shellExec(`sudo -i -u postgres createdb -O "$DB_PG_MAAS_USER" "$DB_PG_MAAS_NAME"`);
1035
+
1036
+ shellExec(`sudo -i -u postgres psql -c "\\l"`);
1037
+ break;
1038
+ }
1039
+
1017
1040
  case 'valkey': {
1018
1041
  if (!process.argv.includes('server')) {
1019
1042
  if (process.argv.includes('rocky')) {
@@ -1083,7 +1106,7 @@ EOF`);
1083
1106
  }
1084
1107
 
1085
1108
  case 'cli-docs': {
1086
- buildCliDoc(program);
1109
+ buildCliDoc(program, process.argv[3], process.argv[4]);
1087
1110
  break;
1088
1111
  }
1089
1112
 
@@ -1692,14 +1715,6 @@ nvidia/gpu-operator \
1692
1715
  // sudo yum install sbt
1693
1716
  break;
1694
1717
  }
1695
-
1696
- case 'chrony': {
1697
- shellExec(`sudo dnf install chrony -y`);
1698
- // debian chroot: sudo apt install chrony
1699
- for (const cmd of chronySetUp(`/etc/chrony.conf`)) shellExec(cmd);
1700
-
1701
- break;
1702
- }
1703
1718
  }
1704
1719
  } catch (error) {
1705
1720
  logger.error(error, error.stack);
package/bin/file.js CHANGED
@@ -136,10 +136,27 @@ try {
136
136
  JSON.stringify(templatePackageLockJson, null, 4),
137
137
  'utf8',
138
138
  );
139
+ const badges = fs
140
+ .readFileSync(`./README.md`, 'utf8')
141
+ .split(`<!-- badges -->`)[1]
142
+ .split(`<!-- end-badges -->`)[0];
143
+ let originMd = fs.readFileSync(`../pwa-microservices-template/README.md`, 'utf8');
144
+
145
+ originMd =
146
+ originMd.split(`<!-- badges -->`)[0] +
147
+ `
148
+ <!-- badges -->
149
+ ` +
150
+ badges +
151
+ `
152
+ <!-- end-badges -->
153
+ ` +
154
+ originMd.split(`<!-- end-badges -->`)[1];
155
+
139
156
  const splitKeyword = '## underpost ci/cd cli';
140
157
  fs.writeFileSync(
141
158
  `../pwa-microservices-template/README.md`,
142
- fs.readFileSync(`../pwa-microservices-template/README.md`, 'utf8').split(`<!-- -->`)[0] +
159
+ originMd.split(`<!-- -->`)[0] +
143
160
  `<!-- -->
144
161
  ${splitKeyword + fs.readFileSync(`./README.md`, 'utf8').split(splitKeyword)[1]}`,
145
162
  'utf8',
package/bin/vs.js CHANGED
@@ -4,7 +4,11 @@ import { loggerFactory } from '../src/server/logger.js';
4
4
 
5
5
  const logger = loggerFactory(import.meta);
6
6
 
7
- const vsCodeRootPath = '/root/.vscode-root';
7
+ // const vsCodeRootPath = '/root/.vscode-root';
8
+ // const vsProgram = 'code';
9
+
10
+ const vsCodeRootPath = '/root/.windsurf';
11
+ const vsProgram = 'windsurf';
8
12
 
9
13
  switch (process.argv[2]) {
10
14
  case 'info': {
@@ -31,13 +35,17 @@ switch (process.argv[2]) {
31
35
  const extensions = JSON.parse(fs.readFileSync(`./.vscode/extensions.json`, 'utf8'));
32
36
  extensions.recommendations.map((extension) => {
33
37
  if (extension)
34
- shellExec(`sudo code --user-data-dir="${vsCodeRootPath}" --no-sandbox --install-extension ${extension}`);
38
+ shellExec(
39
+ `sudo ${vsProgram} --user-data-dir="${vsCodeRootPath}" --no-sandbox --install-extension ${extension}`,
40
+ );
35
41
  });
36
42
  }
37
43
  break;
38
44
  case 'export':
39
45
  {
40
- shellExec(`sudo code --user-data-dir="${vsCodeRootPath}" --no-sandbox --list-extensions > vs-extensions.txt`);
46
+ shellExec(
47
+ `sudo ${vsProgram} --user-data-dir="${vsCodeRootPath}" --no-sandbox --list-extensions > vs-extensions.txt`,
48
+ );
41
49
  fs.writeFileSync(
42
50
  `./.vscode/extensions.json`,
43
51
  JSON.stringify(
@@ -61,6 +69,6 @@ switch (process.argv[2]) {
61
69
  break;
62
70
  }
63
71
  default:
64
- shellExec(`sudo code ${process.argv[2]} --user-data-dir="${vsCodeRootPath}" --no-sandbox`);
72
+ shellExec(`sudo ${vsProgram} ${process.argv[2]} --user-data-dir="${vsCodeRootPath}" --no-sandbox`);
65
73
  break;
66
74
  }
package/cli.md CHANGED
@@ -1,4 +1,4 @@
1
- ## underpost ci/cd cli v2.8.82
1
+ ## underpost ci/cd cli v2.8.84
2
2
 
3
3
  ### Usage: `underpost [options] [command]`
4
4
  ```
@@ -28,6 +28,7 @@ Commands:
28
28
  fs [options] [path] Manages file storage, defaulting to file upload operations.
29
29
  test [options] [deploy-list] Manages and runs tests, defaulting to the current Underpost default test suite.
30
30
  monitor [options] <deploy-id> [env] Manages health server monitoring for specified deployments.
31
+ run [options] <runner-id> [path] Runs a script from the specified path.
31
32
  lxd [options] Manages LXD containers and virtual machines.
32
33
  baremetal [options] [workflow-id] [hostname] [ip-address] Manages baremetal server operations, including installation, database setup, commissioning, and user management.
33
34
  help [command] display help for command
@@ -240,6 +241,7 @@ Options:
240
241
  initialization.
241
242
  --init-host Installs necessary Kubernetes node CLI tools (e.g.,
242
243
  kind, kubeadm, docker, podman, helm).
244
+ --uninstall-host Uninstalls all host components installed by init-host.
243
245
  --config Sets the base Kubernetes node configuration.
244
246
  --worker Sets the context for a worker node.
245
247
  --chown Sets the appropriate ownership for Kubernetes kubeconfig
@@ -545,6 +547,31 @@ Options:
545
547
  ```
546
548
 
547
549
 
550
+ ### `run` :
551
+ ```
552
+ Usage: underpost run [options] <runner-id> [path]
553
+
554
+ Runs a script from the specified path.
555
+
556
+ Arguments:
557
+ runner-id The runner ID to run. Options: spark-template, rmi, kill, secret, gpu-env, tf-gpu-test, ide, monitor, tf-vae-test, deploy-job.
558
+ path The absolute or relative directory path where the script is located.
559
+
560
+ Options:
561
+ --command <command-array> Array of commands to run.
562
+ --args <args-array> Array of arguments to pass to the command.
563
+ --dev Sets the development context environment for the script.
564
+ --pod-name <pod-name> Optional: Specifies the pod name for test execution.
565
+ --volume-host-path <volume-host-path> Optional: Specifies the volume host path for test execution.
566
+ --volume-mount-path <volume-mount-path> Optional: Specifies the volume mount path for test execution.
567
+ --image-name <image-name> Optional: Specifies the image name for test execution.
568
+ --container-name <container-name> Optional: Specifies the container name for test execution.
569
+ --namespace <namespace> Optional: Specifies the namespace for test execution.
570
+ -h, --help display help for command
571
+
572
+ ```
573
+
574
+
548
575
  ### `lxd` :
549
576
  ```
550
577
  Usage: underpost lxd [options]
@@ -58,7 +58,7 @@ services:
58
58
  cpus: '0.25'
59
59
  memory: 20M
60
60
  labels: # labels in Compose file instead of Dockerfile
61
- engine.version: '2.8.82'
61
+ engine.version: '2.8.84'
62
62
  networks:
63
63
  - load-balancer
64
64
 
@@ -17,7 +17,7 @@ spec:
17
17
  spec:
18
18
  containers:
19
19
  - name: dd-template-development-blue
20
- image: localhost/rockylinux9-underpost:v2.8.82
20
+ image: localhost/rockylinux9-underpost:v2.8.84
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-template-development-green
103
- image: localhost/rockylinux9-underpost:v2.8.82
103
+ image: localhost/rockylinux9-underpost:v2.8.84
104
104
  # resources:
105
105
  # requests:
106
106
  # memory: "124Ki"
@@ -0,0 +1,65 @@
1
+ ---
2
+ apiVersion: v1
3
+ kind: ConfigMap
4
+ metadata:
5
+ name: tf-gpu-test-script
6
+ namespace: default
7
+ data:
8
+ main_tf_gpu_test.py: |
9
+ import os
10
+ import tensorflow as tf
11
+
12
+ print("--- Starting GPU and Library Check ---")
13
+
14
+ gpus = tf.config.list_physical_devices("GPU")
15
+ if gpus:
16
+ try:
17
+ tf.config.set_visible_devices(gpus[0], "GPU")
18
+ logical_gpus = tf.config.list_logical_devices("GPU")
19
+ print(
20
+ f"TensorFlow detected {len(gpus)} Physical GPUs, {len(logical_gpus)} Logical GPUs. Using: {gpus[0].name}"
21
+ )
22
+ except RuntimeError as e:
23
+ print(f"RuntimeError during GPU configuration: {e}")
24
+ else:
25
+ print("TensorFlow did not detect any GPU devices. Running on CPU.")
26
+
27
+ print(f"XLA_FLAGS environment variable: {os.environ.get('XLA_FLAGS')}")
28
+ print(f"TF_XLA_FLAGS environment variable: {os.environ.get('TF_XLA_FLAGS')}")
29
+
30
+ print(f"TensorFlow version: {tf.__version__}")
31
+ print(f"Built with CUDA: {tf.test.is_built_with_cuda()}")
32
+ print(f"Is GPU available: {tf.config.list_physical_devices('GPU') != []}")
33
+
34
+ print("--- GPU and Library Check Complete ---")
35
+ ---
36
+ apiVersion: v1
37
+ kind: Pod
38
+ metadata:
39
+ name: tf-gpu-test-pod
40
+ namespace: default
41
+ spec:
42
+ restartPolicy: Never
43
+ runtimeClassName: nvidia
44
+ containers:
45
+ - name: tensorflow-gpu-tester
46
+ image: nvcr.io/nvidia/tensorflow:24.04-tf2-py3
47
+ imagePullPolicy: IfNotPresent
48
+ command: ['python']
49
+ args: ['/app/main_tf_gpu_test.py']
50
+ resources:
51
+ limits:
52
+ nvidia.com/gpu: '1'
53
+ env:
54
+ - name: NVIDIA_VISIBLE_DEVICES
55
+ value: all
56
+ volumeMounts:
57
+ - name: tf-script-volume
58
+ mountPath: /app
59
+ volumes:
60
+ - name: tf-script-volume
61
+ configMap:
62
+ name: tf-gpu-test-script
63
+ items:
64
+ - key: main_tf_gpu_test.py
65
+ path: main_tf_gpu_test.py
@@ -8,14 +8,14 @@ for iface_path in /sys/class/net/*; do
8
8
  operstate=$(< "$iface_path/operstate")
9
9
  mtu=$(< "$iface_path/mtu")
10
10
 
11
- # Driver: módulo kernel que maneja esta interfaz
11
+ # Driver
12
12
  if [ -L "$iface_path/device/driver" ]; then
13
13
  driver=$(basename "$(readlink -f "$iface_path/device/driver")")
14
14
  else
15
15
  driver="—"
16
16
  fi
17
17
 
18
- # Vendor:Device ID PCI
18
+ # Vendor device ID PCI
19
19
  pci_dev="$iface_path/device"
20
20
  if [ -f "$pci_dev/vendor" ] && [ -f "$pci_dev/device" ]; then
21
21
  vendor_id=$(< "$pci_dev/vendor")
@@ -28,7 +28,7 @@ for iface_path in /sys/class/net/*; do
28
28
  pci="—"
29
29
  fi
30
30
 
31
- # Link Speed: lectura directa de /sys/class/net/<iface>/speed
31
+ # Link Speed
32
32
  speed=$(cat "$iface_path/speed" 2>/dev/null || echo "—")
33
33
 
34
34
  echo "Interface: $name"
@@ -0,0 +1,19 @@
1
+ # GPUs and drivers in use
2
+ sudo lspci -nnk | egrep -i 'vga|3d' -A3
3
+
4
+ # modules loaded relevant
5
+ lsmod | egrep 'nvidia|nouveau|amdgpu' || true
6
+
7
+ # if exists nvidia tool
8
+ nvidia-smi 2>/dev/null || echo "nvidia-smi no disponible / driver no cargado"
9
+
10
+ # kernel related errors
11
+ sudo dmesg | egrep -i 'nvidia|nouveau|amdgpu' --color=auto
12
+
13
+ # recent system errors / gdm / mutter / X
14
+ sudo journalctl -b -p err --no-pager | head -n 200
15
+ journalctl -b _COMM=gdm --no-pager | tail -n 200
16
+ journalctl -b _COMM=Xorg --no-pager | tail -n 200
17
+
18
+ # X log (if exists)
19
+ sudo grep -E "(EE|WW|NVIDIA|nouveau|amdgpu)" /var/log/Xorg.0.log || true
@@ -58,14 +58,14 @@ maas "$MAAS_ADMIN_USERNAME" maas set-config name=upstream_dns value=8.8.8.8
58
58
  # os="ubuntu" release="noble" arches="amd64" \
59
59
  # subarches="ga-24.04" labels="*"
60
60
 
61
- echo "Downloading Ubuntu Noble arm64/ga-24.04 image..."
62
- maas $MAAS_ADMIN_USERNAME boot-source-selections create 1 \
63
- os="ubuntu" release="noble" arches="arm64" \
64
- subarches="ga-24.04" labels="*"
61
+ # echo "Downloading Ubuntu Noble arm64/ga-24.04 image..."
62
+ # maas $MAAS_ADMIN_USERNAME boot-source-selections create 1 \
63
+ # os="ubuntu" release="noble" arches="arm64" \
64
+ # subarches="ga-24.04" labels="*"
65
65
 
66
66
  # Import the newly selected boot images
67
- echo "Importing boot images (this may take some time)..."
68
- maas "$MAAS_ADMIN_USERNAME" boot-resources import
67
+ # echo "Importing boot images (this may take some time)..."
68
+ # maas "$MAAS_ADMIN_USERNAME" boot-resources import
69
69
 
70
70
  # Disable the MAAS HTTP proxy
71
71
  echo "Disabling MAAS HTTP proxy..."
@@ -108,13 +108,13 @@ if [ -z "$FABRIC_ID" ]; then
108
108
  exit 1
109
109
  fi
110
110
 
111
- # Enable DHCP on the untagged VLAN (VLAN tag 0)
112
- echo "Enabling DHCP on VLAN 0 for fabric-1 (ID: $FABRIC_ID)..."
113
- maas "$MAAS_ADMIN_USERNAME" vlan update "$FABRIC_ID" 0 dhcp_on=true primary_rack="$RACK_CONTROLLER_ID"
114
-
115
111
  # Create a Dynamic IP Range for enlistment, commissioning, and deployment
116
112
  echo "Creating dynamic IP range from $START_IP to $END_IP..."
117
113
  maas "$MAAS_ADMIN_USERNAME" ipranges create type=dynamic start_ip="$START_IP" end_ip="$END_IP"
118
114
 
115
+ # Enable DHCP on the untagged VLAN (VLAN tag 0)
116
+ echo "Enabling DHCP on VLAN 0 for fabric-1 (ID: $FABRIC_ID)..."
117
+ maas "$MAAS_ADMIN_USERNAME" vlan update "$FABRIC_ID" 0 dhcp_on=true primary_rack="$RACK_CONTROLLER_ID"
118
+
119
119
  echo "Setting gateway IP for subnet $SUBNET_CIDR (ID: $SUBNET_ID) to $IP_ADDRESS..."
120
120
  maas "$MAAS_ADMIN_USERNAME" subnet update $SUBNET_ID gateway_ip=$IP_ADDRESS
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env bash
2
+ # cleanup-snap.sh
3
+ # Remove all disabled snap revisions to free up disk space.
4
+
5
+ set -euo pipefail
6
+
7
+ # Ensure we’re running as root
8
+ if [[ $EUID -ne 0 ]]; then
9
+ echo "Please run this script with sudo or as root."
10
+ exit 1
11
+ fi
12
+
13
+ echo "Gathering list of snaps with disabled revisions..."
14
+ snap list --all \
15
+ | awk '/disabled/ {print $1, $3}' \
16
+ | while read -r pkg rev; do
17
+ echo " -> Removing $pkg (revision $rev)..."
18
+ snap remove "$pkg" --revision="$rev"
19
+ done
20
+
21
+ echo "Cleanup complete."
22
+ echo
23
+ echo "Tip: Limit how many revisions Snap retains by setting:"
24
+ echo " sudo snap set system refresh.retain=2"
25
+ echo "Then apply with:"
26
+ echo " sudo snap refresh"
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.8.82",
5
+ "version": "2.8.84",
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",