underpost 2.99.6 → 2.99.7
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/ghpkg.ci.yml +10 -25
- package/.github/workflows/npmpkg.ci.yml +13 -2
- package/CHANGELOG.md +496 -0
- package/README.md +3 -3
- package/bin/deploy.js +13 -3
- package/cli.md +46 -28
- package/jsdoc.json +26 -5
- package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +9 -2
- package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +9 -2
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
- package/manifests/deployment/dd-test-development/deployment.yaml +2 -2
- package/package.json +1 -2
- package/src/cli/baremetal.js +8 -322
- package/src/cli/cloud-init.js +2 -2
- package/src/cli/index.js +12 -1
- package/src/cli/repository.js +166 -13
- package/src/cli/run.js +16 -42
- package/src/cli/ssh.js +1 -1
- package/src/cli/system.js +332 -0
- package/src/db/DataBaseProvider.js +3 -3
- package/src/db/mariadb/MariaDB.js +3 -3
- package/src/db/mongo/MongooseDB.js +3 -3
- package/src/index.js +17 -5
- package/src/mailer/EmailRender.js +3 -3
- package/src/mailer/MailerProvider.js +4 -4
- package/src/server/backup.js +15 -4
- package/src/server/client-build-docs.js +28 -2
- package/src/server/conf.js +6 -5
- package/src/server/cron.js +48 -38
- package/src/server/dns.js +0 -8
package/bin/deploy.js
CHANGED
|
@@ -468,10 +468,9 @@ try {
|
|
|
468
468
|
shellExec(`node bin new --deploy-id dd-default`);
|
|
469
469
|
console.log(fs.existsSync(`./engine-private/conf/dd-default`));
|
|
470
470
|
shellExec(`sudo rm -rf ./engine-private/conf/dd-default`);
|
|
471
|
-
shellExec(
|
|
472
|
-
`node bin cron --cmd 'cd /home/dd/engine && node bin run secret && node bin env dd-cron production' --git --kubeadm --dev --setup-start`,
|
|
473
|
-
);
|
|
471
|
+
shellExec(`node bin cron --dev --setup-start`);
|
|
474
472
|
shellExec(`node bin/deploy build-envs`);
|
|
473
|
+
shellExec(`node bin cmt --changelog-build`);
|
|
475
474
|
break;
|
|
476
475
|
}
|
|
477
476
|
|
|
@@ -1125,6 +1124,17 @@ nvidia/gpu-operator \
|
|
|
1125
1124
|
break;
|
|
1126
1125
|
}
|
|
1127
1126
|
|
|
1127
|
+
case 'sync-start': {
|
|
1128
|
+
const originPackageJson = JSON.parse(fs.readFileSync(`./package.json`, 'utf8'));
|
|
1129
|
+
for (const deployId of fs.readFileSync(`./engine-private/deploy/dd.router`, 'utf8').split(',')) {
|
|
1130
|
+
const packageJsonPath = `./engine-private/conf/${deployId}/package.json`;
|
|
1131
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
|
1132
|
+
packageJson.scripts.start = `${originPackageJson.scripts.start} ${deployId}`;
|
|
1133
|
+
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 4), 'utf8');
|
|
1134
|
+
}
|
|
1135
|
+
break;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1128
1138
|
case 'sync-envs': {
|
|
1129
1139
|
for (const deployId of ['dd-cron'].concat(
|
|
1130
1140
|
fs.readFileSync(`./engine-private/deploy/dd.router`, 'utf8').split(','),
|
package/cli.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## underpost ci/cd cli v2.99.
|
|
1
|
+
## underpost ci/cd cli v2.99.7
|
|
2
2
|
|
|
3
3
|
### Usage: `underpost [options] [command]`
|
|
4
4
|
```
|
|
@@ -29,7 +29,7 @@ Commands:
|
|
|
29
29
|
fs [options] [path] Manages file storage, defaulting to file upload operations.
|
|
30
30
|
test [options] [deploy-list] Manages and runs tests, defaulting to the current Underpost default test suite.
|
|
31
31
|
monitor [options] <deploy-id> [env] Manages health server monitoring for specified deployments.
|
|
32
|
-
ssh [options]
|
|
32
|
+
ssh [options] Manages SSH credentials and sessions for remote access to cluster nodes or services.
|
|
33
33
|
run [options] <runner-id> [path] Runs specified scripts using various runners.
|
|
34
34
|
lxd [options] Manages LXD containers and virtual machines.
|
|
35
35
|
baremetal [options] [workflow-id] Manages baremetal server operations, including installation, database setup, commissioning, and user management.
|
|
@@ -142,33 +142,46 @@ Manages commits to a GitHub repository, supporting various commit types and
|
|
|
142
142
|
options.
|
|
143
143
|
|
|
144
144
|
Arguments:
|
|
145
|
-
path
|
|
146
|
-
|
|
147
|
-
commit-type
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
145
|
+
path The absolute or relative directory path of
|
|
146
|
+
the repository.
|
|
147
|
+
commit-type The type of commit to perform. Options:
|
|
148
|
+
feat, fix, docs, style, refactor, perf,
|
|
149
|
+
ci, cd, infra, build, test, chore, revert,
|
|
150
|
+
backup.
|
|
151
|
+
module-tag Optional: Sets a specific module tag for
|
|
152
|
+
the commit.
|
|
153
|
+
message Optional: Provides an additional custom
|
|
154
|
+
message for the commit.
|
|
153
155
|
|
|
154
156
|
Options:
|
|
155
|
-
--log <latest-n>
|
|
156
|
-
|
|
157
|
-
--last-msg <latest-n>
|
|
158
|
-
--empty
|
|
159
|
-
--copy
|
|
160
|
-
|
|
161
|
-
--info
|
|
162
|
-
|
|
163
|
-
--
|
|
164
|
-
--
|
|
165
|
-
--deploy-id <deploy-id>
|
|
166
|
-
|
|
167
|
-
--cached
|
|
168
|
-
--hashes <hashes>
|
|
169
|
-
|
|
170
|
-
--extension <extension>
|
|
171
|
-
-
|
|
157
|
+
--log <latest-n> Shows commit history from the specified
|
|
158
|
+
number of latest n path commits.
|
|
159
|
+
--last-msg <latest-n> Displays the last n commit message.
|
|
160
|
+
--empty Allows committing with empty files.
|
|
161
|
+
--copy Copies the generated commit message to the
|
|
162
|
+
clipboard.
|
|
163
|
+
--info Displays information about available
|
|
164
|
+
commit types.
|
|
165
|
+
--diff Shows the current git diff changes.
|
|
166
|
+
--edit Edit last commit.
|
|
167
|
+
--deploy-id <deploy-id> Sets the deployment configuration ID for
|
|
168
|
+
the commit context.
|
|
169
|
+
--cached Commit staged changes only or context.
|
|
170
|
+
--hashes <hashes> Comma-separated list of specific file
|
|
171
|
+
hashes of commits.
|
|
172
|
+
--extension <extension> specific file extensions of commits.
|
|
173
|
+
--changelog [latest-n] Print plain the changelog of the specified
|
|
174
|
+
number of latest n commits, if no number
|
|
175
|
+
is provided it will get the changelog to
|
|
176
|
+
latest ci integration
|
|
177
|
+
--changelog-build Builds a CHANGELOG.md file based on the
|
|
178
|
+
commit history
|
|
179
|
+
--changelog-min-version <version> Sets the minimum version limit for
|
|
180
|
+
--changelog-build (default: 2.85.0)
|
|
181
|
+
--changelog-no-hash Excludes commit hashes from the generated
|
|
182
|
+
changelog entries (used with
|
|
183
|
+
--changelog-build).
|
|
184
|
+
-h, --help display help for command
|
|
172
185
|
|
|
173
186
|
```
|
|
174
187
|
|
|
@@ -664,6 +677,8 @@ Options:
|
|
|
664
677
|
--dry-run Preview cron jobs without executing them.
|
|
665
678
|
--create-job-now After applying manifests, immediately create a Job
|
|
666
679
|
from each CronJob (requires --apply).
|
|
680
|
+
--ssh Execute backup commands via SSH on the remote node
|
|
681
|
+
instead of locally.
|
|
667
682
|
-h, --help display help for command
|
|
668
683
|
|
|
669
684
|
```
|
|
@@ -766,6 +781,9 @@ Options:
|
|
|
766
781
|
```
|
|
767
782
|
Usage: underpost ssh [options]
|
|
768
783
|
|
|
784
|
+
Manages SSH credentials and sessions for remote access to cluster nodes or
|
|
785
|
+
services.
|
|
786
|
+
|
|
769
787
|
Options:
|
|
770
788
|
--deploy-id <deploy-id> Sets deploy id context for ssh operations.
|
|
771
789
|
--generate Generates new ssh credential and stores it in
|
|
@@ -811,7 +829,7 @@ Options:
|
|
|
811
829
|
Runs specified scripts using various runners.
|
|
812
830
|
|
|
813
831
|
Arguments:
|
|
814
|
-
runner-id The runner ID to run. Options: dev-cluster,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,
|
|
832
|
+
runner-id The runner ID to run. Options: dev-cluster,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,release-cmt,deploy-test,sync-replica,tf-vae-test,spark-template,rmi,kill,secret,underpost-config,gpu-env,tf-gpu-test,deploy-job.
|
|
815
833
|
path The input value, identifier, or path for the operation.
|
|
816
834
|
|
|
817
835
|
Options:
|
package/jsdoc.json
CHANGED
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
"allowUnknownTags": true,
|
|
4
4
|
"dictionaries": ["jsdoc"]
|
|
5
5
|
},
|
|
6
|
+
"categoryfile": "./jsdoc-categories.json",
|
|
6
7
|
"source": {
|
|
7
|
-
"include": ["./src", "./package.json", "./README.md"],
|
|
8
|
+
"include": ["./src", "./package.json", "./README.md", "./CHANGELOG.md"],
|
|
8
9
|
"includePattern": ".js$",
|
|
9
|
-
"excludePattern": "(node_modules
|
|
10
|
+
"excludePattern": "(node_modules/|/docs/)"
|
|
10
11
|
},
|
|
11
12
|
"plugins": ["plugins/markdown", "plugins/summarize", "plugins/shout"],
|
|
12
13
|
"opts": {
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
"readme": "./README.md",
|
|
15
16
|
"recurse": true,
|
|
16
17
|
"destination": "./public/www.nexodev.org/docs/",
|
|
18
|
+
"tutorials": "./src/client/public/nexodev/docs/references",
|
|
17
19
|
"encoding": "utf8",
|
|
18
20
|
"verbose": true,
|
|
19
21
|
"theme_opts": {
|
|
@@ -21,9 +23,28 @@
|
|
|
21
23
|
"search": true,
|
|
22
24
|
"title": "Nexodev - ERP, CRM Development & Cloud DevOps Services",
|
|
23
25
|
"homepageTitle": "Docs",
|
|
24
|
-
"favicon": "./public/www.nexodev.org/"
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
"favicon": "./public/www.nexodev.org/",
|
|
27
|
+
"displayModuleHeader": true,
|
|
28
|
+
"includeFilesListInHomepage": true,
|
|
29
|
+
"sections": ["Modules", "Classes", "Namespaces", "Tutorials", "Events", "Interfaces", "Global"],
|
|
30
|
+
"meta": [
|
|
31
|
+
{
|
|
32
|
+
"name": "author",
|
|
33
|
+
"content": "Nexodev - underpostnet"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "description",
|
|
37
|
+
"content": "Underpost Engine - End2end CI/CD cloud to applications federation tools documentation"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "keywords",
|
|
41
|
+
"content": "underpost, engine, erp, crm, devops, cloud, kubernetes, documentation, jsdoc"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"footer": "<div style='text-align:center;margin:1rem 0;font-size:0.85rem;'>© Nexodev / underpostnet — <a href='https://github.com/underpostnet/engine' target='_blank'>Engine</a> | <a href='https://www.npmjs.com/package/underpost' target='_blank'>npm</a></div>",
|
|
45
|
+
"create_style": ".jsdoc-category-badge{display:inline-block;padding:2px 8px;border-radius:4px;background:#e3f2fd;color:#1565c0;font-size:0.82em;font-weight:600;margin-bottom:0.4em;border:1px solid #90caf9}.jsdoc-category{margin-bottom:0.5em}#sidebar-classes,#sidebar-classes+.sidebar-section-children-container{display:none !important}",
|
|
46
|
+
"add_scripts": ""
|
|
47
|
+
}
|
|
27
48
|
},
|
|
28
49
|
"markdown": {
|
|
29
50
|
"hardwrap": false,
|
|
@@ -23,18 +23,25 @@ spec:
|
|
|
23
23
|
spec:
|
|
24
24
|
containers:
|
|
25
25
|
- name: dd-cron-backup
|
|
26
|
-
image: underpost/underpost-engine:v2.99.
|
|
26
|
+
image: underpost/underpost-engine:v2.99.7
|
|
27
27
|
command:
|
|
28
28
|
- /bin/sh
|
|
29
29
|
- -c
|
|
30
30
|
- >
|
|
31
|
-
|
|
31
|
+
cd /home/dd/engine && node bin env dd-cron production && node bin cron --git --dev --ssh dd-lampp,dd-cyberia,dd-core,dd-test backup
|
|
32
32
|
volumeMounts:
|
|
33
33
|
- mountPath: /home/dd/engine
|
|
34
34
|
name: underpost-cron-container-volume
|
|
35
|
+
- mountPath: /usr/lib/node_modules/underpost/.env
|
|
36
|
+
name: underpost-share-env
|
|
37
|
+
subPath: .env
|
|
35
38
|
volumes:
|
|
36
39
|
- hostPath:
|
|
37
40
|
path: /home/dd/engine
|
|
38
41
|
type: Directory
|
|
39
42
|
name: underpost-cron-container-volume
|
|
43
|
+
- hostPath:
|
|
44
|
+
path: /root/.nvm/versions/node/v24.10.0/lib/node_modules/underpost
|
|
45
|
+
type: DirectoryOrCreate
|
|
46
|
+
name: underpost-share-env
|
|
40
47
|
restartPolicy: OnFailure
|
|
@@ -23,18 +23,25 @@ spec:
|
|
|
23
23
|
spec:
|
|
24
24
|
containers:
|
|
25
25
|
- name: dd-cron-dns
|
|
26
|
-
image: underpost/underpost-engine:v2.99.
|
|
26
|
+
image: underpost/underpost-engine:v2.99.7
|
|
27
27
|
command:
|
|
28
28
|
- /bin/sh
|
|
29
29
|
- -c
|
|
30
30
|
- >
|
|
31
|
-
|
|
31
|
+
cd /home/dd/engine && node bin env dd-cron production && node bin cron --git --dev --ssh dd-cron dns
|
|
32
32
|
volumeMounts:
|
|
33
33
|
- mountPath: /home/dd/engine
|
|
34
34
|
name: underpost-cron-container-volume
|
|
35
|
+
- mountPath: /usr/lib/node_modules/underpost/.env
|
|
36
|
+
name: underpost-share-env
|
|
37
|
+
subPath: .env
|
|
35
38
|
volumes:
|
|
36
39
|
- hostPath:
|
|
37
40
|
path: /home/dd/engine
|
|
38
41
|
type: Directory
|
|
39
42
|
name: underpost-cron-container-volume
|
|
43
|
+
- hostPath:
|
|
44
|
+
path: /root/.nvm/versions/node/v24.10.0/lib/node_modules/underpost
|
|
45
|
+
type: DirectoryOrCreate
|
|
46
|
+
name: underpost-share-env
|
|
40
47
|
restartPolicy: OnFailure
|
|
@@ -17,7 +17,7 @@ spec:
|
|
|
17
17
|
spec:
|
|
18
18
|
containers:
|
|
19
19
|
- name: dd-default-development-blue
|
|
20
|
-
image: localhost/rockylinux9-underpost:v2.99.
|
|
20
|
+
image: localhost/rockylinux9-underpost:v2.99.7
|
|
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.99.
|
|
103
|
+
image: localhost/rockylinux9-underpost:v2.99.7
|
|
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.99.
|
|
21
|
+
image: localhost/rockylinux9-underpost:v2.99.7
|
|
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.99.
|
|
106
|
+
image: localhost/rockylinux9-underpost:v2.99.7
|
|
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.99.
|
|
5
|
+
"version": "2.99.7",
|
|
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",
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"docs": "jsdoc -c jsdoc.json",
|
|
18
18
|
"install-global": "npm install -g jsdoc && npm install -g prettier && npm install -g env-cmd",
|
|
19
19
|
"install-test": "npm install -g mocha && npm install -g c8 && npm install -g coveralls",
|
|
20
|
-
"install-underpost": "cp -a $(npm root -g)/underpost/node_modules ./node_modules && npm install --only=dev --ignore-scripts",
|
|
21
20
|
"install": "npm run install-global && npm run install-test",
|
|
22
21
|
"prettier": "prettier --write .",
|
|
23
22
|
"fix": "npm audit fix --force && npm audit",
|