Skip to content

Commit adf4337

Browse files
authored
Update isolates documentation with new unified tool
1 parent 9eaf359 commit adf4337

File tree

1 file changed

+140
-13
lines changed

1 file changed

+140
-13
lines changed

docs/cloudlinuxos/isolates/README.md

Lines changed: 140 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ When CloudLinux Isolates is enabled for a domain:
2121
| Package | Minimum Version |
2222
| ------------------ | --------------- |
2323
| cagefs | 7.6.29-1 |
24+
| lve-utils | 6.6.30-1 |
2425
| lve (liblve) | 2.2-1 |
2526
| lve-wrappers | 0.7.13-1 |
2627
| alt-python27-cllib | 3.4.33-1 |
@@ -153,7 +154,7 @@ CloudLinux Isolates was allowed for all users.
153154
* Creates the feature flag at `/opt/cloudlinux/flags/enabled-flags.d/website-isolation.flag`
154155
* Sets up the per-user denied directory at `/etc/cagefs/site-isolation.users.denied`
155156
* Triggers a CageFS remount to apply necessary mount configurations
156-
* Registers the `cagefsctl-user` proxyexec command for user-level management
157+
* Registers the `isolatectl` proxyexec command for user-level management
157158
* Must be run with root privileges
158159

159160
***
@@ -448,18 +449,22 @@ jane
448449

449450
***
450451

451-
### User-Level Management
452+
### User-Level Management (`isolatectl`)
452453

453-
End users can manage CloudLinux Isolates for their own domains using the `cagefsctl-user` utility. This command runs inside CageFS via proxyexec and allows users to enable, disable, and list isolation for domains they own — without requiring root access.
454+
End users can manage CloudLinux Isolates and per-domain resource limits for their own domains using the `isolatectl` utility. All output is JSON.
455+
456+
`isolatectl` must be run as a regular (non-root) user. It automatically identifies the calling user — no `--username` or `--lve-id` flags are needed.
454457

455458
:::tip Note
456459
User-level management requires that CloudLinux Isolates is allowed server-wide **and** allowed for the specific user by the server administrator.
457460
:::
458461

459-
#### Enable Isolation for a Domain (User-Level)
462+
#### Site Isolation
463+
464+
##### Enable Isolation for a Domain (User-Level)
460465

461466
```
462-
cagefsctl-user site-isolation-enable --domain <domain>[,<domain2>,...]
467+
isolatectl site-isolation enable --domain <domain>[,<domain2>,...]
463468
```
464469

465470
Enables CloudLinux Isolates for one or more domains owned by the calling user.
@@ -473,10 +478,10 @@ Enables CloudLinux Isolates for one or more domains owned by the calling user.
473478
**Example:**
474479

475480
```
476-
$ cagefsctl-user site-isolation-enable --domain example.com
481+
$ isolatectl site-isolation enable --domain example.com
477482
{"result": "success", "enabled_sites": ["example.com"]}
478483
479-
$ cagefsctl-user site-isolation-enable --domain site1.com,site2.com
484+
$ isolatectl site-isolation enable --domain site1.com,site2.com
480485
{"result": "success", "enabled_sites": ["site1.com", "site2.com"]}
481486
```
482487

@@ -487,10 +492,10 @@ $ cagefsctl-user site-isolation-enable --domain site1.com,site2.com
487492

488493
***
489494

490-
#### Disable Isolation for a Domain (User-Level)
495+
##### Disable Isolation for a Domain (User-Level)
491496

492497
```
493-
cagefsctl-user site-isolation-disable --domain <domain>[,<domain2>,...]
498+
isolatectl site-isolation disable --domain <domain>[,<domain2>,...]
494499
```
495500

496501
Disables CloudLinux Isolates for one or more domains owned by the calling user.
@@ -504,27 +509,149 @@ Disables CloudLinux Isolates for one or more domains owned by the calling user.
504509
**Example:**
505510

506511
```
507-
$ cagefsctl-user site-isolation-disable --domain example.com
512+
$ isolatectl site-isolation disable --domain example.com
508513
{"result": "success", "enabled_sites": []}
509514
```
510515

511516
***
512517

513-
#### List Isolated Domains (User-Level)
518+
##### List Isolated Domains (User-Level)
514519

515520
```
516-
cagefsctl-user site-isolation-list
521+
isolatectl site-isolation list
517522
```
518523

519524
Lists all domains with CloudLinux Isolates enabled for the calling user.
520525

521526
**Example:**
522527

523528
```
524-
$ cagefsctl-user site-isolation-list
529+
$ isolatectl site-isolation list
525530
{"result": "success", "enabled_sites": ["example.com", "mysite.org"]}
526531
```
527532

533+
***
534+
535+
#### Per-Domain Resource Limits
536+
537+
Per-domain resource limits allow end users to set and apply individual CPU, memory, I/O, and process limits for each isolated domain. Domain limits require site isolation to be enabled first.
538+
539+
##### List Domain Limits
540+
541+
```
542+
isolatectl limits list [--domain <domain>]
543+
```
544+
545+
Shows the configured limits for all domains or a specific domain.
546+
547+
**Parameters:**
548+
549+
| Parameter | Description |
550+
| ---------- | ---------------------------------------------------- |
551+
| `--domain` | (Optional) Show limits for a specific domain only |
552+
553+
**Example:**
554+
555+
```
556+
$ isolatectl limits list
557+
{
558+
"result": "success",
559+
"domains": [
560+
{
561+
"name": "example.com",
562+
"lve_id": 1000,
563+
"limits": {"cpu": 2500, "pmem": 1048576}
564+
}
565+
]
566+
}
567+
568+
$ isolatectl limits list --domain example.com
569+
{
570+
"result": "success",
571+
"domains": [
572+
{
573+
"name": "example.com",
574+
"lve_id": 1000,
575+
"limits": {"cpu": 2500, "pmem": 1048576}
576+
}
577+
]
578+
}
579+
```
580+
581+
***
582+
583+
##### Set Domain Limits
584+
585+
```
586+
isolatectl limits set --domain <domain> [--cpu VAL] [--pmem VAL] [--io VAL] [--nproc VAL] [--iops VAL] [--ep VAL] [--vmem VAL]
587+
```
588+
589+
Stores per-domain limits in the user's config and applies them to the kernel.
590+
591+
**Parameters:**
592+
593+
| Parameter | Description |
594+
| ---------- | ---------------------------------------------------------- |
595+
| `--domain` | Domain name (required) |
596+
| `--cpu` | CPU limit (hundredths of percent, e.g. 2500 = 25%) |
597+
| `--pmem` | Physical memory limit (bytes) |
598+
| `--io` | I/O limit (KB/s) |
599+
| `--nproc` | Max processes |
600+
| `--iops` | I/O operations per second |
601+
| `--ep` | Max entry processes (concurrent connections) |
602+
| `--vmem` | Virtual memory limit (bytes) |
603+
604+
At least one limit parameter is required.
605+
606+
**Example:**
607+
608+
```
609+
$ isolatectl limits set --domain example.com --cpu 5000 --pmem 268435456 --io 2048 --nproc 30 --iops 500 --ep 20 --vmem 536870912
610+
{
611+
"result": "success",
612+
"domain": "example.com",
613+
"limits": {
614+
"cpu": 5000,
615+
"pmem": 268435456,
616+
"io": 2048,
617+
"nproc": 30,
618+
"iops": 500,
619+
"ep": 20,
620+
"vmem": 536870912
621+
}
622+
}
623+
```
624+
625+
This sets: CPU 50%, 256 MB PMEM, 2048 KB/s IO, 30 procs, 500 IOPS, 20 entry procs, 512 MB VMEM.
626+
627+
628+
***
629+
630+
##### Apply Domain Limits
631+
632+
```
633+
isolatectl limits apply --domain <domain>
634+
```
635+
636+
Pushes the stored limits for a domain from the config file to the kernel. Use after manually editing the config or to re-apply limits after a restart.
637+
638+
**Parameters:**
639+
640+
| Parameter | Description |
641+
| ---------- | ------------------ |
642+
| `--domain` | Domain name |
643+
644+
**Example:**
645+
646+
```
647+
$ isolatectl limits apply --domain example.com
648+
{
649+
"result": "success",
650+
"domain": "example.com",
651+
"limits": {"cpu": 5000, "pmem": 268435456}
652+
}
653+
```
654+
528655

529656
### Executing Commands in an Isolated Site Context
530657

0 commit comments

Comments
 (0)