Resources - Create or Edit a Resource

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

Field Description

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=resourcename command, in the build class’s Resource Request field (on the web interface), or or as the environment variable EMAKE_RESOURCE.

Description

(Optional) Description of the specified resource.

Applicable for static hosts:

Hosts

(If you are using static hosts) One or more static host names. See Host Name Globbing below.

You must configure at least one host or one cloud burst provider (described below).

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 files. 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 ec2 or kubernetes.

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

Credentials

Choose an existing credential set or choose to add a new set.

  • Name —User-defined name for this credential.

  • Description— User-defined description.

  • Type —Choose EC2 ` or `Kubernetes.

For AWS EC2 clusters, as supplied with your EC2 account:

  • Region —Named set of AWS resources in the same geographical area. A region comprises at least two Availability Zones.

  • AWS Access Key ID —Access key ID, which is the unique identifier that is associated with a secret access key. The access key ID and the secret access key are used together to sign programmatic AWS requests cryptographically.

  • AWS Secret Key —Secret access key, which is used in conjunction with the access key ID to cryptographically sign programmatic AWS requests. Signing a request identifies the sender and prevents request alteration. You can generate secret access keys for your AWS account, individual IAM users, and temporary sessions.

For Kubernetes clusters, as supplied with your Kubernetes account:

  • Kubernetes API Endpoint—The endpoint at which the Kubernetes API is reachable. This must be an IP address or a resolvable DNS name in the form: https://ip_address:port_number.

  • User Name —(Optional) The AccountService user who owns the bearer token.

  • Kubernetes Bearer token— Service account bearer token for a service account that has permissions to create resources in the Kubernetes cluster.

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

Kubernetes

Field Description

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. Default is 1 (except for Kubernetes, in which this value is always 1 and is disabled for editing).

Instance Idle Timeout (minutes)

Period of time before idle agents are terminated. After their corresponding cluster resource is done being used, agents become idle and available for a subsequent build. If a new build starts using that resource during idle timeout, idle instances are used and new instances are provisioned if needed. The default is 15 minutes.

EC2

Field or menu Description

Instance Type

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

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.

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.

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 EA-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:EA
As an alternative, you can add these tags to the submitJob.tcl Amazon EC2 cloud provider integration script. For details, see About the Amazon EC2 Cloud Provider Integration Scripts.

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 (except for Kubernetes, in which this value is always 1 and is disabled for editing).

Instance Idle Timeout (minutes)

(Optional) Period of time before idle agents are terminated. After their corresponding cluster resource is done being used, agents become idle and available for a subsequent build. If a new build starts using that resource during idle timeout, idle instances are used and new instances are provisioned if needed. The default is 15 minutes.

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.