Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Conductor UI Release - 3.3.0 (#2462)
Browse files Browse the repository at this point in the history
* Squashed 3.0 UI release
* Update top level README
* Update docker README
* Resolve typos and suggested changes in README & properties

Co-authored-by: Peter Lau <[email protected]>
  • Loading branch information
peterlau and peterlau authored Sep 21, 2021
1 parent feb1406 commit 66c6c84
Show file tree
Hide file tree
Showing 198 changed files with 10,200 additions and 23,343 deletions.
9 changes: 8 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
server/build/libs
# General

# Backend
server/build/libs

# UI
**/node_modules
ui/build
37 changes: 19 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
**/node_modules
**/npm-debug.log
ui/dist
ui/package-lock.json
# Java Build
.gradle
.project
.classpath
dump.rdb
out
bin
build
client/python/conductor.egg-info
target
buildscan.log
/docs/site

# Python
/polyglot-clients/python/conductor.egg-info
*.pyc
.classpath
docs/site
site
ui/.settings

# OS & IDE
.DS_Store
.settings
dump.rdb
.vscode
.idea
.project
*.iml
out/
bin/
target/
.DS_Store
.vscode/
buildscan.log

# JS & UI Related
node_modules
/ui/build

# publishing secrets
secrets/signing-key
55 changes: 38 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,60 @@


## Conductor
Conductor is an _orchestration_ engine that runs in the cloud.
Conductor is a _workflow orchestration_ engine that runs in the cloud.


[![Github release](https://img.shields.io/github/v/release/Netflix/conductor.svg)](https://GitHub.com/Netflix/conductor/releases)
[![CI](https://github.com/Netflix/conductor/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Netflix/conductor/actions/workflows/ci.yml)
[![License](https://img.shields.io/github/license/Netflix/conductor.svg)](http://www.apache.org/licenses/LICENSE-2.0)
[![NetflixOSS Lifecycle](https://img.shields.io/osslifecycle/Netflix/conductor.svg)]()

## Community
[Discussion Forum](https://github.com/Netflix/conductor/discussions) Please use the forum for questions and discussing ideas and join the community.

[Access here other Conductor related projects made by the community!](/RELATED.md) - Backup tool, Cron like workflow starter, Docker containers...

## Builds
The latest version is [![Github release](https://img.shields.io/github/v/release/Netflix/conductor.svg)](https://GitHub.com/Netflix/conductor/releases).
| Branch | Build |
|:------:|:-------------------------------------------------------------------------------------------------------------:|
| main | [![CI](https://github.com/Netflix/conductor/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Netflix/conductor/actions/workflows/ci.yml) |
| 2.31 | [![Build Status](https://travis-ci.com/Netflix/conductor.svg?branch=2.31)](https://travis-ci.com/Netflix/conductor) |


## Running Conductor
The latest version is [![Github release](https://img.shields.io/github/v/release/Netflix/conductor.svg)](https://GitHub.com/Netflix/conductor/releases). Conductor can be started up with an in-memory persistence and queue implementation. It is not recommended for production use but can come in handy for quickly evaluating what Conductor's all about. For actual production use-cases, please use one of the supported persistence and queue implementations.
## Getting Started - Building & Running Conductor
### Docker
The easiest way to get started is with Docker containers. Please follow the instructions [here](https://github.com/Netflix/conductor/tree/main/docker). The server and UI can also be built from source separately.

If Docker is installed, please follow the instructions [here](https://github.com/Netflix/conductor/tree/main/docker).
### Conductor Server From Source
Conductor Server is a [Spring Boot](https://spring.io/projects/spring-boot) project and follows all applicable conventions. First, ensure that Java JDK 11+ is installed.

If Java 11 or above is installed, Conductor [publishes](https://mvnrepository.com/artifact/com.netflix.conductor/conductor-server) an executable jar that can be run using,
#### Development
The server can be started locally by running `./gradlew bootRun` from the project root. This will start up Conductor with an in-memory persistence and queue implementation. It is not recommended for production use but can come in handy for quickly evaluating what Conductor's all about. For actual production use-cases, please use one of the supported persistence and queue implementations.

You can verify the development server is up by navigating to `http://localhost:8080/swagger-ui/index.html` in a browser.

#### Production Build
Running `./gradlew build` from the project root builds the project into the `/build` directory. Note that Docker is a requirement for tests to run, and thus a requirement to build even if you are building
outside of a Docker container. If you do not have Docker installed you can run `./gradlew build -x test` to skip tests.


#### Pre-built JAR
A [pre-built](https://artifacts.netflix.net/netflixoss/com/netflix/conductor/conductor-server/) executable jar is available that can be downloaded and run using:

`java -jar conductor-server-*-boot.jar`

## Documentation & Getting Started
[Documentation](http://netflix.github.io/conductor/)
[Roadmap](https://github.com/Netflix/conductor/wiki/Roadmap)
### Conductor UI from Source

[Getting Started](https://netflix.github.io/conductor/gettingstarted/basicconcepts/) guide.
The UI is a standard `create-react-app` React Single Page Application (SPA). To get started, with Node 14 and `yarn` installed, first run `yarn install` from within the `/ui` directory to retrieve package dependencies.

## Get Conductor
Binaries are available from [Netflix OSS Maven](https://mvnrepository.com/artifact/com.netflix.conductor) repository.
There is no need to "build" the project unless you require compiled assets to host on a production web server. If the latter is true, the project can be built with the command `yarn build`.

Below are the various artifacts published:
To run the UI on the bundled development server, run `yarn run start`. Navigate your browser to `http://localhost:5000`. The server must already be running on port 8080.


## Documentation
[Documentation](http://netflix.github.io/conductor/)
[Roadmap](https://github.com/Netflix/conductor/wiki/Roadmap)
[Getting Started Guide](https://netflix.github.io/conductor/gettingstarted/basicconcepts/).

## Published Artifacts
Binaries are available from [Netflix OSS Maven](https://artifacts.netflix.net/netflixoss/com/netflix/conductor/) repository, or the [Maven Central Repository](https://search.maven.org/search?q=g:com.netflix.conductor).

| Artifact | Description |
| ----------- | --------------- |
Expand Down Expand Up @@ -73,6 +88,12 @@ Below are the various artifacts published:

## Other Requirements
* JDK 11+
* UI requires Node 14 to build. Earlier Node versions may work but is untested.

## Community
[Discussion Forum](https://github.com/Netflix/conductor/discussions) Please use the forum for questions and discussing ideas and join the community.

[Access here other Conductor related projects made by the community!](/RELATED.md) - Backup tool, Cron like workflow starter, Docker containers...

## Get Support
Conductor is maintained by Media Workflow Infrastructure team at Netflix. Use github issue tracking for filing issues and [Discussion Forum](https://github.com/Netflix/conductor/discussions) for any other questions, ideas or support requests.
Expand Down
126 changes: 70 additions & 56 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,76 +1,90 @@
# Docker

This dockerfile runs using dynomite and elasticsearch. The conductor is split into the backend (server) and the frontend (ui). If an image with both of these items combined is desired, build the Dockerfile in the folder serverAndUI

## Building the image
Dependency (build the jar files in ./server from project root)
- `gradlew build`

Building the images:
- `docker build -t conductor:server ./server`
- `docker build -t conductor:ui ./ui`

or using compose:
- `docker-compose build`

This builds the images:
- conductor:server - the conductor server and API.
- conductor:ui - the conductor frontend

## Running conductor
Running the images:
- `docker run -p 8080:8080 -d -t conductor:server`
- `docker run -p 5000:5000 -d -t conductor:ui` (requires elasticsearch running locally)

Using compose (with Dynomite):
`docker-compose -f docker-compose.yaml -f docker-compose-dynomite.yaml up`

Using compose (with Postgres):
`docker-compose -f docker-compose.yaml -f docker-compose-postgres.yaml up`

## Exiting Compose
`ctrl+c` will exit docker compose.

To ensure images are stopped do:
- `docker-compose down --remove-orphans`

## Running in Interactive Mode
In interactive mode the default startup script for the container do not run
- `docker run -p 8080:8080 -t -i conductor:server -`
- `docker run -p 5000:5000 -t -i conductor:ui -`

## Getting Started with Docker Compose
The easiest way to start experimenting with Conductor is via `docker-compose`.
```
cd docker
docker-compose build
docker-compose up
```

This default docker compose build establishes 3 services each running in its own container
* Elasticsearch
* Conductor Server
* Conductor UI

The UI can be accessed by pointing your browser to `http://localhost:5000/`
The Server API is accessible at `http://localhost:8080/`

### Alternative Persistence Engines
By default `docker-compose.yaml` uses `config-local.properties`. This configures the `memory` database, where data is lost when the server terminates. This configuration is useful for testing or demo only.

A selection of `docker-compose-*.yaml` and `config-*.properties` files are provided demonstrating the use of alternative persistence engines.

For example this will start the server instance backed by a PostgreSQL DB.
```
docker-compose -f docker-compose.yaml -f docker-compose-postgres.yaml up
```

### Exiting Compose
`Ctrl+c` will exit docker compose.

To ensure images are stopped execute: `docker-compose down`.

## Standalone Server Image
To build and run the server image, without using `docker-compose`, from the `docker` directory execute:
```
docker build -t conductor:server -f server/Dockerfile ../
docker run -p 8080:8080 -d --name conductor_server conductor:server
```
This builds the image `conductor:server` and runs it in a container named `conductor_server`. The API should now be accessible at `localhost:8080`.

To 'login' to the running container, use the command:
```
docker exec -it conductor_server /bin/sh
```

## Standalone UI Image
From the `docker` directory,
```
docker build -t conductor:ui -f ui/Dockerfile ../
docker run -p 5000:5000 -d --name conductor_ui conductor:ui
```
This builds the image `conductor:ui` and runs it in a container named `conductor_ui`. The UI should now be accessible at `localhost:5000`.

### Note
* In order for the UI to do anything useful the Conductor Server must already be running on port 8080, either in a Docker container (see above), or running directly in the local JRE.
* Additionally, significant parts of the UI will not be functional without Elastisearch being available. Using the `docker-compose` approach alleviates these considerations.

## Monitoring with Prometheus

Start Prometheus with:

`docker-compose -f docker-compose-prometheus.yaml up -d`

Go to [http://127.0.0.1:9090](http://127.0.0.1:9090).


## Potential problem when using docker compose
## Potential problem when using Docker Images

#### Elasticsearch timeout
Standalone(single node) elasticsearch has a yellow status which will cause timeout for conductor server (Required: Green).
Spin up a cluster (more than one) to prevent timeout or use config option `conductor.elasticsearch.clusteHealthColor=yellow`.

Elasticsearch timeout
Standalone(single node) elasticsearch has a yellow status which will cause timeout for conductor server(Required: Green).
Spin up a cluster(More than one) to prevent timeout or edit the local code(check the issue tagged for more)
Check issue: https://github.com/Netflix/conductor/issues/2262
See issue: https://github.com/Netflix/conductor/issues/2262

Changes does not reflect after changes in config.properties
#### Changes in config-*.properties do not take effect
Config is copy into image during docker build. You have to rebuild the image or better, link a volume to it to reflect new changes.

To troubleshoot a failed startup
Check the log of the server, which is located at app/logs (default directory in dockerfile)
#### To troubleshoot a failed startup
Check the log of the server, which is located at `/app/logs` (default directory in dockerfile)

Unable to access to conductor:server with rest
#### Unable to access to conductor:server API on port 8080
It may takes some time for conductor server to start. Please check server log for potential error.
issue: https://github.com/Netflix/conductor/issues/1725#issuecomment-651806800

How to disable elasticsearch
#### How to disable elasticsearch
Elasticsearch is optional, please be aware that disable it will make most of the conductor UI not functional.
Set `workflow.indexing.enabled=false` in your_config.properties
Comment out all the config related to elasticsearch
eg: `conductor.elasticsearch.url=http://es:9200`
Pull request: https://github.com/Netflix/conductor/pull/1555#issue-382145486

* Set `workflow.indexing.enabled=false` in your_config.properties
* Comment out all the config related to elasticsearch
E.g.: `conductor.elasticsearch.url=http://es:9200`


5 changes: 3 additions & 2 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '2.3'
services:
conductor-server:
environment:
- CONFIG_PROP=config.properties
- CONFIG_PROP=config-local.properties
image: conductor:server
build:
context: ../
Expand All @@ -30,7 +30,7 @@ services:

conductor-ui:
environment:
- WF_SERVER=http://conductor-server:8080/api/
- WF_SERVER=http://conductor-server:8080
image: conductor:ui
build:
context: ../
Expand All @@ -41,6 +41,7 @@ services:
- 5000:5000
links:
- conductor-server
stdin_open: true

elasticsearch:
image: elasticsearch:6.8.15
Expand Down
2 changes: 1 addition & 1 deletion docker/grpc/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:

conductor-ui:
environment:
- WF_SERVER=http://conductor-server:8080/api/
- WF_SERVER=http://conductor-server:8080
image: conductor:ui
build:
context: ../../
Expand Down
13 changes: 7 additions & 6 deletions docker/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
# conductor:server - Netflix conductor server
#

# ===========================================================================================================
# 0. Builder stage
# ===========================================================================================================
FROM openjdk:11-jdk AS builder

MAINTAINER Netflix OSS <[email protected]>
LABEL maintainer="Netflix OSS <[email protected]>"

# Copy the project directly onto the image
COPY . /conductor
Expand All @@ -14,25 +16,24 @@ WORKDIR /conductor
# Build the server on run
RUN ./gradlew build -x test

# ===========================================================================================================
# 1. Bin stage
# ===========================================================================================================
FROM openjdk:11-jre

MAINTAINER Netflix OSS <[email protected]>
LABEL maintainer="Netflix OSS <[email protected]>"

# Make app folders
RUN mkdir -p /app/config /app/logs /app/libs

# Copy the project directly onto the image
# Copy the compiled output to new image
COPY --from=builder /conductor/docker/server/bin /app
COPY --from=builder /conductor/docker/server/config /app/config
COPY --from=builder /conductor/server/build/libs/conductor-server-*-boot.jar /app/libs

# Copy the files for the server into the app folders
RUN chmod +x /app/startup.sh

EXPOSE 8080
EXPOSE 8090

HEALTHCHECK --interval=60s --timeout=30s --retries=10 CMD curl -I -XGET http://localhost:8080/health || exit 1

CMD [ "/app/startup.sh" ]
Expand Down
2 changes: 2 additions & 0 deletions docker/server/config/config-local.properties
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ conductor.indexing.enabled=false

# Load sample kitchen sink workflow
loadSample=true

conductor.elasticsearch.clusterHealthColor=yellow
Loading

0 comments on commit 66c6c84

Please sign in to comment.