Skip to content

ADACS-Australia/sso-alert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSO Alert System UI

This is the User Interface of the Siding Spring Observatory's Alert System. This project uses Docker Compose to set up a reverse proxy with Nginx Proxy Manager, a web application, and a PostgreSQL database. Each service is defined within the docker-compose.yml file, ensuring a modular and scalable setup.

Services

1. Nginx Proxy Manager

  • Manages reverse proxy settings and SSL certificates.
  • Exposes:
    • Port 81 for the admin interface.
    • Port 80 for HTTP traffic.
    • Port 443 for HTTPS traffic.
  • Stores configuration and SSL data in mounted volumes.

2. Web Application

  • Runs a web application built from the local directory.
  • Connects to the PostgreSQL database.
  • Exposes port 8080 for external access.
  • Environment variables configure the database connection.

3. PostgreSQL Database

  • Provides a database backend for the web application.
  • Exposes port 5432 for database access.
  • Stores persistent data in a local volume.

Cron jobs

In addition to the services described above, the system employs two cron jobs to read streams and update submitted observation status. These jobs run management commands inside the Docker container at specified intervals and log the output for monitoring.

1. Read Streams via run_readstreams.sh Cron Job

This cron job runs every 5 minutes and executes the readstreams management command.

2. Update Status run_updatestatus.sh Cron Job

This cron job runs every 2 hours and executes the updatestatus management command.

The Web Application service is Built with

Django tom

Installation

To run the prototype locally, please follow the below instructions.

cd <repo_location>
git clone --recursive [email protected]:CAS-eResearch/external/sso-alert/ui.git
python3 -m venv <env_name>
source <env_name>/bin/activate
python3 -m pip install -r ui/requirements.txt 

Run project


cd ui/sso_tom
python manage.py runserver

The project will now be available at http://localhost:8000/

Software Maintenance Documentation

There are some steps which could be followed by the IT people to make sure the application is running smoothly.

1. Regular Monitoring and Logs

  • Ensure that cron jobs are running as expected by checking the logs generated by the scripts (readstreams and updatestatus). Logs are stored in date-based subdirectories to facilitate monitoring.
  • Review logs periodically for any signs of errors, failures, or abnormal behavior. Any issues in the cron jobs should be investigated immediately to avoid potential disruptions in application functionality.

1.1 Do I need to back up cron job logs?

Not necessarily. The application will be able to run smoothly after restarting even if you don't do the backup.

2. Backup Strategy

  • Regularly back up essential data, i.e., the PostgreSQL database to prevent data loss. Automated and secured backups should be scheduled if possible.
  • Use volume mounts in Docker to ensure data persistence across container restarts. For example, the PostgreSQL data is stored in a mounted volume, which should be backed up as part of the disaster recovery plan.

2.1 Where is the Data Stored

The PostgreSQL service stores its data in the following volume mount - ./postgresql/data:/var/lib/postgresql/data - This is where the actual PostgreSQL database files are stored. All database records, schemas, and configurations are stored here.

2.2 What to Back Up

PostgreSQL Data (./postgresql/data): This directory contains the full database for your application. It is essential to back this up regularly, as it stores all the critical data required for the application's operation.

3. Security Updates

  • Stay up-to-date with security patches for both the Docker containers (e.g., Nginx, PostgreSQL) and the application dependencies. Regularly update images used in the docker-compose.yml file to their latest stable versions to incorporate security fixes.
  • If required, you can update the tom-toolkit that is used under the hood of the web application, however, it could potentially lead to various errors in the extended UI components which need to be fixed in the UI code.
  • Ensure that SSL certificates managed by Nginx Proxy Manager are renewed automatically.

4. Database Maintenance

  • Monitor the database size and storage utilization, especially in the mounted volumes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •