mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
Merge updates from master
This commit is contained in:
commit
746c50123d
4 changed files with 37 additions and 14 deletions
31
README.md
31
README.md
|
@ -1,10 +1,25 @@
|
||||||
# proxstar
|
Proxstar
|
||||||
|
===========
|
||||||
|
|
||||||
|
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).
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
Written using [Python](http://nodejs.org), [Flask](https://npmjs.com).
|
||||||
|
|
||||||
|
Proxstar removes the need for CSH members to have direct access to the proxmox web interface.
|
||||||
|
|
||||||
Proxstar is a proxmox VM web management tool used by [Computer Science House](https://csh.rit.edu).
|
|
||||||
<br>
|
|
||||||
Written in Python Flask, proxstar removes the need for CSH members to have direct access to the proxmox web
|
|
||||||
interface.
|
|
||||||
<br>
|
|
||||||
Proxstar is also used to enforce proxmox resource limits automagically.
|
Proxstar is also used to enforce proxmox resource limits automagically.
|
||||||
<br>
|
|
||||||
Available to house members at <code>proxstar.csh.rit.edu</code> behind PYOIDC authentication.
|
It is available to house members at [proxstar.csh.rit.edu](https://proxstar.csh.rit.edu) behind PYOIDC authentication.
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
1. [Fork](https://help.github.com/en/articles/fork-a-repo) this repository
|
||||||
|
- Optionally create a new [git branch](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell) if your change is more than a small tweak (`git checkout -b BRANCH-NAME-HERE`)
|
||||||
|
3. Make your changes locally, commit, and push to your fork
|
||||||
|
4. Create a [Pull Request](https://help.github.com/en/articles/about-pull-requests) on this repo for our Webmasters to review
|
||||||
|
|
||||||
|
## Questions/Concerns
|
||||||
|
|
||||||
|
Please file an [Issue](https://github.com/ComputerScienceHouse/proxstar/issues/new) on this repository.
|
|
@ -95,7 +95,15 @@ def delete_vm_task(vmid):
|
||||||
starrs = connect_starrs()
|
starrs = connect_starrs()
|
||||||
vm = VM(vmid)
|
vm = VM(vmid)
|
||||||
# do this before deleting the VM since it is hard to reconcile later
|
# do this before deleting the VM since it is hard to reconcile later
|
||||||
delete_starrs(starrs, vm.name)
|
retry = 0
|
||||||
|
while retry < 3:
|
||||||
|
try:
|
||||||
|
delete_starrs(starrs, vm.name)
|
||||||
|
break
|
||||||
|
except:
|
||||||
|
retry += 1
|
||||||
|
time.sleep(3)
|
||||||
|
continue
|
||||||
if vm.status != 'stopped':
|
if vm.status != 'stopped':
|
||||||
vm.stop()
|
vm.stop()
|
||||||
retry = 0
|
retry = 0
|
||||||
|
@ -162,12 +170,12 @@ def setup_template_task(template_id, name, user, ssh_key, cores, memory):
|
||||||
logging.info(
|
logging.info(
|
||||||
'[{}] Waiting until Proxmox is done provisioning.'.format(name))
|
'[{}] Waiting until Proxmox is done provisioning.'.format(name))
|
||||||
set_job_status(job, 'waiting for Proxmox')
|
set_job_status(job, 'waiting for Proxmox')
|
||||||
timeout = 20
|
timeout = 25
|
||||||
retry = 0
|
retry = 0
|
||||||
while retry < timeout:
|
while retry < timeout:
|
||||||
if not VM(vmid).is_provisioned():
|
if not VM(vmid).is_provisioned():
|
||||||
retry += 1
|
retry += 1
|
||||||
time.sleep(3)
|
time.sleep(12)
|
||||||
continue
|
continue
|
||||||
break
|
break
|
||||||
if retry == timeout:
|
if retry == timeout:
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
<label for="user" class="pull-left">User</label>
|
<label for="user" class="pull-left">User</label>
|
||||||
<select name="user" id="user" class="form-control">
|
<select name="user" id="user" class="form-control">
|
||||||
{% for pool in pools %}
|
{% for pool in pools %}
|
||||||
<option value="{{ pool }}">{{ pool }}</option>
|
<option value="{{ pool }}" {{ "selected" if user.name == pool else "" }}>{{ pool }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,7 +4,7 @@ flask-pyoidc==1.3.0
|
||||||
gunicorn==19.9.0
|
gunicorn==19.9.0
|
||||||
paramiko==2.4.2
|
paramiko==2.4.2
|
||||||
proxmoxer==1.0.3
|
proxmoxer==1.0.3
|
||||||
psutil==5.4.7
|
psutil==5.6.6
|
||||||
psycopg2-binary==2.7.5
|
psycopg2-binary==2.7.5
|
||||||
python-dateutil==2.7.3
|
python-dateutil==2.7.3
|
||||||
raven~=6.10.0
|
raven~=6.10.0
|
||||||
|
@ -13,7 +13,7 @@ requests==2.20.1
|
||||||
rq==0.12.0
|
rq==0.12.0
|
||||||
rq-dashboard==0.4.0
|
rq-dashboard==0.4.0
|
||||||
rq-scheduler==0.8.3
|
rq-scheduler==0.8.3
|
||||||
sqlalchemy==1.2.12
|
sqlalchemy==1.3
|
||||||
sshtunnel==0.1.4
|
sshtunnel==0.1.4
|
||||||
tenacity==5.0.2
|
tenacity==5.0.2
|
||||||
websockify==0.8.0
|
websockify==0.8.0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue