Closed Bug 1580434 Opened 6 years ago Closed 6 years ago

support zone & region token/placeholders in worker pool definition

Categories

(Taskcluster :: Services, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: grenade, Assigned: bstack)

Details

Attachments

(2 files, 1 obsolete file)

at: https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates, the disk definition parameters are described and include: properties.disks[].initializeParams.diskType which is used to define the disk type. if this property is omitted, google defaults to a disk type of pd-standard.

since we prefer to use a disk type of pd-ssd to keep build times down, it is necessary for us to define this property.

unfortunately all of the syntax formats accepted by gcloud for defining this property expect to find a zone identifier preceding pd-ssd.

when we are defining worker pools, the definition may span multiple zones and regions, so we don't have a way to specify that we want to use ssd's while at the same time specifying a worker pool that can take advantage of multiple zones.

to work around this, it would be useful if the worker pool definition could include a zone placeholder. something like what is conveyed below:

  "disks": [
    {
      "type": "PERSISTENT",
      "boot": true,
      "autoDelete": true,
      "initializeParams": {
        "sourceImage": "projects/windows-cloud/global/images/family/windows-2012-r2",
        "diskSizeGb": 50,
        "diskType": "zones/{{zone-placeholder}}/diskTypes/diskType/pd-ssd"
      }
    },
    {
      "type": "PERSISTENT",
      "autoDelete": true,
      "initializeParams": {
        "diskSizeGb": 120,
        "diskType": "zones/{{zone-placeholder}}/diskTypes/diskType/pd-ssd"
      }
    }
  ],

of course, the worker manager would then have to fill in the zone information when spawning the instance later.

Assignee: nobody → bstack

windows workers now also need to run on a dedicated vpc (bug 1531371) which has region specific identifiers in the network config. eg:

  "networkInterfaces": [
    {
      "kind": "compute#networkInterface",
      "subnetwork": "projects/moz-fx-taskcl-winvpchost-3f31/regions/us-west1/subnetworks/kms-us-west1",
      "accessConfigs": [
        {
          "type": "ONE_TO_ONE_NAT"
        }
      ]
    }
  ],

we'll need a way to define these in the worker manager without specifying the cloud region. eg:

  "networkInterfaces": [
    {
      "kind": "compute#networkInterface",
      "subnetwork": "projects/moz-fx-taskcl-winvpchost-3f31/regions/{{region-placeholder}}/subnetworks/kms-{{region-placeholder}}",
      "accessConfigs": [
        {
          "type": "ONE_TO_ONE_NAT"
        }
      ]
    }
  ],
Summary: support a zone token/placeholder in worker pool disk definition → support zone & region token/placeholders in worker pool disk definition
Summary: support zone & region token/placeholders in worker pool disk definition → support zone & region token/placeholders in worker pool definition

We're going to support this by allowing an array of valid definitions basically. I'm working on this today since we need it for disks as well.

Status: NEW → ASSIGNED

https://github.com/taskcluster/taskcluster/pull/1540

Will start on a ci-config patch that updates everything to this format with the hope that this patch lands. If all goes smoothly, we could be ready to support zone-specific things by tomorrow evening.

Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED

correction to disk type uri

Attachment #9100444 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: