Update README.md
This commit is contained in:
parent
c5448ca727
commit
4c3a4978fd
28
README.md
28
README.md
@ -2,13 +2,15 @@
|
|||||||
ProxmoxAAS API provides functionality to the Client by both providing a proxy API for the Proxmox API, and an API for requesting resources within a defined quota.
|
ProxmoxAAS API provides functionality to the Client by both providing a proxy API for the Proxmox API, and an API for requesting resources within a defined quota.
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
- (ProxmoxAAS-Client)[https://github.com/tronnet-gh/ProxmoxAAS-Client]\
|
||||||
- Proxmox VE Cluster (v7.0+)
|
- Proxmox VE Cluster (v7.0+)
|
||||||
- (ProxmoxAAS-Client)[https://github.com/tronnet-gh/ProxmoxAAS-Client]
|
- Reverse proxy server which can proxy the client and API
|
||||||
|
- FQDN
|
||||||
- Server with NodeJS and NPM installed
|
- Server with NodeJS and NPM installed
|
||||||
|
|
||||||
## Configuring API Token and Permissions
|
## Configuring API Token and Permissions
|
||||||
In the proxmox web ui, follow the following steps:
|
In Proxmox VE, follow the following steps:
|
||||||
1. Add a new user `proxmoxaas-api` to proxmox
|
1. Add a new user `proxmoxaas-api` to Proxmox VE
|
||||||
2. Create a new API token for the user `proxmoxaas-api` and copy the secret key to a safe location
|
2. Create a new API token for the user `proxmoxaas-api` and copy the secret key to a safe location
|
||||||
3. Create a new role `proxmoxaas-api` with at least the following permissions:
|
3. Create a new role `proxmoxaas-api` with at least the following permissions:
|
||||||
- VM.* except VM.Audit, VM.Backup, VM.Clone, VM.Console, VM.Monitor, VM.PowerMgmt, VM.Snapshot, VM.Snapshot.Rollback
|
- VM.* except VM.Audit, VM.Backup, VM.Clone, VM.Console, VM.Monitor, VM.PowerMgmt, VM.Snapshot, VM.Snapshot.Rollback
|
||||||
@ -21,11 +23,27 @@ In the proxmox web ui, follow the following steps:
|
|||||||
1. Clone this repo onto `Client Host`
|
1. Clone this repo onto `Client Host`
|
||||||
2. Run `npm install` to initiaze the package requirements
|
2. Run `npm install` to initiaze the package requirements
|
||||||
3. Copy `vars.js.template` as `vars.js` and modify the following values:
|
3. Copy `vars.js.template` as `vars.js` and modify the following values:
|
||||||
- pveAPI - the URI to the Proxmox API, ie `pve.<FQDN>/api2/json`
|
- pveAPI - the URI to the Proxmox API, ie `<proxmoxhost>:8006/api2/json` or `<proxmox URL>/api2/json` if Proxmox VE is behind a reverse proxy.
|
||||||
- domain - your domain name
|
- domain - the ProxmoxAAS-Client URL, ie `client.<FQDN>`
|
||||||
- listenPort - the port you want the API to listen on, ie `8080`
|
- listenPort - the port you want the API to listen on, ie `8080`
|
||||||
- pveAPIToken - the user(name), authentication realm, token id, and token secrey key (uuid)
|
- pveAPIToken - the user(name), authentication realm, token id, and token secrey key (uuid)
|
||||||
4. Start the service using `node .`, or call the provided shell script, or use the provided systemctl service script
|
4. Start the service using `node .`, or call the provided shell script, or use the provided systemctl service script
|
||||||
|
|
||||||
|
## Installation - Reverse Proxy
|
||||||
|
1. Configure nginx or preferred reverse proxy to reverse proxy the client. This can be done in the same file previously or in a new configuration file:
|
||||||
|
```
|
||||||
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
server_name client.<FQDN>;
|
||||||
|
location / {
|
||||||
|
proxy_pass http://<Client Host>:80;
|
||||||
|
}
|
||||||
|
location /api/ {
|
||||||
|
proxy_pass http://<Client Host>:8080;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
2. Start nginx with the new configurations by running `systemctl reload nginx`
|
||||||
|
|
||||||
## Result
|
## Result
|
||||||
After these steps, the ProxmoxAAS Client should be avaliable and fully functional at `client.<FQDN>`.
|
After these steps, the ProxmoxAAS Client should be avaliable and fully functional at `client.<FQDN>`.
|
||||||
|
Loading…
Reference in New Issue
Block a user