1
0
Fork 0
mirror of https://github.com/ThomasGsp/HyperProxmox.git synced 2025-03-09 15:40:18 +00:00

Update Doc

This commit is contained in:
Tlams 2018-05-03 18:05:33 +01:00
parent 04ce5c2a88
commit 0ffabaab4b
8 changed files with 23 additions and 23 deletions

View file

@ -1,27 +1,27 @@
# Prerequisites # Prerequisites
## Your Proxmox infrastructure ## Your Proxmox infrastructure
For using this project, you need to have an pre-existing Proxmox infrastructure. For using this project, you need have an pre-existing Proxmox infrastructure.
If you want just test, a single Proxmox server with some machines is enough. If you want just test, a single Proxmox server with some machines is enough.
In this case, your cluster is represented by your single node. In this case, your cluster is represented by your single node.
You have to the possibility to access on the Proxmox API with an Administrative pve user (not root). You have to the possibility to access on the Proxmox API with an Administrative pve user (not root).
Setting up Proxmox policies is out of scope for this tutorial. Setting up Proxmox policies and network is out of scope for this tutorial.
Report you to the official Proxmox documentation. Report you to the official Proxmox documentation.
## Environment ## Environment
This project need an recent environment to work correctly. This project need an recent environment to work correctly.
Typically, in this documentation, we'll use an Debian 9 environment. Typically, in this documentation, we'll use an Debian 9 environment.
You can use an other distribution, but just check if theses software are available: You can use an other distribution, but just check if theses software are available on your distribution:
* Python 3.4 + with python-redis, pymongo, webpy, python-request, python-crypto * Python 3.4 + with python-redis, pymongo, webpy, python-request, python-crypto
* MongoDB 3.2 + / Redis * MongoDB 3.2 + / Redis
* Web server : Nginx (or apache) * Web server : Nginx (or apache)
* PHP(5 or 7) with this extensions: php-curl, php7.0-json * PHP(5 or 7) with this extensions: php-curl, php7.0-json
This project is separate in two parts: Frontend and backend. This project is separate in two parts: frontend and backend.
Backend is writing in python and frontend in PHP/HTML/CSS/JS. Backend is writing in python and frontend in PHP/HTML/CSS/JS.
You have the possibility to use these two parts on different machines, You have the possibility to use these two parts in different machines,
but due to performance you should use the same (low network latency). but due to performance you should use the same (low network latency).
In more, the API authentication system is currently not implemented and this architecture can expose you In more, the API authentication system is currently not implemented and this architecture can expose you
to security issues. to security issues.

View file

@ -13,7 +13,7 @@ apt-get install mongodb nginx redis-server
#### Setup Redis #### Setup Redis
Redis-server can work with a small memory-cache dedicated. HyperProxmox doesn't use much memory on your Redis.
vi /etc/redis/redis.conf vi /etc/redis/redis.conf
```bash ```bash

View file

@ -33,7 +33,7 @@ server {
``` ```
In this example, i used the pre-generates nginx key: "/etc/nginx/ssl/nginx.key" In this example, i used the pre-generates nginx key: "/etc/nginx/ssl/nginx.key"
You should change this part. You should change this part and generate your keys.
#### Php-fpm #### Php-fpm
vi /etc/php/7.0/fpm/pool.d/www.conf vi /etc/php/7.0/fpm/pool.d/www.conf

View file

@ -1,6 +1,6 @@
# Configs # Configs
Configurations are managed by single point: Configurations are managed in a single point:
vi /opt/HyperProxmox/code/scripts/main/private/conf/config vi /opt/HyperProxmox/code/scripts/main/private/conf/config
``` bash ``` bash
@ -9,7 +9,7 @@ vi /opt/HyperProxmox/code/scripts/main/private/conf/config
user: hyperproxmox user: hyperproxmox
``` ```
User created in the "Backend" page. User created in the "Backend" page.
This user will run Hyperproxmox. This user will run HyperProxmox.
``` bash ``` bash
; If not exist at startup, the key will be auto-generate. ; If not exist at startup, the key will be auto-generate.
@ -17,7 +17,8 @@ key_pvt: private/keys/Ragnarok.pvt.key
key_pub: private/keys/Ragnarok.pub.key key_pub: private/keys/Ragnarok.pub.key
``` ```
Directory and private/public key generated to protect the critical data in MongoDB. Directory and private/public key generated to protect the critical data in MongoDB.
Private key is setup with an passphrase. Private key is set up with an Passphrase. You should save this keys in an other security place.
Indeed, you can backup your MongoDB server, but without this key, the data will be not readable.
``` bash ``` bash
admin_mail: tlams@localhost admin_mail: tlams@localhost
@ -38,7 +39,7 @@ redis_password:
redis_ip: 127.0.0.1 redis_ip: 127.0.0.1
redis_port: 6379 redis_port: 6379
``` ```
Databases setting for backed. Databases settings for backend.
User / Password are not currently supported. User / Password are not currently supported.
Don't expose your database on 0.0.0.0 or without firewall. Don't expose your database on 0.0.0.0 or without firewall.
@ -63,7 +64,7 @@ Currently not implemented (machine provision)
walker: 300 walker: 300
``` ```
Delay minimum between to crawling on your Proxmox infrastructure. Delay minimum between to crawling on your Proxmox infrastructure.
A lock block a new crawl if the precedent is not terminated. If this situation append, the next crawl is A lock will block a new crawl if the precedent is not terminated. If this situation append, the next crawl is
canceled and reported to the next windows. canceled and reported to the next windows.
A delay too short can generate massive(and useless) data if your infrastructure is large ! A delay too short can generate massive(and useless) data if your infrastructure is large !
``` ```
@ -80,7 +81,7 @@ uid = False
``` ```
Work but useless in this version. Work but useless in this version.
HyperProxmox will set an unique ID in the comment area (machine configuration), HyperProxmox will set an unique ID in the comment area (machine configuration),
with in the future the goal to have the possibility to follow an virtual machine in the infrastructure. with in the future the goal to have the possibility to follow an virtual machine everywhere in the infrastructure.
The currents comments are not deleted, just reported after this ID. The currents comments are not deleted, just reported after this ID.
``` bash ``` bash

View file

@ -27,7 +27,6 @@ http://127.0.0.1:8080/
Passphrase will be ask at each start. Passphrase will be ask at each start.
Without it, the privite key can be read and the access cannot be load in the memory. Without it, the privite key can be read and the access cannot be load in the memory.
If you loose it, you must delete the keys and delete the different entries in the collection "clusters_conf" in mongoDB database. If you loose it, you must delete the keys and delete the different entries in the collection "clusters_conf" in mongoDB database.
Currently there are not system to provide a full reset function. Use MongoDB shell to do it.
[Setup - Config](04-configs.md) <-- Previous | Next --> [Usage - Logs](06-logs.md) [Setup - Config](04-configs.md) <-- Previous | Next --> [Usage - Logs](06-logs.md)

View file

@ -3,7 +3,7 @@
A log system is available, but not complete. A log system is available, but not complete.
Format: [DATE] [THREAD_ID] [LEVEL] [TYPE] : JSON-DATA Format: [DATE] [THREAD_ID] [LEVEL] [TYPE] : JSON-DATA
* DATE = When the log is generated. (If bulk system is activate, date is respected) * DATE = Date when the log is generated. (If bulk system is activate, date is respected)
* THREAD_ID = Hyperproxmox work with different thread (Core, API, crawler, sub-crawler...). If you wan debug correctly, you can use * THREAD_ID = Hyperproxmox work with different thread (Core, API, crawler, sub-crawler...). If you wan debug correctly, you can use
grep to follow your thread. grep to follow your thread.
* LEVEL = WARNING, INFO, DEBUG... * LEVEL = WARNING, INFO, DEBUG...

View file

@ -29,7 +29,7 @@ Examples are available in the next page.
``` ```
### Cache Data - MongoDB ### Cache Data - MongoDB
This data are manage by the crawler, you can't insert or change data yourself This data are manage by the crawler, you can't insert or change something yourself
``` bash ``` bash
# date/cluster/node/vmid # date/cluster/node/vmid
# Disks mapping # Disks mapping
@ -68,7 +68,7 @@ This data are manage by the crawler, you can't insert or change data yourself
``` ```
<\something\> = Change this value <\something\> = Change this value
<\date\>|last = Two way - Use specific timestamp or select automaticaly the last date <\date\>|last = Two way - Use specific timestamp or auto-select the last date
[Usage - logs](06-logs.md) <-- Previous | Next --> [Usage - General](08-usages.md) [Usage - logs](06-logs.md) <-- Previous | Next --> [Usage - General](08-usages.md)

View file

@ -34,13 +34,13 @@ curl -H -XPOST -d '{
``` ```
* "name": Symbolic cluster name. Should be uniq (string) [VALUE NOT EMPTY REQUIRED] * "name": Symbolic cluster name. Should be unique (string) [VALUE NOT EMPTY REQUIRED]
* "url": Proxmox - Web GUI URL access (string) [VALUE NOT EMPTY REQUIRED] * "url": Proxmox - Web GUI URL access (string) [VALUE NOT EMPTY REQUIRED]
* "port": Proxmox - Web PORT access (string) [VALUE NOT EMPTY REQUIRED] * "port": Proxmox - Web PORT access (string) [VALUE NOT EMPTY REQUIRED]
* "user": Proxmox - Administrative PVE user (string) [VALUE NOT EMPTY REQUIRED] * "user": Proxmox - Administrative PVE user (string) [VALUE NOT EMPTY REQUIRED]
* "password": Proxmox - PVE password (string) [VALUE NOT EMPTY REQUIRED] * "password": Proxmox - PVE password (string) [VALUE NOT EMPTY REQUIRED]
* "template": Default template for LXC (string) * "template": Default template for LXC (string) [USELESS IN THIS VERSION]
* "storage_disk": Default shared disk for KVM/LXC (string) * "storage_disk": Default shared disk for KVM/LXC (string) [USELESS IN THIS VERSION]
* "exclude_nodes": Do not use this nodes - Not visible (list) * "exclude_nodes": Do not use this nodes - Not visible (list)
* "groups" : Symbolics groups for this node (list) * "groups" : Symbolics groups for this node (list)
* "weight": Weight for the cluster auto-selection (int) [VALUE NOT EMPTY REQUIRED] * "weight": Weight for the cluster auto-selection (int) [VALUE NOT EMPTY REQUIRED]
@ -48,10 +48,10 @@ curl -H -XPOST -d '{
### Manage virtual machine (status) ### Manage virtual machine (status)
To manage an virtual machine, there are two way: use MongoID or the long path. To manage an virtual machine, there are two way: use MongoID or the long path.
The first way is probably more efficient in a scripting/program system and the second way for human. The first possibility is probably more efficient in a scripting/program way and the second for human.
Indeed, it's just a wrapper. Indeed, it's just a wrapper.
First way: First possibility:
```bash ```bash
# 1 - Get the last date # 1 - Get the last date
curl '/api/v1/static/dates/last' curl '/api/v1/static/dates/last'
@ -94,7 +94,7 @@ curl /api/v1/instance/id/5ae886660e8d893fd32734e8/status/start
Second: Second:
```bash ```bash
curl 'http://127.0.0.1:8080/api/v1/static/instances/last/Cluster_1/my_node/510/stop' curl 'http://127.0.0.1:8080/api/v1/static/instances/last/Cluster_1/my_node/510/stop'
{'data': 'UPID:sd-81592:00003E35:379BC306:5AE9D2E7:qmstop:510:api@pve:'}% {"result": "OK", "value": {'data': 'UPID:sd-81592:00003E35:379BC306:5AE9D2E7:qmstop:510:api@pve:'}}%
``` ```