m1yag1.globus.globus_compute module – Manage Globus Compute Endpoints and Functions
Note
This module is part of the m1yag1.globus collection (version 0.6.0).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install m1yag1.globus.
To use it in a playbook, specify: m1yag1.globus.globus_compute.
New in m1yag1.globus 1.0.0
Synopsis
Create, update, or delete Globus Compute Endpoints
Register and manage Globus Compute Functions
Configure compute endpoint settings and executors
Support for High Assurance endpoints and functions
System-level multi-user endpoint management (setup/teardown)
Parameters
Parameter |
Comments |
|---|---|
Authentication method to use. If not specified, auto-detects based on available credentials. When Otherwise falls back to Choices:
|
|
Authentication policy ID for HA endpoints |
|
Globus Auth client ID for client_credentials authentication. Can also be set via the |
|
Globus Auth client secret for client_credentials authentication. Can also be set via the |
|
Conda environment to use |
|
Description of the compute endpoint |
|
UUID of the endpoint (for updates or function registration) |
|
Root directory for endpoint configurations (for system-level management) Default: |
|
Type of executor to use Choices:
|
|
Python function code as a string (for resource_type=function) |
|
Path to Python file containing the function (for resource_type=function) |
|
UUID of the function (for updates/deletes) |
|
Path to Globus virtualenv (for system-level management) Default: |
|
Enable high assurance for this endpoint Choices:
|
|
Manage system-level multi-user endpoint (not just API registration) Choices:
|
|
Maximum number of workers Default: |
|
Name of the compute endpoint or function |
|
Provider configuration |
|
Whether the endpoint should be public Choices:
|
|
Type of resource to manage Choices:
|
|
Desired state of the resource Choices:
|
|
Globus subscription ID for HA endpoints |
|
Worker initialization script |
Notes
Note
Authentication is required for all Globus API operations.
For
client_credentialsauth, register a confidential client at https://developers.globus.org.For
cliauth, runglobus loginfirst to cache tokens.The
climethod reads tokens from~/.globus/cli/storage.db.For
cliauth with multiple profiles, setGLOBUS_PROFILEenvironment variable.Set
GLOBUS_SDK_ENVIRONMENTtosandboxortestfor non-production environments.
See Also
See also
- Globus Auth Documentation
Official Globus authentication documentation
- Globus CLI
Command-line interface for Globus
Examples
- name: Create a Globus Compute endpoint
globus_compute:
name: "research-cluster"
description: "Research cluster compute endpoint"
public: false
executor_type: "HighThroughputExecutor"
max_workers: 4
conda_env: "my-env"
provider:
type: "LocalProvider"
init_blocks: 1
max_blocks: 2
state: present
- name: Create a High Assurance Compute endpoint
globus_compute:
resource_type: endpoint
name: "ha-endpoint"
description: "High assurance compute endpoint"
public: false
subscription_id: "923ac990-9914-11ed-af9f-c53a64a5b6b4"
high_assurance: true
authentication_policy_id: "{{ auth_policy_id }}"
executor_type: "HighThroughputExecutor"
max_workers: 2
state: present
- name: Register a function on HA endpoint
globus_compute:
resource_type: function
name: "my_test_function"
endpoint_id: "{{ ha_endpoint_id }}"
description: "Test function for HA endpoint"
function_code: |
def my_test_function(x):
return x * 2
state: present
- name: Register function from file
globus_compute:
resource_type: function
name: "data_processor"
endpoint_id: "{{ endpoint_id }}"
function_file: "/path/to/function.py"
state: present
- name: Delete a compute endpoint
globus_compute:
name: "old-endpoint"
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Whether the resource was changed Returned: always |
|
ID of the created/managed compute endpoint Returned: when state=present and resource_type=endpoint |
|
ID of the registered function Returned: when state=present and resource_type=function |
|
Name of the compute endpoint or function Returned: always |