All agent configuration variables

This document includes all of the variables you can configure the Moderne agent to run with. Your configuration will only use some of these.

Core variables

Variables:

  • MODERNE_AGENT_APIGATEWAYRSOCKETURIThe URI used to connect to the Moderne API, provided by Moderne.

  • MODERNE_AGENT_CRYPTO_SYMMETRICKEYA 256-bit AES encryption key, hex encoded. Used to encrypt your artifacts.

  • MODERNE_AGENT_NICKNAMEA name used to identify your agent in the SaaS agent dashboard UI.

  • MODERNE_AGENT_TOKENThe Moderne SaaS agent connection token, provided by Moderne.

  • MODERNE_AGENT_DOWNLOADPARALLELISM(Optional) How many threads are used to download LSTs. Defaults to 2 threads.

  • MODERNE_AGENT_ARTIFACTINDEXINTERVALSECONDS(Optional) How frequently LSTs will be indexed. Defaults to 120 seconds.

  • MODERNE_AGENT_DEFAULTCOMMITOPTIONS_{index}(Optional) Use to restrict which commit options are available on a tenant level (if the organizations service doesn't return any). Acceptable values: Direct, Branch, Fork, PullRequest, ForkAndPullRequest. By default all options are available.

Example:

docker run \
-e MODERNE_AGENT_APIGATEWAYRSOCKETURI=https://api.tenant.moderne.io/rsocket \
-e MODERNE_AGENT_CRYPTO_SYMMETRICKEY=yourSymmetricKey \
-e MODERNE_AGENT_NICKNAME=prod-1 \
-e MODERNE_AGENT_TOKEN=yourToken \
-e MODERNE_AGENT_DEFAULTCOMMITOPTIONS_0=PullRequest \
-e MODERNE_AGENT_DEFAULTCOMMITOPTIONS_1=ForkAndPullRequest \
# ... Additional variables

Bitbucket Cloud variables

Variables:

  • MODERNE_AGENT_BITBUCKET_CLOUD_OAUTH_KEYThe key specified in your Bitbucket OAuth consumer.

  • MODERNE_AGENT_BITBUCKET_CLOUD_OAUTH_SECRETThe secret specified in your Bitbucket OAuth consumer.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_BITBUCKET_CLOUD_OAUTH_KEY=yourOAuthKey \
-e MODERNE_AGENT_BITBUCKET_CLOUD_OAUTH_SECRET=yourSecretKey \
# ... Additional variables

Bitbucket Data Center variables

You can configure multiple Bitbucket instances by including multiple entries, each with a different {index}.

Variables:

  • MODERNE_AGENT_BITBUCKET_{index}_PRIVATEKEYThe private key you configured for this Bitbucket instance.

  • MODERNE_AGENT_BITBUCKET_{index}_URLThe fully-qualified URL of the running Bitbucket instance. For example: https://bitbucket.myorg.com

  • MODERNE_AGENT_BITBUCKET_{index}_ALTERNATEURLS_{index}(Optional) The list of alternative fully-qualified URL of the running Bitbucket instance. For example: https://bitbucket.myorg.com

  • MODERNE_AGENT_BITBUCKET_{index}_SKIPSSL(Optional) Specifies whether or not to skip SSL validation for HTTP connections to this Bitbucket instance. This must be set to true if you use a self-signed SSL/TLS certificate. Defaults to false.

  • MODERNE_AGENT_BITBUCKET_{index}_SSH_PRIVATEKEY(Optional) The SSH private key used to establish a SSH connection with Bitbucket.

  • MODERNE_AGENT_BITBUCKET_{index}_SSH_PASSPHRASE(Required if the SSH private key is specified and encrypted with a passphrase) The passphrase used to encrypt the SSH private key.

  • MODERNE_AGENT_BITBUCKET_{index}_SSH_SSHFILENAME(Required if the SSH private key is specified) The file name of the private key, which the agent will store locally.

  • MODERNE_AGENT_BITBUCKET_{index}_SSH_USER(Required if the SSH private key is specified) The username used for SSH communication with Bitbucket.

  • MODERNE_AGENT_BITBUCKET_{index}_SSH_PORT(Optional) The port used to communicate via SSH with Bitbucket. Defaults to 7999.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_BITBUCKET_0_PRIVATEKEY=yourPrivateKey \
-e MODERNE_AGENT_BITBUCKET_0_URL=https://bitbucket.myorg.com \
# ... Additional variables

GitHub variables

You can configure multiple GitHub OAuth apps by including multiple entries, each with a different {index}.

Variables:

  • MODERNE_AGENT_GITHUB_{index}_OAUTH_CLIENTIDThe client id configured in GitHub.

  • MODERNE_AGENT_GITHUB_{index}_OAUTH_CLIENTSECRETThe client secret configured in GitHub.

  • MODERNE_AGENT_GITHUB_{index}_URLThe fully-qualified hostname of the running GitHub instance.

  • MODERNE_AGENT_GITHUB_{index}_SKIPSSL(Optional) Specifies whether or not to skip SSL validation for HTTP connections to this GitHub instance. This must be set to true if you use a self-signed SSL/TLS certificate. Defaults to false.

  • MODERNE_AGENT_GITHUB_{index}_ALLOWABLE_ORGANIZATIONS_{index}(Optional) Specifies what organizations you can fork recipe results to. By default, there are no restrictions on which organizations can be committed to. If you want multiple organizations, increase the last index and add one per line.

  • MODERNE_AGENT_GITHUB_{index}_OAUTH_INCLUDEPRIVATEREPOS(Optional) By default, the OAuth app will only have access to public repositories within your organization(s). To provide the OAuth app access to private repositories, you can set this to true.

  • MODERNE_AGENT_GITHUB_{index}_SSH_PRIVATEKEY(Optional) The SSH private key used to establish a SSH connection with GitHub.

  • MODERNE_AGENT_GITHUB_{index}_SSH_PASSPHRASE(Required if the SSH private key is specified and encrypted with a passphrase) The passphrase used to encrypt the SSH private key.

  • MODERNE_AGENT_GITHUB_{index}_SSH_SSHFILENAME(Required if the SSH private key is specified) The file name of the private key, which the agent will store locally.

  • MODERNE_AGENT_GITHUB_{index}_SSH_USER(Required if the SSH private key is specified) The username used for SSH communication with GitHub.

  • MODERNE_AGENT_GITHUB_{index}_SSH_PORT(Optional) The port used to communicate via SSH with GitHub. Defaults to 7999.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_GITHUB_0_OAUTH_CLIENTID=yourClientId \
-e MODERNE_AGENT_GITHUB_0_OAUTH_CLIENTSECRET=yourClientSecret \
-e MODERNE_AGENT_GITHUB_0_URL=https://myorg.github.com \
-e MODERNE_AGENT_GITHUB_0_ALLOWABLE_ORGANIZATIONS_0=moderne \
-e MODERNE_AGENT_GITHUB_0_ALLOWABLE_ORGANIZATIONS_1=openrewrite \
-e MODERNE_AGENT_GITHUB_0_OAUTH_INCLUDEPRIVATEREPOS=true \
# ... Additional variables

GitLab variables

You can configure multiple GitLab OAuth apps by including multiple entries, each with a different {index}.

Variables:

  • MODERNE_AGENT_GITLAB_{index}_OAUTH_CLIENTIDThe application id configured in GitLab.

  • MODERNE_AGENT_GITLAB_{index}_OAUTH_CLIENTSECRETThe secret configured in GitLab.`

  • MODERNE_AGENT_GITLAB_{index}_URLThe fully-qualified hostname of your GitLab instance.`

  • MODERNE_AGENT_GITLAB_{index}_SKIPSSL(Optional) Specifies whether or not to skip SSL validation for HTTP connections to this GitLab instance. This must be set to true if you use a self-signed SSL/TLS certificate. Defaults to false.

  • MODERNE_AGENT_GITLAB_{index}_SSH_PRIVATEKEY(Optional) The SSH private key used to establish a SSH connection with GitLab.

  • MODERNE_AGENT_GITLAB_{index}_SSH_PASSPHRASE(Required if the SSH private key is specified and encrypted with a passphrase) The passphrase used to encrypt the SSH private key.

  • MODERNE_AGENT_GITLAB_{index}_SSH_SSHFILENAME(Required if the SSH private key is specified) The file name of the private key, which the agent will store locally.

  • MODERNE_AGENT_GITLAB_{index}_SSH_USER(Required if the SSH private key is specified) The username used for SSH communication with GitLab.

  • MODERNE_AGENT_GITLAB_{index}_SSH_PORT(Optional) The port used to communicate via SSH with GitLab. Defaults to 7999.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_GITLAB_0_OAUTH_CLIENTID=yourClientId \
-e MODERNE_AGENT_GITLAB_0_OAUTH_CLIENTSECRET=yourClientSecret \
-e MODERNE_AGENT_GITLAB_0_URL=https://your-gitlab.com \
# ... Additional variables

Organizations service variables

Variables:

  • MODERNE_AGENT_ORGANIZATION_URLThe URL of your GraphQL service that provides organization information.

  • MODERNE_AGENT_ORGANIZATION_UPDATE_INTERVAL_SECONDS(Optional) Specifies how often to request your organization information. Defaults to 600 (10 minutes).

  • MODERNE_AGENT_ORGANIZATION_SKIPSSL(Optional) Specifies whether or not to skip SSL validation for HTTP connections to this Organization service instance. This must be set to true if you use a self-signed SSL/TLS certificate. Defaults to false.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_ORGANIZATION_URL=http://localhost:8091 \
-e MODERNE_AGENT_ORGANIZATION_UPDATE_INTERVAL_SECONDS=600 \
# ... Additional variables

Maven repository variables

You can configure multiple Maven repositories by including multiple entries, each with a different {index}.

Variables:

  • MODERNE_AGENT_MAVEN_{index}_URLThe URL of your Maven repository.

  • MODERNE_AGENT_MAVEN_{index}_LOCALREPOSITORYThe path on disk where LST artifacts and Maven index files will be downloaded to. This is on the disk where the agent is being run and not on the Maven instance. Defaults to ~/.moderne-maven

    • LST artifacts are deleted from this location after they are transmitted to Moderne. Index files will remain behind to be used to detect diffs in the artifacts. If changes are discovered, only the incremental diffs will be downloaded (to limit the amount of data being transferred).

    • If multiple Maven repositories are configured on the agent, they must have different MODERNE_AGENT_MAVEN_{index}_LOCALREPOSITORY configured.

  • MODERNE_AGENT_MAVEN_{index}_USERNAME(Optional) The username used to resolve artifacts. Defaults to null.

  • MODERNE_AGENT_MAVEN_{index}_PASSWORD(Optional) The password used to resolve artifacts. Defaults to null.

  • MODERNE_AGENT_MAVEN_{index}_RELEASES(Optional) Specifies whether or not this repository should be searched for releases. Defaults to true.

  • MODERNE_AGENT_MAVEN_{index}_SNAPSHOTS(Optional) Specifies whether or not this repository should be searched for snapshots. Defaults to true.

  • MODERNE_AGENT_MAVEN_{index}_ASTSOURCE(Optional) Specifies whether or not this repository should be searched for LST artifacts. Defaults to true (Note: LSTs used to be called ASTs).

  • MODERNE_AGENT_MAVEN_{index}_RECIPESOURCE(Optional) Specifies whether or not this repository should be searched for recipe jars. Defaults to true.

  • MODERNE_AGENT_MAVEN_{index}_SKIPSSL(Optional) Whether or not to skip SSL/TLS verification for calls from the agent to this Maven repository. This must be set to true if you use a self-signed SSL/TLS certificate. Defaults to false.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_MAVEN_0_URL=https://myartifactory.example.com/artifactory/libs-releases-local \
-e MODERNE_AGENT_MAVEN_0_LOCALREPOSITORY=~/.moderne-maven \
-e MODERNE_AGENT_MAVEN_0_USERNAME=admin \
-e MODERNE_AGENT_MAVEN_0_PASSWORD=password \
# ... Additional variables

Artifactory repository variables

You can configure multiple Artifactory servers by including multiple entries, each with a different {index}. Within a given Artifactory server configuration, you can configure multiple LST query filters by including multiple entries, each with a different {index}.

Variables:

  • MODERNE_AGENT_ARTIFACTORY_{index}_URLThe URL of your Artifactory instance.

  • MODERNE_AGENT_ARTIFACTORY_{index}_USERNAMEThe username used to connect to your Artifactory instance. This user must have permission to run AQL queries.

  • MODERNE_AGENT_ARTIFACTORY_{index}_PASSWORDThe password used to connect to your Artifactory instance.

  • MODERNE_AGENT_ARTIFACTORY_{index}_ASTQUERYFILTERS_{index}The AQL query fragment used to select LST artifacts to send to Moderne. If multiple are specified, they are combined together with an AND.

  • MODERNE_AGENT_ARTIFACTORY_{index}_SKIPSSL(Optional) Specifies whether or not to skip SSL verification for HTTP connections from the agent to this Artifactory instance. This must be set to true if you use a self-signed SSL/TLS certificate. Defaults to false.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_ARTIFACTORY_0_URL=https://myartifactory.example.com/artifactory/ \
-e MODERNE_AGENT_ARTIFACTORY_0_USERNAME=admin \
-e MODERNE_AGENT_ARTIFACTORY_0_PASSWORD=password \
-e MODERNE_AGENT_ARTIFACTORY_0_ASTQUERYFILTERS_0='"name":{"$match":"*-ast.jar"}' \
-e MODERNE_AGENT_ARTIFACTORY_0_ASTQUERYFILTERS_1='"repo":{"$eq":"example-maven"}' \
# ... Additional variables

Recipe variables

The platform provides several fallback repositories for recipe loading when an agent has not been configured with any recipe sources. This fallback behavior can be disabled using recipe configuration.

Variables:

  • MODERNE_AGENT_RECIPE_USEONLYCONFIGURED – Only use the recipe sources configured in the agent.

  • MODERNE_AGENT_RECIPE_POMCACHE_TYPE(Optional) Used to specify what type of cache the POM should use. Acceptable values: IN_MEMORY or REDIS.

  • MODERNE_AGENT_RECIPE_POMCACHE_ENTRYTTLMINUTES(Optional) How long entries should live in the POM cache.

  • MODERNE_AGENT_RECIPE_POMCACHE_REDIS_HOST(Required if the POM cache type is set to REDIS, Optional otherwise) The URL of the Redis instance.

  • MODERNE_AGENT_RECIPE_POMCACHE_REDIS_PORT(Required if the POM cache type is set to REDIS, Optional otherwise) The port number of the Redis instance.

  • MODERNE_AGENT_RECIPE_POMCACHE_REDIS_USERNAME(Optional) The username needed to authenticate to the Redis instance.

  • MODERNE_AGENT_RECIPE_POMCACHE_REDIS_PASSWORD(Optional) The password needed to authenticate with the Redis instance.

  • MODERNE_AGENT_RECIPE_POMCACHE_REDIS_SSL(Optional) If set to true, then SSL will be enabled for the connection to the Redis instance. Defaults to false.

  • MODERNE_AGENT_RECIPE_POMCACHE_REDIS_DATABASE(Optional) The Redis DB index.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_RECIPE_USEONLYCONFIGURED=true \
# ... Additional variables

PyPI variables

You can configure multiple PyPI package indexes by including multiple entries, each with a different {index}.

Variables:

  • MODERNE_AGENT_VISUALIZATIONS_USEONLYCONFIGURED – Only use the visualization sources configured in the agent. Default is false.

  • MODERNE_AGENT_PYPI_{index}_URLThe URL of your PyPI package index.

  • MODERNE_AGENT_PYPI_{index}_USERNAME(Optional) The username used to access the index. Defaults to null.

  • MODERNE_AGENT_PYPI_{index}_PASSWORD(Optional) The password used to access the index. Defaults to null.

  • MODERNE_AGENT_PYPI_{index}_SKIPSSL(Optional) Whether or not to skip SSL/TLS verification for calls from the agent to this PyPI package index. This must be set to true if you use a self-signed SSL/TLS certificate. Defaults to false.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_VISUALIZATIONS_USEONLYCONFIGURED=true \
-e MODERNE_AGENT_PYPI_0_URL=https://pypi.example.com/simple \
-e MODERNE_AGENT_PYPI_0_USERNAME=admin \
-e MODERNE_AGENT_PYPI_0_PASSWORD=password \
# ... Additional variables

Last updated