|
| 1 | +# Manage projects and quotas |
| 2 | + |
| 3 | +## Introduction |
| 4 | + |
| 5 | +On Laboinfra, you get a quota assigned by an admin. This quota includes resources like RAM, CPU, and storage, and it’s yours to distribute across different projects as needed. |
| 6 | + |
| 7 | +Using the API or the labctl CLI, you can: |
| 8 | + |
| 9 | +- Create new projects, |
| 10 | +- Add members to your projects, |
| 11 | +- Allocate your quota however you want between your projects. |
| 12 | + |
| 13 | +This gives you full control over how you use your resources, making it easy to collaborate and work on multiple school projects efficiently. |
| 14 | + |
| 15 | +## Projects |
| 16 | + |
| 17 | +### Create a new project |
| 18 | + |
| 19 | +```bash |
| 20 | +labctl project create PROJECT_NAME |
| 21 | +``` |
| 22 | + |
| 23 | +!!! info |
| 24 | + Project names are suffixed with a unique identifier to ensure they are unique across the platform. |
| 25 | + |
| 26 | +### List your projects |
| 27 | + |
| 28 | +```bash |
| 29 | +labctl project list |
| 30 | +``` |
| 31 | + |
| 32 | +### Add a member to a project |
| 33 | + |
| 34 | +```bash |
| 35 | +labctl project add-user PROJECT_NAME MEMBER_NAME |
| 36 | +``` |
| 37 | + |
| 38 | +### Remove a member from a project |
| 39 | + |
| 40 | +```bash |
| 41 | +labctl project del-user PROJECT_NAME MEMBER_NAME |
| 42 | +``` |
| 43 | + |
| 44 | +!!! info |
| 45 | + Before removing a member from a project, make sure your project have enough resources quota to accommodate |
| 46 | + |
| 47 | +### Delete a project |
| 48 | + |
| 49 | +```bash |
| 50 | +labctl project delete PROJECT_NAME |
| 51 | +``` |
| 52 | + |
| 53 | +??? warning |
| 54 | + In order to delete a project, you must first delete all the resources associated with it (VMs, disks, etc.) and remove all quotas allocated to it. |
| 55 | + |
| 56 | +## Quotas |
| 57 | + |
| 58 | +Type of quotas: |
| 59 | + |
| 60 | +| Type | Description | |
| 61 | +|-------|-------------| |
| 62 | +| `cpu` | CPU cores | |
| 63 | +| `mem` | RAM in GB | |
| 64 | +| `sto` | Disk in GB | |
| 65 | + |
| 66 | +### Display your quota |
| 67 | + |
| 68 | +With the me command you get global information about your account, including your quota. |
| 69 | + |
| 70 | +```bash |
| 71 | +labctl me |
| 72 | +``` |
| 73 | + |
| 74 | +### Allocate quota to a project |
| 75 | + |
| 76 | +```bash |
| 77 | +labctl quota set PROJECT_NAME TYPE VALUE |
| 78 | +``` |
| 79 | + |
| 80 | +### Display quota for a project |
| 81 | + |
| 82 | +With this command you can see how much quota is allocated to a project and who share the quota to the project. |
| 83 | + |
| 84 | +```bash |
| 85 | +labctl quota show-project PROJECT_NAME |
| 86 | +``` |
| 87 | + |
| 88 | +### Remove quota from a project |
| 89 | + |
| 90 | +If you just want to decrease the quota allocated to a project, you can use the same command as allocating quota, but with the new value you want to set. |
| 91 | + |
| 92 | +```bash |
| 93 | +labctl quota set PROJECT_NAME TYPE VALUE |
| 94 | +``` |
| 95 | + |
| 96 | +If you want to remove all the quota allocated to a project, you can use the following command: |
| 97 | + |
| 98 | +```bash |
| 99 | +labctl quota unset PROJECT_NAME TYPE |
| 100 | +``` |
0 commit comments