Yeedu Commands
Yeedu CLI(Command Line Interface) is a standard CLI to run interactively with Yeedu's RESTful-API. 2-commands-helper
Table of Contents
- Authentication Setup
- Resources
- Lookup
- list-providers
- get-provider
- list-provider-availability-zones
- get-provider-availability-zone
- list-provider-machine-types
- get-provider-machine-type
- list-disk-machine-types
- list-credential-types
- list-engine-cluster-instance-status
- list-spark-compute-types
- list-spark-infra-versions
- list-spark-job-status
- list-workflow-execution-states
- list-workflow-types
- Volume Configuration
- Network Configuration
- Boot Disk Image Config
- Machine Configuration
- Credentials Configuration
- Object Storage Manager
- Object Storage Manager Files
- Hive Metastore Configuration
- Cluster
- Cluster Configuration
- Cluster Instance
- Job
- Spark Job Configuration
- Spark Job Instance
- Workflow Details By Spark Job Application ID
- IAM (Identity and Access Management)
- User
- Shared Platform and Admin
- Lookup
- Platform-Admin
- Tenant
- User
- Group
- Admin
- User
- Group
Configure
yeedu configure -h
Yeedu CLI
positional arguments:
{configure}
options:
-h, --help Show this help message and exit.
--timeout [TIMEOUT] Provide token expiration timeout in hour Example: --timeout=24,
--timeout=infinity (infinity for no expiration time) to
generate Yeedu Token. (default: 48)
--json-output [{pretty,default}]
Provide the format of JSON output. (default: pretty)
--yaml-output [{true,false}]
Provide true to get output in YAML format. (default: false)
- User can provide the file path to stored the configured token using the environment variable
YEEDU_RESTAPI_TOKEN_FILE_PATH.- For example
YEEDU_RESTAPI_TOKEN_FILE_PATH="/home/user/Documents/YeeduToken/{FileName}"
- For example
- configure example with optional argument passed.
yeedu configure --timeout=72
- Console output
{
"message": "The token has been configured for the username: USER and stored at location: /home/user/.yeedu/yeedu_cli.config"
}
The generated token will be used internally for accessing the yeedu features based on the acess level provided to the given username
- To list the tenants a user has access to, execute the
yeedu iam list-tenantscommand.
list-tenants
yeedu iam list-tenants -h
usage: list-tenants [-h] [--json-output [{pretty,default}]]
[--yaml-output [{true,false}]]
options:
-h, --help show this help message and exit
--json-output [{pretty,default}]
Provide the format of JSON output. (default: pretty)
--yaml-output [{true,false}]
Provide true to get output in YAML format. (default: false)
- list-tenants example without optional arguments passed for output format.
yeedu iam list-tenants
- Console output
[
{
"tenant_id": "0b5017a9-6099-497f-81ba-d4e537e23538",
"name": "tenant1",
"description": "Yeedu Tenant 1"
},
{
"tenant_id": "066a702d-6b9d-4176-afc5-51c24a651739",
"name": "tenant2",
"description": "Yeedu Tenant 2"
},
{
"tenant_id": "328aba9a-92ac-458d-8c27-fe9ea6e5e9ab",
"name": "tenant3",
"description": "Yeedu Tenant 3"
},
{
"tenant_id": "6b682ef1-ede4-4d96-bab6-cd008aadd534",
"name": "tenant4",
"description": "Yeedu Tenant 4"
}
]
- Execute
yeedu iam associate-tenant --tenant_id={tenant_id}to associate a tenant id from theyeedu iam list-tenantsresponse to the session token.
associate-tenant
yeedu iam associate-tenant -h
usage: associate-tenant [-h] --tenant_id TENANT_ID [--json-output [{pretty,default}]]
[--yaml-output [{true,false}]]
options:
-h, --help show this help message and exit
--tenant_id TENANT_ID
Provide tenant_id to associate it with session token
--json-output [{pretty,default}]
Provide the format of JSON output. (default: pretty)
--yaml-output [{true,false}]
Provide true to get output in YAML format. (default: false)
- associate-tenant example with required argument '--tenant_id' passed.
yeedu iam associate-tenant --tenant_id="0b5017a9-6099-497f-81ba-d4e537e23538"
- Console output
{
"message": "Successfully associated Tenant"
}
Resources
Lookup
| Command Name | Utility |
|---|---|
| list-providers | To get information about all Cloud Providers. |
| get-provider | To get information about a specific Cloud Provider. |
| list-provider-availability-zones | To get information about Availability Zones for a specific Cloud Provider. |
| get-provider-availability-zone | To get information about a specific Availability Zone for a specific Cloud Provider. |
| list-provider-machine-types | To get information about Machine Types for a specific Cloud Provider. |
| get-provider-machine-type | To get information about a specific Machine Type for a specific Cloud Provider. |
| list-disk-machine-types | To get information about all disk machine types. |
| list-credential-types | To get information about all credential types. |
| list-engine-cluster-instance-status | To get information about all available engine cluster instance status. |
| list-spark-compute-types | To get information about all spark compute types. |
| list-spark-infra-versions | To get information about spark infra version. |
| list-spark-job-status | To get information about spark job status. |
| list-workflow-execution-states | To get information about workflow execution state. |
| list-workflow-types | To get information about workflow type. |
list-providers
yeedu resource list-providers -h
usage: list-providers [-h] [--json-output [{pretty,default}]]
[--yaml-output [{true,false}]]
options:
-h, --help show this help message and exit
--json-output [{pretty,default}]
Provide the format of JSON output. (default: pretty)
--yaml-output [{true,false}]
Provide true to get output in YAML format. (default: false)
- list-providers example without any optional argument passed for output format.
yeedu resource list-providers
- Console output
[
{
"cloud_provider_id": "0",
"name": "gcp",
"description": "Provider for creating infrastructure on Google Cloud Platform",
"from_date": "2023-07-14T13:44:16.300Z",
"to_date": null
},
{
"cloud_provider_id": "1",
"name": "aws",
"description": "Provider for creating infrastructure on Amazon Web Services",
"from_date": "2023-07-14T13:44:16.300Z",
"to_date": null
},
{
"cloud_provider_id": "2",
"name": "azure",
"description": "Provider for creating infrastructure on Azure Cloud Platform",
"from_date": "2023-07-14T13:44:16.300Z",
"to_date": null
}
]
get-provider
yeedu resource get-provider -h
usage: get-provider [-h] --cloud_provider_id CLOUD_PROVIDER_ID
[--json-output [{pretty,default}]] [--yaml-output [{true,false}]]
options:
-h, --help show this help message and exit
--cloud_provider_id CLOUD_PROVIDER_ID
Provide specific cloud provider id to get-provider.
--json-output [{pretty,default}]
Provide the format of JSON output. (default: pretty)
--yaml-output [{true,false}]
Provide true to get output in YAML format. (default: false)
- get-provider example with required '--cloud_provider_id' argument passed.
yeedu resource get-provider --cloud_provider_id=0
- Console output
{
"cloud_provider_id": "0",
"name": "gcp",
"description": "Provider for creating infrastructure on Google Cloud Platform",
"from_date": "2023-07-14T13:44:16.300Z",
"to_date": null
}
list-provider-availability-zones
yeedu resource list-provider-availability-zones -h
usage: list-provider-availability-zones [-h] --cloud_provider_id CLOUD_PROVIDER_ID
[--json-output [{pretty,default}]]
[--yaml-output [{true,false}]]
options:
-h, --help show this help message and exit
--cloud_provider_id CLOUD_PROVIDER_ID
Provide specific Cloud Provider id to list-provider-
availability-zones.
--json-output [{pretty,default}]
Provide the format of JSON output. (default: pretty)
--yaml-output [{true,false}]
Provide true to get output in YAML format. (default: false)
- list-provider-availability-zones example with required '--cloud_provider_id' argument passed.
yeedu resource list-provider-availability-zones --cloud_provider_id=0
- Console output
[
{
"availability_zone_id": "0",
"cloud_provider": {
"name": "gcp",
"description": "Provider for creating infrastructure on Google Cloud Platform"
},
"name": "asia-east1-a",
"region": "asia-east1",
"description": "Changhua County, Taiwan, APAC",
"from_date": "2023-07-14T13:44:19.583Z",
"to_date": null
},
...
{
"availability_zone_id": "102",
"cloud_provider": {
"name": "gcp",
"description": "Provider for creating infrastructure on Google Cloud Platform"
},
"name": "us-south1-c",
"region": "us-south1",
"description": "Dallas, Texas, North America",
"from_date": "2023-07-14T13:44:19.583Z",
"to_date": null
}
]
get-provider-availability-zone
yeedu resource get-provider-availability-zone -h
usage: get-provider-availability-zone [-h] --cloud_provider_id CLOUD_PROVIDER_ID
--availability_zone_id AVAILABILITY_ZONE_ID
[--json-output [{pretty,default}]]
[--yaml-output [{true,false}]]
options:
-h, --help show this help message and exit
--cloud_provider_id CLOUD_PROVIDER_ID
Provide specific cloud provider id to get-provider-availability-
zone.
--availability_zone_id AVAILABILITY_ZONE_ID
Provide specific Availability Zone id to get-provider-
availability-zone.
--json-output [{pretty,default}]
Provide the format of JSON output. (default: pretty)
--yaml-output [{true,false}]
Provide true to get output in YAML format. (default: false)
- get-provider-availability-zone example with required arguments passed.
yeedu resource get-provider-availability-zone --cloud_provider_id=1 --availability_zone_id=116
- Console output
{
"availability_zone_id": "116",
"cloud_provider": {
"name": "aws",
"description": "Provider for creating infrastructure on Amazon Web Services"
},
"name": "Canada",
"region": "ca-central-1",
"description": "central",
"from_date": "2023-07-14T13:44:19.583Z",
"to_date": null
}
list-provider-machine-types
yeedu resource list-provider-machine-types -h
usage: list-provider-machine-types [-h] --cloud_provider_id CLOUD_PROVIDER_ID
[--json-output [{pretty,default}]]
[--yaml-output [{true,false}]]
options:
-h, --help show this help message and exit
--cloud_provider_id CLOUD_PROVIDER_ID
Provide specific cloud provider id to list-provider-machine-
types.
--json-output [{pretty,default}]
Provide the format of JSON output. (default: pretty)
--yaml-output [{true,false}]
Provide true to get output in YAML format. (default: false)
- list-provider-machine-types example with required '--cloud_provider_id' argument passed.
yeedu resource list-provider-machine-types --cloud_provider_id=0
- Console output
[
{
"machine_type_id": "0",
"cloud_provider": {
"name": "gcp",
"description": "Provider for creating infrastructure on Google Cloud Platform"
},
"name": "a2-highgpu-1g",
"vcpus": 12,
"memory": "85 GiB",
"has_cuda": false,
"gpu_model": null,
"gpus": null,
"gpu_memory": null,
"from_date": "2023-07-14T13:44:18.310Z",
"to_date": null
},
...
{
"machine_type_id": "723",
"cloud_provider": {
"name": "gcp",
"description": "Provider for creating infrastructure on Google Cloud Platform"
},
"name": "n1-standard-4-4g",
"vcpus": 4,
"memory": "15 GiB",
"has_cuda": true,
"gpu_model": "nvidia-tesla-t4",
"gpus": 4,
"gpu_memory": "64 GB GDDR6",
"from_date": "2023-07-14T13:44:18.310Z",
"to_date": null
}
]
get-provider-machine-type
yeedu resource get-provider-machine-type -h
usage: get-provider-machine-type [-h] --cloud_provider_id CLOUD_PROVIDER_ID
--machine_type_id MACHINE_TYPE_ID
[--json-output [{pretty,default}]]
[--yaml-output [{true,false}]]
options:
-h, --help show this help message and exit
--cloud_provider_id CLOUD_PROVIDER_ID
Provide specific cloud provider id to get-provider-machine-type.
--machine_type_id MACHINE_TYPE_ID
Provide specific machine type id to get-provider-machine-type.
--json-output [{pretty,default}]
Provide the format of JSON output. (default: pretty)
--yaml-output [{true,false}]
Provide true to get output in YAML format. (default: false)
- get-provider-machine-type example with all the required arguments passed.
yeedu resource get-provider-machine-type --cloud_provider_id=0 --machine_type_id=108
- Console output
{
"machine_type_id": "108",
"cloud_provider": {
"name": "gcp",
"description": "Provider for creating infrastructure on Google Cloud Platform"
},
"name": "n2d-highmem-64",
"vcpus": 64,
"memory": "512 GiB",
"has_cuda": false,
"gpu_model": null,
"gpus": null,
"gpu_memory": null,
"from_date": "2023-07-14T13:44:18.310Z",
"to_date": null
}
list-disk-machine-types
yeedu resource list-disk-machine-types -h
usage: list-disk-machine-types [-h] [--json-output [{pretty,default}]]
[--yaml-output [{true,false}]]
options:
-h, --help show this help message and exit
--json-output [{pretty,default}]
Provide the format of JSON output. (default: pretty)
--yaml-output [{true,false}]
Provide true to get output in YAML format. (default: false)
- list-disk-machine-types example without optional argument passed for output format.
yeedu resource list-disk-machine-types
- Console output
[
{
"disk_type_id": "0",
"cloud_provider": {
"name": "gcp",
"description": "Provider for creating infrastructure on Google Cloud Platform"
},
"name": "pd-ssd",
"has_fixed_size": false,
"min_size": 10,
"max_size": 64000,
"from_date": "2023-07-14T13:44:19.081Z",
"to_date": null
},
...
{
"disk_type_id": "15",
"cloud_provider": {
"name": "azure",
"description": "Provider for creating infrastructure on Azure Cloud Platform"
},
"name": "UltraSSD_LRS",
"has_fixed_size": false,
"min_size": 4,
"max_size": 65536,
"from_date": "2023-07-14T13:44:19.081Z",
"to_date": null
}
]
list-credential-types
yeedu resource list-credential-types -h
usage: list-credential-types [-h] [--json-output [{pretty,default}]]
[--yaml-output [{true,false}]]
options:
-h, --help show this help message and exit
--json-output [{pretty,default}]
Provide the format of JSON output. (default: pretty)
--yaml-output [{true,false}]
Provide true to get output in YAML format. (default: false)
- list-credential-types example without optional argument passed for output format.
yeedu resource list-credential-types
- Console output
[
{
"credential_type_id": "0",
"name": "gcp",
"cloud_provider": {
"name": "gcp",
"description": "Provider for creating infrastructure on Google Cloud Platform"
},
"from_date": "2023-07-14T13:44:17.305Z",
"to_date": null
},
{
"credential_type_id": "1",
"name": "aws",
"cloud_provider": {
"name": "aws",
"description": "Provider for creating infrastructure on Amazon Web Services"
},
"from_date": "2023-07-14T13:44:17.305Z",
"to_date": null
},
{
"credential_type_id": "2",
"name": "azure",
"cloud_provider": {
"name": "azure",
"description": "Provider for creating infrastructure on Azure Cloud Platform"
},
"from_date": "2023-07-14T13:44:17.305Z",
"to_date": null
}
]