cyberia 2.89.2 → 2.89.45
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 +2 -0
- package/.env.production +2 -0
- package/.env.test +2 -0
- package/.github/workflows/engine-cyberia.cd.yml +4 -0
- package/.github/workflows/release.cd.yml +2 -0
- package/bin/cyberia.js +10 -7
- package/bin/deploy.js +22 -15
- package/bin/index.js +10 -7
- package/cli.md +105 -54
- package/deployment.yaml +34 -6
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
- package/manifests/deployment/dd-test-development/deployment.yaml +18 -6
- package/manifests/deployment/dd-test-development/proxy.yaml +2 -0
- package/manifests/deployment/kafka/deployment.yaml +0 -2
- package/manifests/deployment/spark/spark-pi-py.yaml +0 -1
- package/manifests/deployment/tensorflow/tf-gpu-test.yaml +0 -2
- package/manifests/envoy-service-nodeport.yaml +0 -1
- package/manifests/kubeadm-calico-config.yaml +10 -115
- package/manifests/letsencrypt-prod.yaml +0 -1
- package/manifests/mariadb/statefulset.yaml +1 -1
- package/manifests/mongodb/statefulset.yaml +11 -11
- package/manifests/mongodb-4.4/service-deployment.yaml +1 -3
- package/manifests/mysql/pv-pvc.yaml +1 -1
- package/manifests/mysql/statefulset.yaml +1 -1
- package/manifests/pv-pvc-dd.yaml +34 -0
- package/manifests/valkey/service.yaml +0 -1
- package/manifests/valkey/statefulset.yaml +2 -3
- package/package.json +1 -1
- package/proxy.yaml +6 -0
- package/scripts/device-scan.sh +43 -21
- package/scripts/gen-fqdns.sh +14 -0
- package/scripts/ip-info.sh +118 -0
- package/scripts/rpmfusion-ffmpeg-setup.sh +1 -0
- package/src/api/object-layer/object-layer.controller.js +19 -0
- package/src/api/object-layer/object-layer.router.js +4 -0
- package/src/api/object-layer/object-layer.service.js +111 -0
- package/src/api/user/user.model.js +10 -1
- package/src/cli/cluster.js +88 -75
- package/src/cli/deploy.js +165 -85
- package/src/cli/index.js +44 -3
- package/src/cli/monitor.js +12 -6
- package/src/cli/repository.js +13 -1
- package/src/cli/run.js +127 -60
- package/src/client/components/core/Logger.js +1 -1
- package/src/client/components/core/Modal.js +5 -0
- package/src/client/components/core/ObjectLayerEngineModal.js +336 -72
- package/src/client/components/core/ObjectLayerEngineViewer.js +239 -420
- package/src/client/components/core/Router.js +10 -1
- package/src/client/components/cyberia-portal/LogInCyberiaPortal.js +1 -1
- package/src/client/components/cyberia-portal/LogOutCyberiaPortal.js +1 -1
- package/src/client/components/cyberia-portal/MenuCyberiaPortal.js +1 -1
- package/src/client/components/cyberia-portal/ObjectLayerCyberiaPortal.js +44 -4
- package/src/client/services/default/default.management.js +25 -5
- package/src/client/services/object-layer/object-layer.management.js +8 -8
- package/src/client/services/object-layer/object-layer.service.js +34 -0
- package/src/index.js +1 -1
- package/src/server/client-build.js +5 -4
- package/src/server/conf.js +1 -1
- package/src/server/start.js +3 -1
- package/manifests/kubelet-config.yaml +0 -65
- package/manifests/mongodb/backup-access.yaml +0 -16
- package/manifests/mongodb/backup-cronjob.yaml +0 -42
- package/manifests/mongodb/backup-pv-pvc.yaml +0 -22
- package/manifests/mongodb/configmap.yaml +0 -26
package/.env.development
CHANGED
|
@@ -22,6 +22,8 @@ ROUTER=changethis
|
|
|
22
22
|
CLOUDINARY_CLOUD_NAME=changethis
|
|
23
23
|
CLOUDINARY_API_KEY=changethis
|
|
24
24
|
CLOUDINARY_API_SECRET=changethis
|
|
25
|
+
CLOUDINARY_PASSWORD=changethis
|
|
26
|
+
CLOUDINARY_EMAIL=admin@default.net
|
|
25
27
|
DB_PG_MAAS_NAME=changethis
|
|
26
28
|
DB_PG_MAAS_PASS=changethis
|
|
27
29
|
DB_PG_MAAS_USER=changethis
|
package/.env.production
CHANGED
|
@@ -23,6 +23,8 @@ ROUTER=changethis
|
|
|
23
23
|
CLOUDINARY_CLOUD_NAME=changethis
|
|
24
24
|
CLOUDINARY_API_KEY=changethis
|
|
25
25
|
CLOUDINARY_API_SECRET=changethis
|
|
26
|
+
CLOUDINARY_PASSWORD=changethis
|
|
27
|
+
CLOUDINARY_EMAIL=admin@default.net
|
|
26
28
|
DB_PG_MAAS_NAME=changethis
|
|
27
29
|
DB_PG_MAAS_PASS=changethis
|
|
28
30
|
DB_PG_MAAS_USER=changethis
|
package/.env.test
CHANGED
|
@@ -22,6 +22,8 @@ ROUTER=changethis
|
|
|
22
22
|
CLOUDINARY_CLOUD_NAME=changethis
|
|
23
23
|
CLOUDINARY_API_KEY=changethis
|
|
24
24
|
CLOUDINARY_API_SECRET=changethis
|
|
25
|
+
CLOUDINARY_PASSWORD=changethis
|
|
26
|
+
CLOUDINARY_EMAIL=admin@default.net
|
|
25
27
|
DB_PG_MAAS_NAME=changethis
|
|
26
28
|
DB_PG_MAAS_PASS=changethis
|
|
27
29
|
DB_PG_MAAS_USER=changethis
|
|
@@ -22,6 +22,8 @@ jobs:
|
|
|
22
22
|
key: ${{ secrets.SSH_PRIV_KEY }}
|
|
23
23
|
# Remote port (optional)
|
|
24
24
|
port: ${{ secrets.SSH_PORT }}
|
|
25
|
+
# Optional: increase timeout for long-running commands
|
|
26
|
+
command_timeout: 60m
|
|
25
27
|
# Optional: if your private key has a passphrase, add:
|
|
26
28
|
# passphrase: ${{ secrets.SSH_KEY_PASSPHRASE }}
|
|
27
29
|
# Commands to run on the remote VM
|
|
@@ -47,6 +49,8 @@ jobs:
|
|
|
47
49
|
key: ${{ secrets.SSH_PRIV_KEY }}
|
|
48
50
|
# Remote port (optional)
|
|
49
51
|
port: ${{ secrets.SSH_PORT }}
|
|
52
|
+
# Optional: increase timeout for long-running commands
|
|
53
|
+
command_timeout: 60m
|
|
50
54
|
# Optional: if your private key has a passphrase, add:
|
|
51
55
|
# passphrase: ${{ secrets.SSH_KEY_PASSPHRASE }}
|
|
52
56
|
# Commands to run on the remote VM
|
|
@@ -22,6 +22,8 @@ jobs:
|
|
|
22
22
|
key: ${{ secrets.SSH_PRIV_KEY }}
|
|
23
23
|
# Remote port (optional)
|
|
24
24
|
port: ${{ secrets.SSH_PORT }}
|
|
25
|
+
# Optional: increase timeout for long-running commands
|
|
26
|
+
command_timeout: 60m
|
|
25
27
|
# Optional: if your private key has a passphrase, add:
|
|
26
28
|
# passphrase: ${{ secrets.SSH_KEY_PASSPHRASE }}
|
|
27
29
|
# Commands to run on the remote VM
|
package/bin/cyberia.js
CHANGED
|
@@ -8,7 +8,6 @@ import { loggerFactory } from '../src/server/logger.js';
|
|
|
8
8
|
import { DataBaseProvider } from '../src/db/DataBaseProvider.js';
|
|
9
9
|
import {
|
|
10
10
|
pngDirectoryIteratorByObjectLayerType,
|
|
11
|
-
frameFactory,
|
|
12
11
|
getKeyFramesDirectionsFromNumberFolderDirection,
|
|
13
12
|
processAndPushFrame,
|
|
14
13
|
buildImgFromTile,
|
|
@@ -18,14 +17,13 @@ import {
|
|
|
18
17
|
import { program as underpostProgram } from '../src/cli/index.js';
|
|
19
18
|
|
|
20
19
|
import crypto from 'crypto';
|
|
21
|
-
|
|
22
|
-
shellCd(`/home/dd/engine`);
|
|
20
|
+
import Underpost from '../src/index.js';
|
|
23
21
|
|
|
24
22
|
const logger = loggerFactory(import.meta);
|
|
25
23
|
|
|
26
24
|
const program = new Command();
|
|
27
25
|
|
|
28
|
-
const version =
|
|
26
|
+
const version = Underpost.version;
|
|
29
27
|
|
|
30
28
|
program
|
|
31
29
|
.name('cyberia')
|
|
@@ -41,9 +39,10 @@ program
|
|
|
41
39
|
.option('--show-frame <show-frame-input>', 'View object layer frame e.g. anon_08_0')
|
|
42
40
|
.option('--env-path <env-path>', 'Env path e.g. ./engine-private/conf/dd-cyberia/.env.development')
|
|
43
41
|
.option('--mongo-host <mongo-host>', 'Mongo host override')
|
|
44
|
-
.
|
|
42
|
+
.option('--storage-file-path <storage-file-path>', 'Storage file path override')
|
|
43
|
+
.action(async (options = { import: false, showFrame: '', envPath: '', mongoHost: '', storageFilePath: '' }) => {
|
|
45
44
|
if (!options.envPath) options.envPath = `./.env`;
|
|
46
|
-
dotenv.config({ path: options.envPath, override: true });
|
|
45
|
+
if (fs.existsSync(options.envPath)) dotenv.config({ path: options.envPath, override: true });
|
|
47
46
|
|
|
48
47
|
const deployId = process.env.DEFAULT_DEPLOY_ID;
|
|
49
48
|
const host = process.env.DEFAULT_DEPLOY_HOST;
|
|
@@ -74,6 +73,8 @@ program
|
|
|
74
73
|
|
|
75
74
|
await ObjectLayer.deleteMany();
|
|
76
75
|
|
|
76
|
+
const storage = options.storageFilePath ? JSON.parse(fs.readFileSync(options.storageFilePath, 'utf8')) : null;
|
|
77
|
+
|
|
77
78
|
const objectLayers = {};
|
|
78
79
|
|
|
79
80
|
if (options.import || options.showFrame) {
|
|
@@ -82,6 +83,8 @@ program
|
|
|
82
83
|
await pngDirectoryIteratorByObjectLayerType(
|
|
83
84
|
argItemType,
|
|
84
85
|
async ({ path, objectLayerType, objectLayerId, direction, frame }) => {
|
|
86
|
+
if (storage && !storage[`src/client/public/cyberia/assets/${objectLayerType}/${objectLayerId}/08/0.png`])
|
|
87
|
+
return;
|
|
85
88
|
if (options.showFrame && !`${objectLayerId}_${direction}_${frame}`.match(options.showFrame)) return;
|
|
86
89
|
console.log(path, { objectLayerType, objectLayerId, direction, frame });
|
|
87
90
|
if (!objectLayers[objectLayerId]) {
|
|
@@ -148,7 +151,7 @@ try {
|
|
|
148
151
|
// throw new Error('');
|
|
149
152
|
program.parse();
|
|
150
153
|
} catch (error) {
|
|
151
|
-
logger.
|
|
154
|
+
logger.warn(error);
|
|
152
155
|
process.argv = process.argv.filter((c) => c !== 'underpost');
|
|
153
156
|
logger.warn('Rerouting to underpost cli...');
|
|
154
157
|
try {
|
package/bin/deploy.js
CHANGED
|
@@ -216,7 +216,7 @@ try {
|
|
|
216
216
|
if (argHost.length && argPath.length && (!argHost.includes(host) || !argPath.includes(path))) {
|
|
217
217
|
delete serverConf[host][path];
|
|
218
218
|
} else {
|
|
219
|
-
serverConf[host][path].liteBuild =
|
|
219
|
+
serverConf[host][path].liteBuild = false;
|
|
220
220
|
serverConf[host][path].minifyBuild = process.env.NODE_ENV === 'production' ? true : false;
|
|
221
221
|
if (serverConf[host][path].singleReplica && serverConf[host][path].replicas) {
|
|
222
222
|
deployIdSingleReplicas = deployIdSingleReplicas.concat(
|
|
@@ -1071,34 +1071,39 @@ EOF`);
|
|
|
1071
1071
|
shellExec(args.join(' '));
|
|
1072
1072
|
}
|
|
1073
1073
|
if (process.argv.includes('secret')) {
|
|
1074
|
+
const namespace = process.argv.find((arg) => arg.startsWith('--namespace='))?.split('=')[1] || 'default';
|
|
1074
1075
|
{
|
|
1075
1076
|
const secretSelector = `fastapi-postgres-credentials`;
|
|
1076
|
-
shellExec(`sudo kubectl delete secret ${secretSelector}`);
|
|
1077
|
+
shellExec(`sudo kubectl delete secret ${secretSelector} -n ${namespace} --ignore-not-found`);
|
|
1077
1078
|
shellExec(
|
|
1078
1079
|
`sudo kubectl create secret generic ${secretSelector}` +
|
|
1079
1080
|
` --from-literal=POSTGRES_DB=postgresdb` +
|
|
1080
1081
|
` --from-literal=POSTGRES_USER=admin` +
|
|
1081
|
-
` --from-file=POSTGRES_PASSWORD=/home/dd/engine/engine-private/postgresql-password
|
|
1082
|
+
` --from-file=POSTGRES_PASSWORD=/home/dd/engine/engine-private/postgresql-password` +
|
|
1083
|
+
` --dry-run=client -o yaml | kubectl apply -f - -n ${namespace}`,
|
|
1082
1084
|
);
|
|
1083
1085
|
}
|
|
1084
1086
|
{
|
|
1085
1087
|
const secretSelector = `fastapi-backend-config-secret`;
|
|
1086
|
-
shellExec(`sudo kubectl delete secret ${secretSelector}`);
|
|
1088
|
+
shellExec(`sudo kubectl delete secret ${secretSelector} -n ${namespace} --ignore-not-found`);
|
|
1087
1089
|
shellExec(
|
|
1088
1090
|
`sudo kubectl create secret generic ${secretSelector}` +
|
|
1089
1091
|
` --from-file=SECRET_KEY=/home/dd/engine/engine-private/postgresql-password` +
|
|
1090
1092
|
` --from-literal=FIRST_SUPERUSER=development@underpost.net` +
|
|
1091
|
-
` --from-file=FIRST_SUPERUSER_PASSWORD=/home/dd/engine/engine-private/postgresql-password
|
|
1093
|
+
` --from-file=FIRST_SUPERUSER_PASSWORD=/home/dd/engine/engine-private/postgresql-password` +
|
|
1094
|
+
` --dry-run=client -o yaml | kubectl apply -f - -n ${namespace}`,
|
|
1092
1095
|
);
|
|
1093
1096
|
}
|
|
1094
1097
|
}
|
|
1095
1098
|
if (process.argv.includes('run-back')) {
|
|
1096
|
-
|
|
1097
|
-
shellExec(`sudo kubectl apply -f ./manifests/deployment/fastapi/backend-
|
|
1099
|
+
const namespace = process.argv.find((arg) => arg.startsWith('--namespace='))?.split('=')[1] || 'default';
|
|
1100
|
+
shellExec(`sudo kubectl apply -f ./manifests/deployment/fastapi/backend-deployment.yml -n ${namespace}`);
|
|
1101
|
+
shellExec(`sudo kubectl apply -f ./manifests/deployment/fastapi/backend-service.yml -n ${namespace}`);
|
|
1098
1102
|
}
|
|
1099
1103
|
if (process.argv.includes('run-front')) {
|
|
1100
|
-
|
|
1101
|
-
shellExec(`sudo kubectl apply -f ./manifests/deployment/fastapi/frontend-
|
|
1104
|
+
const namespace = process.argv.find((arg) => arg.startsWith('--namespace='))?.split('=')[1] || 'default';
|
|
1105
|
+
shellExec(`sudo kubectl apply -f ./manifests/deployment/fastapi/frontend-deployment.yml -n ${namespace}`);
|
|
1106
|
+
shellExec(`sudo kubectl apply -f ./manifests/deployment/fastapi/frontend-service.yml -n ${namespace}`);
|
|
1102
1107
|
}
|
|
1103
1108
|
break;
|
|
1104
1109
|
}
|
|
@@ -1117,14 +1122,15 @@ EOF`);
|
|
|
1117
1122
|
|
|
1118
1123
|
case 'kafka': {
|
|
1119
1124
|
// https://medium.com/@martin.hodges/deploying-kafka-on-a-kind-kubernetes-cluster-for-development-and-testing-purposes-ed7adefe03cb
|
|
1125
|
+
const namespace = process.argv.find((arg) => arg.startsWith('--namespace='))?.split('=')[1] || 'kafka';
|
|
1120
1126
|
const imageName = `doughgle/kafka-kraft`;
|
|
1121
1127
|
shellExec(`docker pull ${imageName}`);
|
|
1122
1128
|
if (!process.argv.includes('kubeadm'))
|
|
1123
1129
|
shellExec(
|
|
1124
1130
|
`${process.argv.includes('kubeadm') ? `ctr -n k8s.io images import` : `kind load docker-image`} ${imageName}`,
|
|
1125
1131
|
);
|
|
1126
|
-
shellExec(`kubectl create namespace
|
|
1127
|
-
shellExec(`kubectl apply -f ./manifests/deployment/kafka/deployment.yaml`);
|
|
1132
|
+
shellExec(`kubectl create namespace ${namespace} --dry-run=client -o yaml | kubectl apply -f -`);
|
|
1133
|
+
shellExec(`kubectl apply -f ./manifests/deployment/kafka/deployment.yaml -n ${namespace}`);
|
|
1128
1134
|
// kubectl logs kafka-0 -n kafka | grep STARTED
|
|
1129
1135
|
// kubectl logs kafka-1 -n kafka | grep STARTED
|
|
1130
1136
|
// kubectl logs kafka-2 -n kafka | grep STARTED
|
|
@@ -1152,9 +1158,9 @@ libnvidia-container-tools-${NVIDIA_CONTAINER_TOOLKIT_VERSION} \
|
|
|
1152
1158
|
libnvidia-container1-${NVIDIA_CONTAINER_TOOLKIT_VERSION}`);
|
|
1153
1159
|
|
|
1154
1160
|
// https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/latest/getting-started.html
|
|
1155
|
-
|
|
1156
|
-
shellExec(`kubectl create ns
|
|
1157
|
-
shellExec(`kubectl label --overwrite ns
|
|
1161
|
+
const namespace = 'gpu-operator';
|
|
1162
|
+
shellExec(`kubectl create ns ${namespace} --dry-run=client -o yaml | kubectl apply -f -`);
|
|
1163
|
+
shellExec(`kubectl label --overwrite ns ${namespace} pod-security.kubernetes.io/enforce=privileged`);
|
|
1158
1164
|
|
|
1159
1165
|
shellExec(`helm repo add nvidia https://helm.ngc.nvidia.com/nvidia \
|
|
1160
1166
|
&& helm repo update`);
|
|
@@ -1209,7 +1215,8 @@ nvidia/gpu-operator \
|
|
|
1209
1215
|
process.argv.includes('kubeadm') ? `ctr -n k8s.io images import` : `kind load docker-image`
|
|
1210
1216
|
} ${image}`,
|
|
1211
1217
|
);
|
|
1212
|
-
|
|
1218
|
+
const namespace = process.argv.find((arg) => arg.startsWith('--namespace='))?.split('=')[1] || 'default';
|
|
1219
|
+
shellExec(`kubectl apply -f ./manifests/deployment/spark/spark-pi-py.yaml -n ${namespace}`);
|
|
1213
1220
|
|
|
1214
1221
|
// Check the status of the Spark job:
|
|
1215
1222
|
// kubectl get sparkapplications.sparkoperator.k8s.io -n default
|
package/bin/index.js
CHANGED
|
@@ -8,7 +8,6 @@ import { loggerFactory } from '../src/server/logger.js';
|
|
|
8
8
|
import { DataBaseProvider } from '../src/db/DataBaseProvider.js';
|
|
9
9
|
import {
|
|
10
10
|
pngDirectoryIteratorByObjectLayerType,
|
|
11
|
-
frameFactory,
|
|
12
11
|
getKeyFramesDirectionsFromNumberFolderDirection,
|
|
13
12
|
processAndPushFrame,
|
|
14
13
|
buildImgFromTile,
|
|
@@ -18,14 +17,13 @@ import {
|
|
|
18
17
|
import { program as underpostProgram } from '../src/cli/index.js';
|
|
19
18
|
|
|
20
19
|
import crypto from 'crypto';
|
|
21
|
-
|
|
22
|
-
shellCd(`/home/dd/engine`);
|
|
20
|
+
import Underpost from '../src/index.js';
|
|
23
21
|
|
|
24
22
|
const logger = loggerFactory(import.meta);
|
|
25
23
|
|
|
26
24
|
const program = new Command();
|
|
27
25
|
|
|
28
|
-
const version =
|
|
26
|
+
const version = Underpost.version;
|
|
29
27
|
|
|
30
28
|
program
|
|
31
29
|
.name('cyberia')
|
|
@@ -41,9 +39,10 @@ program
|
|
|
41
39
|
.option('--show-frame <show-frame-input>', 'View object layer frame e.g. anon_08_0')
|
|
42
40
|
.option('--env-path <env-path>', 'Env path e.g. ./engine-private/conf/dd-cyberia/.env.development')
|
|
43
41
|
.option('--mongo-host <mongo-host>', 'Mongo host override')
|
|
44
|
-
.
|
|
42
|
+
.option('--storage-file-path <storage-file-path>', 'Storage file path override')
|
|
43
|
+
.action(async (options = { import: false, showFrame: '', envPath: '', mongoHost: '', storageFilePath: '' }) => {
|
|
45
44
|
if (!options.envPath) options.envPath = `./.env`;
|
|
46
|
-
dotenv.config({ path: options.envPath, override: true });
|
|
45
|
+
if (fs.existsSync(options.envPath)) dotenv.config({ path: options.envPath, override: true });
|
|
47
46
|
|
|
48
47
|
const deployId = process.env.DEFAULT_DEPLOY_ID;
|
|
49
48
|
const host = process.env.DEFAULT_DEPLOY_HOST;
|
|
@@ -74,6 +73,8 @@ program
|
|
|
74
73
|
|
|
75
74
|
await ObjectLayer.deleteMany();
|
|
76
75
|
|
|
76
|
+
const storage = options.storageFilePath ? JSON.parse(fs.readFileSync(options.storageFilePath, 'utf8')) : null;
|
|
77
|
+
|
|
77
78
|
const objectLayers = {};
|
|
78
79
|
|
|
79
80
|
if (options.import || options.showFrame) {
|
|
@@ -82,6 +83,8 @@ program
|
|
|
82
83
|
await pngDirectoryIteratorByObjectLayerType(
|
|
83
84
|
argItemType,
|
|
84
85
|
async ({ path, objectLayerType, objectLayerId, direction, frame }) => {
|
|
86
|
+
if (storage && !storage[`src/client/public/cyberia/assets/${objectLayerType}/${objectLayerId}/08/0.png`])
|
|
87
|
+
return;
|
|
85
88
|
if (options.showFrame && !`${objectLayerId}_${direction}_${frame}`.match(options.showFrame)) return;
|
|
86
89
|
console.log(path, { objectLayerType, objectLayerId, direction, frame });
|
|
87
90
|
if (!objectLayers[objectLayerId]) {
|
|
@@ -148,7 +151,7 @@ try {
|
|
|
148
151
|
// throw new Error('');
|
|
149
152
|
program.parse();
|
|
150
153
|
} catch (error) {
|
|
151
|
-
logger.
|
|
154
|
+
logger.warn(error);
|
|
152
155
|
process.argv = process.argv.filter((c) => c !== 'underpost');
|
|
153
156
|
logger.warn('Rerouting to underpost cli...');
|
|
154
157
|
try {
|
package/cli.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## underpost ci/cd cli v2.89.
|
|
1
|
+
## underpost ci/cd cli v2.89.45
|
|
2
2
|
|
|
3
3
|
### Usage: `underpost [options] [command]`
|
|
4
4
|
```
|
|
@@ -16,6 +16,7 @@ Commands:
|
|
|
16
16
|
env [deploy-id] [env] [subConf] Sets environment variables and configurations related to a specific deployment ID.
|
|
17
17
|
config [options] <operator> [key] [value] Manages Underpost configurations using various operators.
|
|
18
18
|
root Displays the root path of the npm installation.
|
|
19
|
+
ip [options] Displays the current public machine IP addresses.
|
|
19
20
|
cluster [options] [pod-name] Manages Kubernetes clusters, defaulting to Kind cluster initialization.
|
|
20
21
|
deploy [options] [deploy-list] [env] Manages application deployments, defaulting to deploying development pods.
|
|
21
22
|
secret [options] <platform> Manages secrets for various platforms.
|
|
@@ -146,6 +147,9 @@ Options:
|
|
|
146
147
|
--deploy-id <deploy-id> Sets the deployment configuration ID for the commit
|
|
147
148
|
context.
|
|
148
149
|
--cached Commit staged changes only or context.
|
|
150
|
+
--hashes <hashes> Comma-separated list of specific file hashes of
|
|
151
|
+
commits.
|
|
152
|
+
--extension <extension> specific file extensions of commits.
|
|
149
153
|
-h, --help display help for command
|
|
150
154
|
|
|
151
155
|
```
|
|
@@ -221,6 +225,19 @@ Options:
|
|
|
221
225
|
```
|
|
222
226
|
|
|
223
227
|
|
|
228
|
+
### `ip` :
|
|
229
|
+
```
|
|
230
|
+
Usage: underpost ip [options]
|
|
231
|
+
|
|
232
|
+
Displays the current public machine IP addresses.
|
|
233
|
+
|
|
234
|
+
Options:
|
|
235
|
+
--copy Copies the IP addresses to the clipboard.
|
|
236
|
+
-h, --help display help for command
|
|
237
|
+
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
|
|
224
241
|
### `cluster` :
|
|
225
242
|
```
|
|
226
243
|
Usage: underpost cluster [options] [pod-name]
|
|
@@ -228,58 +245,79 @@ Options:
|
|
|
228
245
|
Manages Kubernetes clusters, defaulting to Kind cluster initialization.
|
|
229
246
|
|
|
230
247
|
Arguments:
|
|
231
|
-
pod-name
|
|
248
|
+
pod-name Optional: Filters information by a
|
|
249
|
+
specific pod name.
|
|
232
250
|
|
|
233
251
|
Options:
|
|
234
|
-
--reset
|
|
235
|
-
|
|
236
|
-
--mariadb
|
|
237
|
-
|
|
238
|
-
--
|
|
239
|
-
|
|
240
|
-
--
|
|
241
|
-
|
|
242
|
-
--
|
|
243
|
-
--
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
--
|
|
257
|
-
|
|
258
|
-
--
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
--
|
|
262
|
-
|
|
263
|
-
--
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
--
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
--
|
|
275
|
-
|
|
276
|
-
--
|
|
277
|
-
|
|
278
|
-
--
|
|
279
|
-
|
|
280
|
-
--
|
|
281
|
-
|
|
282
|
-
-
|
|
252
|
+
--reset Deletes all clusters and prunes all
|
|
253
|
+
related data and caches.
|
|
254
|
+
--mariadb Initializes the cluster with a MariaDB
|
|
255
|
+
statefulset.
|
|
256
|
+
--mysql Initializes the cluster with a MySQL
|
|
257
|
+
statefulset.
|
|
258
|
+
--mongodb Initializes the cluster with a MongoDB
|
|
259
|
+
statefulset.
|
|
260
|
+
--mongo-db-host <host> Set custom mongo db host
|
|
261
|
+
--postgresql Initializes the cluster with a
|
|
262
|
+
PostgreSQL statefulset.
|
|
263
|
+
--mongodb4 Initializes the cluster with a MongoDB
|
|
264
|
+
4.4 service.
|
|
265
|
+
--valkey Initializes the cluster with a Valkey
|
|
266
|
+
service.
|
|
267
|
+
--contour Initializes the cluster with Project
|
|
268
|
+
Contour base HTTPProxy and Envoy.
|
|
269
|
+
--cert-manager Initializes the cluster with a Let's
|
|
270
|
+
Encrypt production ClusterIssuer.
|
|
271
|
+
--dedicated-gpu Initializes the cluster with dedicated
|
|
272
|
+
GPU base resources and environment
|
|
273
|
+
settings.
|
|
274
|
+
--full Initializes the cluster with all
|
|
275
|
+
available statefulsets and services.
|
|
276
|
+
--ns-use <ns-name> Switches the current Kubernetes context
|
|
277
|
+
to the specified namespace (creates if
|
|
278
|
+
it doesn't exist).
|
|
279
|
+
--kubeadm Initializes the cluster using kubeadm
|
|
280
|
+
for control plane management.
|
|
281
|
+
--pod-network-cidr <cidr> Sets custom pod network CIDR for kubeadm
|
|
282
|
+
cluster initialization (defaults to
|
|
283
|
+
"192.168.0.0/16").
|
|
284
|
+
--control-plane-endpoint <endpoint> Sets custom control plane endpoint for
|
|
285
|
+
kubeadm cluster initialization (defaults
|
|
286
|
+
to "localhost:6443").
|
|
287
|
+
--grafana Initializes the cluster with a Grafana
|
|
288
|
+
deployment.
|
|
289
|
+
--prom [hosts] Initializes the cluster with a
|
|
290
|
+
Prometheus Operator deployment and
|
|
291
|
+
monitor scrap for specified hosts.
|
|
292
|
+
--dev Initializes a development-specific
|
|
293
|
+
cluster configuration.
|
|
294
|
+
--list-pods Displays detailed information about all
|
|
295
|
+
pods.
|
|
296
|
+
--info-capacity Displays the current total machine
|
|
297
|
+
capacity information.
|
|
298
|
+
--info-capacity-pod Displays the current machine capacity
|
|
299
|
+
information per pod.
|
|
300
|
+
--pull-image Sets an optional associated image to
|
|
301
|
+
pull during initialization.
|
|
302
|
+
--init-host Installs necessary Kubernetes node CLI
|
|
303
|
+
tools (e.g., kind, kubeadm, docker,
|
|
304
|
+
podman, helm).
|
|
305
|
+
--uninstall-host Uninstalls all host components installed
|
|
306
|
+
by init-host.
|
|
307
|
+
--config Sets the base Kubernetes node
|
|
308
|
+
configuration.
|
|
309
|
+
--worker Sets the context for a worker node.
|
|
310
|
+
--chown Sets the appropriate ownership for
|
|
311
|
+
Kubernetes kubeconfig files.
|
|
312
|
+
--k3s Initializes the cluster using K3s
|
|
313
|
+
(Lightweight Kubernetes).
|
|
314
|
+
--hosts <hosts> A comma-separated list of cluster
|
|
315
|
+
hostnames or IP addresses.
|
|
316
|
+
--remove-volume-host-paths Removes specified volume host paths
|
|
317
|
+
after execution.
|
|
318
|
+
--namespace <namespace> Kubernetes namespace for cluster
|
|
319
|
+
operations (defaults to "default").
|
|
320
|
+
-h, --help display help for command
|
|
283
321
|
|
|
284
322
|
```
|
|
285
323
|
|
|
@@ -306,8 +344,6 @@ Options:
|
|
|
306
344
|
configuration.
|
|
307
345
|
--expose Exposes services matching the provided
|
|
308
346
|
deployment ID list.
|
|
309
|
-
--info-util Displays useful `kubectl` utility
|
|
310
|
-
management commands.
|
|
311
347
|
--cert Resets TLS/SSL certificate secrets for
|
|
312
348
|
deployments.
|
|
313
349
|
--cert-hosts <hosts> Resets TLS/SSL certificate secrets for
|
|
@@ -327,6 +363,8 @@ Options:
|
|
|
327
363
|
--disable-update-deployment Disables updates to deployments.
|
|
328
364
|
--disable-update-proxy Disables updates to proxies.
|
|
329
365
|
--disable-deployment-proxy Disables proxies of deployments.
|
|
366
|
+
--disable-update-volume Disables updates to volume mounts during
|
|
367
|
+
deployment.
|
|
330
368
|
--status Retrieves current network traffic data
|
|
331
369
|
from resource deployments and the host
|
|
332
370
|
machine network configuration.
|
|
@@ -337,6 +375,8 @@ Options:
|
|
|
337
375
|
--restore-hosts Restores default `/etc/hosts` entries.
|
|
338
376
|
--disable-update-underpost-config Disables updates to Underpost
|
|
339
377
|
configuration during deployment.
|
|
378
|
+
--namespace <namespace> Kubernetes namespace for deployment
|
|
379
|
+
operations (defaults to "default").
|
|
340
380
|
-h, --help display help for command
|
|
341
381
|
|
|
342
382
|
```
|
|
@@ -628,7 +668,7 @@ Options:
|
|
|
628
668
|
Runs a script from the specified path.
|
|
629
669
|
|
|
630
670
|
Arguments:
|
|
631
|
-
runner-id The runner ID to run. Options: spark-template, rmi, kill, secret, underpost-config, gpu-env, tf-gpu-test, dev-cluster, metadata, svc-ls, svc-rm, ssh-cluster-info, dev-hosts-expose, dev-hosts-restore, cluster-build, template-deploy, template-deploy-image, clean, pull, release-deploy, ssh-deploy, ide, sync, tz, cron, ls-deployments, ls-images, host-update,
|
|
671
|
+
runner-id The runner ID to run. Options: spark-template, rmi, kill, secret, underpost-config, gpu-env, tf-gpu-test, dev-cluster, metadata, svc-ls, svc-rm, ssh-cluster-info, dev-hosts-expose, dev-hosts-restore, cluster-build, template-deploy, template-deploy-image, clean, pull, release-deploy, ssh-deploy, ide, sync, tz, cron, ls-deployments, ls-images, host-update, dd-container, ip-info, monitor, db-client, git-conf, promote, metrics, cluster, deploy, dev, service, sh, log, release-cmt, sync-replica, tf-vae-test, deploy-job.
|
|
632
672
|
path The absolute or relative directory path where the script is located.
|
|
633
673
|
|
|
634
674
|
Options:
|
|
@@ -647,6 +687,15 @@ Options:
|
|
|
647
687
|
--image-name <image-name> Optional: Specifies the image name for test execution.
|
|
648
688
|
--container-name <container-name> Optional: Specifies the container name for test execution.
|
|
649
689
|
--namespace <namespace> Optional: Specifies the namespace for test execution.
|
|
690
|
+
--tty Enables TTY for the container in deploy-job.
|
|
691
|
+
--stdin Keeps STDIN open for the container in deploy-job.
|
|
692
|
+
--restart-policy <policy> Sets the restart policy for the job in deploy-job.
|
|
693
|
+
--runtime-class-name <name> Sets the runtime class name for the job in deploy-job.
|
|
694
|
+
--image-pull-policy <policy> Sets the image pull policy for the job in deploy-job.
|
|
695
|
+
--api-version <version> Sets the API version for the job manifest in deploy-job.
|
|
696
|
+
--labels <labels> Optional: Specifies a comma-separated list of key-value pairs for labels (e.g., "app=my-app,env=prod").
|
|
697
|
+
--claim-name <name> Optional: Specifies the claim name for volume mounting in deploy-job.
|
|
698
|
+
--kind <kind-type> Specifies the kind of Kubernetes resource (e.g., Job, Deployment) for deploy-job.
|
|
650
699
|
--kubeadm Flag to indicate Kubeadm cluster type context
|
|
651
700
|
--k3s Flag to indicate K3s cluster type context
|
|
652
701
|
--force Forces operation, overriding any warnings or conflicts.
|
|
@@ -654,7 +703,9 @@ Options:
|
|
|
654
703
|
--reset Resets the runner state before execution.
|
|
655
704
|
--terminal Enables terminal mode for interactive script execution.
|
|
656
705
|
--dev-proxy-port-offset <port-offset> Sets a custom port offset for development proxy.
|
|
706
|
+
--host-network Enables host network mode for the runner execution.
|
|
657
707
|
--conf-server-path <conf-server-path> Sets a custom configuration server path.
|
|
708
|
+
--underpost-root <underpost-root> Sets a custom Underpost root path.
|
|
658
709
|
-h, --help display help for command
|
|
659
710
|
|
|
660
711
|
```
|
package/deployment.yaml
CHANGED
|
@@ -3,6 +3,7 @@ apiVersion: apps/v1
|
|
|
3
3
|
kind: Deployment
|
|
4
4
|
metadata:
|
|
5
5
|
name: dd-cyberia-development-blue
|
|
6
|
+
namespace: default
|
|
6
7
|
labels:
|
|
7
8
|
app: dd-cyberia-development-blue
|
|
8
9
|
spec:
|
|
@@ -17,7 +18,7 @@ spec:
|
|
|
17
18
|
spec:
|
|
18
19
|
containers:
|
|
19
20
|
- name: dd-cyberia-development-blue
|
|
20
|
-
image: localhost/rockylinux9-underpost:v2.89.
|
|
21
|
+
image: localhost/rockylinux9-underpost:v2.89.45
|
|
21
22
|
# resources:
|
|
22
23
|
# requests:
|
|
23
24
|
# memory: "96294Ki"
|
|
@@ -33,18 +34,31 @@ spec:
|
|
|
33
34
|
npm install -g underpost &&
|
|
34
35
|
underpost secret underpost --create-from-file /etc/config/.env.development &&
|
|
35
36
|
underpost start --build --run dd-cyberia development
|
|
37
|
+
|
|
36
38
|
volumeMounts:
|
|
37
|
-
- name: config-volume
|
|
39
|
+
- name: config-volume-dd-cyberia-development-blue
|
|
38
40
|
mountPath: /etc/config
|
|
41
|
+
|
|
42
|
+
- name: vol-public-dd-cyberia-dd-cyberia-development-blue
|
|
43
|
+
mountPath: /home/dd/engine/src/client/public/cyberia
|
|
44
|
+
|
|
39
45
|
volumes:
|
|
40
|
-
- name: config-volume
|
|
46
|
+
- name: config-volume-dd-cyberia-development-blue
|
|
41
47
|
configMap:
|
|
42
48
|
name: underpost-config
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
- name: vol-public-dd-cyberia-dd-cyberia-development-blue
|
|
52
|
+
persistentVolumeClaim:
|
|
53
|
+
claimName: pvc-public-dd-cyberia-dd-cyberia-development-blue
|
|
54
|
+
|
|
55
|
+
|
|
43
56
|
---
|
|
44
57
|
apiVersion: v1
|
|
45
58
|
kind: Service
|
|
46
59
|
metadata:
|
|
47
60
|
name: dd-cyberia-development-blue-service
|
|
61
|
+
namespace: default
|
|
48
62
|
spec:
|
|
49
63
|
selector:
|
|
50
64
|
app: dd-cyberia-development-blue
|
|
@@ -135,6 +149,7 @@ apiVersion: apps/v1
|
|
|
135
149
|
kind: Deployment
|
|
136
150
|
metadata:
|
|
137
151
|
name: dd-cyberia-development-green
|
|
152
|
+
namespace: default
|
|
138
153
|
labels:
|
|
139
154
|
app: dd-cyberia-development-green
|
|
140
155
|
spec:
|
|
@@ -149,7 +164,7 @@ spec:
|
|
|
149
164
|
spec:
|
|
150
165
|
containers:
|
|
151
166
|
- name: dd-cyberia-development-green
|
|
152
|
-
image: localhost/rockylinux9-underpost:v2.89.
|
|
167
|
+
image: localhost/rockylinux9-underpost:v2.89.45
|
|
153
168
|
# resources:
|
|
154
169
|
# requests:
|
|
155
170
|
# memory: "96294Ki"
|
|
@@ -165,18 +180,31 @@ spec:
|
|
|
165
180
|
npm install -g underpost &&
|
|
166
181
|
underpost secret underpost --create-from-file /etc/config/.env.development &&
|
|
167
182
|
underpost start --build --run dd-cyberia development
|
|
183
|
+
|
|
168
184
|
volumeMounts:
|
|
169
|
-
- name: config-volume
|
|
185
|
+
- name: config-volume-dd-cyberia-development-green
|
|
170
186
|
mountPath: /etc/config
|
|
187
|
+
|
|
188
|
+
- name: vol-public-dd-cyberia-dd-cyberia-development-green
|
|
189
|
+
mountPath: /home/dd/engine/src/client/public/cyberia
|
|
190
|
+
|
|
171
191
|
volumes:
|
|
172
|
-
- name: config-volume
|
|
192
|
+
- name: config-volume-dd-cyberia-development-green
|
|
173
193
|
configMap:
|
|
174
194
|
name: underpost-config
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
- name: vol-public-dd-cyberia-dd-cyberia-development-green
|
|
198
|
+
persistentVolumeClaim:
|
|
199
|
+
claimName: pvc-public-dd-cyberia-dd-cyberia-development-green
|
|
200
|
+
|
|
201
|
+
|
|
175
202
|
---
|
|
176
203
|
apiVersion: v1
|
|
177
204
|
kind: Service
|
|
178
205
|
metadata:
|
|
179
206
|
name: dd-cyberia-development-green-service
|
|
207
|
+
namespace: default
|
|
180
208
|
spec:
|
|
181
209
|
selector:
|
|
182
210
|
app: dd-cyberia-development-green
|
|
@@ -17,7 +17,7 @@ spec:
|
|
|
17
17
|
spec:
|
|
18
18
|
containers:
|
|
19
19
|
- name: dd-default-development-blue
|
|
20
|
-
image: localhost/rockylinux9-underpost:v2.89.
|
|
20
|
+
image: localhost/rockylinux9-underpost:v2.89.45
|
|
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.89.
|
|
103
|
+
image: localhost/rockylinux9-underpost:v2.89.45
|
|
104
104
|
# resources:
|
|
105
105
|
# requests:
|
|
106
106
|
# memory: "124Ki"
|