Container Deployment Configuration
Deployment configuration is essential to managing the granular actions the container will take in response to different events like starting, stopping, reporting, health checks, and more.
Initial Instances
Initial instances refers to the number of instances to create during the container create process.
Deployment Strategy
Get full info on deployment strategies here
Function
For function containers, there is additional settings available:
Field | Description |
---|---|
Max Pool Size | The maximum number of instances that Cycle can pre-allocate (includes auto-scaled instances). |
Max Shard Concurrency | For each shard (scheduler), the maximum number of tasks it can run in parallel. |
Max Runtime | The maximum amount of time a function instance can run before timing out. |
Max Queue Time | The maximum amount of time Cycle will wait for an instance to be available. |
Constraints
The constraints form has two way to tag container instances:
Field | Description |
---|---|
Tags Any | A list of tags for the instance. If a server matches any tag in the list, that server becomes a viable candidate for the instances. |
Tags All | A list of tags for the instance. A server must match every tag on the list in order to become a viable candidate for the instances. |
Startup Policy
A delay, in a time string (ex: 1h30m24s), that Cycle will wait before sending the start signal to this container upon environment start.
Shutdown Policy
Information on how Cycle should handle a shutdown signal.
Graceful Timeout - A time string (ex: 1h30m24s) the platform will wait for a container to stop gracefully.
Restart Policy
Information about how Cycle should handle a restart event.
Field | Description |
---|---|
Restart Condition | If the container fails, under what conditions should Cycle attempt a restart. |
Delay | A time string (ex: 1h30m24s) for how long to wait between restart attempts. |
Max Restart | The maximum number of times to try and restart this container. |
Update
This setting is used to configure behavior of the container instances on "update" (reimage). The main setting is "Stagger", which, when set, will cause the platform to pick a random time from 0 - this duration. This stagger is applied to the instances so they all re-start at different times (up to the time specified here).
Reimage & Downloads
When reimaging a container, the Cycle platform will fully download the image to the server before the reimage step is executed.
Health Check Policy
Commands and instructions Cycle will run to verify container health.
Field | Description |
---|---|
Command | The command to run; success will mean that the container is healthy, and error will mean that it is not. |
Retries | How many times to try the command. |
Delay | How long to wait before performing an initial health check when the instance starts. The state of the instance will be null until the first check is performed. |
Interval | A time string between tries to wait before trying again. |
Timeout | A time string that indicates the amount of time to wait before assuming the command has failed. |
Restart on Fail | If checked, when the container enters the unhealthy state, it will automatically restart. |
Command Syntax
Use ""
quotes to wrap the script for inline scripting. Writing something
like sh -c "script here"
will not work correctly because of the way the sh
shell exits.
Health State
To learn more about the health state of the container instances as they respond to health checks check the Instances API Docs . Here users can expand the data
object, then state
, and finally health
to get an idea of what the health states mean.
More advanced uses may use this information to build a healthiness probe for their instances.
Telemetry
Settings for to collect telemetry data.
Field | Description |
---|---|
Retention | A time string (ex: 1h30m24s) for how long the platform will retain telemetry for a given instance. |
Interval | A time string (ex: 1h30m24s) that represents how much time each telemetry report will cover. |
WebHook | A URL that Cycle will post telemetry reports to. |
Disable Telemetry | If checked, this will disable all telemetry reporting for this container. |