Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
- name: Install ldap dependencies
run: sudo apt-get install libldap2-dev libsasl2-dev
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python 3.13
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.13
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
17 changes: 6 additions & 11 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[MASTER]
ignore = ,input
persistent = yes
load-plugins = pylint_quotes

[MESSAGES CONTROL]
disable =
Expand All @@ -10,7 +9,6 @@ disable =
duplicate-code,
no-member,
parse-error,
bad-continuation,
too-few-public-methods,
global-statement,
cyclic-import,
Expand All @@ -28,23 +26,21 @@ disable =
consider-iterating-dictionary,
inconsistent-return-statements,
consider-using-dict-items,
modified-iterating-dict
modified-iterating-dict,
too-many-arguments,
too-many-positional-arguments,
broad-exception-caught,
check-quote-consistency=yes

[REPORTS]
output-format = text
files-output = no
reports = no

[FORMAT]
max-line-length = 120
max-statement-lines = 75
single-line-if-stmt = no
no-space-check = trailing-comma,dict-separator
max-module-lines = 1000
indent-string = ' '
string-quote=single-avoid-escape
triple-quote=single
docstring-quote=double

[MISCELLANEOUS]
notes = FIXME,XXX,TODO
Expand Down Expand Up @@ -91,7 +87,6 @@ good-names=logger,id,ID
bad-names=foo,bar,baz,toto,tutu,tata

# List of builtins function names that should not be used, separated by a comma
bad-functions=apply,input

[DESIGN]
max-args = 10
Expand All @@ -106,4 +101,4 @@ min-public-methods = 2
max-public-methods = 20

[EXCEPTIONS]
overgeneral-exceptions = Exception
overgeneral-exceptions = builtins.Exception
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9-trixie
FROM python:3.13-trixie
WORKDIR /opt/proxstar
RUN apt-get update -y && apt-get install -y python3-dev libldap2-dev libsasl2-dev ldap-utils git
COPY requirements.txt .
Expand Down
6 changes: 3 additions & 3 deletions HACKING/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
proxstar-rq-scheduler:
build:
context: ..
env_file: .env.local
env_file: .env
entrypoint: ./start_scheduler.sh
networks:
- proxstar
Expand All @@ -30,7 +30,7 @@ services:
proxstar-rq:
build:
context: ..
env_file: .env.local
env_file: .env
entrypoint: ./start_worker.sh
networks:
- proxstar
Expand All @@ -42,7 +42,7 @@ services:
ports:
- "8000:8000"
- "8001:8001"
env_file: .env.local
env_file: .env
entrypoint: ["gunicorn", "proxstar:app", "--bind=0.0.0.0:8000"]
networks:
- proxstar
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Proxstar
===========

[![Python 3.8](https://img.shields.io/badge/python-3.8-blue.svg)](https://www.python.org/downloads/release/python-380/)
[![Python 3.13](https://img.shields.io/badge/python-3.13-blue.svg)](https://www.python.org/downloads/release/python-3130/)
[![Proxstar](https://github.com/ComputerScienceHouse/proxstar/actions/workflows/python-app.yml/badge.svg)](https://github.com/ComputerScienceHouse/proxstar/actions/workflows/python-app.yml)

Proxstar is a proxmox VM web management tool used by [Rochester Institute of Technology](https://rit.edu/)'s [Computer Science House](https://csh.rit.edu).

Expand Down
14 changes: 6 additions & 8 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,8 @@

# OIDC
OIDC_ISSUER = environ.get('PROXSTAR_OIDC_ISSUER', 'https://sso.csh.rit.edu/auth/realms/csh')
OIDC_CLIENT_CONFIG = {
'client_id': environ.get('PROXSTAR_CLIENT_ID', 'proxstar'),
'client_secret': environ.get('PROXSTAR_CLIENT_SECRET', ''),
'post_logout_redirect_uris': [
environ.get('PROXSTAR_REDIRECT_URI', 'https://proxstar.csh.rit.edu/logout')
],
}
OIDC_CLIENT_ID = environ.get('PROXSTAR_CLIENT_ID', 'proxstar')
OIDC_CLIENT_SECRET = environ.get('PROXSTAR_CLIENT_SECRET', '')

# Proxmox
PROXMOX_HOSTS = [host.strip() for host in environ.get('PROXSTAR_PROXMOX_HOSTS', '').split(',')]
Expand All @@ -55,7 +50,10 @@

# REDIS
REDIS_HOST = environ.get('PROXSTAR_REDIS_HOST', 'localhost')
RQ_DASHBOARD_REDIS_HOST = environ.get('PROXSTAR_REDIS_HOST', 'localhost')
RQ_DASHBOARD_REDIS_URL = (
"redis://" + environ.get('PROXSTAR_REDIS_HOST', 'localhost') + ":" +
environ.get('PROXSTAR_REDIS_PORT', '6379') + "/0"
)
REDIS_PORT = int(environ.get('PROXSTAR_REDIS_PORT', '6379'))

# VNC
Expand Down
4 changes: 2 additions & 2 deletions gunicorn.conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


def start_websockify(websockify_path, target_file):
result = subprocess.run(['pgrep', 'websockify'], stdout=subprocess.PIPE)
result = subprocess.run(['pgrep', 'websockify'], stdout=subprocess.PIPE, check=False)
if not result.stdout:
print("Websockify is stopped. Starting websockify.")
proxstar_port = app.config.get('WEBSOCKIFY_PORT')
Expand All @@ -34,6 +34,6 @@ def start_websockify(websockify_path, target_file):
print("Websockify started.")


def on_starting(server):
def on_starting(server): # pylint: disable=unused-argument
print("Booting Websockify server in daemon mode...")
start_websockify(app.config['WEBSOCKIFY_PATH'], app.config['WEBSOCKIFY_TARGET_FILE'])
Loading