public static class HeliosSoloDeployment.Builder extends Object
Modifier and Type | Method and Description |
---|---|
HeliosSoloDeployment |
build()
Configures, deploys, and returns a
HeliosSoloDeployment using the as specified by
this Builder. |
HeliosSoloDeployment.Builder |
checkForNewImages(boolean enabled)
By default, the
heliosSoloImage will be checked for updates before creating a
container by doing a "docker pull". |
HeliosSoloDeployment.Builder |
containerDockerHost(com.spotify.docker.client.DockerHost containerDockerHost)
Optionally specify a DockerHost (i.e.
|
HeliosSoloDeployment.Builder |
dockerClient(com.spotify.docker.client.DockerClient dockerClient)
Specify a Docker client to be used for this Helios Solo deployment.
|
HeliosSoloDeployment.Builder |
dockerHost(com.spotify.docker.client.DockerHost dockerHost)
Optionally specify a DockerHost (i.e.
|
HeliosSoloDeployment.Builder |
env(String key,
Object value)
Optionally specify an environment variable to be set inside the Helios solo container.
|
HeliosSoloDeployment.Builder |
heliosClient(HeliosClient heliosClient)
Optionally specify a
HeliosClient . |
HeliosSoloDeployment.Builder |
heliosSoloImage(String image)
Customize the image used for helios-solo.
|
HeliosSoloDeployment.Builder |
heliosUsername(String username)
Optionally specify the username to be used by the
HeliosClient connected to the
HeliosSoloDeployment created with this Builder. |
HeliosSoloDeployment.Builder |
jobUndeployWaitSeconds(int seconds)
Set the number of seconds Helios solo will wait for jobs to be undeployed and, as a result,
their associated Docker containers to stop running before shutting itself down.
|
HeliosSoloDeployment.Builder |
logStreamProvider(LogStreamFollower logStreamFollower)
Optionally provide a custom
LogStreamFollower that provides streams for writing
container stdout/stderr logs. |
HeliosSoloDeployment.Builder |
namespace(String namespace)
Optionally specify a unique namespace for the Helios solo agent and Docker container names.
|
HeliosSoloDeployment.Builder |
removeHeliosSoloOnExit(boolean enabled)
By default the container running helios-solo is removed when
HeliosSoloDeployment.close() is called. |
public HeliosSoloDeployment.Builder checkForNewImages(boolean enabled)
heliosSoloImage
will be checked for updates before creating a
container by doing a "docker pull". Call this method with "false" to disable this behavior.public HeliosSoloDeployment.Builder removeHeliosSoloOnExit(boolean enabled)
HeliosSoloDeployment.close()
is called. Call this method with "false" to disable this
(which is probably only useful for developing helios-solo or this class itself and
inspecting logs).public HeliosSoloDeployment.Builder jobUndeployWaitSeconds(int seconds)
public HeliosSoloDeployment.Builder dockerClient(com.spotify.docker.client.DockerClient dockerClient)
dockerClient
- A client connected to the Docker instance in which to deploy Helios Solo.public HeliosSoloDeployment.Builder dockerHost(com.spotify.docker.client.DockerHost dockerHost)
DOCKER_HOST
and
DOCKER_CERT_PATH
environment variables will be used. If said variables are not
present sensible defaults will be used.dockerHost
- Docker socket and certificate settings for the host OS.public HeliosSoloDeployment.Builder containerDockerHost(com.spotify.docker.client.DockerHost containerDockerHost)
DOCKER_HOST
and DOCKER_CERT_PATH
environment variables and the
Docker daemon's configuration.containerDockerHost
- Docker socket and certificate settings as seen from inside
the Helios container.public HeliosSoloDeployment.Builder heliosClient(HeliosClient heliosClient)
HeliosClient
. Used for unit tests.heliosClient
- HeliosClientpublic HeliosSoloDeployment.Builder heliosSoloImage(String image)
public HeliosSoloDeployment.Builder namespace(String namespace)
namespace
- A unique namespace for the Helios solo agent and Docker container.public HeliosSoloDeployment.Builder heliosUsername(String username)
HeliosClient
connected to the
HeliosSoloDeployment
created with this Builder. If unset a random string will be
used.username
- The Helios user to identify as.public HeliosSoloDeployment.Builder logStreamProvider(LogStreamFollower logStreamFollower)
LogStreamFollower
that provides streams for writing
container stdout/stderr logs. If set to null, logging of container stdout/stderr will be
disabled.logStreamFollower
- The provider to use.public HeliosSoloDeployment.Builder env(String key, Object value)
key
- Environment variable to set.value
- Environment variable value.public HeliosSoloDeployment build()
HeliosSoloDeployment
using the as specified by
this Builder.Copyright © 2016. All rights reserved.