Skip to main content

Cylc UI Server

Project description

Anaconda-Server Badge Anaconda-Server Badge PyPI forum Test codecov

Cylc UI Server

This project contains the Cylc UI Server which serves the Cylc UI and communicates with running Cylc Schedulers. It also bundles the GUI.

Cylc Website | Contributing | Developing | Forum

Introduction

The functionality in this repository is required to run the Cylc web user interface.

This repository provides the following components of the Cylc system.

  • The UI

    This is the Cylc web app that provides control and monitoring functionalities for Cylc workflows.

    Note The UI is developed in a separate repository https://github.com/cylc/cylc-ui

  • The UI Server

    This is a web server which serves the Cylc web UI. It connects to running workflows and workflow databases to provide the information the UI displays. It is a Jupyter Server.

  • The Hub

    In multi-user setups this launches UI Servers, provides a proxy for running server and handles authentication. It is a JupyterHub server.

Installation

Anaconda-Server Badge PyPI Conda-Platforms

For more information on the Cylc components and full-stack Cylc installations see the Cylc documentation.

For Single-User Setups

Via conda (preferred):

conda install cylc-uiserver

Via pip:

pip install cylc-uiserver

For Multi-User Setups

Via conda (preferred):

conda install cylc-uiserver-hub

Via pip (consult jupyterhub documentation):

pip install cylc-uiserver[hub]

Running

The Cylc UIServer is a Jupyter Server extension (like JupyterLab).

For Single-User Setups

Run as a standalone server using a URL token for authentication:

# launch the Cylc GUI and open a browser tab
$ cylc gui

# alternatively the same app can be opened with the jupyter command
$ jupyter cylc

Note By default, authentication is provided by the URL token. Alternatively, a password can be configured (see Jupyter Server docs).

There is no per-user authorisation, so anyone who has the URL token has full access to the server.

For Multi-User Setups

Run a central JupyterHub server under a user account with the privileges required to spawn cylc processes as other users.

# launch the Cylc Hub
# (the default URL is http://localhost:8000)
$ cylc hub

Users then authenticate with the hub which launches and manages their UI Server.

Configuring

Hub

The Cylc Hub will load the following files in order:

  1. System Config

    These are the Cylc defaults which are hardcoded within the repository.

    (<python-installation>/cylc/uiserver/jupyter_config.py)

  2. Site Config

    This file configures the Hub/UIS for all users. The default path can be changed by the CYLC_SITE_CONF_PATH environment variable.

    (/etc/cylc/uiserver/jupyter_config.py)

  3. User Config

    This file

    (~/.cylc/uiserver/jupyter_config.py)

Alternatively a single config file can be provided on the command line.

cylc hub --config

Warning If specifying a config file on the command line, the system config containing the hardcoded Cylc default will not be loaded.

Note The hub can also be run using the jupyterhub command, however, you must source the configuration files manually on the command line.

See the JupyterHub documentation for details on configuration options.

UI Server

See the Cylc documentation for all Cylc-specific configuration options.

The Cylc UI Server is a Jupyter Server extension. Jupyter Server can run multiple extensions. To control the extensions that are run use the ServerApp.jpserver_extensions configuration, see the Jupyter Server configuration documentation.

By default the Cylc part of the UI Server log is written to ~/.cylc/uiserver/uiserver.log.

UI

The UI can be configured via the "Settings" option in the Dashboard.

Currently these configurations are stored in the web browser so won't travel around a network and might not persist.

Developing

Contributors Commit activity Last commit

Contributions welcome:

  1. Install from source into your Python environment:

    pip install -e .[all]
    

    Note If you want to run with a development copy of Cylc Flow you must install it first else pip will download the latest version from PyPi.

  2. For UI development follow the developer instructions for the cylc-ui project, then set the following configuration so Cylc uses your UI build (rather than the default bundled UI build):

    # ~/.cylc/uiserver/jupyter_config.py
    import os
    c.CylcUIServer.ui_build_dir = os.path.expanduser('~/cylc-ui/dist')
    

Note about testing: unlike cylc-flow, cylc-uiserver uses the pytest-tornasync plugin instead of pytest-asyncio. This means you should not decorate async test functions with @pytest.mark.asyncio.

Copyright and Terms of Use

Copyright (C) 2019-2023 NIWA & British Crown (Met Office) & Contributors.

Cylc is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Cylc is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Cylc. If not, see GNU licenses.

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

cylc-uiserver-1.4.0.tar.gz (2.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cylc_uiserver-1.4.0-py3-none-any.whl (2.1 MB view details)

Uploaded Python 3

File details

Details for the file cylc-uiserver-1.4.0.tar.gz.

File metadata

  • Download URL: cylc-uiserver-1.4.0.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for cylc-uiserver-1.4.0.tar.gz
Algorithm Hash digest
SHA256 fa4a8157efbf2e62cc30552e95af6dcd25033ad3ce9ec89ffa5897b360b93db3
MD5 714ebeb66d5bbe4a4fe56ec23e73a6dd
BLAKE2b-256 3665da5e580697ee3cdd81071a4595110ab7317a374e4a239c3d7e9b87f87a1a

See more details on using hashes here.

File details

Details for the file cylc_uiserver-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: cylc_uiserver-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for cylc_uiserver-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8814741ca196510bc1638a7304254224db3851ffc09cf3cf9f7c2471f57b106f
MD5 a09310213884378eb3ce992b6d585ab2
BLAKE2b-256 d61cbde58ace194e93ef2b08a301f4e188ea09b62715be03098936c53c57e5da

See more details on using hashes here.

Supported by

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