Resources - Create or Edit a Resource

8 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

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=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 include:partial$cloud-provider-type-menu-options.adoc[].

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

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 following information based on your provider.

|Field or Menu |Description

|Name |User-defined name for this credential.

|Description |User-defined description.

|Type |One of the following cloud provider cluster types.

Kubernetes, as supplied with your Kubernetes account:

  • Kubernetes API Endpoint — 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) 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.

Azure, available from your Azure portal:

  • Azure API ClientID —Azure Application ID as configured from the Azure App registration page. UUID formatted string.

  • Azure API ClientSecret —Azure Client secret as configured from the Azure App registration page. UUID formatted string.

  • Azure API TenantID —Directory ID from the Azure Active Directory, Default Directory Properties page. UUID formatted string.

  • Azure API SubscriptionID —Visual Studio Professional Subscription ID from the Subscriptions page. UUID formatted string.

EC2, as supplied with your EC2 account:

  • Credential Provider — Choose Access Key ID/Secret Key or Server IAM Role

    If you select Server IAM Role, you can also select No Key Pair from the Key Pair pulldown menu. But this is not recommended, because you cannot SSH to the instance.
    You must set up the appropriate permissions for the IAM role. For the list of required permissions, see Setting Up a Server IAM Role.
  • Region —Named set of AWS resources in the same geographical area. A region comprises at least two Availability Zones.

  • (If you selected Access Key ID/Secret Key ) 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.

  • (If you selected Access Key ID/Secret Key ) 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.

Google Cloud Platform, as supplied with your GCP account:

  • Service Account File —JSON file generated when the private key is created for the service account in the Google Cloud Platform Console. The service account identified by the key pair in the JSON is used. Service account must have Owner permission allocated.

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

Azure Services Platform

Field Description

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. 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.

Google Cloud Platform

Field Description

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. 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.

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. 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 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. 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.