underpost 2.8.854 → 2.8.856
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/.github/workflows/release.cd.yml +5 -4
- package/README.md +6 -2
- package/cli.md +2 -2
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
- package/package.json +1 -1
- package/src/cli/run.js +21 -11
- package/src/index.js +1 -1
|
@@ -29,7 +29,8 @@ jobs:
|
|
|
29
29
|
set -e
|
|
30
30
|
echo "Starting remote release deploy"
|
|
31
31
|
cd /home/dd/engine
|
|
32
|
-
|
|
33
|
-
underpost
|
|
34
|
-
|
|
35
|
-
underpost run
|
|
32
|
+
npm install -g underpost
|
|
33
|
+
underpost set GITHUB_TOKEN ${{ secrets.GITHUB_TOKEN }}
|
|
34
|
+
node bin run --dev pull
|
|
35
|
+
underpost run secret
|
|
36
|
+
underpost run release-deploy
|
package/README.md
CHANGED
|
@@ -18,16 +18,20 @@
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
+
|
|
22
|
+
|
|
21
23
|
<!-- badges -->
|
|
22
24
|
|
|
23
25
|
|
|
24
|
-
[](https://github.com/underpostnet/engine/actions/workflows/docker-image.yml) [](https://github.com/underpostnet/engine/actions/workflows/coverall.yml) [](https://www.npmjs.com/package/underpost) [](https://github.com/underpostnet/engine/actions/workflows/docker-image.yml) [](https://github.com/underpostnet/engine/actions/workflows/coverall.yml) [](https://www.npmjs.com/package/underpost) [](https://socket.dev/npm/package/underpost/overview/2.8.856) [](https://coveralls.io/github/underpostnet/engine?branch=master) [](https://www.npmjs.org/package/underpost) [](https://www.npmjs.com/package/underpost)
|
|
25
27
|
|
|
26
28
|
|
|
27
29
|
<!-- end-badges -->
|
|
28
30
|
|
|
29
31
|
|
|
30
32
|
|
|
33
|
+
|
|
34
|
+
|
|
31
35
|
</div>
|
|
32
36
|
|
|
33
37
|
<div align="center">
|
|
@@ -72,7 +76,7 @@ Run dev client server
|
|
|
72
76
|
npm run dev
|
|
73
77
|
```
|
|
74
78
|
<!-- -->
|
|
75
|
-
## underpost ci/cd cli v2.8.
|
|
79
|
+
## underpost ci/cd cli v2.8.856
|
|
76
80
|
|
|
77
81
|
### Usage: `underpost [options] [command]`
|
|
78
82
|
```
|
package/cli.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## underpost ci/cd cli v2.8.
|
|
1
|
+
## underpost ci/cd cli v2.8.856
|
|
2
2
|
|
|
3
3
|
### Usage: `underpost [options] [command]`
|
|
4
4
|
```
|
|
@@ -591,7 +591,7 @@ Options:
|
|
|
591
591
|
Runs a script from the specified path.
|
|
592
592
|
|
|
593
593
|
Arguments:
|
|
594
|
-
runner-id The runner ID to run. Options: spark-template, rmi, kill, secret, gpu-env, tf-gpu-test, dev-cluster, ssh-cluster-info, cyberia-ide, engine-ide, template-deploy, clean,
|
|
594
|
+
runner-id The runner ID to run. Options: spark-template, rmi, kill, secret, gpu-env, tf-gpu-test, dev-cluster, ssh-cluster-info, cyberia-ide, engine-ide, template-deploy, clean, pull, release-deploy, ssh-deploy, ide, monitor, db-client, cluster, deploy, tf-vae-test, deploy-job.
|
|
595
595
|
path The absolute or relative directory path where the script is located.
|
|
596
596
|
|
|
597
597
|
Options:
|
|
@@ -17,7 +17,7 @@ spec:
|
|
|
17
17
|
spec:
|
|
18
18
|
containers:
|
|
19
19
|
- name: dd-default-development-blue
|
|
20
|
-
image: localhost/rockylinux9-underpost:v2.8.
|
|
20
|
+
image: localhost/rockylinux9-underpost:v2.8.856
|
|
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.8.
|
|
103
|
+
image: localhost/rockylinux9-underpost:v2.8.856
|
|
104
104
|
# resources:
|
|
105
105
|
# requests:
|
|
106
106
|
# memory: "124Ki"
|
package/package.json
CHANGED
package/src/cli/run.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { daemonProcess, getTerminalPid, openTerminal, pbcopy, shellCd, shellExec } from '../server/process.js';
|
|
2
2
|
import read from 'read';
|
|
3
3
|
import { getNpmRootPath } from '../server/conf.js';
|
|
4
|
-
import { loggerFactory } from '../server/logger.js';
|
|
4
|
+
import { actionInitLog, loggerFactory } from '../server/logger.js';
|
|
5
5
|
import UnderpostTest from './test.js';
|
|
6
6
|
import fs from 'fs-extra';
|
|
7
7
|
import { range, setPad, timer } from '../client/components/core/CommonJs.js';
|
|
@@ -102,15 +102,21 @@ class UnderpostRun {
|
|
|
102
102
|
shellCd(path ?? `/home/dd/engine`);
|
|
103
103
|
shellExec(`node bin/deploy clean-core-repo`);
|
|
104
104
|
},
|
|
105
|
-
|
|
106
|
-
const { underpostRoot } = options;
|
|
107
|
-
shellExec(`npm install -g underpost`);
|
|
108
|
-
shellExec(`underpost run secret`);
|
|
105
|
+
pull: (path, options = UnderpostRun.DEFAULT_OPTION) => {
|
|
109
106
|
shellCd(`/home/dd/engine`);
|
|
110
107
|
shellExec(`node bin/deploy clean-core-repo`);
|
|
111
108
|
shellExec(`underpost pull . underpostnet/engine`);
|
|
112
109
|
shellExec(`underpost pull engine-private underpostnet/engine-private`, { silent: true });
|
|
113
110
|
},
|
|
111
|
+
'release-deploy': (path, options = UnderpostRun.DEFAULT_OPTION) => {
|
|
112
|
+
actionInitLog();
|
|
113
|
+
shellExec(`underpost --version`);
|
|
114
|
+
shellCd(`/home/dd/engine`);
|
|
115
|
+
for (const _deployId of fs.readFileSync(`./engine-private/deploy/dd.router`, 'utf8').split(',')) {
|
|
116
|
+
const deployId = _deployId.trim();
|
|
117
|
+
shellExec(`underpost run deploy ${deployId}`, { async: true });
|
|
118
|
+
}
|
|
119
|
+
},
|
|
114
120
|
'ssh-deploy': (path, options = UnderpostRun.DEFAULT_OPTION) => {
|
|
115
121
|
const baseCommand = options.dev || true ? 'node bin' : 'underpost';
|
|
116
122
|
shellCd('/home/dd/engine');
|
|
@@ -234,16 +240,20 @@ class UnderpostRun {
|
|
|
234
240
|
const ignorePods = UnderpostDeploy.API.get(`${deployId}-${env}-${targetTraffic}`).map((p) => p.NAME);
|
|
235
241
|
shellExec(`sudo kubectl rollout restart deployment/${deployId}-${env}-${targetTraffic}`);
|
|
236
242
|
|
|
237
|
-
let
|
|
238
|
-
|
|
243
|
+
let checkStatusIteration = 0;
|
|
244
|
+
const checkStatusIterationMsDelay = 1000;
|
|
245
|
+
const iteratorTag = `[${deployId}-${env}-${targetTraffic}]`;
|
|
246
|
+
logger.info('Deployment init', { deployId, env, targetTraffic, checkStatusIterationMsDelay });
|
|
239
247
|
|
|
240
248
|
while (!UnderpostDeploy.API.checkDeploymentReadyStatus(deployId, env, targetTraffic, ignorePods).ready) {
|
|
241
|
-
await timer(
|
|
242
|
-
|
|
243
|
-
logger.info(
|
|
249
|
+
await timer(checkStatusIterationMsDelay);
|
|
250
|
+
checkStatusIteration++;
|
|
251
|
+
logger.info(
|
|
252
|
+
`${iteratorTag} | Deployment in progress... | Delay number check iterations: ${checkStatusIteration}`,
|
|
253
|
+
);
|
|
244
254
|
}
|
|
245
255
|
|
|
246
|
-
logger.info(
|
|
256
|
+
logger.info(`${iteratorTag} | Deployment ready. | Total delay number check iterations: ${checkStatusIteration}`);
|
|
247
257
|
|
|
248
258
|
UnderpostRootEnv.API.set(`${deployId}-${env}-traffic`, targetTraffic);
|
|
249
259
|
|