@serve.zone/interfaces 5.0.3 → 5.3.0
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_interfaces/data/baremetal.d.ts +61 -0
- package/dist_ts_interfaces/data/baremetal.js +2 -0
- package/dist_ts_interfaces/data/cloudlyconfig.d.ts +0 -2
- package/dist_ts_interfaces/data/cluster.d.ts +7 -3
- package/dist_ts_interfaces/data/clusternode.d.ts +59 -0
- package/dist_ts_interfaces/data/clusternode.js +2 -0
- package/dist_ts_interfaces/data/deployment.d.ts +42 -2
- package/dist_ts_interfaces/data/index.d.ts +3 -1
- package/dist_ts_interfaces/data/index.js +4 -2
- package/dist_ts_interfaces/data/service.d.ts +24 -0
- package/dist_ts_interfaces/data/settings.d.ts +34 -0
- package/dist_ts_interfaces/data/settings.js +2 -0
- package/dist_ts_interfaces/platformservice/mta.d.ts +2 -2
- package/dist_ts_interfaces/requests/baremetal.d.ts +19 -0
- package/dist_ts_interfaces/requests/baremetal.js +2 -0
- package/dist_ts_interfaces/requests/cluster.d.ts +1 -0
- package/dist_ts_interfaces/requests/deployment.d.ts +96 -0
- package/dist_ts_interfaces/requests/deployment.js +2 -0
- package/dist_ts_interfaces/requests/index.d.ts +4 -1
- package/dist_ts_interfaces/requests/index.js +5 -2
- package/dist_ts_interfaces/requests/node.d.ts +29 -0
- package/dist_ts_interfaces/requests/node.js +2 -0
- package/dist_ts_interfaces/requests/settings.d.ts +49 -0
- package/dist_ts_interfaces/requests/settings.js +2 -0
- package/package.json +2 -2
- package/readme.md +301 -133
- package/ts_interfaces/data/baremetal.ts +73 -0
- package/ts_interfaces/data/cloudlyconfig.ts +0 -2
- package/ts_interfaces/data/cluster.ts +8 -3
- package/ts_interfaces/data/clusternode.ts +71 -0
- package/ts_interfaces/data/deployment.ts +52 -2
- package/ts_interfaces/data/index.ts +4 -2
- package/ts_interfaces/data/service.ts +29 -0
- package/ts_interfaces/data/settings.ts +56 -0
- package/ts_interfaces/platformservice/mta.ts +1 -1
- package/ts_interfaces/readme.md +301 -133
- package/ts_interfaces/requests/baremetal.ts +22 -0
- package/ts_interfaces/requests/cluster.ts +1 -0
- package/ts_interfaces/requests/deployment.ts +141 -0
- package/ts_interfaces/requests/index.ts +6 -0
- package/ts_interfaces/requests/node.ts +33 -0
- package/ts_interfaces/requests/settings.ts +59 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
|
|
3
|
+
export interface IClusterNodeMetrics {
|
|
4
|
+
cpuUsagePercent: number;
|
|
5
|
+
memoryUsedMB: number;
|
|
6
|
+
memoryAvailableMB: number;
|
|
7
|
+
diskUsedGB: number;
|
|
8
|
+
diskAvailableGB: number;
|
|
9
|
+
containerCount: number;
|
|
10
|
+
timestamp: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface IClusterNode {
|
|
14
|
+
id: string;
|
|
15
|
+
data: {
|
|
16
|
+
/**
|
|
17
|
+
* Reference to the cluster this node belongs to
|
|
18
|
+
*/
|
|
19
|
+
clusterId: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Reference to the physical server (if applicable)
|
|
23
|
+
*/
|
|
24
|
+
baremetalId?: string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Type of node
|
|
28
|
+
*/
|
|
29
|
+
nodeType: 'baremetal' | 'vm' | 'container';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Current status of the node
|
|
33
|
+
*/
|
|
34
|
+
status: 'initializing' | 'online' | 'offline' | 'maintenance';
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Role of the node in the cluster
|
|
38
|
+
*/
|
|
39
|
+
role: 'master' | 'worker';
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Timestamp when node joined the cluster
|
|
43
|
+
*/
|
|
44
|
+
joinedAt: number;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Last health check timestamp
|
|
48
|
+
*/
|
|
49
|
+
lastHealthCheck: number;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Current metrics for the node
|
|
53
|
+
*/
|
|
54
|
+
metrics?: IClusterNodeMetrics;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Docker swarm node ID if part of swarm
|
|
58
|
+
*/
|
|
59
|
+
swarmNodeId?: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* SSH keys deployed to this node
|
|
63
|
+
*/
|
|
64
|
+
sshKeys: plugins.tsclass.network.ISshKey[];
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Debian packages installed on this node
|
|
68
|
+
*/
|
|
69
|
+
requiredDebianPackages: string[];
|
|
70
|
+
};
|
|
71
|
+
}
|
|
@@ -6,8 +6,58 @@ import * as plugins from '../plugins.js';
|
|
|
6
6
|
*/
|
|
7
7
|
export interface IDeployment {
|
|
8
8
|
id: string;
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The service being deployed (single service per deployment)
|
|
12
|
+
*/
|
|
13
|
+
serviceId: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The node this deployment is running on
|
|
17
|
+
*/
|
|
18
|
+
nodeId: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Docker container ID for this deployment
|
|
22
|
+
*/
|
|
23
|
+
containerId?: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Image used for this deployment
|
|
27
|
+
*/
|
|
10
28
|
usedImageId: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Version of the service deployed
|
|
32
|
+
*/
|
|
33
|
+
version: string;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Timestamp when deployed
|
|
37
|
+
*/
|
|
38
|
+
deployedAt: number;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Deployment log entries
|
|
42
|
+
*/
|
|
11
43
|
deploymentLog: string[];
|
|
12
|
-
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Current status of the deployment
|
|
47
|
+
*/
|
|
48
|
+
status: 'scheduled' | 'starting' | 'running' | 'stopping' | 'stopped' | 'failed';
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Health status of the deployment
|
|
52
|
+
*/
|
|
53
|
+
healthStatus?: 'healthy' | 'unhealthy' | 'unknown';
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Resource usage for this deployment
|
|
57
|
+
*/
|
|
58
|
+
resourceUsage?: {
|
|
59
|
+
cpuUsagePercent: number;
|
|
60
|
+
memoryUsedMB: number;
|
|
61
|
+
lastUpdated: number;
|
|
62
|
+
};
|
|
13
63
|
}
|
|
@@ -7,8 +7,10 @@ export * from './event.js';
|
|
|
7
7
|
export * from './externalregistry.js';
|
|
8
8
|
export * from './image.js';
|
|
9
9
|
export * from './secretbundle.js';
|
|
10
|
-
export * from './secretgroup.js'
|
|
11
|
-
export * from './
|
|
10
|
+
export * from './secretgroup.js';
|
|
11
|
+
export * from './baremetal.js';
|
|
12
|
+
export * from './clusternode.js';
|
|
13
|
+
export * from './settings.js';
|
|
12
14
|
export * from './service.js';
|
|
13
15
|
export * from './status.js';
|
|
14
16
|
export * from './traffic.js';
|
|
@@ -17,6 +17,35 @@ export interface IService {
|
|
|
17
17
|
* and thus live past the service lifecycle
|
|
18
18
|
*/
|
|
19
19
|
additionalSecretBundleIds?: string[];
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Service category determines deployment behavior
|
|
23
|
+
* - base: Core services that run on every node (coreflow, coretraffic, corelog)
|
|
24
|
+
* - distributed: Services that run on limited nodes (cores3, coremongo)
|
|
25
|
+
* - workload: User applications
|
|
26
|
+
*/
|
|
27
|
+
serviceCategory: 'base' | 'distributed' | 'workload';
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Deployment strategy for the service
|
|
31
|
+
* - all-nodes: Deploy to every node in the cluster
|
|
32
|
+
* - limited-replicas: Deploy to a limited number of nodes
|
|
33
|
+
* - custom: Custom deployment logic
|
|
34
|
+
*/
|
|
35
|
+
deploymentStrategy: 'all-nodes' | 'limited-replicas' | 'custom';
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Maximum number of replicas for distributed services
|
|
39
|
+
* For example, 3 for cores3 or coremongo
|
|
40
|
+
*/
|
|
41
|
+
maxReplicas?: number;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Whether to enforce anti-affinity rules
|
|
45
|
+
* When true, tries to spread deployments across different BareMetal servers
|
|
46
|
+
*/
|
|
47
|
+
antiAffinity?: boolean;
|
|
48
|
+
|
|
20
49
|
scaleFactor: number;
|
|
21
50
|
balancingStrategy: 'round-robin' | 'least-connections';
|
|
22
51
|
ports: {
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Interface for Cloudly settings stored in EasyStore
|
|
5
|
+
* These are runtime-configurable settings that can be modified via the UI
|
|
6
|
+
*/
|
|
7
|
+
export interface ICloudlySettings {
|
|
8
|
+
// Cloud Provider Tokens
|
|
9
|
+
hetznerToken?: string;
|
|
10
|
+
cloudflareToken?: string;
|
|
11
|
+
|
|
12
|
+
// AWS Credentials
|
|
13
|
+
awsAccessKey?: string;
|
|
14
|
+
awsSecretKey?: string;
|
|
15
|
+
awsRegion?: string;
|
|
16
|
+
|
|
17
|
+
// DigitalOcean
|
|
18
|
+
digitalOceanToken?: string;
|
|
19
|
+
|
|
20
|
+
// Azure Credentials
|
|
21
|
+
azureClientId?: string;
|
|
22
|
+
azureClientSecret?: string;
|
|
23
|
+
azureTenantId?: string;
|
|
24
|
+
azureSubscriptionId?: string;
|
|
25
|
+
|
|
26
|
+
// Google Cloud
|
|
27
|
+
googleCloudKeyJson?: string;
|
|
28
|
+
googleCloudProjectId?: string;
|
|
29
|
+
|
|
30
|
+
// Vultr
|
|
31
|
+
vultrApiKey?: string;
|
|
32
|
+
|
|
33
|
+
// Linode
|
|
34
|
+
linodeToken?: string;
|
|
35
|
+
|
|
36
|
+
// OVH
|
|
37
|
+
ovhApplicationKey?: string;
|
|
38
|
+
ovhApplicationSecret?: string;
|
|
39
|
+
ovhConsumerKey?: string;
|
|
40
|
+
|
|
41
|
+
// Scaleway
|
|
42
|
+
scalewayAccessKey?: string;
|
|
43
|
+
scalewaySecretKey?: string;
|
|
44
|
+
scalewayOrganizationId?: string;
|
|
45
|
+
|
|
46
|
+
// Other settings that might be added in the future
|
|
47
|
+
[key: string]: string | undefined;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Interface for masked settings (used in API responses)
|
|
52
|
+
* Shows only last 4 characters of sensitive tokens
|
|
53
|
+
*/
|
|
54
|
+
export type ICloudlySettingsMasked = {
|
|
55
|
+
[K in keyof ICloudlySettings]: string | undefined;
|
|
56
|
+
};
|