replicas is a resource that holds the number of instances of the container to deploy. It is used specifically to deploy Docker containers
You can create a
replicas resource by adding it to
resources: - name: <string> type: replicas version: <object>
name-- should be an easy to remember text string
type-- is set to
version-- is an object that contains specific properties that apply to this resource. Any time this is changed in the YML, a new version of the resource will be created.
version: count: 1 #integer value > 0
Used in Jobs
This resource is used as an
IN for the following jobs:
Default Environment Variables
replicas is used as an
OUT for a job that can execute user defined scripts, a set of environment variables are configured by the platform that may be useful to set the context before user defined scripts execute as part of the job. These variables are available when this resource is used.
<NAME> is the the friendly name of the resource.
||The name of the resource.|
||The ID of the resource.|
||The type of the resource. In this case
||The operation of the resource; either
||The directory containing files for the resource.|
||SourceName defined in the pointer.|
||The count defined in the version.|
||The ID of the version of the resource being used.|
||The number of the version of the resource being used.|
Shippable Utility Functions
To make it easy to use these environment variables, the platform provides a command line utility that can be used to work with these values.
How to use these utility functions is documented here.