Skip to content

Resources Commands

About SSH Key

The SSH Key is used for git clone commands and for connecting to virtual machines. By default, your default SSH key (stored in ~/.ssh/id_rsa) will be used.

Commands

This ml resources command group provides facilities for the management of resources.

The following commands are available with ml resources:

aws

Command group for authorizing MissingLink resource management to access an AWS account using standard AWS cross-account authorization.

The following flags are available with the ml resources aws command:

  • --region TEXT

    AWS region to use

The basic authorization command is:

ml resources aws init

The following flags are available with the command:

  • --org TEXT

    Organization to use

  • --ssh-key-path TEXT

    SSH Key to use for git clone commands and for connecting to virtual machines. By default, your default SSH key (stored in ~/.ssh/id_rsa) will be used.

azure

Command group for authorizing MissingLink resource management to access an Azure account.

The following flag is available with the ml resources azure command:

  • --location TEXT

    Azure location to use

The basic authorization command is:

ml resources azure init

The following flags are available with the ml resources azure init command:

  • --location TEXT

    Azure location to use

group

Provides facilities for configuring resource groups.

The following flags are available with the ml resources group command:

  • --org TEXT

    Organization to use

  • --json TEXT

    Output data in JSON format

  • --advanced TEXT

    Shows advanced configuration parameters as well.

  • --no-defaults (default)/--show-defaults

    Shows default values as well.

  • --update (default)/--create

    Creates new group or updates existing group.

  • --no-description (default)/--show-description

    Shows or hides parameter descriptions.

  • --configured-only (default)/--configured-and-defaults

    Shows only parameters with configured values.

  • --set TEXT TEXT

    Sets or resets a parameter value. Some parameters can be specified multiple times for arrays. If you set it to "None", you can remove a configured option.

    See Parameters for --set and --unset flags.

  • --unset TEXT TEXT

    Reverts a parameter to its previous setting, before it was set with --set.

    If the same parameter is specified in both --set and --unset, it will be unset.

    See Parameters for --set and --unset flags.

Parameters for --set and --unset flags

The following are the parameters available for the --set and --unset flags. Examples follow.

ami-id

Defines the AMI (Amazon Machine Image) to be used by the instance. Ensure that the AMI is in the same region as the subnet that is being used.

default-security-group

Defines the default security group that allows outbound internet access.

  • Default value: MissingLink provides a default managed security group.
disabled

Indicates whether this group and its resources should be assigned new resources. Specifying True will also enable administratively disabled group.

  • Default value: False
  • Possible values: True or False
disk-size

Defines the size (in GB) of the disk to attach to the instance.

  • Default value: 100
  • Possible values: Positive integers
gpu

Indicates whether this resource group will process GPU jobs. Otherwise it will be assigned with CPU jobs.

  • Default value: True
  • Possible values: True or False
group-capacity

Defines the maximum number of servers to be launched in this resource group.

  • Default value: 1
  • Possible values: Positive integers
idle-timeout

Defines the number of minutes during which the machine can be idle before MissingLink shuts it down.

  • Default value: 10
  • Possible values: Positive integers
instance-profile

Defines a role to be applied to the instance. Should grant access to the KMS (Key Management Server) key, ECR (Elastic Container Registry) and S3 buckets.

  • Default value: MissingLink provides a default managed instance profile.
instance-type

Defines the instance type. The type you specify determines the hardware to be used in the host machine used for your instance.

  • Default value: p3.2xlarge
iops

Defines IOPS to provision to the instance. If not specified, gp2 disks will be used.

key-pair-name

Key pair used for creating instances. This value will be overridden if an ssh-keys array is provided.

  • Default value: null
kms-arn

Defines the ARN of the KMS key to be used for encrypting (and decrypting) sensitive data. Changing this will require resubmission of SSH and MissingLink CLI keys using the CLI on an authorized computer.

  • Default value: MissingLink provides a default managed KMS.
monitoring

Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

  • Default value: False
  • Possible values: True or False
priority

Defines the group's priority in processing new jobs. A group with higher priority will process the job before a group with lower priority.

  • Default value: 100
  • Possible values: Positive integers
queue (group)

Defines the queue in which to run the resource group.

security-groups

Defines additional security groups to be attached to created instances.

  • Default value: [] (empty array)
spot-price

Defines the maximum price per hour that you're willing to pay for the spot instances. In case of on-demand instances, use the value None.

  • Default value: null
  • Possible values: Positive floats
ssh-keys

Defines public keys that will have access to the machine. This setting overrides key-pair-name. Multiple keys can be provided.

  • Default value: MissingLink provides a default managed SSH key.
  • Possible values: In case null is provided, MissingLink will not pre-deploy SSH key to the machine and use key-pair-name.
ssh-security-group

Defines the security group that allows inbound SSH connections. The group must be in the same VPC (virtual private cloud) as the subnet.

  • Default value: MissingLink provides a default managed SSH security group.
  • Possible values: In case null is provided, MissingLink will not attach an SSH security group to the machine.
subnet

Defines the Id of the subnet to launch the instance into. Effectively specifies VPC (virtual private cloud) and availability zone.

  • Default value: MissingLink provides a default managed subnet.
use-public-ip

Specifies whether an external IP address is to be assigned to created instances.

Warning

Changing this parameter to False might lead to issues of access to the machines.

  • Default value: True
  • Possible values: True or False
user-script

Defines additional user data commands. These commands will run automatically once the machine boots for the first time. - Default value: [] (empty array) - Possible values: arr-str

Examples

The following demonstrate a few usages of the --set and --unset flags when used in the ml resources group command:

  • ml resources group "MyResourceGroup" --update --set group-capacity 10

    Updates an existing resource group called "MyResourceGroup" so that the group capacity is now 10.

  • ml resources group "MyResourceGroup" --update --set group-capacity 8 --set priority 80

    Updates the previous resource group with two new values: group capacity is now 8 and priority is now 80.

  • ml resources group "MyResourceGroup" --update --unset group-capacity --unset priority

    Where group capacity and priority were set to non-default values, resets them to their default values: 1 and 100 respectively.

  • ml resources group "Strong GPUs" --set queue TeamOne

    Assigns the resource group "Strong GPUs" to run in the TeamOne queue.

  • ml resources queue Q1 --new-name Q2 --enable

    Renames the queue Q1 to Q2 and enables it.

job

Queries status and details for the specified job Id.

The following flag is available with the ml resources job command:

  • --org

    Organization to use

Example

Run ml resources job i12345 to get the status and information regarding job with Id i12345.

local-grid

Command group for authorizing MissingLink Resource Management to access a private Cloud using an on-premises machine.

The following commands can be used together with ml resources local-grid:

init

Initializes Resource Management on a local server.

Run the command on each machine that requires authorization.

The following flags are available with the ml resources local-grid init command:

  • --org

    Organization to use.

  • --ssh-key-path

    SSH Key to use for git clone commands and for connecting to virtual machines. By default, your default SSH key (stored in ~/.ssh/id_rsa) will be used.

  • --force/--no-force

    Forces installation (stops current Resource Manager if present).

  • --resource-token

    MissingLink resource token. One will be generated if this instance of MissingLink is authorized.

  • --link-aws (default)/--no-aws-link

    When configuring the aws-cli an .aws folder is created in your home directory. The folder contains your AWS credentials. When “linked,” the folder will be mounted in your jobs and Resource Manager, allowing them to use the credentials of the host to access AWS services.

  • --env-aws (default)/--no-aws-env

    Similar to the .aws folder, AWS allows authentication using environment variables.

  • --link-gcp (default)/--no-gcp

    Similar to AWS, GCP also has its default directory and this flag allows the folder to be mounted in your jobs and Resource Manager to call GCP APIs.

  • --link-azure (default)/--no-azure

    Similar to AWS. Azure works exactly like the link-aws and link-gcp options, mounting the .azure folder into a container. Defaults to --link-azure.

  • --capacity INTEGER

    Number of jobs that can be run in parallel on this machine.

change-group

Changes the group a server is assigned to.

The following flags are available with the ml resources local-grid change-group command:

  • --org TEXT

    Organization to use

  • --new-group

    Group to assign the server to. Required.


queue

Manages resource queues.

The following flags are available with the ml resources queue command:

  • --org TEXT

    Organization to use

  • --create

    Creates a new resource queue.

  • --new-name TEXT

    Updates the name of the specified queue to this name.

  • --disable

    Disables the specified queue.

  • --enable

    Enables the specified queue.

Examples

Creates a resource queue named MyQueue:

ml resources queue MyQueue --create

Displays the queue MyQueue:

ml resources queue MyQueue

Renames a resource queue MyQueue to NewQueue and disables it:

ml resources queue MyQueue --new-name NewQueue --disable