Resources - Create or Edit a Resource

7 minute read

You can create a resource to contain solely static hosts, solely cloud burst hosts, or a combination of each. For more information about resources, the purpose of resources, and a description of static versus cloud burst hosts, see Working with Resources.

Field Descriptions

FieldDescription

Name

Unique name for your resource definition. The name can contain numbers and letters.

This is also the name that you specify in the --emake-resource=resource_name command, in the build class’ Resource Request field (on the web interface), or as the environment variable EMAKE_RESOURCE.

Description

(Optional) Description of the specified resource.

Applicable for static hosts:

Hosts

One or more static host names. See Host Name Globbing below. You must configure at least one static host or one cloud burst provider (as described below).

Leave this field blank if you want to use only cloud bursting instances as agents. Add one or more static agent hosts if you want the build to start faster.

Add Host Mask Pattern

Host name masks follow the same standard globbing rules as Make. Globbing lets you use a pattern to match one or more hosts. Examples are below.

Applicable for cloud burst hosts:

Cloud Burst

(If you are using cloud bursting) Type of cloud provider for the credential. You can select Kubernetes, Azure, EC2, or Google Cloud Platform.

You must configure at least one cloud burst provider or one static host (as described above).

Agent cloud bursting is supported only on Linux platforms. On Windows platforms, this menu is disabled.

Credentials

Choose an existing credential set or choose to add a new set. If you choose an existing credential set, the Cluster Manager tests that it works.

If the test succeeds, the following message appears:

Your credentials successfully connected to AWS.

If the test fails, the following message appears.

Unable to connect to endpoint with specified credentials. Please try again.

If you are creating a credential, supply the information in Create or Edit Cloud Credentials based on your provider.

If the connection is successful, provide additional details as required for the cloud burst model as follows.

Azure Services Platform

FieldDescription

Location

The location of the resource.

Resource Group Name

The name of the resource group.

Virtual Network Name

The name of the virtual network in which subnet will be present.

Image

The name of Azure image with preinstalled agent by demand.

VM Size

The size of the virtual machine.

Storage Account Type

The storage account type for the managed disk. Can be: Standard_LRS, Premium_LRS, StandardSSD_LRS.

Agents Per Instance

Number of agents installed on the image used to create the instance. Default is 1.

Instance Idle Timeout (minutes)

Period of time before idle agents are terminated. When the build finishes, any agents it used are available for use with other builds using the same resource. If no other build uses an agent, that agent becomes idle. If a cloud burst agent is idle for 15 minutes (by default), the instance hosting that agent will be terminated automatically by the Cluster Manager.

Google Cloud Platform

FieldDescription

Image Name

Name of the GCP image with preinstalled agent by demand.

Zone

Deployment area for GCP resources. This is the GCP zone where the cloud burst agents will be started.

Machine Type

Type for a particular collection of virtualized hardware resources available to a virtual machine (VM) instance, including the system memory size, virtual CPU (vCPU) count, and maximum persistent disk capability.

Disk Type

Type of the node VM boot disk to use to create the instance. Select the most appropriate disk type from the provided list .

Extra Metadata

Extra (custom) tags to add to the GCP agent instance at launch time. These tags are visible in the instance properties as custom metadata. These are in addition to CB-Name, which is the tag that Accelerator uses to indicate that it started the instance.

To add extra tags, you set the variable to a comma-separated list of key:value pairs. For example: Name:MyAgent, ProvisionedBy:CB

Agents Per Instance

Number of agents installed on the image used to create the instance. The default is 1.

Instance Idle Timeout (minutes)

Period of time before idle agents are terminated. When the build finishes, any agents it used are available for use with other builds using the same resource. If no other build uses an agent, that agent becomes idle. If a cloud burst agent is idle for 15 minutes (by default), the instance hosting that agent will be terminated automatically by the Cluster Manager.

Kubernetes

FieldDescription

Image Name

This is the image that is used by the resource that you specified via the --emake-resource option when invoking `eMake ` to launch the instance.

Namespace

The name of the Kubernetes namespace within which the deployed services should be discovered. Defaults to the default namespace.

Labels

(Optional) Define and use labels that identify semantic attributes of your application or deployment.

Image Pull Policy

(Optional) The image pull policy and the tag of the image affect when the kubelet attempts to pull the specified image.

Always —the image is pulled every time the pod is started.

If Not Present —the image is pulled only if it is not already present locally.

Never —the image is assumed to exist locally. No attempt is made to pull the image.

Default is Always if :latest label is specified; otherwise, If Not Present. Cannot be updated.

By default, the kubelet tries to pull each image from the specified registry. However, if the Image Pull Policy of the container is set to If Not Present or Never, then a local image is used preferentially or exclusively, respectively.

If you want to rely on pre-pulled images as a substitute for registry authentication, you must ensure all nodes in the cluster have the same pre-pulled images. This can be used to pre-load certain images for speed or as an alternative to authenticating to a private registry.

Agents Per Instance

Number of agents installed on the image used to create the instance. This value is always 1 and is disabled for editing.

Instance Idle Timeout (minutes)

Period of time before idle agents are terminated. When the build finishes, any agents it used are available for use with other builds using the same resource. If no other build uses an agent, that agent becomes idle. If a cloud burst agent is idle for 15 minutes (by default), the instance hosting that agent will be terminated automatically by the Cluster Manager.

EC2

Field or menuDescription

Prefer Spot Instances

If this checkbox is checked, Amazon EC2 Spot Instances will be launched. Spot Instances let you use spare Amazon EC2 computing capacity at a discount versus on-demand pricing. If these launches fail (because your maximum Spot Instance count is exceeded or if sufficient Spot Instances are otherwise unavailable), the Cluster Manager will attempt to launch on-demand Amazon EC2 instances of the same type (such as t2.medium). For details about Spot Instance limits and how to request a limit increase, see the Spot Instance Limits Amazon web page.

If Amazon EC2 reclaims a Spot Instance during a build, the Cluster Manager attempts to launch another Spot Instance to replace it. If that fails, it attempts to launch an on-demand instance to replace it.

Instance Type

Information provided from AWS EC2 specification that defines the memory, CPU, storage capacity, and usage cost for an instance.

Key Pair

Set of security credentials that you use to prove your identity electronically. A key pair consists of a private key and a public key. You use the private key to create a digital signature, and then AWS uses the corresponding public key to validate the signature.

Availability Zone

Distinct location within a region that is insulated from failures in other Availability Zones.

Subnet ID

Segment of the IP address range of a VPC that Amazon EC2 instances can be attached to. You can create subnets to group instances according to security and operational needs.

Security Group

Named set of allowed inbound network connections for an instance. Security groups in Amazon Virtual Private Cloud (VPC) also include support for outbound connections.

AMI

The Amazon EC2 image name that is used to launch cloud burst agent instances.

Extra Tags

Extra (custom) tags to add to the Amazon EC2 agent instance at launch. These tags are visible in the instance settings on AWS. These are in addition to CB-Name, which is the tag that Accelerator uses to indicate that it started the instance.

To add extra tags, you set the variable to a comma-separated list of <key>:<value> pairs. For example: Name:MyAgent, ProvisionedBy:CB

You can also set the Name tag on the instance to a custom name (such as a host name). For details, see Tagging Your Amazon EC2 Resources.

Agents Per Instance

Number of agents installed on the image used to create the instance. Default is 1

Instance Idle Timeout (minutes)

(Optional) Period of time before idle agents are terminated. When the build finishes, any agents it used are available for use with other builds using the same resource. If no other build uses an agent, that agent becomes idle. If a cloud burst agent is idle for 15 minutes (by default), the instance hosting that agent will be terminated automatically by the Cluster Manager.

For more information about Amazon EC2 and the terms used above, see the Amazon Elastic Compute Cloud Documentation.

include:partial$stalled-cloud-agents-note.adoc[]

Host Name Globbing

Glob-Style Pattern Example 1

With the hosts specification below, the build runs with agents on hosts earth, wind, or `fire, ` only. If these hosts are not available, the build waits until they are. If other builds are running on these hosts, Accelerator may move those builds to other hosts to free up agents for this build.

Resource definition:

NameXcard Hostsearth;wind;fire

eMake execution:

--emake-resource=Xcard

If you use the --emake-resource option, it overrides the resource request defined in the --emake-class option if both options exist.

Glob-Style Pattern Example 2

With the hosts specification below, the build runs on host earth, ` only, or hosts whose names start with `asteroid.

Resource Definition:

NameXsoft Hostsearth;asteroid*

Build Class definition:

NameXbuilds Resource RequestXsoft

eMake execution:

--emake-class=Xbuilds

If you use the --emake-resource option, it overrides the resource request defined in the --emake-class option if both options exist.