Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ LDAP-Identification is performed using the email.
| `EXTERNAL_WEB_DNS` | Custom address for checking availability and passed to `IFRAME_PATH_FORMAT`. Should be set to the external address of the docker host | `nojava-ipmi-kvm.corporate.local` |
| `WEB_PORT_START` | The first port to be allocated to kvm containers | `8800` |
| `WEB_PORT_END` | The first port outside the range | `8900` |
| `WSPING_INTERVAL` | The interval for websocket ping requests | `5` |
| `WSPING_TIMEOUT` | The timeout for websocket ping/pong replies | `30` |
| `JAVA_IFRAME_PATH_FORMAT` | This format specifies the iframe url used for java kvm hosts, useful if you have a reverse proxy | (see section [IFRAME_PATH_FORMAT](#IFRAME_PATH_FORMAT)) |
| `HTML5_IFRAME_PATH_FORMAT` | This format specifies the iframe url used for html5 kvm hosts, useful if you have a reverse proxy | (see section [IFRAME_PATH_FORMAT](#IFRAME_PATH_FORMAT)) |
| `HTML5_AUTHORIZATION` | Authorization cookie required to access html5 consoles. `generate`: auto-generated, `use_server`: Uses the `is_admin` cookie set by server, `[key]:[value]`: Manual | `kvm_authorization:abcdefgh` |
Expand Down
5 changes: 4 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
WEBAPP_PORT = int(os.environ["WEBAPP_PORT"])
WEBAPP_BASE = os.environ["WEBAPP_BASE"]
CONFIG_PATH = os.environ.get("KVM_CONFIG_PATH", DEFAULT_CONFIG_FILEPATH)
WSPING_INTERVAL = os.environ.get("WSPING_INTERVAL", 5)
WSPING_TIMEOUT = os.environ.get("WSPING_TIMEOUT", 30)

logging.basicConfig(level=os.environ.get("LOGLEVEL", "INFO"))

Expand Down Expand Up @@ -67,7 +69,8 @@ def make_app():
"login_url": "/oauth/login",
"xsrf_cookies": True,
"default_handler_class": MainHandler,
"websocket_ping_interval": 10,
"websocket_ping_interval": WSPING_INTERVAL,
"websocket_ping_timeout": WSPING_TIMEOUT,
}
return web.Application(
[web.url(r"/oauth/login", OAuth2LoginHandler), web.url(r"/", MainHandler), web.url(r"/kvm", KVMHandler)],
Expand Down