Skip to main content

An extension to the Autosubmit package that serves its information as an API

Project description

Autosubmit API

Table of Contents

  1. Overview
  2. Installation
  3. Configuration options
  4. How to run tests
  5. Autosubmit Big Picture at BSC

Overview

Autosubmit API is a package that consumes the information generated by Autosubmit and serves it as an API.

Distribution: https://pypi.org/project/autosubmit-api/

See the openapi.json specification and the repository wiki for more information.

Installation

Autosubmit API can be easily installed via pip

pip install autosubmit-api # >=4.0 (recommended)

# Check installation and serving options
autosubmit_api start -h

Start the server:

autosubmit_api start

Configuration options

The Autosubmit API have some configuration options that can be modified by setting their specific environment variable before starting the server:

  • PROTECTION_LEVEL: Default ALL. Possible values ALL, WRITEONLY, NONE.
    • If set to ALL, all the endpoints will be protected by needing a valid token inside the Authorization header of the request.
    • If set to WRITEONLY, only a subset of the endpoints will be protected.
    • If set to NONE, none of the endpoints will be protected.
  • SECRET_KEY: The secret key to encode the JWT tokens from the Authorization Module. Important to be set up on production.
  • CAS_SERVER_URL: CAS Protocol server base URL to request a ticket and verify it. Used for /v4 endpoints. CAS_LOGIN_URL and CAS_VERIFY_URL can be empty if this variable is set (the API will append the protocol URL subpaths).
  • CAS_LOGIN_URL: CAS Protocol URL to request a ticket. Used for /v3 endpoints.
  • CAS_VERIFY_URL: CAS Protocol URL to verify a given ticket. Used for /v3 endpoints.
  • GITHUB_OAUTH_CLIENT_ID: Client ID of the Github Oauth app.
  • GITHUB_OAUTH_CLIENT_SECRET: Secret key of the Github Oauth app.
  • GITHUB_OAUTH_WHITELIST_ORGANIZATION: Used to use authorization based on the membership of a Github organization.
  • GITHUB_OAUTH_WHITELIST_TEAM: Used to use authorization based on the membership of a Github team in an organization. GITHUB_OAUTH_WHITELIST_ORGANIZATION is required

How to run tests

Install pytest

pip install -e .[test]

Run tests:

pytest

Run tests with coverage HTML report:

pytest --cov=autosubmit_api --cov-config=.coveragerc --cov-report=html tests/

You will find the report in htmlcov/index.html

Autosubmit Big Picture at BSC

Autosubmit Big Picture

In this image you can see the flow of information in the Autosubmit environment.

  • Autosubmit: Machines running Autosubmit.
  • Remote Platforms: Platforms (HPCs in most cases) to which Autosubmit connects to run jobs.
  • Experiment Database: Starting from Autosubmit 3.13.0, each experiment generates a set of databases that save important (reusable) information about it. We have the historical database, graph database, structures database.
  • File System: The file system where the experiment files are stored.
  • Data Process Workers: Autosubmit API implements a set of workers that periodically collect information from the experiments or complement that information. In the current BSC implementation, these workers are running no bscesweb04 under webadmin user.
  • Main Database: Autosubmit API uses a centralized database to keep track of important experiment information. The workers fill this information. Autosubmit also writes into this database.
  • Autosubmit API: See Autosubmit API. Currently, under BSC implementation, this API is running on bscesweb04 under webadmin user. This API exposes a set of requests that Autosubmit GUI consumes and serves to the users through the front end.
  • Autosubmit GUI: This project.
  • Authentication Server: BSC Central Authentication Service.
  • Users: Users that access the GUI through their web browsers from any device. The current implementation requires that an user generates a token using the Authentication server once every 5 days.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autosubmit_api-4.0.0b6.tar.gz (148.5 kB view details)

Uploaded Source

Built Distribution

autosubmit_api-4.0.0b6-py3-none-any.whl (189.5 kB view details)

Uploaded Python 3

File details

Details for the file autosubmit_api-4.0.0b6.tar.gz.

File metadata

  • Download URL: autosubmit_api-4.0.0b6.tar.gz
  • Upload date:
  • Size: 148.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.18

File hashes

Hashes for autosubmit_api-4.0.0b6.tar.gz
Algorithm Hash digest
SHA256 d8227fdaa03ccee1538c2813e8a0fe45a0e082acf431fa1244d55ff28ca5af85
MD5 c00f4acf5a32e7735f64b44a0e06fa96
BLAKE2b-256 e7e1568c9cbc6756eac728b936ac0b517c89362b49eda83a21a71ac7377e83fc

See more details on using hashes here.

File details

Details for the file autosubmit_api-4.0.0b6-py3-none-any.whl.

File metadata

File hashes

Hashes for autosubmit_api-4.0.0b6-py3-none-any.whl
Algorithm Hash digest
SHA256 a77a5a5e802d6ff13ca793baad31ff76b97d3d6123b559a3558ba1075f14b3f2
MD5 a14472f21835bf1801824474ab88ed7b
BLAKE2b-256 05b37b81c7d8f9bf99ed88a6c3dd586b89718efd4632a124a418974c6fd03b29

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page