Constraints on size
Size constraints help you control the amount of resources a new or resized machine can have. This way, you won't end up with a fleet of unnecessary XL instances in AWS or a KVM host with all its resources dedicated to a single VM.
Some clouds allow you to choose the size of your machine from a list of predefined sizes. Others, allow you to completely customize the amount of CPU cores, RAM and disk a machine has. Mist's size constraints can be applied on both types of clouds.
Please keep in mind that only members of the Owners team can manage constraints. Also, constraints are available only in Mist Hosted Service (HS) and Mist Enterprise Edition (EE).
Example 1: Clouds with predefined sizes
Let’s assume that your RBAC policy allows members of your Dev team to create machines only in AWS Oregon and Linode. You would like to apply the following size constraints:
- In AWS Oregon, team members will be able to use only t3-small and t3-medium sizes.
- In Linode, team members will be able to use any size except the very big Dedicated 512GB.
To set this up, from the Teams section:
- Make sure you belong to the Owners team.
- Click on the Dev team.
- Click the gear icon next to the team policy that applies to machines.
- Fill out the relevant Allowed sizes and Disallowed sizes as shown below.
- Don't forget to click OK and then SAVE POLICY for the changes to take effect.
Example 2: Clouds with custom sizes
Let's assume now that your Dev team can create machines only on a vSphere and you would like to apply the following constraints:
- All machines should have 2 CPU cores. Since there is really no option for the end user, the CPU selection field should be hidden to simplify the provisioning process.
- Machines can have at least 1024GB of RAM and up to 4096GB.
- Machines can have 100GB of disk. Again, like with CPUs above, this field will also be hidden.
To set this up, from the Teams section:
- Make sure you belong to the Owners team.
- Click on the Dev team.
- Click the gear icon next to the team policy that applies to machines.
- Fill out the the relevant CPU, RAM and Primary disk constraints as shown below.
- Don't forget to click OK and then SAVE POLICY for the changes to take effect.