underpost 2.8.84 → 2.8.85
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 +1 -0
- package/.env.production +1 -0
- package/.env.test +1 -0
- package/.github/workflows/{ghpkg.yml → ghpkg.ci.yml} +1 -1
- package/.github/workflows/{npmpkg.yml → npmpkg.ci.yml} +1 -1
- package/.github/workflows/{publish.yml → publish.ci.yml} +1 -1
- package/.github/workflows/{pwa-microservices-template.page.yml → pwa-microservices-template-page.cd.yml} +1 -1
- package/.github/workflows/{pwa-microservices-template.test.yml → pwa-microservices-template-test.ci.yml} +1 -1
- package/.vscode/settings.json +0 -1
- package/README.md +45 -2
- package/bin/build.js +15 -5
- package/bin/deploy.js +17 -82
- package/bin/file.js +15 -8
- package/cli.md +65 -44
- package/conf.js +1 -1
- package/docker-compose.yml +1 -1
- package/manifests/deployment/dd-template-development/deployment.yaml +2 -2
- package/manifests/maas/gpu-diag.sh +1 -1
- package/package.json +4 -6
- package/src/api/user/user.router.js +24 -1
- package/src/api/user/user.service.js +1 -4
- package/src/cli/cluster.js +42 -27
- package/src/cli/deploy.js +20 -0
- package/src/cli/index.js +9 -0
- package/src/cli/monitor.js +8 -12
- package/src/cli/run.js +111 -6
- package/src/cli/ssh.js +32 -0
- package/src/client/Default.index.js +7 -3
- package/src/client/components/core/Account.js +1 -1
- package/src/client/components/core/Chat.js +1 -1
- package/src/client/components/core/CommonJs.js +24 -22
- package/src/client/components/core/Content.js +1 -5
- package/src/client/components/core/Css.js +258 -18
- package/src/client/components/core/CssCore.js +8 -8
- package/src/client/components/core/Docs.js +14 -61
- package/src/client/components/core/DropDown.js +137 -82
- package/src/client/components/core/EventsUI.js +92 -5
- package/src/client/components/core/LoadingAnimation.js +8 -15
- package/src/client/components/core/Modal.js +597 -136
- package/src/client/components/core/NotificationManager.js +2 -2
- package/src/client/components/core/ObjectLayerEngine.js +638 -0
- package/src/client/components/core/Panel.js +158 -34
- package/src/client/components/core/PanelForm.js +12 -3
- package/src/client/components/core/Recover.js +1 -1
- package/src/client/components/core/Router.js +77 -17
- package/src/client/components/core/SocketIo.js +3 -3
- package/src/client/components/core/Translate.js +6 -2
- package/src/client/components/core/VanillaJs.js +0 -3
- package/src/client/components/core/Worker.js +3 -1
- package/src/client/components/default/CssDefault.js +17 -3
- package/src/client/components/default/MenuDefault.js +264 -45
- package/src/client/components/default/RoutesDefault.js +6 -12
- package/src/client/public/default/android-chrome-144x144.png +0 -0
- package/src/client/public/default/android-chrome-192x192.png +0 -0
- package/src/client/public/default/android-chrome-256x256.png +0 -0
- package/src/client/public/default/android-chrome-36x36.png +0 -0
- package/src/client/public/default/android-chrome-48x48.png +0 -0
- package/src/client/public/default/android-chrome-72x72.png +0 -0
- package/src/client/public/default/android-chrome-96x96.png +0 -0
- package/src/client/public/default/apple-touch-icon-114x114-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-114x114.png +0 -0
- package/src/client/public/default/apple-touch-icon-120x120-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-120x120.png +0 -0
- package/src/client/public/default/apple-touch-icon-144x144-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-144x144.png +0 -0
- package/src/client/public/default/apple-touch-icon-152x152-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-152x152.png +0 -0
- package/src/client/public/default/apple-touch-icon-180x180-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-180x180.png +0 -0
- package/src/client/public/default/apple-touch-icon-57x57-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-57x57.png +0 -0
- package/src/client/public/default/apple-touch-icon-60x60-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-60x60.png +0 -0
- package/src/client/public/default/apple-touch-icon-72x72-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-72x72.png +0 -0
- package/src/client/public/default/apple-touch-icon-76x76-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-76x76.png +0 -0
- package/src/client/public/default/apple-touch-icon-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon.png +0 -0
- package/src/client/public/default/assets/background/dark.jpg +0 -0
- package/src/client/public/default/assets/background/dark.svg +557 -0
- package/src/client/public/default/assets/logo/base-icon.png +0 -0
- package/src/client/public/default/assets/logo/underpost.gif +0 -0
- package/src/client/public/default/assets/mailer/api-user-check.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-invalid-token.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-recover.png +0 -0
- package/src/client/public/default/favicon-16x16.png +0 -0
- package/src/client/public/default/favicon-32x32.png +0 -0
- package/src/client/public/default/favicon.ico +0 -0
- package/src/client/public/default/mstile-144x144.png +0 -0
- package/src/client/public/default/mstile-150x150.png +0 -0
- package/src/client/public/default/mstile-310x150.png +0 -0
- package/src/client/public/default/mstile-310x310.png +0 -0
- package/src/client/public/default/mstile-70x70.png +0 -0
- package/src/client/public/default/safari-pinned-tab.svg +24 -0
- package/src/client/ssr/body/DefaultSplashScreen.js +2 -2
- package/src/index.js +9 -1
- package/src/monitor.js +24 -0
- package/src/runtime/lampp/Dockerfile +30 -39
- package/src/runtime/lampp/Lampp.js +11 -2
- package/src/server/client-build-docs.js +205 -0
- package/src/server/client-build.js +16 -166
- package/src/server/conf.js +12 -5
- package/src/server/valkey.js +102 -41
package/.env.development
CHANGED
package/.env.production
CHANGED
package/.env.test
CHANGED
package/.vscode/settings.json
CHANGED
package/README.md
CHANGED
|
@@ -27,10 +27,31 @@ template
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
30
51
|
<!-- badges -->
|
|
31
52
|
|
|
32
53
|
|
|
33
|
-
[](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.85) [](https://coveralls.io/github/underpostnet/engine?branch=master) [](https://www.npmjs.org/package/underpost) [](https://www.npmjs.com/package/underpost)
|
|
34
55
|
|
|
35
56
|
|
|
36
57
|
<!-- end-badges -->
|
|
@@ -40,6 +61,27 @@ template
|
|
|
40
61
|
|
|
41
62
|
|
|
42
63
|
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
43
85
|
</div>
|
|
44
86
|
|
|
45
87
|
<div align="center">
|
|
@@ -84,7 +126,7 @@ Run dev client server
|
|
|
84
126
|
npm run dev
|
|
85
127
|
```
|
|
86
128
|
<!-- -->
|
|
87
|
-
## underpost ci/cd cli v2.8.
|
|
129
|
+
## underpost ci/cd cli v2.8.85
|
|
88
130
|
|
|
89
131
|
### Usage: `underpost [options] [command]`
|
|
90
132
|
```
|
|
@@ -114,6 +156,7 @@ Commands:
|
|
|
114
156
|
fs [options] [path] Manages file storage, defaulting to file upload operations.
|
|
115
157
|
test [options] [deploy-list] Manages and runs tests, defaulting to the current Underpost default test suite.
|
|
116
158
|
monitor [options] <deploy-id> [env] Manages health server monitoring for specified deployments.
|
|
159
|
+
ssh [options] Import and start ssh server and client based on current default deployment ID.
|
|
117
160
|
run [options] <runner-id> [path] Runs a script from the specified path.
|
|
118
161
|
lxd [options] Manages LXD containers and virtual machines.
|
|
119
162
|
baremetal [options] [workflow-id] [hostname] [ip-address] Manages baremetal server operations, including installation, database setup, commissioning, and user management.
|
package/bin/build.js
CHANGED
|
@@ -53,7 +53,9 @@ if (process.argv.includes('conf')) {
|
|
|
53
53
|
fs.removeSync(toPath);
|
|
54
54
|
fs.mkdirSync(toPath, { recursive: true });
|
|
55
55
|
fs.copySync(`./engine-private/conf/${_confName}`, toPath);
|
|
56
|
-
if (fs.existsSync(
|
|
56
|
+
if (process.argv.includes('remove-replica') && fs.existsSync(`../${privateRepoName}/replica`)) {
|
|
57
|
+
fs.removeSync(`../${privateRepoName}/replica`);
|
|
58
|
+
} else if (fs.existsSync(`./engine-private/replica`)) {
|
|
57
59
|
const replicas = await fs.readdir(`./engine-private/replica`);
|
|
58
60
|
for (const replica of replicas)
|
|
59
61
|
if (replica.match(_confName))
|
|
@@ -150,10 +152,6 @@ const { DefaultConf } = await import(`../conf.${confName}.js`);
|
|
|
150
152
|
shellExec(`node bin/deploy update-default-conf ${confName}`);
|
|
151
153
|
|
|
152
154
|
fs.copyFileSync(`./conf.${confName}.js`, `${basePath}/conf.js`);
|
|
153
|
-
fs.copyFileSync(
|
|
154
|
-
`./.github/workflows/engine.${confName.split('dd-')[1]}.ci.yml`,
|
|
155
|
-
`${basePath}/.github/workflows/engine.${confName.split('dd-')[1]}.ci.yml`,
|
|
156
|
-
);
|
|
157
155
|
|
|
158
156
|
switch (confName) {
|
|
159
157
|
case 'dd-cyberia':
|
|
@@ -183,4 +181,16 @@ const { DefaultConf } = await import(`../conf.${confName}.js`);
|
|
|
183
181
|
fs.copyFileSync(`./manifests/deployment/${confName}-${env}/${file}`, `${basePath}/${file}`);
|
|
184
182
|
}
|
|
185
183
|
}
|
|
184
|
+
|
|
185
|
+
if (!fs.existsSync(`${basePath}/.github/workflows`))
|
|
186
|
+
fs.mkdirSync(`${basePath}/.github/workflows`, {
|
|
187
|
+
recursive: true,
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
fs.copyFileSync(`./.github/workflows/${repoName}.ci.yml`, `${basePath}/.github/workflows/${repoName}.ci.yml`);
|
|
191
|
+
fs.copyFileSync(`./.github/workflows/${repoName}.cd.yml`, `${basePath}/.github/workflows/${repoName}.cd.yml`);
|
|
192
|
+
|
|
193
|
+
if (fs.existsSync(`./src/ws/${confName.split('-')[1]}`)) {
|
|
194
|
+
fs.copySync(`./src/ws/${confName.split('-')[1]}`, `${basePath}/src/ws/${confName.split('-')[1]}`);
|
|
195
|
+
}
|
|
186
196
|
}
|
package/bin/deploy.js
CHANGED
|
@@ -531,74 +531,6 @@ try {
|
|
|
531
531
|
if (!proxyInstance) for (const host of Object.keys(serverConf)) port += Object.keys(serverConf[host]).length;
|
|
532
532
|
}
|
|
533
533
|
break;
|
|
534
|
-
case 'uml':
|
|
535
|
-
{
|
|
536
|
-
shellExec(`node bin/deploy fix-uml ${process.argv.slice(3).join(' ')}`);
|
|
537
|
-
shellExec(`node bin/deploy build-uml ${process.argv.slice(3).join(' ')}`);
|
|
538
|
-
}
|
|
539
|
-
break;
|
|
540
|
-
|
|
541
|
-
case 'fix-uml': {
|
|
542
|
-
// required: java jdk-11.0.1
|
|
543
|
-
|
|
544
|
-
// comment:
|
|
545
|
-
// '--add-opens=java.xml/com.sun.org.apache.xalan.internal.xsltc.trax="ALL-UNNAMED"'
|
|
546
|
-
// in plantuml.js src
|
|
547
|
-
|
|
548
|
-
// const deployId = process.argv[3];
|
|
549
|
-
// const clientId = process.argv[4];
|
|
550
|
-
// const folder = `./src/client/public/${clientId ? clientId : 'default'}/docs/plantuml`;
|
|
551
|
-
// const privateConfFolder = `./engine-private/conf/${deployId}`;
|
|
552
|
-
// const confData = !deployId
|
|
553
|
-
// ? Config.default
|
|
554
|
-
// : {
|
|
555
|
-
// client: JSON.parse(fs.readFileSync(`${privateConfFolder}/conf.client.json`, 'utf8')),
|
|
556
|
-
// ssr: JSON.parse(fs.readFileSync(`${privateConfFolder}/conf.ssr.json`, 'utf8')),
|
|
557
|
-
// server: JSON.parse(fs.readFileSync(`${privateConfFolder}/conf.server.json`, 'utf8')),
|
|
558
|
-
// cron: JSON.parse(fs.readFileSync(`${privateConfFolder}/conf.cron.json`, 'utf8')),
|
|
559
|
-
// };
|
|
560
|
-
|
|
561
|
-
fs.writeFileSync(
|
|
562
|
-
`./node_modules/plantuml/lib/plantuml.js`,
|
|
563
|
-
fs
|
|
564
|
-
.readFileSync(`./node_modules/plantuml/lib/plantuml.js`, 'utf8')
|
|
565
|
-
.replace(`'--add-opens=java.xml/com.sun.org.apache.xalan.internal.xsltc.trax="ALL-UNNAMED"'`, `//`),
|
|
566
|
-
);
|
|
567
|
-
}
|
|
568
|
-
case 'build-uml':
|
|
569
|
-
{
|
|
570
|
-
const plantuml = await import('plantuml');
|
|
571
|
-
const folder = process.argv[3] ? process.argv[3] : `./src/client/public/default/plantuml`;
|
|
572
|
-
const confData = Config.default;
|
|
573
|
-
|
|
574
|
-
if (!fs.existsSync(folder)) fs.mkdirSync(folder, { recursive: true });
|
|
575
|
-
|
|
576
|
-
for (const typeConf of Object.keys(confData)) {
|
|
577
|
-
logger.info(`generate ${typeConf} instance`);
|
|
578
|
-
try {
|
|
579
|
-
const svg = await plantuml(`
|
|
580
|
-
@startjson
|
|
581
|
-
${JSON.stringify(confData[typeConf])}
|
|
582
|
-
@endjson
|
|
583
|
-
`);
|
|
584
|
-
fs.writeFileSync(`${folder}/${typeConf}-conf.svg`, svg);
|
|
585
|
-
} catch (error) {
|
|
586
|
-
logger.error(error, error.stack);
|
|
587
|
-
}
|
|
588
|
-
logger.info(`generate ${typeConf} schema`);
|
|
589
|
-
try {
|
|
590
|
-
const svg = await plantuml(`
|
|
591
|
-
@startjson
|
|
592
|
-
${JSON.stringify(ejs(confData[typeConf]))}
|
|
593
|
-
@endjson
|
|
594
|
-
`);
|
|
595
|
-
fs.writeFileSync(`${folder}/${typeConf}-schema.svg`, svg);
|
|
596
|
-
} catch (error) {
|
|
597
|
-
logger.error(error, error.stack);
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
break;
|
|
602
534
|
|
|
603
535
|
case 'build-single-replica': {
|
|
604
536
|
const deployId = process.argv[3];
|
|
@@ -682,6 +614,15 @@ try {
|
|
|
682
614
|
}
|
|
683
615
|
|
|
684
616
|
case 'version-build': {
|
|
617
|
+
shellCd(`/home/dd/engine`);
|
|
618
|
+
shellExec(`git reset`);
|
|
619
|
+
shellExec(`git checkout .`);
|
|
620
|
+
shellExec(`git clean -f -d`);
|
|
621
|
+
shellCd(`/home/dd/engine/engine-private`);
|
|
622
|
+
shellExec(`git reset`);
|
|
623
|
+
shellExec(`git checkout .`);
|
|
624
|
+
shellExec(`git clean -f -d`);
|
|
625
|
+
shellCd(`/home/dd/engine`);
|
|
685
626
|
const originPackageJson = JSON.parse(fs.readFileSync(`package.json`, 'utf8'));
|
|
686
627
|
const newVersion = process.argv[3] ?? originPackageJson.version;
|
|
687
628
|
const { version } = originPackageJson;
|
|
@@ -863,7 +804,7 @@ ${shellExec(`git log | grep Author: | sort -u`, { stdout: true }).split(`\n`).jo
|
|
|
863
804
|
// mongodb-0.mongodb-service
|
|
864
805
|
DefaultConf.server[host][path].db.host = 'mongodb://mongodb-service:27017';
|
|
865
806
|
confName = '';
|
|
866
|
-
} else if (confName) {
|
|
807
|
+
} else if (confName && fs.existsSync(`./engine-private/conf/${confName}`)) {
|
|
867
808
|
DefaultConf.client = JSON.parse(fs.readFileSync(`./engine-private/conf/${confName}/conf.client.json`, 'utf8'));
|
|
868
809
|
DefaultConf.server = JSON.parse(fs.readFileSync(`./engine-private/conf/${confName}/conf.server.json`, 'utf8'));
|
|
869
810
|
DefaultConf.ssr = JSON.parse(fs.readFileSync(`./engine-private/conf/${confName}/conf.ssr.json`, 'utf8'));
|
|
@@ -894,6 +835,12 @@ ${shellExec(`git log | grep Author: | sort -u`, { stdout: true }).split(`\n`).jo
|
|
|
894
835
|
}
|
|
895
836
|
|
|
896
837
|
case 'ssh': {
|
|
838
|
+
// only import + start
|
|
839
|
+
// node bin/deploy ssh root@<host> <password> import
|
|
840
|
+
|
|
841
|
+
// generate + import + start
|
|
842
|
+
// node bin/deploy ssh root@<host> <password>
|
|
843
|
+
|
|
897
844
|
const host = process.argv[3] ?? `root@${await ip.public.ipv4()}`;
|
|
898
845
|
const domain = host.split('@')[1];
|
|
899
846
|
const user = 'root'; // host.split('@')[0];
|
|
@@ -966,7 +913,7 @@ EOF`);
|
|
|
966
913
|
// shellExec(`sudo echo "" > ~/.ssh/known_hosts`);
|
|
967
914
|
|
|
968
915
|
// ssh-copy-id -i ~/.ssh/id_rsa.pub -p <port_number> <username>@<host>
|
|
969
|
-
shellExec(`ssh-copy-id -i ~/.ssh/id_rsa.pub -p ${port} ${host}`);
|
|
916
|
+
// shellExec(`ssh-copy-id -i ~/.ssh/id_rsa.pub -p ${port} ${host}`);
|
|
970
917
|
// debug:
|
|
971
918
|
// shellExec(`ssh -vvv ${host}`);
|
|
972
919
|
|
|
@@ -1110,18 +1057,6 @@ EOF`);
|
|
|
1110
1057
|
break;
|
|
1111
1058
|
}
|
|
1112
1059
|
|
|
1113
|
-
case 'monitor': {
|
|
1114
|
-
shellExec(
|
|
1115
|
-
`node bin monitor ${process.argv[6] === 'sync' ? '--sync ' : ''}--type ${process.argv[3]} ${process.argv[4]} ${
|
|
1116
|
-
process.argv[5]
|
|
1117
|
-
}`,
|
|
1118
|
-
{
|
|
1119
|
-
async: true,
|
|
1120
|
-
},
|
|
1121
|
-
);
|
|
1122
|
-
break;
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
1060
|
case 'postgresql': {
|
|
1126
1061
|
if (process.argv.includes('install')) {
|
|
1127
1062
|
shellExec(`sudo dnf install -y postgresql-server postgresql`);
|
package/bin/file.js
CHANGED
|
@@ -72,20 +72,14 @@ try {
|
|
|
72
72
|
|
|
73
73
|
if (type === 'update-template') {
|
|
74
74
|
fs.copySync(`./.vscode`, `../pwa-microservices-template/.vscode`);
|
|
75
|
-
fs.copySync(`./.github`, `../pwa-microservices-template/.github`);
|
|
75
|
+
// fs.copySync(`./.github`, `../pwa-microservices-template/.github`);
|
|
76
76
|
fs.copySync(`./src/client/public/default`, `../pwa-microservices-template/src/client/public/default`);
|
|
77
77
|
|
|
78
78
|
for (const checkoutPath of ['README.md', 'package-lock.json', 'package.json'])
|
|
79
79
|
shellExec(`cd ../pwa-microservices-template && git checkout ${checkoutPath}`);
|
|
80
80
|
|
|
81
81
|
for (const deletePath of [
|
|
82
|
-
'
|
|
83
|
-
'.github/workflows/docker-image.yml',
|
|
84
|
-
'.github/workflows/deploy.ssh.yml',
|
|
85
|
-
'.github/workflows/deploy.api-rest.yml',
|
|
86
|
-
'.github/workflows/engine.lampp.ci.yml',
|
|
87
|
-
'.github/workflows/engine.core.ci.yml',
|
|
88
|
-
'.github/workflows/engine.cyberia.ci.yml',
|
|
82
|
+
'./.github',
|
|
89
83
|
'./manifests/deployment/dd-lampp-development',
|
|
90
84
|
'./manifests/deployment/dd-cyberia-development',
|
|
91
85
|
'./manifests/deployment/dd-core-development',
|
|
@@ -94,6 +88,19 @@ try {
|
|
|
94
88
|
]) {
|
|
95
89
|
if (fs.existsSync(deletePath)) fs.removeSync('../pwa-microservices-template/' + deletePath);
|
|
96
90
|
}
|
|
91
|
+
|
|
92
|
+
fs.mkdirSync(`../pwa-microservices-template/.github/workflows`, {
|
|
93
|
+
recursive: true,
|
|
94
|
+
});
|
|
95
|
+
for (const _path of [
|
|
96
|
+
`./.github/workflows/pwa-microservices-template-page.cd.yml`,
|
|
97
|
+
`./.github/workflows/pwa-microservices-template-test.ci.yml`,
|
|
98
|
+
`./.github/workflows/npmpkg.ci.yml`,
|
|
99
|
+
`./.github/workflows/ghpkg.ci.yml`,
|
|
100
|
+
`./.github/workflows/publish.ci.yml`,
|
|
101
|
+
])
|
|
102
|
+
fs.copyFileSync(_path, `../pwa-microservices-template/${_path}`);
|
|
103
|
+
|
|
97
104
|
const originPackageJson = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
|
|
98
105
|
const templatePackageJson = JSON.parse(fs.readFileSync('../pwa-microservices-template/package.json', 'utf8'));
|
|
99
106
|
|
package/cli.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## underpost ci/cd cli v2.8.
|
|
1
|
+
## underpost ci/cd cli v2.8.85
|
|
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
|
+
ssh [options] Import and start ssh server and client based on current default deployment ID.
|
|
31
32
|
run [options] <runner-id> [path] Runs a script from the specified path.
|
|
32
33
|
lxd [options] Manages LXD containers and virtual machines.
|
|
33
34
|
baremetal [options] [workflow-id] [hostname] [ip-address] Manages baremetal server operations, including installation, database setup, commissioning, and user management.
|
|
@@ -118,7 +119,8 @@ options.
|
|
|
118
119
|
Arguments:
|
|
119
120
|
path The absolute or relative directory path of the repository.
|
|
120
121
|
commit-type The type of commit to perform. Options: feat, fix, docs, style,
|
|
121
|
-
refactor, perf, cd,
|
|
122
|
+
refactor, perf, ci, cd, infra, build, test, chore, revert,
|
|
123
|
+
backup.
|
|
122
124
|
module-tag Optional: Sets a specific module tag for the commit.
|
|
123
125
|
message Optional: Provides an additional custom message for the commit.
|
|
124
126
|
|
|
@@ -206,49 +208,53 @@ Options:
|
|
|
206
208
|
Manages Kubernetes clusters, defaulting to Kind cluster initialization.
|
|
207
209
|
|
|
208
210
|
Arguments:
|
|
209
|
-
pod-name
|
|
211
|
+
pod-name Optional: Filters information by a specific pod name.
|
|
210
212
|
|
|
211
213
|
Options:
|
|
212
|
-
--reset
|
|
213
|
-
|
|
214
|
-
--mariadb
|
|
215
|
-
--mysql
|
|
216
|
-
--mongodb
|
|
217
|
-
--
|
|
218
|
-
--
|
|
219
|
-
|
|
220
|
-
--
|
|
221
|
-
|
|
222
|
-
--
|
|
223
|
-
|
|
224
|
-
--
|
|
225
|
-
|
|
226
|
-
--
|
|
227
|
-
|
|
228
|
-
--
|
|
229
|
-
|
|
230
|
-
--
|
|
231
|
-
|
|
232
|
-
--
|
|
233
|
-
|
|
234
|
-
--
|
|
235
|
-
|
|
236
|
-
--
|
|
237
|
-
|
|
238
|
-
--
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
--
|
|
246
|
-
|
|
247
|
-
--
|
|
248
|
-
|
|
249
|
-
--
|
|
250
|
-
|
|
251
|
-
|
|
214
|
+
--reset Deletes all clusters and prunes all related data and
|
|
215
|
+
caches.
|
|
216
|
+
--mariadb Initializes the cluster with a MariaDB statefulset.
|
|
217
|
+
--mysql Initializes the cluster with a MySQL statefulset.
|
|
218
|
+
--mongodb Initializes the cluster with a MongoDB statefulset.
|
|
219
|
+
--mongo-db-host <host> Set custom mongo db host
|
|
220
|
+
--postgresql Initializes the cluster with a PostgreSQL
|
|
221
|
+
statefulset.
|
|
222
|
+
--mongodb4 Initializes the cluster with a MongoDB 4.4 service.
|
|
223
|
+
--valkey Initializes the cluster with a Valkey service.
|
|
224
|
+
--contour Initializes the cluster with Project Contour base
|
|
225
|
+
HTTPProxy and Envoy.
|
|
226
|
+
--cert-manager Initializes the cluster with a Let's Encrypt
|
|
227
|
+
production ClusterIssuer.
|
|
228
|
+
--dedicated-gpu Initializes the cluster with dedicated GPU base
|
|
229
|
+
resources and environment settings.
|
|
230
|
+
--info Retrieves information about all deployed Kubernetes
|
|
231
|
+
objects.
|
|
232
|
+
--full Initializes the cluster with all available
|
|
233
|
+
statefulsets and services.
|
|
234
|
+
--ns-use <ns-name> Switches the current Kubernetes context to the
|
|
235
|
+
specified namespace.
|
|
236
|
+
--kubeadm Initializes the cluster using kubeadm for control
|
|
237
|
+
plane management.
|
|
238
|
+
--dev Initializes a development-specific cluster
|
|
239
|
+
configuration.
|
|
240
|
+
--list-pods Displays detailed information about all pods.
|
|
241
|
+
--info-capacity Displays the current total machine capacity
|
|
242
|
+
information.
|
|
243
|
+
--info-capacity-pod Displays the current machine capacity information per
|
|
244
|
+
pod.
|
|
245
|
+
--pull-image Sets an optional associated image to pull during
|
|
246
|
+
initialization.
|
|
247
|
+
--init-host Installs necessary Kubernetes node CLI tools (e.g.,
|
|
248
|
+
kind, kubeadm, docker, podman, helm).
|
|
249
|
+
--uninstall-host Uninstalls all host components installed by
|
|
250
|
+
init-host.
|
|
251
|
+
--config Sets the base Kubernetes node configuration.
|
|
252
|
+
--worker Sets the context for a worker node.
|
|
253
|
+
--chown Sets the appropriate ownership for Kubernetes
|
|
254
|
+
kubeconfig files.
|
|
255
|
+
--k3s Initializes the cluster using K3s (Lightweight
|
|
256
|
+
Kubernetes).
|
|
257
|
+
-h, --help display help for command
|
|
252
258
|
|
|
253
259
|
```
|
|
254
260
|
|
|
@@ -547,6 +553,20 @@ Options:
|
|
|
547
553
|
```
|
|
548
554
|
|
|
549
555
|
|
|
556
|
+
### `ssh` :
|
|
557
|
+
```
|
|
558
|
+
Usage: underpost ssh [options]
|
|
559
|
+
|
|
560
|
+
Import and start ssh server and client based on current default deployment ID.
|
|
561
|
+
|
|
562
|
+
Options:
|
|
563
|
+
--generate Generates new ssh credential and stores it in current private
|
|
564
|
+
keys file storage.
|
|
565
|
+
-h, --help display help for command
|
|
566
|
+
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
|
|
550
570
|
### `run` :
|
|
551
571
|
```
|
|
552
572
|
Usage: underpost run [options] <runner-id> [path]
|
|
@@ -554,7 +574,7 @@ Options:
|
|
|
554
574
|
Runs a script from the specified path.
|
|
555
575
|
|
|
556
576
|
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.
|
|
577
|
+
runner-id The runner ID to run. Options: spark-template, rmi, kill, secret, gpu-env, tf-gpu-test, dev-cluster, cyberia-ide, engine-ide, template-deploy, ssh-deploy, ide, monitor, db-client, cluster, deploy, tf-vae-test, deploy-job.
|
|
558
578
|
path The absolute or relative directory path where the script is located.
|
|
559
579
|
|
|
560
580
|
Options:
|
|
@@ -564,6 +584,7 @@ Options:
|
|
|
564
584
|
--pod-name <pod-name> Optional: Specifies the pod name for test execution.
|
|
565
585
|
--volume-host-path <volume-host-path> Optional: Specifies the volume host path for test execution.
|
|
566
586
|
--volume-mount-path <volume-mount-path> Optional: Specifies the volume mount path for test execution.
|
|
587
|
+
--volume-type <volume-type> Optional: Specifies the volume type for test execution.
|
|
567
588
|
--image-name <image-name> Optional: Specifies the image name for test execution.
|
|
568
589
|
--container-name <container-name> Optional: Specifies the container name for test execution.
|
|
569
590
|
--namespace <namespace> Optional: Specifies the namespace for test execution.
|
package/conf.js
CHANGED
package/docker-compose.yml
CHANGED
|
@@ -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.
|
|
20
|
+
image: localhost/rockylinux9-underpost:v2.8.85
|
|
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.
|
|
103
|
+
image: localhost/rockylinux9-underpost:v2.8.85
|
|
104
104
|
# resources:
|
|
105
105
|
# requests:
|
|
106
106
|
# memory: "124Ki"
|
|
@@ -5,7 +5,7 @@ sudo lspci -nnk | egrep -i 'vga|3d' -A3
|
|
|
5
5
|
lsmod | egrep 'nvidia|nouveau|amdgpu' || true
|
|
6
6
|
|
|
7
7
|
# if exists nvidia tool
|
|
8
|
-
nvidia-smi 2>/dev/null || echo "nvidia-smi
|
|
8
|
+
nvidia-smi 2>/dev/null || echo "nvidia-smi not found"
|
|
9
9
|
|
|
10
10
|
# kernel related errors
|
|
11
11
|
sudo dmesg | egrep -i 'nvidia|nouveau|amdgpu' --color=auto
|
package/package.json
CHANGED
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
"type": "module",
|
|
3
3
|
"main": "src/index.js",
|
|
4
4
|
"name": "underpost",
|
|
5
|
-
"version": "2.8.
|
|
5
|
+
"version": "2.8.85",
|
|
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",
|
|
9
|
+
"build": "node bin/deploy build-full-client",
|
|
9
10
|
"test": "env-cmd -f .env.test c8 mocha",
|
|
10
11
|
"pm2": "env-cmd -f .env.production pm2 start src/server.js --node-args=\"--max-old-space-size=8192\" --name engine",
|
|
11
12
|
"dev": "env-cmd -f .env.development node src/client.dev default",
|
|
12
13
|
"dev-img": "env-cmd -f .env.development node src/server",
|
|
13
14
|
"prod-img": "env-cmd -f .env.production node src/server",
|
|
14
|
-
"monitor": "pm2 start
|
|
15
|
+
"monitor": "pm2 start src/monitor.js --name monitor -- dd production",
|
|
15
16
|
"dev-api": "env-cmd -f .env.development nodemon --watch src --ignore src/client src/api",
|
|
16
17
|
"dev-client": "env-cmd -f .env.development node src/client.dev",
|
|
17
18
|
"proxy": "node src/proxy proxy",
|
|
@@ -23,8 +24,7 @@
|
|
|
23
24
|
"docker:start": "docker-compose up",
|
|
24
25
|
"prettier": "prettier --write .",
|
|
25
26
|
"fix": "npm audit fix --force && npm audit",
|
|
26
|
-
"changelog": "auto-changelog"
|
|
27
|
-
"build": "node bin/deploy build-full-client"
|
|
27
|
+
"changelog": "auto-changelog"
|
|
28
28
|
},
|
|
29
29
|
"bin": {
|
|
30
30
|
"underpost": "bin/index.js"
|
|
@@ -99,14 +99,12 @@
|
|
|
99
99
|
"peer": "^1.0.2",
|
|
100
100
|
"peerjs": "^1.5.2",
|
|
101
101
|
"pixi.js": "7.4.2",
|
|
102
|
-
"plantuml": "^0.0.2",
|
|
103
102
|
"prom-client": "^15.1.2",
|
|
104
103
|
"public-ip": "^6.0.1",
|
|
105
104
|
"read": "^2.1.0",
|
|
106
105
|
"rrule": "^2.8.1",
|
|
107
106
|
"sharp": "^0.32.5",
|
|
108
107
|
"shelljs": "^0.8.5",
|
|
109
|
-
"simple-icons": "^13.9.0",
|
|
110
108
|
"sitemap": "^7.1.1",
|
|
111
109
|
"socket.io": "^4.8.0",
|
|
112
110
|
"sortablejs": "^1.15.0",
|