Skip to content

Commit 31940ef

Browse files
authored
Merge pull request #314 from Monstrofil/patch-1
Update isolates documentation with new unified tool
2 parents bd31d96 + adf4337 commit 31940ef

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 |
@@ -176,7 +177,7 @@ CloudLinux Isolates was allowed for all users.
176177
* Creates the feature flag at `/opt/cloudlinux/flags/enabled-flags.d/website-isolation.flag`
177178
* Sets up the per-user denied directory at `/etc/cagefs/site-isolation.users.denied`
178179
* Triggers a CageFS remount to apply necessary mount configurations
179-
* Registers the `cagefsctl-user` proxyexec command for user-level management
180+
* Registers the `isolatectl` proxyexec command for user-level management
180181
* Must be run with root privileges
181182

182183
***
@@ -471,18 +472,22 @@ jane
471472

472473
***
473474

474-
### User-Level Management
475+
### User-Level Management (`isolatectl`)
475476

476-
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.
477+
End users can manage CloudLinux Isolates and per-domain resource limits for their own domains using the `isolatectl` utility. All output is JSON.
478+
479+
`isolatectl` must be run as a regular (non-root) user. It automatically identifies the calling user — no `--username` or `--lve-id` flags are needed.
477480

478481
:::tip Note
479482
User-level management requires that CloudLinux Isolates is allowed server-wide **and** allowed for the specific user by the server administrator.
480483
:::
481484

482-
#### Enable Isolation for a Domain (User-Level)
485+
#### Site Isolation
486+
487+
##### Enable Isolation for a Domain (User-Level)
483488

484489
```
485-
cagefsctl-user site-isolation-enable --domain <domain>[,<domain2>,...]
490+
isolatectl site-isolation enable --domain <domain>[,<domain2>,...]
486491
```
487492

488493
Enables CloudLinux Isolates for one or more domains owned by the calling user.
@@ -496,10 +501,10 @@ Enables CloudLinux Isolates for one or more domains owned by the calling user.
496501
**Example:**
497502

498503
```
499-
$ cagefsctl-user site-isolation-enable --domain example.com
504+
$ isolatectl site-isolation enable --domain example.com
500505
{"result": "success", "enabled_sites": ["example.com"]}
501506
502-
$ cagefsctl-user site-isolation-enable --domain site1.com,site2.com
507+
$ isolatectl site-isolation enable --domain site1.com,site2.com
503508
{"result": "success", "enabled_sites": ["site1.com", "site2.com"]}
504509
```
505510

@@ -510,10 +515,10 @@ $ cagefsctl-user site-isolation-enable --domain site1.com,site2.com
510515

511516
***
512517

513-
#### Disable Isolation for a Domain (User-Level)
518+
##### Disable Isolation for a Domain (User-Level)
514519

515520
```
516-
cagefsctl-user site-isolation-disable --domain <domain>[,<domain2>,...]
521+
isolatectl site-isolation disable --domain <domain>[,<domain2>,...]
517522
```
518523

519524
Disables CloudLinux Isolates for one or more domains owned by the calling user.
@@ -527,27 +532,149 @@ Disables CloudLinux Isolates for one or more domains owned by the calling user.
527532
**Example:**
528533

529534
```
530-
$ cagefsctl-user site-isolation-disable --domain example.com
535+
$ isolatectl site-isolation disable --domain example.com
531536
{"result": "success", "enabled_sites": []}
532537
```
533538

534539
***
535540

536-
#### List Isolated Domains (User-Level)
541+
##### List Isolated Domains (User-Level)
537542

538543
```
539-
cagefsctl-user site-isolation-list
544+
isolatectl site-isolation list
540545
```
541546

542547
Lists all domains with CloudLinux Isolates enabled for the calling user.
543548

544549
**Example:**
545550

546551
```
547-
$ cagefsctl-user site-isolation-list
552+
$ isolatectl site-isolation list
548553
{"result": "success", "enabled_sites": ["example.com", "mysite.org"]}
549554
```
550555

556+
***
557+
558+
#### Per-Domain Resource Limits
559+
560+
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.
561+
562+
##### List Domain Limits
563+
564+
```
565+
isolatectl limits list [--domain <domain>]
566+
```
567+
568+
Shows the configured limits for all domains or a specific domain.
569+
570+
**Parameters:**
571+
572+
| Parameter | Description |
573+
| ---------- | ---------------------------------------------------- |
574+
| `--domain` | (Optional) Show limits for a specific domain only |
575+
576+
**Example:**
577+
578+
```
579+
$ isolatectl limits list
580+
{
581+
"result": "success",
582+
"domains": [
583+
{
584+
"name": "example.com",
585+
"lve_id": 1000,
586+
"limits": {"cpu": 2500, "pmem": 1048576}
587+
}
588+
]
589+
}
590+
591+
$ isolatectl limits list --domain example.com
592+
{
593+
"result": "success",
594+
"domains": [
595+
{
596+
"name": "example.com",
597+
"lve_id": 1000,
598+
"limits": {"cpu": 2500, "pmem": 1048576}
599+
}
600+
]
601+
}
602+
```
603+
604+
***
605+
606+
##### Set Domain Limits
607+
608+
```
609+
isolatectl limits set --domain <domain> [--cpu VAL] [--pmem VAL] [--io VAL] [--nproc VAL] [--iops VAL] [--ep VAL] [--vmem VAL]
610+
```
611+
612+
Stores per-domain limits in the user's config and applies them to the kernel.
613+
614+
**Parameters:**
615+
616+
| Parameter | Description |
617+
| ---------- | ---------------------------------------------------------- |
618+
| `--domain` | Domain name (required) |
619+
| `--cpu` | CPU limit (hundredths of percent, e.g. 2500 = 25%) |
620+
| `--pmem` | Physical memory limit (bytes) |
621+
| `--io` | I/O limit (KB/s) |
622+
| `--nproc` | Max processes |
623+
| `--iops` | I/O operations per second |
624+
| `--ep` | Max entry processes (concurrent connections) |
625+
| `--vmem` | Virtual memory limit (bytes) |
626+
627+
At least one limit parameter is required.
628+
629+
**Example:**
630+
631+
```
632+
$ isolatectl limits set --domain example.com --cpu 5000 --pmem 268435456 --io 2048 --nproc 30 --iops 500 --ep 20 --vmem 536870912
633+
{
634+
"result": "success",
635+
"domain": "example.com",
636+
"limits": {
637+
"cpu": 5000,
638+
"pmem": 268435456,
639+
"io": 2048,
640+
"nproc": 30,
641+
"iops": 500,
642+
"ep": 20,
643+
"vmem": 536870912
644+
}
645+
}
646+
```
647+
648+
This sets: CPU 50%, 256 MB PMEM, 2048 KB/s IO, 30 procs, 500 IOPS, 20 entry procs, 512 MB VMEM.
649+
650+
651+
***
652+
653+
##### Apply Domain Limits
654+
655+
```
656+
isolatectl limits apply --domain <domain>
657+
```
658+
659+
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.
660+
661+
**Parameters:**
662+
663+
| Parameter | Description |
664+
| ---------- | ------------------ |
665+
| `--domain` | Domain name |
666+
667+
**Example:**
668+
669+
```
670+
$ isolatectl limits apply --domain example.com
671+
{
672+
"result": "success",
673+
"domain": "example.com",
674+
"limits": {"cpu": 5000, "pmem": 268435456}
675+
}
676+
```
677+
551678

552679
### Executing Commands in an Isolated Site Context
553680

0 commit comments

Comments
 (0)