CLI
The easiest way to use Maestro
Introduction
You could create your own Semaphore implementation or use the predefined CLI. The official CLI has most implementations available.
semaphore daemon --http=:8080 --proto=./* --flow=./*
Multiple flow paths could be given as arguments. Definitions could be looked up recursively with wildcards.
semaphore daemon --http=:8080 --proto=./* --flow=/var/flows/** --flow=/var/endpoints/**
Installation
You are able to download a prebuild artifact from the latest release. Feel free to open a new PR if you require a specific build for your CPU architecture.
Linux / MacOS
A installer script is available. By default the latest binaries for your operating system will be pulled and stored in /usr/local/bin
. Arguments could be given to pull a specific version and/or store the binary inside a specific directory.
# pull latest version
curl https://raw.githubusercontent.com/jexia/maestro/master/install.sh | sh
# pull version v2.0.0 and store it in ./bin
curl https://raw.githubusercontent.com/jexia/maestro/master/install.sh | sh -s -- -b ./bin v2.0.0
Homebrew
A Maestro Homebrew installer is available inside the Jexia cask. Simply tap into the cask and install Maestro.
brew tap jexia/cask
brew install maestro
Docker image
Official docker images are available on Github and Docker hub. These images contain the Maestro CLI.
docker pull jexiacom/maestro-cli
Building the Development Version from Source
If you have a Go environment configured, you can install the development version of semaphore
from the command line.
go install github.com/jexia/maestro/cmd/semaphore
While the development version is a good way to take a peek at maestro
's latest features before they get released, be aware that it may have bugs. Officially released versions will generally be more stable.
Validate flows
Flow definitions could easily be checked with the validate
command. This validates the flow property types with the configured schema(s).
$ semaphore validate --proto=./* --flow=/var/flows/** --flow=/var/endpoints/**
Configuration files
CLI configurations could be defined inside a hcl
file. Configuration files could include other hcl
definitions and access environment variables. Service selectors could be defined which override the configuration of services. It is often adviced to store these service selectors inside a seperate file to include them inside your specific environment include = ["services.$ENV.hcl"]
.
log_level = "$LOG_LEVEL"
protobuffers = ["../../annotations", "./proto/*.proto"]
include = ["flow.hcl"]
graphql {
address = "$GRAPHQL_ADDRESS"
}
http {
address = "$HTTP_ADDRESS"
}
prometheus {
address = "$PROMETHEUS_ADDRESS"
}
services {
select "proto.users.*" {
host = "api.jexia.com"
}
select "proto.projects.*" {
host = "api.jexia.com"
}
}
hcl
files could be passed to Maestro with the --file
or (-f
) flag.
$ semaphore daemon --file config.hcl
Advanced pattern matching
Maestro supports advanced pattern matching for most paths. Patterns could be used to target specific files inside a given directory.
./**/*.e2e.hcl
Last updated