A Template (short for environment template) is a blueprint for creating an environment. Templates contain a defined configuration of VM images, networking and installed software in a single region. Templates are the building blocks for courses, events and environments.
In this article
Creating a template
- From the left navigation menu, select Templates, then select Add.
- In the Create new template window, complete the following information:
- Company: Select the company that will own the template.
- Users with a global role type can create a template for any company. Users with a company role type can create a template for their own company only.
- Select 'Share with all companies' if the template is to be available to all companies. For more information, see: Sharing resources across Companies.
- Title: Each template requires a name.
- Region: Templates reference resources located in a single geographic region. When creating a template, you must select the region where the VM images that will be added are located.
- Advanced networking: When a template is created they have a single subnet by default (a single network) based on a default CIDR block of 10.0.0.0/16, with all VMs on the same subnet. If you want to build a complex environment with multiple networks and potentially routing scenarios, select 'Show Advanced'. The section which displays allows you to add multiple subnets to a CIDR block.
- Network CIDR Block: To change the CIDR block, delete the listed subnet and select the required CIDR block.
- Then, enter the Subnet Label and select '+' to add the subnet.
- Routing: When multiple subnets are present, selecting Route between subnets allows the subnets to communicate with each other using the cloud provider’s automatic routing. If adding your own routing devices you may want to disable automatic routing between subnets by ensuring this toggle is disabled.
- Company: Select the company that will own the template.
Once the above information has been completed, select Create.
Configuring a template
Now the template has been created, it can be configured as required. There are 3 steps to configuring a template:
1. Adding VM images
- Select the template from the Templates list.
- In the Details tab for the template, select Add VM.
- The Add VM window will contain a list of VM images that are owned by you or published (publicly available) VM images in that region.
- Locate the VM image to add to the template and select Add.
- To add more VM images, locate them in the list and select Add. When finished, select Close.
2. Configuring VM images
Once the VM image has been added to the template, it can be configured as required for the template.
- In the Details tab for the template, click the VM image name to edit the VM (or select ‘Edit VM’ from the row action arrow). The Edit VM window will be displayed.
- Here’s what can be edited in the Edit VM window:
- Display name: The VM name that will be shown in the workspace
- Instance type: The VM size (Additional sizes can be added to you instance of Heropa on request)
- Storage GB: The storage size of the VM image within the template
- SSH keypair: Turn this on if the VM is to be accessed via an SSH key instead of a username and password (Linux VMs only)
- Username and password: Displays the default credentials of the VM image which will be used to automatically log into the VM in the workspace. These can be changed if necessary but must be valid login credentials to the VM image.
- Description: Administrator notes can be added here for the VM. If an environment containing the VM is subsequently saved as a template, the newly generated VM image will contain this description. This field is useful to store specific IP address or setup information.
- User notes: Use this field to add information that will be visible for the VM when it is in the workspace.
- User data: Can be used to perform common automated configuration tasks and run initialization scripts after the VM starts. The accepted format is Cloud-init. Note: On Windows VMs, you need to run Ec2LaunchSettings in order for the user data to be executed.
- Kubernetes cluster: If the VM being deployed is part of a Kubernetes cluster, selecting this toggle allows the VM to locate itself in the cloud provider infrastructure.
For macOS VMs, some additional configuration may be required. Learn more here: Considerations for macOS VM images.
3. Configuring the networks
Network access can also be configured for the template.
- In the Details tab for the template, click the Subnet name to edit the Network (or select ‘Edit Network’ from the row action arrow). The Edit Network window will be displayed.
- Here’s what can be edited in the Edit Network window:
- Primary IP: If multiple subnets, you can select which one to make Primary for any given VM.
- Secondary IPs: One more secondary IPs can be added to any NIC.
- Disable SDC: If adding a routing device, select this check box to disable the source destination check on the network interface.
- Add NIC: You can also add an additional network interface to a VM (the maximum number of NICs is shown in the description of the instance type in the Edit VM modal).
- Allocate a permanent public IP address: The auto-assigned public IP address associated with your VM changes every time the VM starts from a stopped state. Select this check box to assign a static public IP address. This preserves the public IP address after to stop and start your instance, however when the VM is deleted the public IP address is not available to be re-used with a different VM.
- Inbound / Outbound network access: This is where the inbound and outbound network access to a VM can be controlled. The default network configuration is to allow all outbound traffic and to block all inbound traffic. Note: There is a single hidden inbound rule to allow the workspace HTML5 viewer to access the VM.
Article is closed for comments.