forked from Hostea/dashboard
41 lines
939 B
Markdown
41 lines
939 B
Markdown
## Manage Virtual Machines
|
|
|
|
### 1. Create VM: Creates a new VM, bypasing payments
|
|
|
|
#### Pre-requisites:
|
|
|
|
1. A registered and active/email-verified user
|
|
|
|
#### Example:
|
|
|
|
```bash
|
|
python manage.py vm create <VM-name> --owner=<owner-username> --flavor=<flavor>
|
|
# flavor=[small,medium,large]
|
|
```
|
|
|
|
This command is not idempotent. The command throws an error when a
|
|
supplied flavor is not available or when a VM with the same name exists.
|
|
|
|
### 2. Delete VM:
|
|
|
|
#### Example
|
|
|
|
```bash
|
|
python manage.py vm delete <VM-name>
|
|
```
|
|
|
|
This command is not idempotent. The command throws an error when a
|
|
a VM with the given name doesn't exist.
|
|
|
|
### 3. Generate Invoices: periodically generate invoices for VMs
|
|
|
|
```bash
|
|
python manage.py generate_invoice
|
|
```
|
|
|
|
Generates invoices for VMs which enter a new billing cycle and sends
|
|
notification email to VM owners.
|
|
|
|
This command can be run as many times as desirable but running at least
|
|
once in a day is advisable.
|