https://github.com/adacs-australia/ss19a-jcooke
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: acs.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.2%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: ADACS-Australia
- License: other
- Language: Python
- Default Branch: master
- Size: 224 KB
Statistics
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 1
- Releases: 0
Metadata Files
Readme.md
Project Overview
This project serves as a user-interface and job submission controller for the DWF. The UI is responsible for controlling and managing user input, viewing job information, performing cone-search, etc.
Prerequisites
- Python 3.7+ (tested with 3.7.3)
- MySQL 5.7+ (tested with 5.7)
Optional
- Docker and Docker-Compose (If you want to use skip manual setup steps and just want to run the UI as a docker container)
Setup
You might need to install python-dev, python3-dev and libmysqlclient-dev using the following
commands:
shell
sudo apt-get install python-dev python3-dev
sudo apt-get install libmysqlclient-dev
beforehand for successful completion of the command:
shell
pip install -r requirements.txt
Configuration Steps
The required steps include the following:
virtualenv -p python3 venv(create the virtual environment, e.g. with https://docs.python.org/3/library/venv.html or https://github.com/pyenv/pyenv)git pull(clone the code)cd SS19A-JCooke(enter to the directory)git submodule update --init --recursive(pulls any submodules (ex: djangohpcjob_controller))source ../venv/bin/activate(activate the virtual environment)cd dwfui/settings(enter the settings directory)touch local.py(create the file for local settings - refer to the Local Settings section for setting up a local settings file)cd ../../(enter the root directory of the project)pip3 install -r requirements.txt(install required python packages)pip3 install -r django_hpc_job_controller/server/requirements.txt(install required python packages for the djangohpcjob_controller server)./development-manage.py migrate(migrate, for staging or production)./development-manage.py createsuperuser(create an admin account) (specify the required manage.py file instead)./development-manage.py runserver 8000(running the server)
Local Settings
The project is required to have customised machine specific settings. Those settings need to be included or overridden
in the local settings file. Create one local.py in the settings module next to the other settings files (base.py,
development.py, production.py etc.)
The following settings needs to be present in the local.py settings file.
The secret key used to authenticate the workflow with the UI API (can be generated with e.g. https://www.miniwebtool.com/django-secret-key-generator/)
python SECRET_KEY = 'some really long string with $YMb0l$'The admins of the site who will receive error emails. ```python ADMINS = [ ('Your Name', 'youremail@dd.ress'), ]
MANAGERS = ADMINS
* The address from where the server emails will be sent.
python
SERVER_EMAIL = 'serveremail@dd.ress'
```
- The address from where the notification emails will be sent.
python
EMAIL_FROM = 'mail@dd.ress'
Other email settings can also be provided.
python EMAIL_HOST = 'gpo.dd.res' EMAIL_PORT = 25 EMAIL_USE_TLS = True EMAIL_USE_SSL = FalseDatabase settings. For example, a simple MySQL database can be configured using
python DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'dwf', 'USER': 'dwf', 'PORT': 3306, 'PASSWORD': 'MySQLPassword123', }, }Postgresql settings for the cone search
python POSTGRES_USER = 'postgresuser' POSTGRES_PASSWORD = 'postgresspassword' POSTGRES_HOST_NAME = 'postgres_host_name' POSTGRES_PORT = 5432 POSTGRES_DB_NAME = 'dwfadacs'
Database Settings for Docker
To run using docker and MySQL, modify the local.py configuration file.
Instead of using the database settings described above, use something in
the lines of the following:
```python DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'dwf', 'HOST': 'db', 'USER': 'dwf', 'PORT': 3306, 'PASSWORD': 'password', }, }
```
The USER and PASSWORD should be in accordance with the information provided in the file docker-compose.yml
included at the root of the project repository.
Nginx Configuration
The Django server currently exports two ports, one for handling HTTP, and the other for handling Websocket connections. Typically, we would recommend running the web app with gunicorn in a production environment (as configured in the provided docker configurations). By default the Websocket server will listen on port 8001. For the Swinburne/OzSTAR deployment, we use an nginx reverse proxy to map the incoming Websocket connections on /ws/ to the websocket server, and all other requests are sent to the normal Django port.
The nginx config for our docker release looks like this:
```nginx server { location /static/ { autoindex on; alias /static/; }
location /ws/ { proxy_pass http://web:8001/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_connect_timeout 7d;
proxy_send_timeout 7d;
proxy_read_timeout 7d;
}
location / { proxy_pass http://web:8000; }
listen 8000; server_name localhost; } ```
The connection upgrade configuration is very important for successful websocket connection.
License
The project is licensed under the MIT License. For more information, please refer to the LICENSE included in
the root of the project.
Authors
- Shibli Saleheen (as part of ADACS)
- Lewis Lakerink (as part of ADACS)
Owner
- Name: Astronomy Data and Computing Services
- Login: ADACS-Australia
- Kind: organization
- Location: Australia
- Repositories: 43
- Profile: https://github.com/ADACS-Australia
GitHub Events
Total
Last Year
Dependencies
- Django ==2.2.10
- django-recaptcha ==2.0.5
- mysqlclient *
- psycopg2 *
- six *
- django ==2.2.10
- django-recaptcha ==2.0.5
- mysqlclient ==1.4.2.post1
- psycopg2 ==2.8.4
- pytz ==2019.1
- six ==1.12.0
- sqlparse ==0.3.0