@serve.zone/interfaces 1.0.11 → 1.0.13
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/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/data/cluster.d.ts +46 -0
- package/dist_ts/data/cluster.js +2 -2
- package/dist_ts/data/config.d.ts +0 -2
- package/dist_ts/data/config.js +2 -6
- package/dist_ts/data/docker.d.ts +10 -0
- package/dist_ts/data/docker.js +2 -0
- package/dist_ts/data/index.d.ts +2 -0
- package/dist_ts/data/index.js +3 -1
- package/dist_ts/data/server.d.ts +18 -0
- package/dist_ts/data/server.js +2 -2
- package/dist_ts/requests/cluster.d.ts +20 -0
- package/dist_ts/requests/cluster.js +2 -0
- package/dist_ts/requests/config.d.ts +6 -6
- package/dist_ts/requests/config.js +1 -1
- package/package.json +1 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/cluster.ts +48 -0
- package/ts/data/config.ts +0 -6
- package/ts/data/index.ts +2 -0
- package/ts/data/server.ts +25 -1
- package/ts/requests/cluster.ts +28 -0
- package/ts/requests/config.ts +6 -6
- package/ts/config/cluster.ts +0 -33
- package/ts/config/server.ts +0 -23
- /package/ts/{config → data}/docker.ts +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@serve.zone/interfaces',
|
|
6
|
-
version: '1.0.
|
|
6
|
+
version: '1.0.13',
|
|
7
7
|
description: 'interfaces for working with containers'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHdDQUF3QztDQUN0RCxDQUFBIn0=
|
|
@@ -1,4 +1,50 @@
|
|
|
1
|
+
import { type IDockerRegistryInfo, type IServiceRessources } from '../data/docker.js';
|
|
2
|
+
import type { IServerConfig } from './server.js';
|
|
1
3
|
export interface IClusterIdentifier {
|
|
2
4
|
clusterName: string;
|
|
3
5
|
secretKey: string;
|
|
4
6
|
}
|
|
7
|
+
export interface IClusterConfig {
|
|
8
|
+
id: string;
|
|
9
|
+
data: {
|
|
10
|
+
name: string;
|
|
11
|
+
secretKey: string;
|
|
12
|
+
jumpCode: string;
|
|
13
|
+
jumpCodeUsedAt: number;
|
|
14
|
+
/**
|
|
15
|
+
* how can the cluster reach cloudly
|
|
16
|
+
*/
|
|
17
|
+
cloudlyUrl: string;
|
|
18
|
+
/**
|
|
19
|
+
* what servers are expected to be part of the cluster
|
|
20
|
+
*/
|
|
21
|
+
servers: IServerConfig[];
|
|
22
|
+
/**
|
|
23
|
+
* the containers running
|
|
24
|
+
*/
|
|
25
|
+
containers: IClusterConfigContainer[];
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
acmeInfo: {
|
|
30
|
+
serverAddress: string;
|
|
31
|
+
serverSecret: string;
|
|
32
|
+
};
|
|
33
|
+
registryInfo: IDockerRegistryInfo;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export interface IClusterConfigContainer {
|
|
37
|
+
name: string;
|
|
38
|
+
image: string;
|
|
39
|
+
ports: {
|
|
40
|
+
web: number;
|
|
41
|
+
custom?: {
|
|
42
|
+
[domain: string]: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
resources?: IServiceRessources;
|
|
46
|
+
domains: string[];
|
|
47
|
+
secrets: {
|
|
48
|
+
[key: string]: string;
|
|
49
|
+
};
|
|
50
|
+
}
|
package/dist_ts/data/cluster.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import {} from '../data/docker.js';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2x1c3Rlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2RhdGEvY2x1c3Rlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQXFELE1BQU0sbUJBQW1CLENBQUMifQ==
|
package/dist_ts/data/config.d.ts
CHANGED
package/dist_ts/data/config.js
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// ========== */
|
|
4
|
-
export * from '../config/cluster.js';
|
|
5
|
-
export * from '../config/server.js';
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvZGF0YS9jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O2dCQUVnQjtBQUVoQixjQUFjLHNCQUFzQixDQUFDO0FBQ3JDLGNBQWMscUJBQXFCLENBQUMifQ==
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvZGF0YS9jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
export interface IDockerRegistryInfo {
|
|
3
|
+
serveraddress: string;
|
|
4
|
+
username: string;
|
|
5
|
+
password: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IServiceRessources {
|
|
8
|
+
memorySizeMB?: number;
|
|
9
|
+
volumeMounts?: plugins.tsclass.container.IVolumeMount[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG9ja2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvZGF0YS9kb2NrZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLE9BQU8sTUFBTSxlQUFlLENBQUMifQ==
|
package/dist_ts/data/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from './cluster.js';
|
|
2
2
|
export * from './config.js';
|
|
3
|
+
export * from './docker.js';
|
|
3
4
|
export * from './env.js';
|
|
4
5
|
export * from './event.js';
|
|
5
6
|
export * from './secret.js';
|
|
7
|
+
export * from './server.js';
|
|
6
8
|
export * from './status.js';
|
|
7
9
|
export * from './traffic.js';
|
|
8
10
|
export * from './version.js';
|
package/dist_ts/data/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export * from './cluster.js';
|
|
2
2
|
export * from './config.js';
|
|
3
|
+
export * from './docker.js';
|
|
3
4
|
export * from './env.js';
|
|
4
5
|
export * from './event.js';
|
|
5
6
|
export * from './secret.js';
|
|
7
|
+
export * from './server.js';
|
|
6
8
|
export * from './status.js';
|
|
7
9
|
export * from './traffic.js';
|
|
8
10
|
export * from './version.js';
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9kYXRhL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsVUFBVSxDQUFDO0FBQ3pCLGNBQWMsWUFBWSxDQUFDO0FBQzNCLGNBQWMsYUFBYSxDQUFBO0FBQzNCLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsY0FBYyxDQUFDIn0=
|
package/dist_ts/data/server.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type IDockerRegistryInfo } from './docker.js';
|
|
1
2
|
export interface IServerMetrics {
|
|
2
3
|
serverId: string;
|
|
3
4
|
cpuUsageInPercent: number;
|
|
@@ -11,3 +12,20 @@ export interface IServerMetrics {
|
|
|
11
12
|
memoryUsageInMB: number;
|
|
12
13
|
}>;
|
|
13
14
|
}
|
|
15
|
+
export interface IServerConfig {
|
|
16
|
+
type: 'server';
|
|
17
|
+
/**
|
|
18
|
+
* a list of debian packages to be installed
|
|
19
|
+
*/
|
|
20
|
+
requiredDebianPackages: string[];
|
|
21
|
+
/**
|
|
22
|
+
* a list of SSH keys to deploy
|
|
23
|
+
*/
|
|
24
|
+
sshKeys: IServezoneSshKey[];
|
|
25
|
+
dockerRegistryInfo: IDockerRegistryInfo;
|
|
26
|
+
}
|
|
27
|
+
export interface IServezoneSshKey {
|
|
28
|
+
keyName: string;
|
|
29
|
+
public: string;
|
|
30
|
+
private?: string;
|
|
31
|
+
}
|
package/dist_ts/data/server.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import {} from './docker.js';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvZGF0YS9zZXJ2ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUE0QixNQUFNLGFBQWEsQ0FBQyJ9
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IClusterConfig } from '../data/cluster.js';
|
|
2
|
+
import * as plugins from '../plugins.js';
|
|
3
|
+
export interface IRequest_CreateCluster extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_CreateCluster> {
|
|
4
|
+
method: 'createCluster';
|
|
5
|
+
request: {
|
|
6
|
+
clusterName: string;
|
|
7
|
+
};
|
|
8
|
+
response: {
|
|
9
|
+
clusterConfig: IClusterConfig;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export interface IRequest_UpdateCluster extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_UpdateCluster> {
|
|
13
|
+
method: 'updateCluster';
|
|
14
|
+
request: {
|
|
15
|
+
clusterConfig: IClusterConfig;
|
|
16
|
+
};
|
|
17
|
+
response: {
|
|
18
|
+
clusterConfig: IClusterConfig;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2x1c3Rlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL3JlcXVlc3RzL2NsdXN0ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxLQUFLLE9BQU8sTUFBTSxlQUFlLENBQUMifQ==
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
2
|
import * as clusterInterfaces from '../data/cluster.js';
|
|
3
|
-
import * as
|
|
3
|
+
import * as serverInterfaces from '../data/server.js';
|
|
4
4
|
export interface IRequest_Any_Cloudly_GetServerConfig extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_Any_Cloudly_GetServerConfig> {
|
|
5
5
|
method: 'getServerConfig';
|
|
6
6
|
request: {
|
|
7
7
|
clusterIdentifier: clusterInterfaces.IClusterIdentifier;
|
|
8
8
|
};
|
|
9
9
|
response: {
|
|
10
|
-
configData:
|
|
10
|
+
configData: serverInterfaces.IServerConfig;
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
export interface IRequest_Any_Cloudly_GetClusterConfig extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_Any_Cloudly_GetClusterConfig> {
|
|
@@ -16,21 +16,21 @@ export interface IRequest_Any_Cloudly_GetClusterConfig extends plugins.typedrequ
|
|
|
16
16
|
clusterIdentifier: clusterInterfaces.IClusterIdentifier;
|
|
17
17
|
};
|
|
18
18
|
response: {
|
|
19
|
-
configData:
|
|
19
|
+
configData: clusterInterfaces.IClusterConfig;
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
export interface IRequest_Cloudly_Coreflow_PushClusterConfig extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_Cloudly_Coreflow_PushClusterConfig> {
|
|
23
23
|
method: 'pushClusterConfig';
|
|
24
24
|
request: {
|
|
25
|
-
configData:
|
|
25
|
+
configData: clusterInterfaces.IClusterConfig;
|
|
26
26
|
};
|
|
27
27
|
response: {};
|
|
28
28
|
}
|
|
29
29
|
export interface IRequest_Cloudly_Coreflow_PushContainerUpdate extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_Cloudly_Coreflow_PushContainerUpdate> {
|
|
30
30
|
method: 'pushContainerUpdate';
|
|
31
31
|
request: {
|
|
32
|
-
configData:
|
|
33
|
-
specificContainerConfigToUpdate:
|
|
32
|
+
configData: clusterInterfaces.IClusterConfig;
|
|
33
|
+
specificContainerConfigToUpdate: clusterInterfaces.IClusterConfigContainer;
|
|
34
34
|
};
|
|
35
35
|
response: {};
|
|
36
36
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
2
|
import * as clusterInterfaces from '../data/cluster.js';
|
|
3
|
-
import * as
|
|
3
|
+
import * as serverInterfaces from '../data/server.js';
|
|
4
4
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdHMvY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sS0FBSyxpQkFBaUIsTUFBTSxvQkFBb0IsQ0FBQztBQUN4RCxPQUFPLEtBQUssZ0JBQWdCLE1BQU0sbUJBQW1CLENBQUMifQ==
|
package/package.json
CHANGED
package/ts/00_commitinfo_data.ts
CHANGED
package/ts/data/cluster.ts
CHANGED
|
@@ -1,4 +1,52 @@
|
|
|
1
|
+
import { type IDockerRegistryInfo, type IServiceRessources } from '../data/docker.js';
|
|
2
|
+
import type { IServerConfig } from './server.js';
|
|
3
|
+
|
|
1
4
|
export interface IClusterIdentifier {
|
|
2
5
|
clusterName: string;
|
|
3
6
|
secretKey: string;
|
|
4
7
|
}
|
|
8
|
+
|
|
9
|
+
export interface IClusterConfig {
|
|
10
|
+
id: string;
|
|
11
|
+
data: {
|
|
12
|
+
name: string;
|
|
13
|
+
secretKey: string;
|
|
14
|
+
jumpCode: string;
|
|
15
|
+
jumpCodeUsedAt: number;
|
|
16
|
+
/**
|
|
17
|
+
* how can the cluster reach cloudly
|
|
18
|
+
*/
|
|
19
|
+
cloudlyUrl: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* what servers are expected to be part of the cluster
|
|
23
|
+
*/
|
|
24
|
+
servers: IServerConfig[];
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* the containers running
|
|
28
|
+
*/
|
|
29
|
+
containers: IClusterConfigContainer[];
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
acmeInfo: {
|
|
35
|
+
serverAddress: string;
|
|
36
|
+
serverSecret: string;
|
|
37
|
+
};
|
|
38
|
+
registryInfo: IDockerRegistryInfo;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface IClusterConfigContainer {
|
|
43
|
+
name: string;
|
|
44
|
+
image: string;
|
|
45
|
+
ports: {
|
|
46
|
+
web: number;
|
|
47
|
+
custom?: { [domain: string]: string };
|
|
48
|
+
};
|
|
49
|
+
resources?: IServiceRessources;
|
|
50
|
+
domains: string[];
|
|
51
|
+
secrets: { [key: string]: string };
|
|
52
|
+
}
|
package/ts/data/config.ts
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
/* ==========
|
|
2
|
-
This file exports all config interfaces for easier access under module.config.[anyconfig]
|
|
3
|
-
// ========== */
|
|
4
|
-
|
|
5
|
-
export * from '../config/cluster.js';
|
|
6
|
-
export * from '../config/server.js';
|
|
7
1
|
export type TConfigType = 'server' | 'cluster' | 'coreflow' | 'service';
|
package/ts/data/index.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from './cluster.js';
|
|
2
2
|
export * from './config.js';
|
|
3
|
+
export * from './docker.js';
|
|
3
4
|
export * from './env.js';
|
|
4
5
|
export * from './event.js';
|
|
5
6
|
export * from './secret.js'
|
|
7
|
+
export * from './server.js';
|
|
6
8
|
export * from './status.js';
|
|
7
9
|
export * from './traffic.js';
|
|
8
10
|
export * from './version.js';
|
package/ts/data/server.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type IDockerRegistryInfo } from './docker.js';
|
|
2
|
+
|
|
1
3
|
export interface IServerMetrics {
|
|
2
4
|
serverId: string;
|
|
3
5
|
cpuUsageInPercent: number;
|
|
@@ -10,4 +12,26 @@ export interface IServerMetrics {
|
|
|
10
12
|
cpuUsageInPercent: number;
|
|
11
13
|
memoryUsageInMB: number;
|
|
12
14
|
}>;
|
|
13
|
-
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface IServerConfig {
|
|
18
|
+
type: 'server';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* a list of debian packages to be installed
|
|
22
|
+
*/
|
|
23
|
+
requiredDebianPackages: string[];
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* a list of SSH keys to deploy
|
|
27
|
+
*/
|
|
28
|
+
sshKeys: IServezoneSshKey[];
|
|
29
|
+
|
|
30
|
+
dockerRegistryInfo: IDockerRegistryInfo;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface IServezoneSshKey {
|
|
34
|
+
keyName: string;
|
|
35
|
+
public: string;
|
|
36
|
+
private?: string;
|
|
37
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { IClusterConfig } from '../data/cluster.js';
|
|
2
|
+
import * as plugins from '../plugins.js';
|
|
3
|
+
|
|
4
|
+
export interface IRequest_CreateCluster extends plugins.typedrequestInterfaces.implementsTR<
|
|
5
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
6
|
+
IRequest_CreateCluster
|
|
7
|
+
> {
|
|
8
|
+
method: 'createCluster';
|
|
9
|
+
request: {
|
|
10
|
+
clusterName: string;
|
|
11
|
+
};
|
|
12
|
+
response: {
|
|
13
|
+
clusterConfig: IClusterConfig;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface IRequest_UpdateCluster extends plugins.typedrequestInterfaces.implementsTR<
|
|
18
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
19
|
+
IRequest_UpdateCluster
|
|
20
|
+
> {
|
|
21
|
+
method: 'updateCluster';
|
|
22
|
+
request: {
|
|
23
|
+
clusterConfig: IClusterConfig;
|
|
24
|
+
};
|
|
25
|
+
response: {
|
|
26
|
+
clusterConfig: IClusterConfig;
|
|
27
|
+
};
|
|
28
|
+
}
|
package/ts/requests/config.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
2
|
import * as clusterInterfaces from '../data/cluster.js';
|
|
3
|
-
import * as
|
|
3
|
+
import * as serverInterfaces from '../data/server.js';
|
|
4
4
|
|
|
5
5
|
export interface IRequest_Any_Cloudly_GetServerConfig
|
|
6
6
|
extends plugins.typedrequestInterfaces.implementsTR<
|
|
@@ -12,7 +12,7 @@ extends plugins.typedrequestInterfaces.implementsTR<
|
|
|
12
12
|
clusterIdentifier: clusterInterfaces.IClusterIdentifier;
|
|
13
13
|
};
|
|
14
14
|
response: {
|
|
15
|
-
configData:
|
|
15
|
+
configData: serverInterfaces.IServerConfig;
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -26,7 +26,7 @@ extends plugins.typedrequestInterfaces.implementsTR<
|
|
|
26
26
|
clusterIdentifier: clusterInterfaces.IClusterIdentifier;
|
|
27
27
|
};
|
|
28
28
|
response: {
|
|
29
|
-
configData:
|
|
29
|
+
configData: clusterInterfaces.IClusterConfig;
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -37,7 +37,7 @@ extends plugins.typedrequestInterfaces.implementsTR<
|
|
|
37
37
|
> {
|
|
38
38
|
method: 'pushClusterConfig';
|
|
39
39
|
request: {
|
|
40
|
-
configData:
|
|
40
|
+
configData: clusterInterfaces.IClusterConfig;
|
|
41
41
|
};
|
|
42
42
|
response: {};
|
|
43
43
|
}
|
|
@@ -49,8 +49,8 @@ extends plugins.typedrequestInterfaces.implementsTR<
|
|
|
49
49
|
> {
|
|
50
50
|
method: 'pushContainerUpdate'
|
|
51
51
|
request: {
|
|
52
|
-
configData:
|
|
53
|
-
specificContainerConfigToUpdate:
|
|
52
|
+
configData: clusterInterfaces.IClusterConfig;
|
|
53
|
+
specificContainerConfigToUpdate: clusterInterfaces.IClusterConfigContainer;
|
|
54
54
|
};
|
|
55
55
|
response: {}
|
|
56
56
|
}
|
package/ts/config/cluster.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { type IDockerRegistryInfo, type IServiceRessources } from './docker.js';
|
|
2
|
-
import type { IServerConfig } from './server.js';
|
|
3
|
-
|
|
4
|
-
export interface IClusterConfig {
|
|
5
|
-
id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
zone: 'servezone' | 'gitzone' | 'shipzone' | 'umbrellazone' | 'trafficzone' | 'proxyzone';
|
|
8
|
-
type: 'cluster';
|
|
9
|
-
secretKey: string;
|
|
10
|
-
jumpCode: string;
|
|
11
|
-
jumpCodeUsedAt: number;
|
|
12
|
-
manager_domain: string;
|
|
13
|
-
manager_ip: string;
|
|
14
|
-
servers: IServerConfig[];
|
|
15
|
-
containers: IClusterConfigContainer[];
|
|
16
|
-
acmeInfo: {
|
|
17
|
-
serverAddress: string;
|
|
18
|
-
serverSecret: string;
|
|
19
|
-
};
|
|
20
|
-
registryInfo: IDockerRegistryInfo;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface IClusterConfigContainer {
|
|
24
|
-
name: string;
|
|
25
|
-
image: string;
|
|
26
|
-
ports: {
|
|
27
|
-
web: number;
|
|
28
|
-
custom?: { [domain: string]: string };
|
|
29
|
-
};
|
|
30
|
-
resources?: IServiceRessources;
|
|
31
|
-
domains: string[];
|
|
32
|
-
secrets: { [key: string]: string };
|
|
33
|
-
}
|
package/ts/config/server.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { type IDockerRegistryInfo } from './docker.js';
|
|
2
|
-
|
|
3
|
-
export interface IServerConfig {
|
|
4
|
-
type: 'server';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* a list of debian packages to be installed
|
|
8
|
-
*/
|
|
9
|
-
requiredDebianPackages: string[];
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* a list of SSH keys to deploy
|
|
13
|
-
*/
|
|
14
|
-
sshKeys: IServezoneSshKey[];
|
|
15
|
-
|
|
16
|
-
dockerRegistryInfo: IDockerRegistryInfo;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface IServezoneSshKey {
|
|
20
|
-
keyName: string;
|
|
21
|
-
public: string;
|
|
22
|
-
private?: string;
|
|
23
|
-
}
|
|
File without changes
|