Skip to main content

Configure an agent with Artifactory access: recipes

In order for Moderne to retrieve your recipe artifacts from Artifactory, you will need to create a Maven formatted repository inside of Artifactory and point the agent to said repository. This guide will walk you through how to configure the agent to get recipe artifacts from your repository.

Publishing recipe artifacts

Recipe artifacts will automatically be picked up by Moderne so long as you set the recipe source flag to true in the below configuration step. These artifacts will be immediately available for deployment to Moderne upon being published.

Configuring the Moderne agent

The following table contains all of the variables/arguments you need to add to your Moderne agent run command in order for it to get recipe artifacts from your Maven formatted repository inside of Artifactory. Please note that these variables/arguments must be combined with ones found in other steps in the Configuring the Moderne agent guide.

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

Environment variables:

Variable NameRequiredDefaultDescription
MODERNE_AGENT_MAVEN_{index}_URLtrueThe URL of your Maven repository.
MODERNE_AGENT_MAVEN_{index}_ASTSOURCEtruetrueSpecifies whether or not this repository should be searched for LST artifacts. You should set this to false (Note: LSTs used to be called ASTs).
MODERNE_AGENT_MAVEN_{index}_USERNAMEfalsenullThe username used to resolve artifacts.
MODERNE_AGENT_MAVEN_{index}_PASSWORDfalsenullThe password used to resolve artifacts.
MODERNE_AGENT_MAVEN_{index}_RELEASESfalsetrueSpecifies whether or not this repository should be searched for releases.
MODERNE_AGENT_MAVEN_{index}_SNAPSHOTSfalsetrueSpecifies whether or not this repository should be searched for snapshots.
MODERNE_AGENT_MAVEN_{index}_RECIPESOURCEfalsetrueSpecifies whether or not this repository should be searched for recipe jars.
MODERNE_AGENT_MAVEN_{index}_SKIPSSLfalsefalseWhether 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.
warning

If you want to configure a Moderne DevCenter, you will need to ensure that you have exactly one Maven repository configured with RECIPESOURCE set to true. (It is fine to have this same Maven repository configured in multiple agents.)

Example:

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