@highstate/library 0.11.7 → 0.12.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/highstate.library.msgpack +0 -0
- package/dist/index.js +288 -93
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/k3s.ts +14 -0
- package/src/third-party/yandex.ts +235 -66
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -907,20 +907,20 @@ var secrets = $secrets({
|
|
|
907
907
|
/**
|
|
908
908
|
* The SSH private key in PEM format.
|
|
909
909
|
*/
|
|
910
|
-
sshPrivateKey: z.string().optional().meta({ multiline: true }),
|
|
910
|
+
sshPrivateKey: $addArgumentDescription(z.string().optional().meta({ multiline: true }), `The SSH private key in PEM format.`),
|
|
911
911
|
/**
|
|
912
912
|
* The SSH password to use for authentication.
|
|
913
913
|
*/
|
|
914
|
-
sshPassword: z.string().optional()
|
|
914
|
+
sshPassword: $addArgumentDescription(z.string().optional(), `The SSH password to use for authentication.`)
|
|
915
915
|
});
|
|
916
916
|
var inputs2 = $inputs({
|
|
917
917
|
/**
|
|
918
918
|
* The SSH key pair to use for authentication.
|
|
919
919
|
*/
|
|
920
|
-
sshKeyPair: {
|
|
920
|
+
sshKeyPair: $addInputDescription({
|
|
921
921
|
entity: keyPairEntity,
|
|
922
922
|
required: false
|
|
923
|
-
}
|
|
923
|
+
}, `The SSH key pair to use for authentication.`)
|
|
924
924
|
});
|
|
925
925
|
var keyPair = defineUnit({
|
|
926
926
|
type: "ssh.key-pair.v1",
|
|
@@ -974,14 +974,14 @@ var serverOutputs = $outputs({
|
|
|
974
974
|
/**
|
|
975
975
|
* The server entity representing the server.
|
|
976
976
|
*/
|
|
977
|
-
server: serverEntity,
|
|
977
|
+
server: $addInputDescription(serverEntity, `The server entity representing the server.`),
|
|
978
978
|
/**
|
|
979
979
|
* The L3 endpoints of the server.
|
|
980
980
|
*/
|
|
981
|
-
endpoints: {
|
|
981
|
+
endpoints: $addInputDescription({
|
|
982
982
|
entity: l3EndpointEntity,
|
|
983
983
|
multiple: true
|
|
984
|
-
}
|
|
984
|
+
}, `The L3 endpoints of the server.`)
|
|
985
985
|
});
|
|
986
986
|
var vmSshArgs = argsSchema.omit({ user: true }).prefault({});
|
|
987
987
|
var vmSecrets = $secrets({
|
|
@@ -990,13 +990,17 @@ var vmSecrets = $secrets({
|
|
|
990
990
|
*
|
|
991
991
|
* If not specified, will be generated automatically.
|
|
992
992
|
*/
|
|
993
|
-
rootPassword: z.string().optional(),
|
|
993
|
+
rootPassword: $addArgumentDescription(z.string().optional(), `The root password for the virtual machine.
|
|
994
|
+
|
|
995
|
+
If not specified, will be generated automatically.`),
|
|
994
996
|
/**
|
|
995
997
|
* The SSH private for the `root` user of the virtual machine in PEM format.
|
|
996
998
|
*
|
|
997
999
|
* If not specified or provided via `keyPair`, will be generated automatically.
|
|
998
1000
|
*/
|
|
999
|
-
sshPrivateKey: secrets.sshPrivateKey
|
|
1001
|
+
sshPrivateKey: $addArgumentDescription(secrets.sshPrivateKey, `The SSH private for the \`root\` user of the virtual machine in PEM format.
|
|
1002
|
+
|
|
1003
|
+
If not specified or provided via \`keyPair\`, will be generated automatically.`)
|
|
1000
1004
|
});
|
|
1001
1005
|
var existingServer = defineUnit({
|
|
1002
1006
|
type: "common.existing-server.v1",
|
|
@@ -1175,33 +1179,35 @@ var sharedArgs = $args({
|
|
|
1175
1179
|
/**
|
|
1176
1180
|
* The endpoints to connect to the database in form of `host:port`.
|
|
1177
1181
|
*/
|
|
1178
|
-
endpoints: z.string().array().min(1),
|
|
1182
|
+
endpoints: $addArgumentDescription(z.string().array().min(1), `The endpoints to connect to the database in form of \`host:port\`.`),
|
|
1179
1183
|
/**
|
|
1180
1184
|
* The username to connect to the database with.
|
|
1181
1185
|
*
|
|
1182
1186
|
* If not provided, defaults to `root`.
|
|
1183
1187
|
*/
|
|
1184
|
-
username: z.string().default("root"),
|
|
1188
|
+
username: $addArgumentDescription(z.string().default("root"), `The username to connect to the database with.
|
|
1189
|
+
|
|
1190
|
+
If not provided, defaults to \`root\`.`),
|
|
1185
1191
|
/**
|
|
1186
1192
|
* The name of the database to connect to.
|
|
1187
1193
|
*/
|
|
1188
|
-
database: z.string().optional()
|
|
1194
|
+
database: $addArgumentDescription(z.string().optional(), `The name of the database to connect to.`)
|
|
1189
1195
|
});
|
|
1190
1196
|
var sharedSecrets = $secrets({
|
|
1191
1197
|
/**
|
|
1192
1198
|
* The password to connect to the database with.
|
|
1193
1199
|
*/
|
|
1194
|
-
password: z.string().optional()
|
|
1200
|
+
password: $addArgumentDescription(z.string().optional(), `The password to connect to the database with.`)
|
|
1195
1201
|
});
|
|
1196
1202
|
var sharedInputs = $inputs({
|
|
1197
1203
|
/**
|
|
1198
1204
|
* The endpoints to connect to the database.
|
|
1199
1205
|
*/
|
|
1200
|
-
endpoints: {
|
|
1206
|
+
endpoints: $addInputDescription({
|
|
1201
1207
|
entity: l4EndpointEntity,
|
|
1202
1208
|
multiple: true,
|
|
1203
1209
|
required: false
|
|
1204
|
-
}
|
|
1210
|
+
}, `The endpoints to connect to the database.`)
|
|
1205
1211
|
});
|
|
1206
1212
|
|
|
1207
1213
|
// src/databases/mariadb.ts
|
|
@@ -1571,7 +1577,11 @@ var scheduleOnMastersPolicyArgs = $args({
|
|
|
1571
1577
|
* - `when-no-workers`: schedule workloads on master nodes only if there are no workers (default);
|
|
1572
1578
|
* - `never`: never schedule workloads on master nodes.
|
|
1573
1579
|
*/
|
|
1574
|
-
scheduleOnMastersPolicy: scheduleOnMastersPolicySchema.default("when-no-workers")
|
|
1580
|
+
scheduleOnMastersPolicy: $addArgumentDescription(scheduleOnMastersPolicySchema.default("when-no-workers"), `The policy for scheduling workloads on master nodes.
|
|
1581
|
+
|
|
1582
|
+
- \`always\`: always schedule workloads on master nodes regardless of the number of workers;
|
|
1583
|
+
- \`when-no-workers\`: schedule workloads on master nodes only if there are no workers (default);
|
|
1584
|
+
- \`never\`: never schedule workloads on master nodes.`)
|
|
1575
1585
|
});
|
|
1576
1586
|
var clusterInputs = {
|
|
1577
1587
|
masters: {
|
|
@@ -1800,6 +1810,22 @@ var cluster = defineUnit({
|
|
|
1800
1810
|
*/
|
|
1801
1811
|
config: $addArgumentDescription(z.record(z.string(), z.unknown()).optional(), `The K3S configuration to pass to each server or agent in the cluster.
|
|
1802
1812
|
|
|
1813
|
+
See: https://docs.k3s.io/installation/configuration`),
|
|
1814
|
+
/**
|
|
1815
|
+
* The K3S configuration to pass to each server in the cluster.
|
|
1816
|
+
*
|
|
1817
|
+
* See: https://docs.k3s.io/installation/configuration
|
|
1818
|
+
*/
|
|
1819
|
+
serverConfig: $addArgumentDescription(z.record(z.string(), z.unknown()).optional(), `The K3S configuration to pass to each server in the cluster.
|
|
1820
|
+
|
|
1821
|
+
See: https://docs.k3s.io/installation/configuration`),
|
|
1822
|
+
/**
|
|
1823
|
+
* The K3S configuration to pass to each agent in the cluster.
|
|
1824
|
+
*
|
|
1825
|
+
* See: https://docs.k3s.io/installation/configuration
|
|
1826
|
+
*/
|
|
1827
|
+
agentConfig: $addArgumentDescription(z.record(z.string(), z.unknown()).optional(), `The K3S configuration to pass to each agent in the cluster.
|
|
1828
|
+
|
|
1803
1829
|
See: https://docs.k3s.io/installation/configuration`),
|
|
1804
1830
|
/**
|
|
1805
1831
|
* The configuration of the registries to use for the K3S cluster.
|
|
@@ -2091,21 +2117,23 @@ var sharedArgs2 = $args({
|
|
|
2091
2117
|
/**
|
|
2092
2118
|
* The FQDN where the application will be accessible.
|
|
2093
2119
|
*/
|
|
2094
|
-
fqdn: z.string(),
|
|
2120
|
+
fqdn: $addArgumentDescription(z.string(), `The FQDN where the application will be accessible.`),
|
|
2095
2121
|
/**
|
|
2096
2122
|
* The endpoints where the application will or should be accessible.
|
|
2097
2123
|
*
|
|
2098
2124
|
* Can be both L3 (IP addresses) or L4 (IP:port) endpoints and the interpretation is up to the application.
|
|
2099
2125
|
*/
|
|
2100
|
-
endpoints: z.string().array().default([]),
|
|
2126
|
+
endpoints: $addArgumentDescription(z.string().array().default([]), `The endpoints where the application will or should be accessible.
|
|
2127
|
+
|
|
2128
|
+
Can be both L3 (IP addresses) or L4 (IP:port) endpoints and the interpretation is up to the application.`),
|
|
2101
2129
|
/**
|
|
2102
2130
|
* Whether the application should be exposed externally by NodePort or LoadBalancer service.
|
|
2103
2131
|
*/
|
|
2104
|
-
external: z.boolean().default(false),
|
|
2132
|
+
external: $addArgumentDescription(z.boolean().default(false), `Whether the application should be exposed externally by NodePort or LoadBalancer service.`),
|
|
2105
2133
|
/**
|
|
2106
2134
|
* The number of replicas for the application.
|
|
2107
2135
|
*/
|
|
2108
|
-
replicas: z.number().default(1)
|
|
2136
|
+
replicas: $addArgumentDescription(z.number().default(1), `The number of replicas for the application.`)
|
|
2109
2137
|
});
|
|
2110
2138
|
var optionalSharedArgs = mapValues(sharedArgs2, (arg) => ({
|
|
2111
2139
|
...arg,
|
|
@@ -2130,11 +2158,11 @@ var sharedSecrets2 = $secrets({
|
|
|
2130
2158
|
/**
|
|
2131
2159
|
* The root password for the database instance. If not provided, a random password will be generated.
|
|
2132
2160
|
*/
|
|
2133
|
-
rootPassword: z.string().optional(),
|
|
2161
|
+
rootPassword: $addArgumentDescription(z.string().optional(), `The root password for the database instance. If not provided, a random password will be generated.`),
|
|
2134
2162
|
/**
|
|
2135
2163
|
* The key to use for backup encryption. If not provided, a random key will be generated.
|
|
2136
2164
|
*/
|
|
2137
|
-
backupKey: z.string().optional()
|
|
2165
|
+
backupKey: $addArgumentDescription(z.string().optional(), `The key to use for backup encryption. If not provided, a random key will be generated.`)
|
|
2138
2166
|
});
|
|
2139
2167
|
var sharedDatabaseArgs = $args({
|
|
2140
2168
|
/**
|
|
@@ -2142,13 +2170,17 @@ var sharedDatabaseArgs = $args({
|
|
|
2142
2170
|
*
|
|
2143
2171
|
* If not provided, defaults to the name of the instance.
|
|
2144
2172
|
*/
|
|
2145
|
-
username: z.string().optional(),
|
|
2173
|
+
username: $addArgumentDescription(z.string().optional(), `The username for the database user.
|
|
2174
|
+
|
|
2175
|
+
If not provided, defaults to the name of the instance.`),
|
|
2146
2176
|
/**
|
|
2147
2177
|
* The name of the database to create.
|
|
2148
2178
|
*
|
|
2149
2179
|
* If not provided, defaults to the username.
|
|
2150
2180
|
*/
|
|
2151
|
-
database: z.string().optional()
|
|
2181
|
+
database: $addArgumentDescription(z.string().optional(), `The name of the database to create.
|
|
2182
|
+
|
|
2183
|
+
If not provided, defaults to the username.`)
|
|
2152
2184
|
});
|
|
2153
2185
|
var sharedDatabaseSecrets = $secrets({
|
|
2154
2186
|
/**
|
|
@@ -2156,7 +2188,9 @@ var sharedDatabaseSecrets = $secrets({
|
|
|
2156
2188
|
*
|
|
2157
2189
|
* If not provided, a random password will be generated.
|
|
2158
2190
|
*/
|
|
2159
|
-
password: z.string().optional()
|
|
2191
|
+
password: $addArgumentDescription(z.string().optional(), `The password for the database user.
|
|
2192
|
+
|
|
2193
|
+
If not provided, a random password will be generated.`)
|
|
2160
2194
|
});
|
|
2161
2195
|
var sharedInputs2 = $inputs({
|
|
2162
2196
|
k8sCluster: {
|
|
@@ -4829,46 +4863,94 @@ var virtualMachine2 = defineUnit({
|
|
|
4829
4863
|
// src/third-party/yandex.ts
|
|
4830
4864
|
var yandex_exports = {};
|
|
4831
4865
|
__export(yandex_exports, {
|
|
4832
|
-
cloudEntity: () => cloudEntity,
|
|
4833
4866
|
connection: () => connection4,
|
|
4867
|
+
connectionEntity: () => connectionEntity2,
|
|
4868
|
+
disk: () => disk,
|
|
4869
|
+
diskEntity: () => diskEntity,
|
|
4870
|
+
diskSchema: () => diskSchema,
|
|
4871
|
+
existingImage: () => existingImage2,
|
|
4872
|
+
imageEntity: () => imageEntity2,
|
|
4834
4873
|
virtualMachine: () => virtualMachine3
|
|
4835
4874
|
});
|
|
4836
|
-
var
|
|
4837
|
-
type: "yandex.
|
|
4875
|
+
var connectionEntity2 = defineEntity({
|
|
4876
|
+
type: "yandex.connection.v1",
|
|
4838
4877
|
schema: z.object({
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4878
|
+
/**
|
|
4879
|
+
* The service account key file content (JSON).
|
|
4880
|
+
*/
|
|
4881
|
+
serviceAccountKeyFile: z.string().optional().meta({ title: camelCaseToHumanReadable("serviceAccountKeyFile"), description: `The service account key file content (JSON).` }),
|
|
4882
|
+
/**
|
|
4883
|
+
* The ID of the cloud.
|
|
4884
|
+
*/
|
|
4885
|
+
cloudId: z.string().meta({ title: camelCaseToHumanReadable("cloudId"), description: `The ID of the cloud.` }),
|
|
4886
|
+
/**
|
|
4887
|
+
* The default folder ID.
|
|
4888
|
+
*/
|
|
4889
|
+
defaultFolderId: z.string().meta({ title: camelCaseToHumanReadable("defaultFolderId"), description: `The default folder ID.` }),
|
|
4890
|
+
/**
|
|
4891
|
+
* The default availability zone.
|
|
4892
|
+
*/
|
|
4893
|
+
defaultZone: z.string().meta({ title: camelCaseToHumanReadable("defaultZone"), description: `The default availability zone.` }),
|
|
4894
|
+
/**
|
|
4895
|
+
* The region ID.
|
|
4896
|
+
*/
|
|
4897
|
+
regionId: z.string().optional().meta({ title: camelCaseToHumanReadable("regionId"), description: `The region ID.` })
|
|
4845
4898
|
}),
|
|
4846
4899
|
meta: {
|
|
4847
4900
|
color: "#0080ff"
|
|
4848
4901
|
}
|
|
4849
4902
|
});
|
|
4850
4903
|
var connection4 = defineUnit({
|
|
4851
|
-
type: "yandex.connection.
|
|
4904
|
+
type: "yandex.connection.v1",
|
|
4852
4905
|
args: {
|
|
4853
4906
|
/**
|
|
4854
|
-
* The
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
/**
|
|
4858
|
-
* The region ID for resources.
|
|
4907
|
+
* The region to create connection for.
|
|
4908
|
+
*
|
|
4909
|
+
* See [Regions](https://yandex.cloud/en/docs/overview/concepts/region) for details.
|
|
4859
4910
|
*/
|
|
4860
|
-
|
|
4911
|
+
region: $addArgumentDescription(z.discriminatedUnion("id", [
|
|
4912
|
+
z.object({
|
|
4913
|
+
/**
|
|
4914
|
+
* The ID of the region.
|
|
4915
|
+
*/
|
|
4916
|
+
id: z.literal("ru-central1").meta({ title: camelCaseToHumanReadable("id"), description: `The ID of the region.` }),
|
|
4917
|
+
/**
|
|
4918
|
+
* The default availability zone in ru-central1 to place resources in.
|
|
4919
|
+
*/
|
|
4920
|
+
defaultZone: z.enum(["ru-central1-a", "ru-central1-b", "ru-central1-d"]).default("ru-central1-d").meta({ title: camelCaseToHumanReadable("defaultZone"), description: `The default availability zone in ru-central1 to place resources in.` })
|
|
4921
|
+
}),
|
|
4922
|
+
z.object({
|
|
4923
|
+
/**
|
|
4924
|
+
* The ID of the region.
|
|
4925
|
+
*/
|
|
4926
|
+
id: z.literal("kz1").meta({ title: camelCaseToHumanReadable("id"), description: `The ID of the region.` }),
|
|
4927
|
+
/**
|
|
4928
|
+
* The default availability zone in kz1 to place resources in.
|
|
4929
|
+
*/
|
|
4930
|
+
defaultZone: z.enum(["kz1-a"]).default("kz1-a").meta({ title: camelCaseToHumanReadable("defaultZone"), description: `The default availability zone in kz1 to place resources in.` })
|
|
4931
|
+
})
|
|
4932
|
+
]).prefault({ id: "ru-central1" }), `The region to create connection for.
|
|
4933
|
+
|
|
4934
|
+
See [Regions](https://yandex.cloud/en/docs/overview/concepts/region) for details.`)
|
|
4861
4935
|
},
|
|
4862
4936
|
secrets: {
|
|
4863
4937
|
/**
|
|
4864
4938
|
* The service account key file content (JSON).
|
|
4939
|
+
*
|
|
4940
|
+
* Important: service account must have `iam.serviceAccounts.user` role to work properly.
|
|
4941
|
+
*
|
|
4942
|
+
* See [Creating an authorized key](https://yandex.cloud/en/docs/iam/operations/authentication/manage-authorized-keys#create-authorized-key) for details.
|
|
4865
4943
|
*/
|
|
4866
4944
|
serviceAccountKeyFile: $addArgumentDescription({
|
|
4867
4945
|
schema: z.string().meta({ language: "json" }),
|
|
4868
4946
|
meta: {
|
|
4869
4947
|
title: "Service Account Key File"
|
|
4870
4948
|
}
|
|
4871
|
-
}, `The service account key file content (JSON)
|
|
4949
|
+
}, `The service account key file content (JSON).
|
|
4950
|
+
|
|
4951
|
+
Important: service account must have \`iam.serviceAccounts.user\` role to work properly.
|
|
4952
|
+
|
|
4953
|
+
See [Creating an authorized key](https://yandex.cloud/en/docs/iam/operations/authentication/manage-authorized-keys#create-authorized-key) for details.`)
|
|
4872
4954
|
},
|
|
4873
4955
|
inputs: {
|
|
4874
4956
|
...inputs2
|
|
@@ -4877,11 +4959,11 @@ var connection4 = defineUnit({
|
|
|
4877
4959
|
/**
|
|
4878
4960
|
* The Yandex Cloud connection.
|
|
4879
4961
|
*/
|
|
4880
|
-
|
|
4962
|
+
connection: $addInputDescription(connectionEntity2, `The Yandex Cloud connection.`)
|
|
4881
4963
|
},
|
|
4882
4964
|
meta: {
|
|
4883
4965
|
description: `The connection to a Yandex Cloud account.`,
|
|
4884
|
-
title: "
|
|
4966
|
+
title: "YC Connection",
|
|
4885
4967
|
category: "Yandex Cloud",
|
|
4886
4968
|
icon: "simple-icons:yandexcloud",
|
|
4887
4969
|
iconColor: "#0080ff"
|
|
@@ -4891,13 +4973,164 @@ var connection4 = defineUnit({
|
|
|
4891
4973
|
path: "connection"
|
|
4892
4974
|
}
|
|
4893
4975
|
});
|
|
4976
|
+
var diskSchema = z.object({
|
|
4977
|
+
/**
|
|
4978
|
+
* The disk type.
|
|
4979
|
+
*
|
|
4980
|
+
* - Network SSD (network-ssd): Fast network drive; SSD network block storage.
|
|
4981
|
+
* - Network HDD (network-hdd): Standard network drive; HDD network block storage.
|
|
4982
|
+
* - Non-replicated SSD (network-ssd-nonreplicated): Enhanced performance network drive without redundancy.
|
|
4983
|
+
* - Ultra high-speed network storage with three replicas (SSD) (network-ssd-io-m3): High-performance SSD offering the same speed as network-ssd-nonreplicated, plus redundancy.
|
|
4984
|
+
*/
|
|
4985
|
+
type: z.enum(["network-ssd", "network-hdd", "network-ssd-nonreplicated", "network-ssd-io-m3"]).default("network-ssd").meta({ title: camelCaseToHumanReadable("type"), description: `The disk type.
|
|
4986
|
+
|
|
4987
|
+
- Network SSD (network-ssd): Fast network drive; SSD network block storage.
|
|
4988
|
+
- Network HDD (network-hdd): Standard network drive; HDD network block storage.
|
|
4989
|
+
- Non-replicated SSD (network-ssd-nonreplicated): Enhanced performance network drive without redundancy.
|
|
4990
|
+
- Ultra high-speed network storage with three replicas (SSD) (network-ssd-io-m3): High-performance SSD offering the same speed as network-ssd-nonreplicated, plus redundancy.` }),
|
|
4991
|
+
/**
|
|
4992
|
+
* The disk size in GB.
|
|
4993
|
+
*
|
|
4994
|
+
* For `network-ssd-nonreplicated` and `network-ssd-io-m3` must be multiple of 93.
|
|
4995
|
+
*/
|
|
4996
|
+
size: z.number().default(20).meta({ title: camelCaseToHumanReadable("size"), description: `The disk size in GB.
|
|
4997
|
+
|
|
4998
|
+
For \`network-ssd-nonreplicated\` and \`network-ssd-io-m3\` must be multiple of 93.` })
|
|
4999
|
+
});
|
|
5000
|
+
var diskEntity = defineEntity({
|
|
5001
|
+
type: "yandex.disk.v1",
|
|
5002
|
+
schema: z.object({
|
|
5003
|
+
/**
|
|
5004
|
+
* The global ID of the disk.
|
|
5005
|
+
*/
|
|
5006
|
+
id: z.string().meta({ title: camelCaseToHumanReadable("id"), description: `The global ID of the disk.` })
|
|
5007
|
+
}),
|
|
5008
|
+
meta: {
|
|
5009
|
+
title: "YC Disk",
|
|
5010
|
+
icon: "simple-icons:yandexcloud",
|
|
5011
|
+
iconColor: "#0080ff",
|
|
5012
|
+
secondaryIcon: "icon-park-outline:disk"
|
|
5013
|
+
}
|
|
5014
|
+
});
|
|
5015
|
+
var disk = defineUnit({
|
|
5016
|
+
type: "yandex.disk.v1",
|
|
5017
|
+
args: {
|
|
5018
|
+
/**
|
|
5019
|
+
* The name of the disk in the folder.
|
|
5020
|
+
* If not specified, the name of the unit will be used.
|
|
5021
|
+
*/
|
|
5022
|
+
diskName: $addArgumentDescription(z.string().optional(), `The name of the disk in the folder.
|
|
5023
|
+
If not specified, the name of the unit will be used.`),
|
|
5024
|
+
...diskSchema.shape
|
|
5025
|
+
},
|
|
5026
|
+
inputs: {
|
|
5027
|
+
connection: connectionEntity2
|
|
5028
|
+
},
|
|
5029
|
+
outputs: {
|
|
5030
|
+
/**
|
|
5031
|
+
* The disk entity.
|
|
5032
|
+
*/
|
|
5033
|
+
disk: $addInputDescription(diskEntity, `The disk entity.`)
|
|
5034
|
+
},
|
|
5035
|
+
meta: {
|
|
5036
|
+
description: `The disk on Yandex Cloud.`,
|
|
5037
|
+
title: "YC Disk",
|
|
5038
|
+
category: "Yandex Cloud",
|
|
5039
|
+
icon: "icon-park-outline:disk",
|
|
5040
|
+
iconColor: "#0080ff",
|
|
5041
|
+
secondaryIcon: "mage:compact-disk-fill"
|
|
5042
|
+
},
|
|
5043
|
+
source: {
|
|
5044
|
+
package: "@highstate/yandex",
|
|
5045
|
+
path: "disk"
|
|
5046
|
+
}
|
|
5047
|
+
});
|
|
5048
|
+
var imageEntity2 = defineEntity({
|
|
5049
|
+
type: "yandex.image.v1",
|
|
5050
|
+
schema: z.object({
|
|
5051
|
+
/**
|
|
5052
|
+
* The global ID of the image.
|
|
5053
|
+
*/
|
|
5054
|
+
id: z.string().meta({ title: camelCaseToHumanReadable("id"), description: `The global ID of the image.` })
|
|
5055
|
+
}),
|
|
5056
|
+
meta: {
|
|
5057
|
+
title: "Yandex Cloud Image",
|
|
5058
|
+
icon: "simple-icons:yandexcloud",
|
|
5059
|
+
iconColor: "#0080ff",
|
|
5060
|
+
secondaryIcon: "mage:compact-disk-fill"
|
|
5061
|
+
}
|
|
5062
|
+
});
|
|
5063
|
+
var existingImage2 = defineUnit({
|
|
5064
|
+
type: "yandex.existing-image.v1",
|
|
5065
|
+
args: {
|
|
5066
|
+
/**
|
|
5067
|
+
* The ID of the image.
|
|
5068
|
+
*
|
|
5069
|
+
* See [Yandex Cloud Marketplace Images](https://yandex.cloud/en/marketplace) to find available images and their IDs.
|
|
5070
|
+
* You can also use user images by specifying their IDs.
|
|
5071
|
+
*/
|
|
5072
|
+
id: $addArgumentDescription(z.string(), `The ID of the image.
|
|
5073
|
+
|
|
5074
|
+
See [Yandex Cloud Marketplace Images](https://yandex.cloud/en/marketplace) to find available images and their IDs.
|
|
5075
|
+
You can also use user images by specifying their IDs.`)
|
|
5076
|
+
},
|
|
5077
|
+
inputs: {
|
|
5078
|
+
connection: connectionEntity2
|
|
5079
|
+
},
|
|
5080
|
+
outputs: {
|
|
5081
|
+
/**
|
|
5082
|
+
* The image entity.
|
|
5083
|
+
*/
|
|
5084
|
+
image: $addInputDescription(imageEntity2, `The image entity.`)
|
|
5085
|
+
},
|
|
5086
|
+
meta: {
|
|
5087
|
+
description: `The existing image from Yandex Cloud Marketplace or user images.`,
|
|
5088
|
+
title: "YC Existing Image",
|
|
5089
|
+
category: "Yandex Cloud",
|
|
5090
|
+
icon: "simple-icons:yandexcloud",
|
|
5091
|
+
iconColor: "#0080ff",
|
|
5092
|
+
secondaryIcon: "mage:compact-disk-fill"
|
|
5093
|
+
},
|
|
5094
|
+
source: {
|
|
5095
|
+
package: "@highstate/yandex",
|
|
5096
|
+
path: "existing-image"
|
|
5097
|
+
}
|
|
5098
|
+
});
|
|
4894
5099
|
var virtualMachine3 = defineUnit({
|
|
4895
|
-
type: "yandex.virtual-machine.
|
|
5100
|
+
type: "yandex.virtual-machine.v1",
|
|
4896
5101
|
args: {
|
|
4897
5102
|
/**
|
|
4898
|
-
* The
|
|
5103
|
+
* The name of the virtual machine.
|
|
5104
|
+
* If not specified, the name of the unit will be used.
|
|
4899
5105
|
*/
|
|
4900
|
-
|
|
5106
|
+
vmName: $addArgumentDescription(z.string().optional(), `The name of the virtual machine.
|
|
5107
|
+
If not specified, the name of the unit will be used.`),
|
|
5108
|
+
/**
|
|
5109
|
+
* The platform ID for the instance.
|
|
5110
|
+
*
|
|
5111
|
+
* See [Platforms](https://yandex.cloud/en/docs/compute/concepts/vm-platforms) for details.
|
|
5112
|
+
*/
|
|
5113
|
+
platformId: $addArgumentDescription(z.enum([
|
|
5114
|
+
// standard platforms
|
|
5115
|
+
"standard-v1",
|
|
5116
|
+
"standard-v2",
|
|
5117
|
+
"standard-v3",
|
|
5118
|
+
"amd-v1",
|
|
5119
|
+
"standard-v4a",
|
|
5120
|
+
// high-performance platforms
|
|
5121
|
+
"highfreq-v3",
|
|
5122
|
+
"highfreq-v4a",
|
|
5123
|
+
// with gpu
|
|
5124
|
+
"gpu-standard-v1",
|
|
5125
|
+
"gpu-standard-v2",
|
|
5126
|
+
"gpu-standard-v3",
|
|
5127
|
+
"gpu-standard-v3i",
|
|
5128
|
+
"standard-v3-t4",
|
|
5129
|
+
"standard-v3-t4i",
|
|
5130
|
+
"gpu-platform-v4"
|
|
5131
|
+
]).default("standard-v3"), `The platform ID for the instance.
|
|
5132
|
+
|
|
5133
|
+
See [Platforms](https://yandex.cloud/en/docs/compute/concepts/vm-platforms) for details.`),
|
|
4901
5134
|
/**
|
|
4902
5135
|
* The resources to allocate to the virtual machine.
|
|
4903
5136
|
*/
|
|
@@ -4911,31 +5144,14 @@ var virtualMachine3 = defineUnit({
|
|
|
4911
5144
|
*/
|
|
4912
5145
|
memory: z.number().default(4).meta({ title: camelCaseToHumanReadable("memory"), description: `The amount of memory in GB.` }),
|
|
4913
5146
|
/**
|
|
4914
|
-
* The core
|
|
5147
|
+
* The guaranteed CPU core performance (10-100).
|
|
4915
5148
|
*/
|
|
4916
|
-
coreFraction: z.number().min(10).max(100).optional().meta({ title: camelCaseToHumanReadable("coreFraction"), description: `The core
|
|
5149
|
+
coreFraction: z.number().min(10).max(100).optional().meta({ title: camelCaseToHumanReadable("coreFraction"), description: `The guaranteed CPU core performance (10-100).` })
|
|
4917
5150
|
}).prefault({}), `The resources to allocate to the virtual machine.`),
|
|
4918
5151
|
/**
|
|
4919
5152
|
* The boot disk configuration.
|
|
4920
5153
|
*/
|
|
4921
|
-
|
|
4922
|
-
/**
|
|
4923
|
-
* The disk size in GB.
|
|
4924
|
-
*
|
|
4925
|
-
* For `network-ssd-nonreplicated` must be multiple of 93.
|
|
4926
|
-
*/
|
|
4927
|
-
size: z.number().default(20).meta({ title: camelCaseToHumanReadable("size"), description: `The disk size in GB.
|
|
4928
|
-
|
|
4929
|
-
For \`network-ssd-nonreplicated\` must be multiple of 93.` }),
|
|
4930
|
-
/**
|
|
4931
|
-
* The disk type.
|
|
4932
|
-
*/
|
|
4933
|
-
type: z.string().default("network-ssd-nonreplicated").meta({ title: camelCaseToHumanReadable("type"), description: `The disk type.` }),
|
|
4934
|
-
/**
|
|
4935
|
-
* The image family to use.
|
|
4936
|
-
*/
|
|
4937
|
-
imageFamily: z.string().default("ubuntu-2204-lts").meta({ title: camelCaseToHumanReadable("imageFamily"), description: `The image family to use.` })
|
|
4938
|
-
}).prefault({}), `The boot disk configuration.`),
|
|
5154
|
+
bootDisk: $addArgumentDescription(diskSchema.prefault({}), `The boot disk configuration.`),
|
|
4939
5155
|
/**
|
|
4940
5156
|
* The network configuration.
|
|
4941
5157
|
*/
|
|
@@ -4949,46 +5165,25 @@ var virtualMachine3 = defineUnit({
|
|
|
4949
5165
|
/**
|
|
4950
5166
|
* Whether to assign a public IP.
|
|
4951
5167
|
*/
|
|
4952
|
-
assignPublicIp: z.boolean().default(true).meta({ title: camelCaseToHumanReadable("assignPublicIp"), description: `Whether to assign a public IP.` })
|
|
4953
|
-
/**
|
|
4954
|
-
* The list of DNS servers.
|
|
4955
|
-
*/
|
|
4956
|
-
dns: ipv46Schema.array().default([]).meta({ title: camelCaseToHumanReadable("dns"), description: `The list of DNS servers.` })
|
|
5168
|
+
assignPublicIp: z.boolean().default(true).meta({ title: camelCaseToHumanReadable("assignPublicIp"), description: `Whether to assign a public IP.` })
|
|
4957
5169
|
}).prefault({}), `The network configuration.`),
|
|
4958
|
-
/**
|
|
4959
|
-
* The IPv4 address configuration.
|
|
4960
|
-
*/
|
|
4961
|
-
ipv4: $addArgumentDescription(z.discriminatedUnion("type", [
|
|
4962
|
-
z.object({
|
|
4963
|
-
type: z.literal("dhcp")
|
|
4964
|
-
}),
|
|
4965
|
-
z.object({
|
|
4966
|
-
type: z.literal("static"),
|
|
4967
|
-
address: z.string(),
|
|
4968
|
-
prefix: ipv4PrefixSchema.default(24),
|
|
4969
|
-
gateway: z.string().optional()
|
|
4970
|
-
})
|
|
4971
|
-
]).default({ type: "dhcp" }), `The IPv4 address configuration.`),
|
|
4972
5170
|
/**
|
|
4973
5171
|
* The SSH configuration.
|
|
4974
5172
|
*/
|
|
4975
|
-
ssh: $addArgumentDescription(vmSshArgs, `The SSH configuration.`)
|
|
4976
|
-
/**
|
|
4977
|
-
* Additional metadata for cloud-init.
|
|
4978
|
-
*/
|
|
4979
|
-
metadata: $addArgumentDescription(z.record(z.string(), z.string()).default({}), `Additional metadata for cloud-init.`)
|
|
5173
|
+
ssh: $addArgumentDescription(vmSshArgs, `The SSH configuration.`)
|
|
4980
5174
|
},
|
|
4981
5175
|
secrets: {
|
|
4982
5176
|
...vmSecrets
|
|
4983
5177
|
},
|
|
4984
5178
|
inputs: {
|
|
4985
|
-
|
|
5179
|
+
connection: connectionEntity2,
|
|
5180
|
+
image: imageEntity2,
|
|
4986
5181
|
...inputs2
|
|
4987
5182
|
},
|
|
4988
5183
|
outputs: serverOutputs,
|
|
4989
5184
|
meta: {
|
|
4990
5185
|
description: `The virtual machine on Yandex Cloud.`,
|
|
4991
|
-
title: "
|
|
5186
|
+
title: "YC Virtual Machine",
|
|
4992
5187
|
category: "Yandex Cloud",
|
|
4993
5188
|
icon: "simple-icons:yandexcloud",
|
|
4994
5189
|
iconColor: "#0080ff",
|