forked from uncloud/uncloud
[doc] move readme to subdir
This commit is contained in:
parent
198aaea48a
commit
06c4a5643c
5 changed files with 0 additions and 0 deletions
|
|
@ -0,0 +1,5 @@
|
|||
* What is a remote uncloud client?
|
||||
** Systems that configure themselves for the use with uncloud
|
||||
** Examples are VMHosts, VPN Servers, etc.
|
||||
* Which access do these clients need?
|
||||
** They need read / write access to the database
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
## Introduction
|
||||
|
||||
This document describes how to create a product and use it.
|
||||
|
||||
A product (like a VMSnapshotproduct) creates an order when ordered.
|
||||
The "order" is used to combine products together.
|
||||
|
||||
Sub-products or related products link to the same order.
|
||||
Each product has one (?) orderrecord
|
||||
82
uncloud_django_based/uncloud/doc/README-object-relations.md
Normal file
82
uncloud_django_based/uncloud/doc/README-object-relations.md
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
## Introduction
|
||||
|
||||
This article describes how models relate to each other and what the
|
||||
design ideas are. It is meant to prevent us from double implementing
|
||||
something or changing something that is already solved.
|
||||
|
||||
|
||||
## Products
|
||||
|
||||
A product is something someone can order. We might have "low level"
|
||||
products that need to be composed (= higher degree of flexibility, but
|
||||
more amount of details necessary) and "composed products" that present
|
||||
some defaults or select other products automatically (f.i. a "dual
|
||||
stack VM" can be a VM + a disk + an IPv4 address).
|
||||
|
||||
|
||||
## Bills
|
||||
|
||||
Bills represent active orders of a month. Bills can be shown during a
|
||||
month but only become definitive at the end of the month.
|
||||
|
||||
## Orders
|
||||
|
||||
When customer X order a (set) of product, it generates an order for billing
|
||||
purposes. The ordered products point to that order and register an Order Record
|
||||
at creation.
|
||||
|
||||
Orders and Order Records are assumed immutable => they are used to generate
|
||||
bills and should not be mutated. If a product is updated (e.g. adding RAM to
|
||||
VM), a new order should be generated.
|
||||
|
||||
The order MUST NOT be deleted when a product is deleted, as it is used for
|
||||
billing (including past bills).
|
||||
|
||||
### Order record
|
||||
|
||||
Used to store billing details of a product at creation: will stay there even if
|
||||
the product change (e.g. new pricing, updated) and act as some kind of archive.
|
||||
Used to generate bills.
|
||||
|
||||
## Payment Methods
|
||||
|
||||
Users/customers can register payment methods.
|
||||
|
||||
## Sample flows / products
|
||||
|
||||
### A VM snapshot
|
||||
|
||||
A VM snapshot creates a snapshot of all disks attached to a VM to be
|
||||
able to rollback the VM to a previous state.
|
||||
|
||||
Creating a VM snapshot (-product) creates a related order. Deleting a
|
||||
VMSnapshotproduct sets the order to deleted.
|
||||
|
||||
### Object Storage
|
||||
|
||||
(tbd by Balazs)
|
||||
|
||||
### A "raw" VM
|
||||
|
||||
(tbd by Ahmed)
|
||||
|
||||
### An IPv6 only VM
|
||||
|
||||
(tbd by Ahmed)
|
||||
|
||||
### A dual stack VM
|
||||
|
||||
(tbd by Ahmed)
|
||||
|
||||
### A managed service (e.g. Matrix-as-a-Service)
|
||||
|
||||
Customer orders service with:
|
||||
* Service-specific configuration: e.g. domain name for matrix
|
||||
* VM configuration:
|
||||
- CPU
|
||||
- Memory
|
||||
- Disk (soon)
|
||||
|
||||
It creates a new Order with two products/records:
|
||||
* Service itself (= management)
|
||||
* Underlying VM
|
||||
11
uncloud_django_based/uncloud/doc/README-vpn.org
Normal file
11
uncloud_django_based/uncloud/doc/README-vpn.org
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
* How to add a new VPN Host
|
||||
** Install wireguard to the host
|
||||
** Install uncloud to the host
|
||||
** Add `python manage.py vpn --hostname fqdn-of-this-host` to the crontab
|
||||
** Use the CLI to configure one or more VPN Networks for this host
|
||||
* Example of adding a VPN host at ungleich
|
||||
** Create a new dual stack alpine VM
|
||||
** Add it to DNS as vpn-XXX.ungleich.ch
|
||||
** Route a /40 network to its IPv6 address
|
||||
** Install wireguard on it
|
||||
** TODO Enable wireguard on boot
|
||||
95
uncloud_django_based/uncloud/doc/README.md
Normal file
95
uncloud_django_based/uncloud/doc/README.md
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
## Install
|
||||
|
||||
### OS package requirements
|
||||
|
||||
Alpine:
|
||||
|
||||
```
|
||||
apk add openldap-dev postgresql-dev
|
||||
```
|
||||
|
||||
Debian/Devuan:
|
||||
|
||||
```
|
||||
apt install postgresql-server-dev-all
|
||||
```
|
||||
|
||||
|
||||
### Python requirements
|
||||
|
||||
If you prefer using a venv, use:
|
||||
|
||||
```
|
||||
python -m venv venv
|
||||
. ./venv/bin/activate
|
||||
```
|
||||
|
||||
Then install the requirements
|
||||
|
||||
```
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
### Database requirements
|
||||
|
||||
Due to the use of the JSONField, postgresql is required.
|
||||
|
||||
First create a role to be used:
|
||||
|
||||
```
|
||||
postgres=# create role nico login;
|
||||
```
|
||||
|
||||
Then create the database owner by the new role:
|
||||
|
||||
```
|
||||
postgres=# create database uncloud owner nico;
|
||||
```
|
||||
|
||||
Installing the postgresql service is os dependent, but some hints:
|
||||
|
||||
* Alpine: `apk add postgresql-server && rc-update add postgresql && rc-service postgresql start`
|
||||
* Debian/Devuan: `apt install postgresql`
|
||||
|
||||
After postresql is started, apply the migrations:
|
||||
|
||||
```
|
||||
python manage.py migrate
|
||||
```
|
||||
|
||||
### Secrets
|
||||
|
||||
cp `uncloud/secrets_sample.py` to `uncloud/secrets.py` and replace the
|
||||
sample values with real values.
|
||||
|
||||
|
||||
## Flows / Orders
|
||||
|
||||
### Creating a VMHost
|
||||
|
||||
|
||||
|
||||
### Creating a VM
|
||||
|
||||
* Create a VMHost
|
||||
* Create a VM on a VMHost
|
||||
|
||||
|
||||
### Creating a VM Snapshot
|
||||
|
||||
|
||||
## Working Beta APIs
|
||||
|
||||
These APIs can be used for internal testing.
|
||||
|
||||
### URL Overview
|
||||
|
||||
```
|
||||
http -a nicoschottelius:$(pass ungleich.ch/nico.schottelius@ungleich.ch) http://localhost:8000
|
||||
```
|
||||
|
||||
### Snapshotting
|
||||
|
||||
```
|
||||
http -a nicoschottelius:$(pass ungleich.ch/nico.schottelius@ungleich.ch) http://localhost:8000/vm/snapshot/ vm_uuid=$(uuidgen)
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue