Skip to content

Advanced Configuration

This topic describes the ml resources group MissingLink CLI command and flags for configuring resource groups.

Basic resource groups options are configurable in the MissingLink dashboard.

Command Syntax

To configure resource groups from the command line, use the following command:

ml resources group "my_resource_group" --update --set <param>

Flags

--update                        Update existing group.
--set &lt;param param_value&gt;       Change parameter value. Some parameters can
                                be specified multiple times for arrays and
                                you can remove configured option by setting
                                it to `None`.
--unset &lt;param&gt;                 Reset parameter value to default. 
                                If the same parameter is specified in both 
                                `--set` and `--unset`, it will be unset.                  
-h, --help                      Show this message and exit.

set and unset Parameters

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

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. 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.

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 ml resources group command:

  1. ml resources group "my_resource_group" --update --set group_capacity 10

    Updates an existing resource group called "my_resource_group" inside an organization called "my_organization" so that the group capacity is now 10.

  2. ml resources group "my_resource_group" --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.

  3. ml resources group "my_resource_group" --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.