1
0
Fork 0
mirror of https://github.com/ThomasGsp/HyperProxmox.git synced 2025-02-15 04:32:15 +00:00
HyperProxmox/doc/md/04-configs.md

134 lines
3.9 KiB
Markdown
Raw Normal View History

2018-04-30 18:44:12 +00:00
# Configs
2018-04-30 18:41:26 +00:00
Configurations are managed by single point:
vi /opt/HyperProxmox/code/scripts/main/private/conf/config
``` bash
[system]
; System configurations
user: hyperproxmox
2018-05-01 09:33:43 +00:00
```
User created in the "Backend" page.
This user will run Hyperproxmox.
2018-04-30 18:41:26 +00:00
2018-05-01 09:33:43 +00:00
``` bash
2018-04-30 18:41:26 +00:00
; If not exist at startup, the key will be auto-generate.
key_pvt: private/keys/Ragnarok.pvt.key
key_pub: private/keys/Ragnarok.pub.key
2018-05-01 09:33:43 +00:00
```
Directory and private/public key generated to protect the critical data in MongoDB.
Private key is setup with an passphrase.
2018-04-30 18:41:26 +00:00
2018-05-01 09:33:43 +00:00
``` bash
2018-04-30 18:41:26 +00:00
admin_mail: tlams@localhost
2018-05-01 09:33:43 +00:00
```
Receive alerts and information by mail. Currently not implemented.
2018-04-30 18:41:26 +00:00
2018-05-01 09:33:43 +00:00
``` bash
2018-04-30 18:41:26 +00:00
[databases]
; Databases configurations
; NOSQL databases, should use a password
mongodb_user:
mongodb_password:
mongodb_ip: 127.0.0.1
mongodb_port: 27017
redis_user:
redis_password:
redis_ip: 127.0.0.1
redis_port: 6379
2018-05-01 09:33:43 +00:00
```
Databases setting for backed.
User / Password are not currently supported.
Don't expose your database on 0.0.0.0 or without firewall.
2018-04-30 18:41:26 +00:00
2018-05-01 09:33:43 +00:00
``` bash
2018-04-30 18:41:26 +00:00
[deploy]
; Maximum concurrent deployment
; A high value can overcharge your physicals servers
concurrencydeploy: 2
; Delay between two deployment round
; If your infrastructure isn't very large, you should'nt reduce this delay.
; A low delay can overcharge your physicals servers
delayrounddeploy: 15
2018-05-01 09:33:43 +00:00
```
Currently not implemented (machine provision)
2018-04-30 18:41:26 +00:00
2018-05-01 09:33:43 +00:00
``` bash
2018-04-30 18:41:26 +00:00
[walker]
; Delay in seconds between to crawl (update)
walker: 300
2018-05-01 09:33:43 +00:00
```
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
canceled and reported to the next windows.
A delay too short can generate massive(and useless) data if your infrastructure is large !
```
2018-04-30 18:41:26 +00:00
2018-05-01 09:33:43 +00:00
``` bash
2018-04-30 18:41:26 +00:00
; Lock file -- prevent concurrent crawling
walker_lock: /tmp/hyperproxmoxwalker.lock
2018-05-01 09:33:43 +00:00
```
Lock file. The directory have to be writable by Hyperproxmox user.
2018-04-30 18:41:26 +00:00
2018-05-01 09:33:43 +00:00
``` bash
2018-04-30 18:41:26 +00:00
; Set an unique ID (change comment part)
uid = False
2018-05-01 09:33:43 +00:00
```
Work but useless in this version.
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.
The currents comments are not deleted, just reported after this ID.
``` bash
2018-04-30 18:41:26 +00:00
[logger]
; logs level 1: "INFO", 2: "WARNING", 3: "ERROR", 4: "CRITICAL", 5: "DEBUG"
logs_level = 5
2018-05-01 09:33:43 +00:00
```
Log level definite the logs verbosity.
In production, you should definite this setting on "WARNING".
In "DEBUG", hyperproxmox can generate lot of logs.
This system is currently only implemented on the main functions.
2018-04-30 18:41:26 +00:00
2018-05-01 09:33:43 +00:00
``` bash
2018-04-30 18:41:26 +00:00
; Limit IO write, if debug level is active, this value is overwrite to 0
bulk_write = 1
; Buffer size
bulk_size = 1000
2018-05-01 09:33:43 +00:00
```
The goal is to limit the I/O usage on your hard drive.
HyperProxmox will save the logs in memory and write on the disk only when the buffer(bulk_size) is full.
2018-04-30 18:41:26 +00:00
2018-05-01 09:33:43 +00:00
``` bash
2018-04-30 18:41:26 +00:00
; log output
logs_dir = /var/log/hyperproxmox/
```
2018-05-01 09:33:43 +00:00
Logs directory have to be writable by Hyperproxmox user.
2018-04-30 18:41:26 +00:00
#### Purge system
2018-05-01 09:33:43 +00:00
You should setup an cron to purge old data (not an obligation).
This cron allow the possibility to delete automatically old data in your database.
2018-04-30 18:41:26 +00:00
``` bash
2018-05-01 09:33:43 +00:00
RET=90 # older than the current date less this delay in days
2018-04-30 18:41:26 +00:00
DATETIMESTAMP=$(($(date +%s)-$((86400*$RET))))
2018-05-01 09:33:43 +00:00
0 0 * * * hyperproxmox curl -H -XPOST -d '{ "action": "purge", "type":"strict", "date": $DATETIMESTAMP }' localhost:8080/api/v1/administration/purge >/var/log/hyperproxmox/purge.log 2>&1
2018-04-30 18:41:26 +00:00
```
* action: actiontype (only purge is currently available)
* type: purge type (strict = all data before this date)
* date: delete data before this date - in seconds(timestamp)
2018-05-01 09:33:43 +00:00
Currently, just one mod is available: stric.
It's mean that ALL data will be delete before the date.
Some others possibility should be available in the future, like keep one day per week.
2018-04-30 18:41:26 +00:00
2018-05-01 09:33:43 +00:00
[Frontend](03-frontend.md) <-- Previous | Next --> [Usage - First start](05-first_start.md)