88 lines
2.7 KiB
Markdown
88 lines
2.7 KiB
Markdown
---
|
|
sidebar_position: 2
|
|
---
|
|
|
|
# Plans
|
|
|
|
Scripts for creating and editing hosting plans (packages).
|
|
|
|
## List Plans
|
|
|
|
To list all current hosting packages (plans) run:
|
|
|
|
```bash
|
|
opencli plan-list
|
|
```
|
|
|
|
Example output:
|
|
```bash
|
|
opencli plan-list
|
|
+----+-----------------+------------------------+---------------+----------------+------------+--------------+----------+------+------+-----------------+-----------+
|
|
| id | name | description | domains_limit | websites_limit | disk_limit | inodes_limit | db_limit | cpu | ram | docker_image | bandwidth |
|
|
+----+-----------------+------------------------+---------------+----------------+------------+--------------+----------+------+------+-----------------+-----------+
|
|
| 1 | cloud_4_nginx | 20gb space and Nginx | 0 | 10 | 20 GB | 1000000 | 0 | 4 | 4g | dev_plan_nginx | 100 |
|
|
| 2 | cloud_4_apache | 20gb space and Apache | 0 | 10 | 20 GB | 1000000 | 0 | 4 | 4g | dev_plan_apache | 100 |
|
|
| 3 | cloud_8_nginx | 80gb space and Nginx | 0 | 50 | 80 GB | 2000000 | 0 | 8 | 8g | dev_plan_nginx | 200 |
|
|
| 4 | cloud_8_apache | 80gb space and Apache | 0 | 50 | 80 GB | 2000000 | 0 | 8 | 8g | dev_plan_apache | 200 |
|
|
+----+-----------------+------------------------+---------------+----------------+------------+--------------+----------+------+------+-----------------+-----------+
|
|
```
|
|
|
|
You can also format the data as JSON:
|
|
|
|
```bash
|
|
opencli plan-list --json
|
|
```
|
|
|
|
## Create Plan
|
|
|
|
To create a new plan run the following command:
|
|
|
|
```bash
|
|
opencli plan-create <NAME> <DESCRIPTION> <DOMAINS_LIMIT> <WEBSITES_LIMIT> <DISK_LIMIT> <INODES_LIMITS> <DATABASES_LIMIT> <CPU_LIMIT> <RAM_LIMIT> <DOCKER_IMAGE> <PORT_SPEED_LIMIT>
|
|
```
|
|
|
|
Example:
|
|
```bash
|
|
opencli plan-create cloud_8 "Custom plan with 8GB of RAM&CPU" 0 0 15 500000 0 8 8 nginx 200
|
|
```
|
|
|
|
## List Users on Plan
|
|
|
|
List all users that are currently using a plan:
|
|
|
|
```bash
|
|
opencli plan-usage
|
|
```
|
|
|
|
Example output:
|
|
```bash
|
|
opencli plan-usage
|
|
+----+----------+-------+----------------+---------------------+
|
|
| id | username | email | plan_name | registered_date |
|
|
+----+----------+-------+----------------+---------------------+
|
|
| 2 | rasa | rasa | cloud_4_apache | 2023-11-30 10:33:52 |
|
|
| 3 | aas | sasa | cloud_4_apache | 2023-11-30 12:01:49 |
|
|
+----+----------+-------+----------------+---------------------+
|
|
```
|
|
|
|
You can also format the data as JSON:
|
|
|
|
```bash
|
|
opencli plan-usage --json
|
|
```
|
|
|
|
## Delete Plan
|
|
|
|
Delete a plan if no users are currently using it.
|
|
|
|
```bash
|
|
opencli plan-delete <PLAN_NAME>
|
|
```
|
|
|
|
## Edit Plan
|
|
|
|
Change plan limits.
|
|
|
|
```bash
|
|
#
|
|
```
|