Deploy to Multiple Environments
By default, On-Premise Agents handle requests for all integration profiles. To configure agents to execute workloads for a specific profile, deploy separate agents to each of your environments or VPCs, and set the SUPERBLOCKS_AGENT_TAGS
environment variable directly or with one of the deployment-specific methods below. The value is a comma separated list of key-value pairs in the form profile:<PROFILE_NAME>
. Some examples include:
# Execute APIs for only the production profile
SUPERBLOCKS_AGENT_TAGS="profile:production"
# Execute APIs for both the development and staging profiles
SUPERBLOCKS_AGENT_TAGS="profile:development,profile:staging"
# Execute APIs for all profiles (default)
SUPERBLOCKS_AGENT_TAGS="profile:*"
To configure agent tags, set the following variable depending on your deployment method.
- Terraform
- Helm
- Docker
superblocks_agent_tags = "profile:<VALUE>"
superblocks:
#(...)
agentTags: "profile:<VALUE>"
export SUPERBLOCKS_AGENT_TAGS="profile:<VALUE>"
Agent version compatibility
SUPERBLOCKS_AGENT_TAGS
is available in Agent version 0.83.0+. It supersedes and will eventually replace the previously used SUPERBLOCKS_AGENT_ENVIRONMENT
setting.
If you already have agents deployed using the SUPERBLOCKS_AGENT_ENVIRONMENT
variable, these agents will continue to work and successfully serve traffic for the environment you’ve specified (*
, production
, and staging
).
Once SUPERBLOCKS_AGENT_TAGS
is set on an agent, its values will be used instead of those set in SUPERBLOCKS_AGENT_ENVIRONMENT
.