Links

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}.
OCI Container
Executable JAR
Variables:
  • MODERNE_AGENT_MAVEN_{index}_URLThe URL of your Maven repository inside of Artifactory.
  • MODERNE_AGENT_MAVEN_{index}_ASTSOURCESpecifies whether or not this repository should be searched for LST artifacts. Defaults to true – but you should set this to false (Note: LSTs used to be called ASTs).
  • MODERNE_AGENT_MAVEN_{index}_LOCALREPOSITORYThe path on disk where Maven index files will be downloaded to. This is on the disk where the agent is being run and not in Artifactory. Defaults to ~/.moderne-maven
    • 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}_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_ASTSOURCE=false \
-e MODERNE_AGENT_MAVEN_0_LOCALREPOSITORY=~/.moderne-maven \
-e MODERNE_AGENT_MAVEN_0_USERNAME=admin \
-e MODERNE_AGENT_MAVEN_0_PASSWORD=password \
# ... Additional variables
Arguments:
  • --moderne.agent.maven[{index}].urlThe URL of your Maven repository inside of Artifactory.
  • --moderne.agent.maven[{index}].astSourceSpecifies whether or not this repository should be searched for LST artifacts. Defaults to true – but you should set this to false (Note: LSTs used to be called ASTs).
  • --moderne.agent.maven[{index}].localRepositoryThe path on disk where Maven index files will be downloaded to. This is on the disk where the agent is being run and not in Artifactory. Defaults to ~/.moderne-maven
    • 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}].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:
java -jar moderne-agent-{version}.jar \
# ... Existing arguments
--moderne.agent.maven[0].url=https://myartifactory.example.com/artifactory/libs-releases-local \
--moderne.agent.maven[0].astSource=false \
--moderne.agent.maven[0].localRepository=~/.moderne-maven \
--moderne.agent.maven[0].username=admin \
--moderne.agent.maven[0].password=password \
# ... Additional arguments