During the installation process, you can configure agent
relays to cache downloaded artifacts. After artifacts are cached,
when agents request artifacts from the attached relay, process steps
that agents execute download artifacts from the relay not the main
server. This arrangement can reduce deployment time because at during
deployment, the artifacts are likely already local.
About this task
To configure agent-relay artifact caching:
Procedure
- During the installation of an agent-relay, when the installer
prompts with Cache files on the relay which have been downloaded
by any connected agents?, click Yes.
- Create an authorization token:
- On the Setting page in the Security section,
click Tokens.
- Click Create New Token, and enter
details:
- For User, select admin.
- For Expiration Date, select a
date well into the future.
- Set Expiration Time.
- Optional: Enter a description.
- Optional: Specify allowed IPs
- Click Save. When you save, the
token column has a value such as d0a650e1-7f0c-4d6d-bc78-b20850cb6a31.
Paste this value into the installer.
Results
The relay requires a valid authentication token for distributing
artifacts. The relay uses the token to authenticate with the main
server when it downloads artifacts.
Note: You can control caching
with the agentrelay.codestation.enable_replication property.
This file is in the config/agentrelay.properties directory.
To enable caching, set the property to TRUE, for
example, agentrelay.codestation.enable_replication =true.
To disable caching set the property to FALSE, for
example, agentrelay.codestation.enable_replication=false