Skip to content

Commit 4067ab5

Browse files
authored
core package (#209)
1 parent 58c34dd commit 4067ab5

File tree

1 file changed

+65
-79
lines changed

1 file changed

+65
-79
lines changed

apps/docs/content/references/import.mdx

Lines changed: 65 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ project:
2929
name: project0
3030
# Project description
3131
description: "This project is an example only"
32+
# Project core package - LIGHT/SERIOUS
33+
corePackage: SERIOUS
3234
# List of project tags for filtering
3335
tags:
3436
- test
@@ -121,8 +123,8 @@ services:
121123
</DropdownItem>
122124
</Dropdown>
123125

124-
:::warning
125-
This is a general guideline; not all keys are valid for every service type. For technology-specific details, refer to the **Create service** page in the **How To** section of the Zerops documentation.
126+
:::note
127+
The example above is a general guideline; not all keys are valid for every service type. For technology-specific details, refer to the **Create service** page in the **How To** section of the Zerops documentation.
126128
:::
127129

128130
---
@@ -137,9 +139,6 @@ The project configuration is used to define the project you want to import.
137139

138140
#### Usage
139141

140-
<Dropdown>
141-
<DropdownItem title="Project Structure">
142-
143142
<table className="w-full my-1.5">
144143
<thead>
145144
<tr>
@@ -150,38 +149,38 @@ The project configuration is used to define the project you want to import.
150149
</thead>
151150
<tbody>
152151
<tr>
153-
<td className="w-fit">project</td>
152+
<td className="w-fit font-semibold">project</td>
154153
<td className="w-fit">object</td>
155-
<td className="w-fit">
156-
_REQUIRED, if a whole project is imported_
157-
Only one project can be defined.
158-
</td>
154+
<td className="w-fit">_REQUIRED, if a whole project is imported_ <br/>Only one project can be defined.</td>
159155
</tr>
160156
<tr>
161-
<td className="w-fit">name</td>
157+
<td className="w-fit font-semibold">name</td>
162158
<td className="w-fit">string, REQUIRED</td>
163-
<td className="w-fit">
164-
The name of the new project. Duplicates are allowed.
165-
</td>
159+
<td className="w-fit">The name of the new project. Duplicates are allowed.</td>
166160
</tr>
167161
<tr>
168-
<td className="w-fit">description</td>
169-
<td className="w-fit">string</td>
170-
<td className="w-fit">
171-
Description of the new project.
172-
</td>
162+
<td className="w-fit font-semibold">description</td>
163+
<td className="w-fit">string</td>
164+
<td className="w-fit">Description of the new project.</td>
165+
</tr>
166+
<tr>
167+
<td className="w-fit font-semibold">corePackage</td>
168+
<td className="w-fit">string</td>
169+
<td className="w-fit">Core package of the new project. <br/>Values: <b>LIGHT</b>/<b>SERIOUS</b> (default LIGHT)</td>
173170
</tr>
174171
<tr>
175-
<td className="w-fit">tags</td>
172+
<td className="w-fit font-semibold">tags</td>
176173
<td className="w-fit">list of strings</td>
177-
<td className="w-fit">
178-
One or more string tags. Tags do not have a functional meaning, they only provide better orientation in projects.
179-
</td>
174+
<td className="w-fit">One or more string tags.<br/>Tags do not have a functional meaning, they only provide better orientation in projects.</td>
180175
</tr>
181176
</tbody>
182177
</table>
183-
</DropdownItem>
184-
</Dropdown>
178+
179+
:::warning
180+
The `corePackage` value can't be changed later. Make sure to choose a suitable core package for your project.
181+
:::
182+
183+
This example will create a project named `project0` with [serious core](/features/infrastructure#serious-core) package and the description `This project is an example only`. The project will have two tags: `test` and `dev`:
185184

186185
```yml
187186
# ==== Define a project to import ====
@@ -190,24 +189,22 @@ project:
190189
name: project0
191190
# Project description
192191
description: "This project is an example only"
192+
# Project core package
193+
corePackage: SERIOUS
193194
# List of project tags for filtering
194195
tags:
195196
- test
196197
- dev
197198
```
198199
199-
This will create a project with the name `project0` and the description `This project is an example only`. The project will have two tags: `test` and `dev`.
200-
201-
The `project` object requires only the `name` parameter - both `description` and `tags` are optional.
202-
203200
### Service Configuration
204201
205202
The service configuration is used to define the services, environment variables, and other settings you want to import into the project(You require at least one service and you need to have a project to import into or define the project in the yaml).
206203
207204
#### Usage
208205
209206
<Dropdown>
210-
<DropdownItem title="Service Structure">
207+
<DropdownItem title="Service Structure Parameters">
211208
212209
<table className="w-full my-1.5">
213210
<thead>
@@ -219,14 +216,12 @@ The service configuration is used to define the services, environment variables,
219216
</thead>
220217
<tbody>
221218
<tr>
222-
<td className="w-fit">services</td>
219+
<td className="w-fit font-semibold">services</td>
223220
<td className="w-fit">list of objects, REQUIRED</td>
224-
<td className="w-fit">
225-
At least one service is required.
226-
</td>
221+
<td className="w-fit">At least one service is required.</td>
227222
</tr>
228223
<tr>
229-
<td className="w-fit">hostname</td>
224+
<td className="w-fit font-semibold">hostname</td>
230225
<td className="w-fit">string, REQUIRED</td>
231226
<td className="w-fit">
232227
The unique service identifier.
@@ -236,67 +231,58 @@ The service configuration is used to define the services, environment variables,
236231
</td>
237232
</tr>
238233
<tr>
239-
<td className="w-fit">type</td>
234+
<td className="w-fit font-semibold">type</td>
240235
<td className="w-fit">enum, REQUIRED</td>
241-
<td className="w-fit">
242-
Specifies the service type and version. See [supported types](/references/importyml/type-list).
243-
</td>
236+
<td className="w-fit">Specifies the service type and version. See [supported types](/references/importyml/type-list).</td>
244237
</tr>
245238
<tr>
246-
<td className="w-fit">mode</td>
239+
<td className="w-fit font-semibold">mode</td>
247240
<td className="w-fit">enum</td>
248-
<td className="w-fit">
249-
Values: **HA / NON_HA** (default NON_HA)
250-
Defines the operation mode of the service.
251-
</td>
241+
<td className="w-fit">Values: <b>HA</b> / <b>NON_HA</b> (default NON_HA)<br/>Defines the operation mode of the service.</td>
252242
</tr>
253243
<tr>
254-
<td className="w-fit">envSecrets</td>
244+
<td className="w-fit font-semibold">envSecrets</td>
255245
<td className="w-fit">map[string]string</td>
256-
<td className="w-fit">
257-
Environment variables that are blurred by default in Zerops GUI. Can be edited or deleted in Zerops GUI.
258-
</td>
246+
<td className="w-fit">Environment variables that are blurred by default in Zerops GUI. Can be edited or deleted in Zerops GUI.</td>
259247
</tr>
260248
<tr>
261-
<td className="w-fit">objectStorageSize</td>
249+
<td className="w-fit font-semibold">objectStorageSize</td>
262250
<td className="w-fit">integer</td>
263-
<td className="w-fit">
264-
Object storage size in GB.
265-
</td>
251+
<td className="w-fit">Object storage size in GB.</td>
266252
</tr>
267253
<tr>
268-
<td className="w-fit">objectStoragePolicy</td>
254+
<td className="w-fit font-semibold">objectStoragePolicy</td>
269255
<td className="w-fit">enum</td>
270256
<td className="w-fit">
271257
Values: **private / public-read / public-objects-read / public-write / public-read-write / custom**
272258
Select a predefined AWS S3 bucket access policy.
273259
</td>
274260
</tr>
275261
<tr>
276-
<td className="w-fit">objectStorageRawPolicy</td>
262+
<td className="w-fit font-semibold">objectStorageRawPolicy</td>
277263
<td className="w-fit">json</td>
278264
<td className="w-fit">
279265
Define your own AWS S3 bucket access policy. See [AWS docs](https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-policy-language-overview.html) for details.
280266
Use `{{ .BucketName }}` placeholder if you need to use bucket name in your custom policy rules.
281267
</td>
282268
</tr>
283269
<tr>
284-
<td className="w-fit">buildFromGit</td>
270+
<td className="w-fit font-semibold">buildFromGit</td>
285271
<td className="w-fit">string (URL)</td>
286272
<td className="w-fit">
287273
A URL of a Github or Gitlab repository used for a one-time build of your service.
288274
</td>
289275
</tr>
290276
<tr>
291-
<td className="w-fit">enableSubdomainAccess</td>
277+
<td className="w-fit font-semibold">enableSubdomainAccess</td>
292278
<td className="w-fit">boolean</td>
293279
<td className="w-fit">
294280
Default: false
295281
Set `true`, if you want to enable a public access to your service via a Zerops subdomain. Not suitable for production.
296282
</td>
297283
</tr>
298284
<tr>
299-
<td className="w-fit">priority</td>
285+
<td className="w-fit font-semibold">priority</td>
300286
<td className="w-fit">integer</td>
301287
<td className="w-fit">
302288
Services are sorted before creation by priority in descending order, i.e. the higher the priority the sooner the service is created.
@@ -355,7 +341,7 @@ The vertical autoscaling configuration is used to define the vertical autoscalin
355341
#### Usage
356342

357343
<Dropdown>
358-
<DropdownItem title="Vertical Autoscaling Structure">
344+
<DropdownItem title="Vertical Autoscaling Structure Parameters">
359345

360346
<table className="w-full my-1.5">
361347
<thead>
@@ -367,78 +353,78 @@ The vertical autoscaling configuration is used to define the vertical autoscalin
367353
</thead>
368354
<tbody>
369355
<tr>
370-
<td className="w-fit">minCpu</td>
356+
<td className="w-fit font-semibold">minCpu</td>
371357
<td className="w-fit">integer</td>
372358
<td className="w-fit">Minimum number of virtual CPUs</td>
373359
</tr>
374360
<tr>
375-
<td className="w-fit">maxCpu</td>
361+
<td className="w-fit font-semibold">maxCpu</td>
376362
<td className="w-fit">integer</td>
377363
<td className="w-fit">Maximum number of virtual CPUs</td>
378364
</tr>
379365
<tr>
380-
<td className="w-fit">cpuMode</td>
366+
<td className="w-fit font-semibold">cpuMode</td>
381367
<td className="w-fit">enum</td>
382368
<td className="w-fit">Values: **SHARED / DEDICATED**</td>
383369
</tr>
384370
<tr>
385-
<td className="w-fit">minRam</td>
371+
<td className="w-fit font-semibold">minRam</td>
386372
<td className="w-fit">float</td>
387373
<td className="w-fit">
388374
Minimum RAM in GB that each container of the service can scale down to.
389375
</td>
390376
</tr>
391377
<tr>
392-
<td className="w-fit">maxRam</td>
378+
<td className="w-fit font-semibold">maxRam</td>
393379
<td className="w-fit">float</td>
394380
<td className="w-fit">
395381
Maximum RAM in GB that each container of the service can scale up to.
396382
</td>
397383
</tr>
398384
<tr>
399-
<td className="w-fit">minDisk</td>
385+
<td className="w-fit font-semibold">minDisk</td>
400386
<td className="w-fit">float</td>
401387
<td className="w-fit">
402388
Minimum disk space in GB that each container of the service can scale down to.
403389
</td>
404390
</tr>
405391
<tr>
406-
<td className="w-fit">maxDisk</td>
392+
<td className="w-fit font-semibold">maxDisk</td>
407393
<td className="w-fit">float</td>
408394
<td className="w-fit">
409395
Maximum disk space in GB that each container of the service can scale up to.
410396
</td>
411397
</tr>
412398
<tr>
413-
<td className="w-fit">startCpuCoreCount</td>
399+
<td className="w-fit font-semibold">startCpuCoreCount</td>
414400
<td className="w-fit">integer</td>
415401
<td className="w-fit">
416402
Number of CPU cores with which each container starts.
417403
</td>
418404
</tr>
419405
<tr>
420-
<td className="w-fit">minFreeCpuCores</td>
406+
<td className="w-fit font-semibold">minFreeCpuCores</td>
421407
<td className="w-fit">float</td>
422408
<td className="w-fit">
423409
Minimum number of unused CPU cores before a container starts scaling.
424410
</td>
425411
</tr>
426412
<tr>
427-
<td className="w-fit">minFreeCpuPercent</td>
413+
<td className="w-fit font-semibold">minFreeCpuPercent</td>
428414
<td className="w-fit">float</td>
429415
<td className="w-fit">
430416
Minimum percentage of unused CPU cores before a container starts scaling.
431417
</td>
432418
</tr>
433419
<tr>
434-
<td className="w-fit">minFreeRamGB</td>
420+
<td className="w-fit font-semibold">minFreeRamGB</td>
435421
<td className="w-fit">float</td>
436422
<td className="w-fit">
437423
Minimum unused memory in GB before a container starts scaling.
438424
</td>
439425
</tr>
440426
<tr>
441-
<td className="w-fit">minFreeRamPercent</td>
427+
<td className="w-fit font-semibold">minFreeRamPercent</td>
442428
<td className="w-fit">float</td>
443429
<td className="w-fit">
444430
Minimum percentage of unused memory before a container starts scaling.
@@ -486,7 +472,7 @@ The horizontal autoscaling configuration is used to define the horizontal autosc
486472
#### Usage
487473

488474
<Dropdown>
489-
<DropdownItem title="Horizontal Autoscaling Structure">
475+
<DropdownItem title="Horizontal Autoscaling Structure Parameters">
490476
<table className="w-full my-1.5">
491477
<thead>
492478
<tr>
@@ -497,14 +483,14 @@ The horizontal autoscaling configuration is used to define the horizontal autosc
497483
</thead>
498484
<tbody>
499485
<tr>
500-
<td className="w-fit">minContainers</td>
486+
<td className="w-fit font-semibold">minContainers</td>
501487
<td className="w-fit">integer</td>
502-
<td className="w-fit">Default: 1, maximum value: 6 - Minimum number of containers of the service.</td>
488+
<td className="w-fit">Minimum number of containers of the service.<br/>Default: 1, maximum value: 6</td>
503489
</tr>
504490
<tr>
505-
<td className="w-fit">maxContainers</td>
491+
<td className="w-fit font-semibold">maxContainers</td>
506492
<td className="w-fit">integer</td>
507-
<td className="w-fit">Maximum value: 6 - Maximum number of containers of the service.</td>
493+
<td className="w-fit">Maximum number of containers of the service.<br/>Maximum value: 6</td>
508494
</tr>
509495
</tbody>
510496
</table>
@@ -541,7 +527,7 @@ The mount shared storage configuration is used to define the shared storage to m
541527
</thead>
542528
<tbody>
543529
<tr>
544-
<td className="w-fit">mount</td>
530+
<td className="w-fit font-semibold">mount</td>
545531
<td className="w-fit">list of strings</td>
546532
<td className="w-fit">Mount shared storage to the service. `buildFromGit` must be filled.</td>
547533
</tr>
@@ -558,7 +544,7 @@ services:
558544
- teststorage1
559545
```
560546

561-
The `mount: |-` parameter allows you to mount a shared storage(should be created inside the project) to the service.
547+
The `mount: |-` parameter allows you to mount a shared storage (should be created inside the project) to the service.
562548
563549
564550
### Using Nginx Configuration
@@ -577,7 +563,7 @@ The nginx configuration is used to define the nginx settings for the service.
577563
</thead>
578564
<tbody>
579565
<tr>
580-
<td className="w-fit">nginxConfig</td>
566+
<td className="w-fit font-semibold">nginxConfig</td>
581567
<td className="w-fit">string (multiline)</td>
582568
<td className="w-full">Insert full nginx config.</td>
583569
</tr>
@@ -628,7 +614,7 @@ This shows you how you can use the `zeropsSetup` parameter as a way to insert a
628614
</thead>
629615
<tbody>
630616
<tr>
631-
<td className="w-fit">zeropsSetup</td>
617+
<td className="w-fit font-semibold">zeropsSetup</td>
632618
<td className="w-fit whitespace-nowrap">string or object</td>
633619
<td className="w-fit">Provide the name of the service from your zerops.yml (find it under `-setup: {name}`) or insert full [zerops.yml configuration file](/zerops-yml/specification).</td>
634620
</tr>

0 commit comments

Comments
 (0)