Skip to content

Latest commit

 

History

History
55 lines (40 loc) · 1.87 KB

File metadata and controls

55 lines (40 loc) · 1.87 KB

SIMPLE YAML compiler Web UI (backend)

Backend for the SIMPLE YAML Compiler GUI web application.

Frontend repository can be found here.

How to deploy to OpenShift

  1. Download the OKD client oc.

  2. Go to https://openshift.cern.ch/console/catalog

  3. Select Python from the list of options

screenshot from OpenShift

  1. Select your project, set application name and select the repository. Supported Python version is 2.7.

screenshot from OpenShift

  1. Create route and expose it to the internet using oc annotate route <SERVICE NAME HERE> router.cern.ch/network-visibility=Internet

  2. (Optional) Add health-check to the backend deployment on /health endpoint.

Available endpoints

  • /versions - GET list of installed compiler versions
  • /compile - POST site-level config file to be compiled/augmented
    // Request
    {
      "version": "v1.0.6",
      "site_conf": (binary)
    }
    
    // Response (success)
    {
      "augmented_conf": "...",
      "schema": "..."
    }
    
    // Response (failure)
    {
      "Input File": "<site-level conf>",
      "error": "<error traceback>",
      "file_name1": "...",
      "file_name2": "...",
      "file_name3": "...",
      ...
    }
  • /health - GET health check endpoint

Installing new compiler versions

In order to install a new compiler simply download it from the SIMPLE Grid YAML compiler package page in PyPi here and extract it inside the compilers directory. The backend will take care of picking up the installed compilers and providing a list of available versions to the frontend.