PegaSys Orchestrate General Configuration

Introduction

Orchestrate is a set of configurable microservices following the Twelve-Factor App methodology.

Each microservice can be configured using environment variables or command line arguments. Command line arguments take precedence over environment variables. We can find specific configuration details on this section for each container.

Orchestrate can be connected to multiple Ethereum clients, you can use the ETH_CLIENT_URL environment variable to list URLs of Ethereum clients Orchestrate should use. On start up, Orchestrate will determine chain ids for each client URL and will use a corresponding URL when executing client’s transactions.

Quick-Start

Prerequisites

  • Having docker installed, version 18.09 or upper;
  • Having docker-compose installed, version 1.24.0 or upper; and
  • Having Go installed, version 1.13 or upper.

Configure application

The application can be configured through flags or environment variables, you can run the help run command line:

go run . help run
Global Flags:
      --auth-api-key string                Key used for authentication (it should be used only for Orchestrate internal authenetication)
                                           Environment variable: "AUTH_API_KEY"
      --auth-jwt-certificate string        certificate of the authentication service encoded in base64
                                           Environment variable: "AUTH_JWT_CERTIFICATE"
      --auth-jwt-claims-namespace string   Tenant Namespace to retrieve the tenant id in the OpenId or Access Token (JWT)
                                           Environment variable: "AUTH_JWT_CLAIMS_NAMESPACE" (default "http://tenant.info")
      --jaeger-agent-host string           Jaeger host.
                                           Environment variable: "JAEGER_AGENT_HOST" (default "localhost")
      --jaeger-agent-port int              Jaeger port
                                           Environment variable: "JAEGER_AGENT_PORT" (default 6831)
      --jaeger-collector-url string        Jaeger collector url to send spans to
                                           Environment variable: "JAEGER_COLLECTOR_URL"
      --jaeger-enabled                     Enable Jaeger reporting
                                           Environment variable: "JAEGER_ENABLED" (default true)
      --jaeger-password string             Jaeger password
                                           Environment variable: "JAEGER_PASSWORD"
      --jaeger-reporter-log-spans          LogSpans, when true, enables LoggingReporter that runs in parallel with the main reporter and logs all submitted spans.
                                           Environment variable: "JAEGER_REPORTER_LOG_SPANS" (default true)
      --jaeger-rpc-metrics                 Enable Jaeger RPC metrics
                                           Environment variable: "JAEGER_RPC_METRICS"
      --jaeger-sampler-param int           Jaeger sampler
                                           Environment variable: "JAEGER_SAMPLER_PARAM" (default 1)
      --jaeger-sampler-type string         Jaeger sampler
                                           Environment variable: "JAEGER_SAMPLER_TYPE" (default "const")
      --jaeger-service-name string         Jaeger ServiceName to use on the tracer
                                           Environment variable: "JAEGER_SERVICE_NAME" (default "jaeger")
      --jaeger-user string                 Jaeger User
                                           Environment variable: "JAEGER_USER"
      --log-format string                  Log formatter (one of ["text" "json"]).
                                           Environment variable: "LOG_FORMAT" (default "text")
      --log-level string                   Log level (one of ["panic" "fatal" "error" "warn" "info" "debug" "trace"]).
                                           Environment variable: "LOG_LEVEL" (default "info")
      --metrics-hostname string            Hostname to expose metrics services
                                           Environment variable: "METRICS_HOSTNAME"
      --metrics-port uint                  Port to expose metrics services
                                           Environment variable: "METRICS_PORT" (default 8082)
      --multi-tenancy-enabled              Whether or not to use Multi Tenancy (one of ["false" "true"]).
                                           Environment variable: "MULTI_TENANCY_ENABLED"

Note

  • Flags and their corresponding Environment variables share names, but change in format.
  • Flags are always written in small letters and words are separated by -
  • Environment variables are always written in caps and words are separated by _

Logging

By default the Orchestrate log is written to stdout in text format. To change the log levels or their formatting please check the documentation here.