underpost 3.1.0 → 3.1.2
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/CHANGELOG.md +24 -0
- package/CLI-HELP.md +2 -2
- package/README.md +2 -2
- package/bin/deploy.js +0 -36
- 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-default-development/deployment.yaml +2 -2
- package/manifests/deployment/dd-test-development/deployment.yaml +2 -2
- package/package.json +1 -1
- package/src/cli/env.js +1 -1
- package/src/cli/index.js +2 -2
- package/src/cli/repository.js +11 -15
- package/src/cli/run.js +1 -49
- package/src/cli/secrets.js +1 -0
- package/src/index.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
## 2026-03-15
|
|
4
4
|
|
|
5
|
+
### cli-run
|
|
6
|
+
|
|
7
|
+
- Fix streamline deployment logic prevent override env files and redundant build workflows ([048fb8ff1](https://github.com/underpostnet/engine/commit/048fb8ff1cbb895c3c04cf8a84daa921fcbe6bf5))
|
|
8
|
+
|
|
9
|
+
### engine-cyberia
|
|
10
|
+
|
|
11
|
+
- fix: update error handling for underpost passthrough to include 'env' command ([402a96176](https://github.com/underpostnet/engine/commit/402a961768db9753c2cdd7b067c548edcbd2f0b7))
|
|
12
|
+
|
|
13
|
+
## New release v:3.1.1 (2026-03-14)
|
|
14
|
+
|
|
15
|
+
### cli-index
|
|
16
|
+
|
|
17
|
+
- fix: add quiet option to dotenv config for improved error handling ([975448eb4](https://github.com/underpostnet/engine/commit/975448eb4d710cc8248a783240ce818b5fb9b891))
|
|
18
|
+
|
|
19
|
+
### cli-secrets
|
|
20
|
+
|
|
21
|
+
- fix: add missing dotenv import in secrets module ([7f83e26c4](https://github.com/underpostnet/engine/commit/7f83e26c44dfe176b6cc524e7b117f322a62bf32))
|
|
22
|
+
|
|
23
|
+
### cli-repository
|
|
24
|
+
|
|
25
|
+
- fix: enhance environment variable checks for GITHUB_TOKEN retrieval ([d097c6c1f](https://github.com/underpostnet/engine/commit/d097c6c1f02edcab1e76dca226f129e334dbd453))
|
|
26
|
+
|
|
27
|
+
## New release v:3.1.0 (2026-03-14)
|
|
28
|
+
|
|
5
29
|
### docs
|
|
6
30
|
|
|
7
31
|
- Add documentation for Baremetal and LXD management, including command references and quick start guides ([3569b5150](https://github.com/underpostnet/engine/commit/3569b5150f375467bf5cdb03247897e2849e45ce))
|
package/CLI-HELP.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## underpost ci/cd cli v3.1.
|
|
1
|
+
## underpost ci/cd cli v3.1.2
|
|
2
2
|
|
|
3
3
|
### Usage: `underpost [options] [command]`
|
|
4
4
|
```
|
|
@@ -854,7 +854,7 @@ Options:
|
|
|
854
854
|
Runs specified scripts using various runners.
|
|
855
855
|
|
|
856
856
|
Arguments:
|
|
857
|
-
runner-id The runner ID to run. Options: dev-cluster,ipfs-expose,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,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,
|
|
857
|
+
runner-id The runner ID to run. Options: dev-cluster,ipfs-expose,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,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,deploy-test,tf-vae-test,spark-template,rmi,kill,secret,underpost-config,gpu-env,tf-gpu-test,deploy-job.
|
|
858
858
|
path The input value, identifier, or path for the operation.
|
|
859
859
|
|
|
860
860
|
Options:
|
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
<div align="center">
|
|
18
18
|
|
|
19
|
-
[](https://github.com/underpostnet/engine/actions/workflows/docker-image.yml) [](https://github.com/underpostnet/engine/actions/workflows/coverall.ci.yml) [](https://www.npmjs.com/package/underpost) [](https://github.com/underpostnet/engine/actions/workflows/docker-image.ci.yml) [](https://github.com/underpostnet/engine/actions/workflows/coverall.ci.yml) [](https://www.npmjs.com/package/underpost) [](https://socket.dev/npm/package/underpost/overview/3.1.2) [](https://coveralls.io/github/underpostnet/engine?branch=master) [](https://www.npmjs.org/package/underpost) [](https://www.npmjs.com/package/underpost)
|
|
20
20
|
|
|
21
21
|
</div>
|
|
22
22
|
|
|
@@ -60,7 +60,7 @@ npm run dev
|
|
|
60
60
|
|
|
61
61
|
<a target="_top" href="https://www.nexodev.org/docs?cid=src">See Docs here.</a>
|
|
62
62
|
|
|
63
|
-
## underpost ci/cd cli v3.1.
|
|
63
|
+
## underpost ci/cd cli v3.1.2
|
|
64
64
|
|
|
65
65
|
### Usage: `underpost [options] [command]`
|
|
66
66
|
```
|
package/bin/deploy.js
CHANGED
|
@@ -979,42 +979,6 @@ nvidia/gpu-operator \
|
|
|
979
979
|
logger.info('All dependabot branches merged into master');
|
|
980
980
|
break;
|
|
981
981
|
}
|
|
982
|
-
|
|
983
|
-
// Temporal fallback underpost legacy version handling
|
|
984
|
-
|
|
985
|
-
case 'conf': {
|
|
986
|
-
let subConf = process.argv[5] ?? '';
|
|
987
|
-
|
|
988
|
-
if (!['current', 'clean', 'root'].includes(process.argv[3])) {
|
|
989
|
-
const path = fs.existsSync(`./engine-private/replica/${process.argv[3]}`)
|
|
990
|
-
? `./engine-private/replica/${process.argv[3]}/.env.${process.argv[4]}`
|
|
991
|
-
: `./engine-private/conf/${process.argv[3]}/.env.${process.argv[4]}`;
|
|
992
|
-
dotenv.config({ path, override: true });
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
loadConf(process.argv[3], subConf);
|
|
996
|
-
break;
|
|
997
|
-
}
|
|
998
|
-
|
|
999
|
-
case 'build-full-client': {
|
|
1000
|
-
await Underpost.repo.client(process.argv[3], process.argv[4], process.argv[5], process.argv[6]);
|
|
1001
|
-
break;
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
case 'build-single-replica': {
|
|
1005
|
-
const deployId = process.argv[3];
|
|
1006
|
-
const host = process.argv[4];
|
|
1007
|
-
const path = process.argv[5];
|
|
1008
|
-
await Underpost.repo.client(deployId, '', host, path, {
|
|
1009
|
-
singleReplica: true,
|
|
1010
|
-
});
|
|
1011
|
-
break;
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
case 'sync-env-port': {
|
|
1015
|
-
await Underpost.repo.client(undefined, '', '', '', { syncEnvPort: true });
|
|
1016
|
-
break;
|
|
1017
|
-
}
|
|
1018
982
|
}
|
|
1019
983
|
} catch (error) {
|
|
1020
984
|
logger.error(error, error.stack);
|
|
@@ -17,7 +17,7 @@ spec:
|
|
|
17
17
|
spec:
|
|
18
18
|
containers:
|
|
19
19
|
- name: dd-default-development-blue
|
|
20
|
-
image: localhost/rockylinux9-underpost:v3.1.
|
|
20
|
+
image: localhost/rockylinux9-underpost:v3.1.2
|
|
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:v3.1.
|
|
103
|
+
image: localhost/rockylinux9-underpost:v3.1.2
|
|
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:v3.1.
|
|
21
|
+
image: localhost/rockylinux9-underpost:v3.1.2
|
|
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:v3.1.
|
|
106
|
+
image: localhost/rockylinux9-underpost:v3.1.2
|
|
107
107
|
|
|
108
108
|
command:
|
|
109
109
|
- /bin/sh
|
package/package.json
CHANGED
package/src/cli/env.js
CHANGED
|
@@ -79,7 +79,7 @@ class UnderpostRootEnv {
|
|
|
79
79
|
get(key, value, options = { plain: false, disableLog: false, copy: false }) {
|
|
80
80
|
const exeRootPath = `${getNpmRootPath()}/underpost`;
|
|
81
81
|
const envPath = `${exeRootPath}/.env`;
|
|
82
|
-
if (!fs.existsSync(envPath)) {
|
|
82
|
+
if (!fs.existsSync(envPath) || !fs.statSync(envPath).isFile()) {
|
|
83
83
|
logger.warn(`Empty environment variables`);
|
|
84
84
|
return undefined;
|
|
85
85
|
}
|
package/src/cli/index.js
CHANGED
|
@@ -9,8 +9,8 @@ import Underpost from '../index.js';
|
|
|
9
9
|
|
|
10
10
|
const underpostGlobalEnv = `${getUnderpostRootPath()}/.env`;
|
|
11
11
|
|
|
12
|
-
if (fs.existsSync(underpostGlobalEnv)) dotenv.config({ path: underpostGlobalEnv, override: true });
|
|
13
|
-
else dotenv.config();
|
|
12
|
+
if (fs.existsSync(underpostGlobalEnv)) dotenv.config({ path: underpostGlobalEnv, override: true, quiet: true });
|
|
13
|
+
else dotenv.config({ quiet: true });
|
|
14
14
|
|
|
15
15
|
const program = new Command();
|
|
16
16
|
|
package/src/cli/repository.js
CHANGED
|
@@ -797,23 +797,12 @@ class UnderpostRepository {
|
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
799
|
}
|
|
800
|
+
|
|
800
801
|
if (confFilePath) fs.writeFileSync(confFilePath, JSON.stringify(serverConf, null, 4), 'utf-8');
|
|
801
|
-
await buildClient();
|
|
802
|
-
if (confFilePath && originalConfBackup) fs.writeFileSync(confFilePath, originalConfBackup, 'utf-8');
|
|
803
802
|
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
await Underpost.repo.client(resolvedDeployId, '', host, path, {
|
|
807
|
-
singleReplica: true,
|
|
808
|
-
});
|
|
809
|
-
}
|
|
810
|
-
shellExec(`node bin env ${resolvedDeployId} ${process.env.NODE_ENV}`);
|
|
811
|
-
}
|
|
803
|
+
await buildClient();
|
|
804
|
+
for (const replicaDeployId of deployIdSingleReplicas) await Underpost.repo.client(replicaDeployId);
|
|
812
805
|
|
|
813
|
-
for (const replicaDeployId of deployIdSingleReplicas) {
|
|
814
|
-
shellExec(`node bin env ${replicaDeployId} ${process.env.NODE_ENV}`);
|
|
815
|
-
await Underpost.repo.client(replicaDeployId);
|
|
816
|
-
}
|
|
817
806
|
return resolve(true);
|
|
818
807
|
}
|
|
819
808
|
} catch (error) {
|
|
@@ -1193,7 +1182,14 @@ Prevent build private config repo.`,
|
|
|
1193
1182
|
}
|
|
1194
1183
|
shellExec(cmd);
|
|
1195
1184
|
} else {
|
|
1196
|
-
|
|
1185
|
+
let token = process.env.GITHUB_TOKEN;
|
|
1186
|
+
if (!token) {
|
|
1187
|
+
const envPath = `${getNpmRootPath()}/underpost/.env`;
|
|
1188
|
+
if (fs.existsSync(envPath) && fs.statSync(envPath).isFile()) {
|
|
1189
|
+
const envVars = dotenv.parse(fs.readFileSync(envPath, 'utf8'));
|
|
1190
|
+
token = envVars.GITHUB_TOKEN;
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1197
1193
|
if (!token) {
|
|
1198
1194
|
logger.error('GITHUB_TOKEN is required for workflow dispatch (gh CLI not available)');
|
|
1199
1195
|
return;
|
package/src/cli/run.js
CHANGED
|
@@ -612,7 +612,7 @@ echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com
|
|
|
612
612
|
image ? ` --image ${image}` : ''
|
|
613
613
|
}${versions ? ` --versions ${versions}` : ''}${
|
|
614
614
|
options.namespace ? ` --namespace ${options.namespace}` : ''
|
|
615
|
-
}${timeoutFlags}${cmdString}
|
|
615
|
+
}${timeoutFlags}${cmdString} ${deployId} ${env}`,
|
|
616
616
|
);
|
|
617
617
|
|
|
618
618
|
if (isDeployRunnerContext(path, options)) {
|
|
@@ -1583,20 +1583,6 @@ EOF
|
|
|
1583
1583
|
shellExec(`chmod +x ${options.underpostRoot}/scripts/ports-ls.sh`);
|
|
1584
1584
|
shellExec(`${options.underpostRoot}/scripts/ports-ls.sh`);
|
|
1585
1585
|
},
|
|
1586
|
-
/**
|
|
1587
|
-
* @method release-cmt
|
|
1588
|
-
* @description Commits and pushes a new release for the `engine` repository with a message indicating the new version.
|
|
1589
|
-
* @param {string} path - The input value, identifier, or path for the operation.
|
|
1590
|
-
* @param {Object} options - The default underpost runner options for customizing workflow
|
|
1591
|
-
* @memberof UnderpostRun
|
|
1592
|
-
*/
|
|
1593
|
-
'release-cmt': async (path, options = DEFAULT_OPTION) => {
|
|
1594
|
-
shellExec(`underpost run pull`);
|
|
1595
|
-
shellExec(`underpost run secret`);
|
|
1596
|
-
shellCd(`/home/dd/engine`);
|
|
1597
|
-
shellExec(`underpost cmt --empty . ci engine ' New engine release $(underpost --version)'`);
|
|
1598
|
-
shellExec(`underpost push . ${process.env.GITHUB_USERNAME}/engine`, { silent: true });
|
|
1599
|
-
},
|
|
1600
1586
|
|
|
1601
1587
|
/**
|
|
1602
1588
|
* @method deploy-test
|
|
@@ -1623,40 +1609,6 @@ EOF
|
|
|
1623
1609
|
shellExec(`node bin run sync${baseClusterCommand} --deploy-id-cron-jobs none dd-test --cmd "${cmd}"`);
|
|
1624
1610
|
},
|
|
1625
1611
|
|
|
1626
|
-
/**
|
|
1627
|
-
* @method sync-replica
|
|
1628
|
-
* @description Syncs a replica for the dd.router
|
|
1629
|
-
* @param {string} path - The input value, identifier, or path for the operation.
|
|
1630
|
-
* @param {Object} options - The default underpost runner options for customizing workflow
|
|
1631
|
-
* @memberof UnderpostRun
|
|
1632
|
-
*/
|
|
1633
|
-
'sync-replica': async (path, options = DEFAULT_OPTION) => {
|
|
1634
|
-
const env = options.dev ? 'development' : 'production';
|
|
1635
|
-
const baseCommand = options.dev ? 'node bin' : 'underpost';
|
|
1636
|
-
|
|
1637
|
-
for (let deployId of fs.readFileSync(`./engine-private/deploy/dd.router`, 'utf8').split(',')) {
|
|
1638
|
-
deployId = deployId.trim();
|
|
1639
|
-
const _path = '/single-replica';
|
|
1640
|
-
const confServer = loadConfServerJson(`./engine-private/conf/${deployId}/conf.server.json`);
|
|
1641
|
-
shellExec(`${baseCommand} env ${deployId} ${env}`);
|
|
1642
|
-
for (const host of Object.keys(confServer))
|
|
1643
|
-
if (_path in confServer[host])
|
|
1644
|
-
await Underpost.repo.client(deployId, '', host, _path, {
|
|
1645
|
-
singleReplica: true,
|
|
1646
|
-
});
|
|
1647
|
-
const node = options.nodeName
|
|
1648
|
-
? options.nodeName
|
|
1649
|
-
: !options.kubeadm && !options.k3s
|
|
1650
|
-
? 'kind-control-plane'
|
|
1651
|
-
: os.hostname();
|
|
1652
|
-
// deployId, replicas, versions, image, node
|
|
1653
|
-
let defaultPath = [deployId, 1, ``, ``, node];
|
|
1654
|
-
shellExec(`${baseCommand} run${options.dev === true ? ' --dev' : ''} --build sync ${defaultPath}`);
|
|
1655
|
-
await Underpost.repo.client(deployId);
|
|
1656
|
-
}
|
|
1657
|
-
if (isDeployRunnerContext(path, options)) shellExec(`${baseCommand} run promote ${path} production`);
|
|
1658
|
-
},
|
|
1659
|
-
|
|
1660
1612
|
/**
|
|
1661
1613
|
* @method tf-vae-test
|
|
1662
1614
|
* @description Creates and runs a job pod (`tf-vae-test`) that installs TensorFlow dependencies, clones the TensorFlow docs, and runs the CVAE tutorial script, with a terminal monitor attached.
|
package/src/cli/secrets.js
CHANGED