# parsl.providers.GoogleCloudProvider

class parsl.providers.GoogleCloudProvider(project_id, key_file, region, os_project, os_family, google_version='v1', instance_type='n1-standard-1', init_blocks=1, min_blocks=0, max_blocks=10, launcher=SingleNodeLauncher(), parallelism=1)

  A provider for using resources from the Google Compute Engine.

  Parameters:

    - project_id (str) – Project ID from Google compute engine.

    - key_file (str) – Path to authorization private key json file. This is required for auth. A new one can be generated here: https://console.cloud.google.com/apis/credentials

    - region (str) – Region in which to start instances

    - os_project (str) – OS project code for Google compute engine.

    - os_family (str) – OS family to request.

    - google_version (str) – Google compute engine version to use. Possibilies include ‘v1’ (default) or ‘beta’.

    - instance_type (str) – ‘n1-standard-1’,

    - init_blocks (int) – Number of blocks to provision immediately. Default is 1.

    - min_blocks (int) – Minimum number of blocks to maintain. Default is 0.

    - max_blocks (int) – Maximum number of blocks to maintain. Default is 10.

    - parallelism (float) – Ratio of provisioned task slots to active tasks. A parallelism value of 1 represents aggressive scaling where as many resources as possible are used; parallelism close to 0 represents the opposite situation in which as few resources as possible (i.e., min_blocks) are used.

  __init__(project_id, key_file, region, os_project, os_family, google_version='v1', instance_type='n1-standard-1', init_blocks=1, min_blocks=0, max_blocks=10, launcher=SingleNodeLauncher(), parallelism=1)

  Methods

  `__init__`(project_id, key_file, region, ...) |
  `bye`() |
  `cancel`(job_ids) | Cancels the resources identified by the job_ids provided by the user.
  `create_instance`([command]) |
  `delete_instance`(name) |
  `get_zone`(region) |
  `status`(job_ids) | Get the status of a list of jobs identified by the job identifiers returned from the submit request.
  `submit`(command, tasks_per_node[, job_name]) | The submit method takes the command string to be executed upon instantiation of a resource most often to start a pilot.

  Attributes

  `status_polling_interval` |

  bye()
  cancel(job_ids)

    Cancels the resources identified by the job_ids provided by the user.

    Parameters:

      job_ids (-) – A list of job identifiers

    Returns:

      - A list of status from cancelling the job which can be True, False

    Raises:

      - ExecutionProviderException or its subclasses –

  create_instance(command='')
  delete_instance(name)
  get_zone(region)
  status(job_ids)

    Get the status of a list of jobs identified by the job identifiers returned from the submit request.

    Parameters:

      job_ids (-) – A list of job identifiers

    Returns:

      - A list of JobStatus objects corresponding to each job_id in the job_ids list.

    Raises:

      - ExecutionProviderException or its subclasses –

  property status_polling_interval
  submit(command, tasks_per_node, job_name='parsl.gcs')

    The submit method takes the command string to be executed upon instantiation of a resource most often to start a pilot.

    Args :

      - command (str) : The bash command string to be executed.

      - tasks_per_node (int) : command invocations to be launched per node

    KWargs:

      - job_name (str) : Human friendly name to be assigned to the job request

    Returns:

      - A job identifier, this could be an integer, string etc

    Raises:

      - ExecutionProviderException or its subclasses –