Overview of Cadence Web UI
Cadence Web UI is an integral part of the robust orchestration engine developed by Uber Engineering, known as Cadence. Designed for executing asynchronous, long-running business logic smoothly and reliably, Cadence ensures operations are scalable and highly available across distributed systems. The Cadence Web UI acts as a window into this powerful engine, allowing users to visualize and manage workflows efficiently. Users can see what workflows are running, explore details, and debug executions with ease.
Getting Started with Cadence Web UI
Configuration
Before diving into the Cadence Web UI, users might need to tweak some settings to fit their environment. The configuration primarily involves setting up environment variables. Here are a few key variables:
- CADENCE_TCHANNEL_PEERS: This determines the peers in the tchannel network, with a default value set to
127.0.0.1:7933
. - CADENCE_TCHANNEL_SERVICE: Specifies the name of the tchannel service, defaulting to
cadence-frontend
. - CADENCE_WEB_PORT: The port on which the Cadence Web UI runs, defaulting to
8088
. - ENABLE_AUTH: Activation of authentication features as needed, default is
false
.
Additionally, users can configure authentication using JWT or OIDC, with customizable settings for admin JWT keys and OIDC client secret management.
Running Locally
For local deployment and testing, Cadence Web UI requires Node.js version v10.22.1
or higher. Users can run the web UI using standard npm scripts for installing dependencies, running the server, and performing tests. Docker plays a pivotal role in establishing a consistent development environment. For ease of use, docker-compose is recommended, and there's a default configuration provided.
Using VSCode Dev Containers
To streamline the development process using Visual Studio Code, developers can use the Remote Containers plugin. Here's a quick setup guide:
- Install the Remote Containers plugin from the VSCode Marketplace.
- Open the cadence-web project directory in VSCode.
- Use the Command Palette to reopen the folder within a container, triggering
npm install
automatically. - Execute the app using
npm run dev
. - Access the web interface by navigating to
localhost:8088
or the specified custom port.
Docker-Compose for Quick Start
Launching the server with live reload capabilities is a breeze with docker-compose up
. For contributors and developers looking to extend Cadence Web UI, comprehensive guides are available to aid in the process.
Developers might also opt to pull the Cadence Web UI Docker image directly from Docker Hub, which integrates seamlessly with the Cadence server's local docker setup.
API Integration
To enhance server functionalities with additional middleware, developers can install Cadence Web UI as a dependency. The web server, built on Koa, can be extended with custom middleware. An exported init
function facilitates middleware configuration, allowing developers to introduce additional logic before or after the standard setup.
Licensing
The Cadence Web UI is distributed under the MIT License, providing open access to modify and use the software under defined terms.
Cadence Web UI represents a significant advancement in the orchestration and management of distributed workflows, bringing together the power of the Cadence engine with a user-friendly interface for streamlined operations.