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)[source]

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.
:param .. code:: python: +——————

script_string ——->| submit
id <——–|—+

[ ids ] ——->| status [statuses] <——–|—-+


[ ids ] ——->| cancel [cancel] <——–|—-+


+——————-

__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)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(project_id, key_file, region, …) Initialize self.
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

current_capacity Returns the number of currently provisioned blocks.
GoogleCloudProvider.scaling_enabled