@serve.zone/interfaces 1.0.11 → 1.0.14

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.
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/interfaces',
6
- version: '1.0.11',
6
+ version: '1.0.14',
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
+ }
@@ -1,2 +1,2 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2x1c3Rlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2RhdGEvY2x1c3Rlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
1
+ import {} from '../data/docker.js';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2x1c3Rlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2RhdGEvY2x1c3Rlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQXFELE1BQU0sbUJBQW1CLENBQUMifQ==
@@ -1,3 +1 @@
1
- export * from '../config/cluster.js';
2
- export * from '../config/server.js';
3
1
  export type TConfigType = 'server' | 'cluster' | 'coreflow' | 'service';
@@ -1,6 +1,2 @@
1
- /* ==========
2
- This file exports all config interfaces for easier access under module.config.[anyconfig]
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==
@@ -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';
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9kYXRhL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsVUFBVSxDQUFDO0FBQ3pCLGNBQWMsWUFBWSxDQUFDO0FBQzNCLGNBQWMsYUFBYSxDQUFBO0FBQzNCLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsY0FBYyxDQUFDIn0=
11
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9kYXRhL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsVUFBVSxDQUFDO0FBQ3pCLGNBQWMsWUFBWSxDQUFDO0FBQzNCLGNBQWMsYUFBYSxDQUFBO0FBQzNCLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsY0FBYyxDQUFDIn0=
@@ -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
+ }
@@ -1,2 +1,2 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvZGF0YS9zZXJ2ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
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 configInterfaces from '../data/config.js';
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: configInterfaces.IServerConfig;
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: configInterfaces.IClusterConfig;
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: configInterfaces.IClusterConfig;
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: configInterfaces.IClusterConfig;
33
- specificContainerConfigToUpdate: configInterfaces.IClusterConfigContainer;
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 configInterfaces from '../data/config.js';
3
+ import * as serverInterfaces from '../data/server.js';
4
4
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdHMvY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sS0FBSyxpQkFBaUIsTUFBTSxvQkFBb0IsQ0FBQztBQUN4RCxPQUFPLEtBQUssZ0JBQWdCLE1BQU0sbUJBQW1CLENBQUMifQ==
@@ -1,4 +1,5 @@
1
1
  import * as certificateRequests from './certificate.js';
2
+ import * as clusterRequests from './cluster.js';
2
3
  import * as configRequests from './config.js';
3
4
  import * as identityRequests from './identity.js';
4
5
  import * as networkRequests from './network.js';
@@ -7,5 +8,5 @@ import * as secretRequests from './secret.js';
7
8
  import * as serverRequests from './server.js';
8
9
  import * as statusRequests from './status.js';
9
10
  import * as versionRequests from './version.js';
10
- export { certificateRequests as certificate, configRequests as config, identityRequests as identity, networkRequests as network, routingRequests as routing, secretRequests as secret, serverRequests as server, statusRequests as status, versionRequests as version, };
11
+ export { certificateRequests as certificate, clusterRequests as cluster, configRequests as config, identityRequests as identity, networkRequests as network, routingRequests as routing, secretRequests as secret, serverRequests as server, statusRequests as status, versionRequests as version, };
11
12
  export * from './inform.js';
@@ -1,5 +1,6 @@
1
1
  import * as plugins from '../plugins.js';
2
2
  import * as certificateRequests from './certificate.js';
3
+ import * as clusterRequests from './cluster.js';
3
4
  import * as configRequests from './config.js';
4
5
  import * as identityRequests from './identity.js';
5
6
  import * as networkRequests from './network.js';
@@ -8,6 +9,6 @@ import * as secretRequests from './secret.js';
8
9
  import * as serverRequests from './server.js';
9
10
  import * as statusRequests from './status.js';
10
11
  import * as versionRequests from './version.js';
11
- export { certificateRequests as certificate, configRequests as config, identityRequests as identity, networkRequests as network, routingRequests as routing, secretRequests as secret, serverRequests as server, statusRequests as status, versionRequests as version, };
12
+ export { certificateRequests as certificate, clusterRequests as cluster, configRequests as config, identityRequests as identity, networkRequests as network, routingRequests as routing, secretRequests as secret, serverRequests as server, statusRequests as status, versionRequests as version, };
12
13
  export * from './inform.js';
13
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9yZXF1ZXN0cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQztBQUV6QyxPQUFPLEtBQUssbUJBQW1CLE1BQU0sa0JBQWtCLENBQUM7QUFDeEQsT0FBTyxLQUFLLGNBQWMsTUFBTSxhQUFhLENBQUM7QUFDOUMsT0FBTyxLQUFLLGdCQUFnQixNQUFNLGVBQWUsQ0FBQztBQUNsRCxPQUFPLEtBQUssZUFBZSxNQUFNLGNBQWMsQ0FBQztBQUNoRCxPQUFPLEtBQUssZUFBZSxNQUFNLGNBQWMsQ0FBQztBQUNoRCxPQUFPLEtBQUssY0FBYyxNQUFNLGFBQWEsQ0FBQztBQUM5QyxPQUFPLEtBQUssY0FBYyxNQUFNLGFBQWEsQ0FBQztBQUM5QyxPQUFPLEtBQUssY0FBYyxNQUFNLGFBQWEsQ0FBQztBQUM5QyxPQUFPLEtBQUssZUFBZSxNQUFNLGNBQWMsQ0FBQztBQUVoRCxPQUFPLEVBQ0wsbUJBQW1CLElBQUksV0FBVyxFQUNsQyxjQUFjLElBQUksTUFBTSxFQUN4QixnQkFBZ0IsSUFBSSxRQUFRLEVBQzVCLGVBQWUsSUFBSSxPQUFPLEVBQzFCLGVBQWUsSUFBSSxPQUFPLEVBQzFCLGNBQWMsSUFBSSxNQUFNLEVBQ3hCLGNBQWMsSUFBSSxNQUFNLEVBQ3hCLGNBQWMsSUFBSSxNQUFNLEVBQ3hCLGVBQWUsSUFBSSxPQUFPLEdBQzNCLENBQUM7QUFFRixjQUFjLGFBQWEsQ0FBQyJ9
14
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9yZXF1ZXN0cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQztBQUV6QyxPQUFPLEtBQUssbUJBQW1CLE1BQU0sa0JBQWtCLENBQUM7QUFDeEQsT0FBTyxLQUFLLGVBQWUsTUFBTSxjQUFjLENBQUM7QUFDaEQsT0FBTyxLQUFLLGNBQWMsTUFBTSxhQUFhLENBQUM7QUFDOUMsT0FBTyxLQUFLLGdCQUFnQixNQUFNLGVBQWUsQ0FBQztBQUNsRCxPQUFPLEtBQUssZUFBZSxNQUFNLGNBQWMsQ0FBQztBQUNoRCxPQUFPLEtBQUssZUFBZSxNQUFNLGNBQWMsQ0FBQztBQUNoRCxPQUFPLEtBQUssY0FBYyxNQUFNLGFBQWEsQ0FBQztBQUM5QyxPQUFPLEtBQUssY0FBYyxNQUFNLGFBQWEsQ0FBQztBQUM5QyxPQUFPLEtBQUssY0FBYyxNQUFNLGFBQWEsQ0FBQztBQUM5QyxPQUFPLEtBQUssZUFBZSxNQUFNLGNBQWMsQ0FBQztBQUVoRCxPQUFPLEVBQ0wsbUJBQW1CLElBQUksV0FBVyxFQUNsQyxlQUFlLElBQUksT0FBTyxFQUMxQixjQUFjLElBQUksTUFBTSxFQUN4QixnQkFBZ0IsSUFBSSxRQUFRLEVBQzVCLGVBQWUsSUFBSSxPQUFPLEVBQzFCLGVBQWUsSUFBSSxPQUFPLEVBQzFCLGNBQWMsSUFBSSxNQUFNLEVBQ3hCLGNBQWMsSUFBSSxNQUFNLEVBQ3hCLGNBQWMsSUFBSSxNQUFNLEVBQ3hCLGVBQWUsSUFBSSxPQUFPLEdBQzNCLENBQUM7QUFFRixjQUFjLGFBQWEsQ0FBQyJ9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serve.zone/interfaces",
3
- "version": "1.0.11",
3
+ "version": "1.0.14",
4
4
  "private": false,
5
5
  "description": "interfaces for working with containers",
6
6
  "main": "dist_ts/index.js",
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/interfaces',
6
- version: '1.0.11',
6
+ version: '1.0.14',
7
7
  description: 'interfaces for working with containers'
8
8
  }
@@ -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
+ }
@@ -1,6 +1,6 @@
1
1
  import * as plugins from '../plugins.js';
2
2
  import * as clusterInterfaces from '../data/cluster.js';
3
- import * as configInterfaces from '../data/config.js';
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: configInterfaces.IServerConfig;
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: configInterfaces.IClusterConfig;
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: configInterfaces.IClusterConfig;
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: configInterfaces.IClusterConfig;
53
- specificContainerConfigToUpdate: configInterfaces.IClusterConfigContainer;
52
+ configData: clusterInterfaces.IClusterConfig;
53
+ specificContainerConfigToUpdate: clusterInterfaces.IClusterConfigContainer;
54
54
  };
55
55
  response: {}
56
56
  }
@@ -1,6 +1,7 @@
1
1
  import * as plugins from '../plugins.js';
2
2
 
3
3
  import * as certificateRequests from './certificate.js';
4
+ import * as clusterRequests from './cluster.js';
4
5
  import * as configRequests from './config.js';
5
6
  import * as identityRequests from './identity.js';
6
7
  import * as networkRequests from './network.js';
@@ -12,6 +13,7 @@ import * as versionRequests from './version.js';
12
13
 
13
14
  export {
14
15
  certificateRequests as certificate,
16
+ clusterRequests as cluster,
15
17
  configRequests as config,
16
18
  identityRequests as identity,
17
19
  networkRequests as network,
@@ -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
- }
@@ -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