skyplane.api.provisioner#
Classes
|
Launches a single VM provisioning job. |
|
Dataclass to track a single VM provisioning job. |
- class skyplane.api.provisioner.Provisioner(aws_auth=None, azure_auth=None, gcp_auth=None, host_uuid=None, ibmcloud_auth=None)[source]#
Bases:
object
Launches a single VM provisioning job.
- Parameters:
aws_auth (compute.AWSAuthentication) – authentication information for aws
azure_auth (compute.AzureAuthentication) – authentication information for azure
gcp_auth (compute.GCPAuthentication) – authentication information for gcp
host_uuid (string) – the uuid of the local host that requests the provision task
ibmcloud_auth (compute.IBMCloudAuthentication) – authentication information for aws
- add_task(cloud_provider, region, vm_type, spot=False, autoterminate_minutes=None, tags=None)[source]#
Add a provision task
- Parameters:
cloud_provider (str) – the name of the cloud provider to provision gateways
region (str) – the name of the cloud region to provision gateways
vm_type (str) – the type of VMs to provision in that cloud region
spot (bool) – whether to use the spot instances
autoterminate_minutes (int) – terminate the VMs after this amount of time (default: None)
tags (dict) – a list of tags with identifications such as hostid
- deprovision(deauthorize_firewall=True, max_jobs=64, spinner=False)[source]#
Deprovision all nodes. Returns UUIDs of deprovisioned VMs.
- get_node(uuid)[source]#
Returns a provisioned VM
- Parameters:
uuid (str) – the uuid of the provision task
- Return type:
Server
- init_global(aws=True, azure=True, gcp=True, ibmcloud=True)[source]#
Initialize the global cloud providers by configuring with credentials
- class skyplane.api.provisioner.ProvisionerTask(cloud_provider, region, vm_type, spot=False, autoterminate_minutes=None, tags=<factory>, uuid=<factory>)[source]#
Bases:
object
Dataclass to track a single VM provisioning job.
- Parameters:
cloud_provider (str) – the name of the cloud provider to provision gateways
region (str) – the name of the cloud region to provision gateways
vm_type (str) – the type of VMs to provision in that cloud region
spot (bool) – whether to use the spot instances
autoterminate_minutes (int) – terminate the VMs after this amount of time (default: None)
tags (dict) – a list of tags with identifications such as hostid
uuid (str) – the uuid of the local host that requests the provision task