View Jitterbit Developer Portal
- Created by John Jackson, last modified on May 14, 2020
Introduction
A group of Jitterbit Harmony Private Agents can be configured to be auto-registering and autoscaling by using Kubernetes. This page describes how to configure a group of Private Agents using Kubernetes and Helm.
Reference: The Values YAML File
The Agent Group is configured using a specific values.yaml
file. These are the attributes and definitions in the file, based on the register.json
defined for the Agent Group (original in the Jitterbit charts GitHub repository):
Attribute | Example Values | Description |
---|---|---|
nameOverride | private-agent-group | Used to name Kubernetes resources; by default the name of the chart (agent-group ) is used but can be overridden with this |
| Image mapping | |
repository | jitterbit/agent | |
tag | latest | Unless specifically required, use latest |
agent: | Agent's register.json mapping | |
registerjson: | ||
cloudURL |
https://na-east.jitterbit.com
| URL of your Harmony region; see example register.json for the region list |
| $00+LongEncryptedAndHashedUsername== | Encrypted and hashed username from generating the Agent Group's |
password | $00LongEncryptedAndHashedPassword= | Encrypted and hashed password from generating the Agent Group's register.json |
agentGroupId | 346591 | Agent Group ID |
agentNamePrefix | "%host%" | A prefix added to the UTC timestamp of agent creation to form the agent name |
deregisterAgentOnDrainStop | true | Performs agent de-registration upon agent drainstop; recommend using true |
hpa: | Horizontal Pod Autoscaler mapping | |
minReplicas | 2 | Minimum number of replicas |
maxReplicas | 3 | Maximum number of replicas |
replicas | 3 | Initial number of replicas; a safeguard is to set this equal to the maxReplicas |
Installing and Running the Agent Group
Follow these steps to install and run an Agent Group in Kubernetes using Helm:
Ensure that your Kubernetes cluster is up and running and that your Helm client is configured properly to use the cluster along with Jitterbit's public Helm repository.
Generate the Agent Group's
register.json
file, if you haven't already. Instructions on this are at Agent Automatic Registration and Autoscaling.Create your Agent Group's
values.yaml
file. Note that as YAML is a superset of JSON, you can assignagent.registerjson
to yourregister.json
's JSON object. Here's an examplevalues.yaml
file created using theregister.json
file from the previous step. It was converted into YAML by placing it underagent.registerjson
:nameOverride: private-agent-group image: repository: jitterbit/agent tag: latest agent: registerjson: cloudUrl: https://na-east.jitterbit.com username: $00+LongEncryptedAndHashedUsername== password: $00LongEncryptedAndHashedPassword= agentGroupId: 346591 agentNamePrefix: "%host%" deregisterAgentOnDrainstop: true hpa: minReplicas: 2 maxReplicas: 3 replicas: 3
WARNING: If you are using a Windows operating system, make sure that thevalues.yaml
file has the UNIX line endings\n
instead of DOS's\r\n
.Check that your Docker runtime has sufficient resources allocated to it to accommodate the maximum number of replicas you have specified. Each Docker Private Agent requires 0.25 cores and 2 GB memory:
Resource Value Calculation Value Not to Exceed Cores
0.25 cores x maxReplicas
(number of CPUs) x (number of cores/CPU) Memory 2 GB x maxReplicas
Available memory allocated to the Kubernetes cluster In the example Docker Kubernetes system shown below (a macOS computer with 6 cores—labelled CPUs in the Docker UI—and 16 GB of memory allocated to Docker) you could run at most 7 Docker Private Agents. Eight agents would require 2 cores and 16 GB of memory, using all the available memory. However, as Kubernetes itself runs some containers on the same Docker runtime (known as Kubernetes in Docker), allow at minimum headroom of one core and a portion of the memory rather than dedicating all of the resources available to the Agent Group:
Add Jitterbit's public Helm chart repository to your client. No credentials are required:
helm repo add jitterbit https://jitterbit.github.io/charts # "jitterbit" has been added to your repositories
Update your Helm client's local cache of repositories (recommended). This will ensure that you are using the latest version of the Helm chart:
helm repo update
Install your Agent Group's Helm release:
helm upgrade --install --force --atomic --timeout 1h -f ./values.yaml private-agent-group jitterbit/agent-group
Wait for each agent pod to spin up and monitor using the Jitterbit Harmony Management Console:
watch kubectl get pods
Accessing an Individual Agent
If you need to access one of the agents, you can execute a Bash shell in its container using the following code, replacing private-agent-group-0
with the Docker name of the particular agent you need to access:
kubectl exec -it private-agent-group-0 bash
Agent Group Teardown
When you are ready to tear down the Agent Group, uninstall the Helm release:
helm uninstall private-agent-group
- Agents > Agent Groups
- Agents > Agents
- Agent Automatic Registration and Autoscaling
- Agent Groups High Availability and Load Balancing
- Docker Agent Automatic Registration Tutorial
- Installing a Jitterbit Harmony Linux Agent
- Installing a Jitterbit Harmony Windows Agent
- Private Agents Best Practices Tech Talk
- System Requirements
- Upgrading from Jitterbit v5.x to Harmony
Last updated: May 14, 2020