Shipping your agents
And now we get to the fun part - actually shipping your agent!
This will usually depend heavily on your specific use case, but there are a few typical ways to ship your agents:
Locally with a single jar
Here you'll just distribute the combined jar file that the build process creates. You can choose to wrap it in an Operating System specific script or just instruct your users to run it directly if its meant to be used from the CLI.
Docker container
Docker is often the most preferred way to deploy applications built on the Talent Agent SDK. We provide a sample Dockerfile
inside the resources folder of the SDK.
FROM openjdk:22-jdk-slim
WORKDIR /app
COPY libs/sampleagent-@@applicationVersion@@.jar /app/sampleagent-all.jar
ENTRYPOINT ["java", "-Dnetworkaddress.cache.ttl=0", "-Dnetworkaddress.cache.negative.ttl=0", "-Dspring.profiles.active=prod,aws", "-Xmx2g", "--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED", "--add-opens=java.base/java.lang=ALL-UNNAMED", "--add-opens=java.base/java.lang.reflect=ALL-UNNAMED", "--add-opens=java.base/sun.reflect.annotation=ALL-UNNAMED", "-jar", "/app/sampleagent-all.jar"]
EXPOSE 8080
To use this file, and get all the properties replaced and setup, you'll want to add the following to your build.gradle
file:
build {
copy {
from('Dockerfile') {
filter { it.replaceAll('@@applicationVersion@@', version) }
}
into 'build'
}
}
Once this is done, you'd typically run something like docker buildx to build your container stack:
docker buildx build --platform=linux/amd64 -t $CONTAINER_NAME:$VERSION build
Obviously, the exact specifics will depend on your setup and how you intend to deploy.
Elastic Beanstalk or Similar
With platforms like Elastic Beanstalk from AWS, or the similar services from Azure, you can choose to either have it use a Docker container or the single large jar file. Either way, these types of services can provide a low maintenance way of hosting your agents without the hassle of server maintenance.
Hosting with the Talent Cloud
You can also choose to host your agents in our enterprise Talent Cloud. We'll take care of all the hosting and scaling of your agents. This is a great option if you're also using the Composable Talent Platform. If you're interested in this option, please reach out at [email protected].
Last updated
Was this helpful?