---
title: Charmhub | Deploy Jenkins agent using Charmhub - The Open Operator Collection
description: Deploy the latest version of Jenkins agent on any cloud.
url: https://charmhub.io/jenkins-agent/docs/explanation-workload
---

# Jenkins agent

[Canonical IS DevOps](https://charmhub.io/publisher/canonical-is-devops "View all packages from Canonical IS DevOps")

* [Canonical IS DevOps](https://charmhub.io/publisher/canonical-is-devops "View all packages from Canonical IS DevOps")

Platform:

24.04

22.04

20.04

18.04

16.04

14.04

stable 95

```
juju deploy jenkins-agent
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

---

#### Relevant links

* [Homepage](https://charmhub.io/jenkins-agent)

---

#### Contacts

##### Maintainers

+ [Launchpad Team](https://launchpad.net/~canonical-is-devops)

* [Submit a bug](https://github.com/canonical/jenkins-agent-operator/issues)

---

Share your thoughts on this charm with the community on discourse.

[Join the discussion](https://discourse.charmhub.io/)

# Managing workload inside the charm

The core Jenkins agent workload requires three main parameters (`JENKINS_URL`, `JENKINS_AGENT` and `JENKINS_SECRET`) and is defined as a two-step process:

1. Download the agent binary at JENKINS\_URL/jnlpJars/agent.jar and store it in the agent’s home directory
2. Run the agent binary with the following parameters to register the node with Jenkins:

```
/usr/bin/java -jar agent.jar \\
-jnlpUrl "<jnlp-path-on-jenkins-server>" \\
-workDir "${JENKINS_WORKDIR}" \\
-noReconnect \\
-secret "${JENKINS_SECRET}"
```

In the charm, this workload is managed using an [apt package](https://launchpad.net/~canonical-is-devops/+archive/ubuntu/jenkins-agent-charm) which installs a systemd service that can be configured via a configuration file.

```
# File: /etc/systemd/system/jenkins-agent.service.d/override.conf
[Service]
Environment="JENKINS_SECRET=secret"
Environment="JENKINS_URL=url"
Environment="JENKINS_AGENT=node-name"
```

The service won’t start automatically through the use of the `--no-start` option during packaging in order to allow flexibility between running the workload as a service and as a standalone executable, located at `/usr/bin/jenkins-agent`.

---
