Deploying a Development Environment

This tutorial details how to deploy a development environment in the ITS Private Cloud using the VSS CLI. It assumes you already have set up a VSS account with access to the REST API.

Launch Instance

Before launching the virtual machine instance we need the following items:

  • Operating system

  • Network

  • Folder

  • ISO image

Then, all is ready to deploy a brand new virtual machine.

Operating system

Run vss-cli compute os ls to display the list of supported operating systems in the ITS Private Cloud. In order to narrow down the list to only CentOS operating systems, use the --filter-by/-f option which is structured <field_name>=<operator>,<value> and available operators are eq, ne, lt, le, gt, ge, like, in. So, to limit results to just CentOS, use the following filter:

This version of the VSS CLI supports providing OS reference not only using the guest_id, but also the full_name or Id. In case of multiple results, the CLI prompts to select the right instance.

vss-cli compute os ls --filter-by full_name=CentOS id guest_id full_name family ---- --------------- ------------------- ---------- 24 centos64Guest CentOS 4/5 (64-bit) linuxGuest 70 centos6_64Guest CentOS 6 (64-bit) linuxGuest 26 centos6Guest CentOS 6 linuxGuest 15 centos7_64Guest CentOS 7 (64-bit) linuxGuest 78 centos7Guest CentOS 7 linuxGuest 95 centos8_64Guest CentOS 8 (64-bit) linuxGuest 2 centosGuest CentOS 4/5 linuxGuest

Set the OS environment variable to centos64Guest to save the guest_id:

export OS=centos64Guest

Network

Run vss-cli compute net ls to list available network segments to your account. You must have at least VL-1584-VSS-PUBLIC which is our public network.

This version of the VSS CLI supports managing networks not only using the moref, but also using names. In case of multiple results, the CLI prompts to select the right instance.

vss-cli compute net ls -f name=public moref name description subnet ports ----------------- ------------------ ------------------ -------------- ------- dvportgroup-11052 VL-1584-VSS-PUBLIC VSS Public network 142.1.216.0/23 32

Save dvportgroup-11052 in NET environment variable:

By default, the network adapter will use vmxnet3 which provides ideal performance, however a few legacy operating systems does not have the drivers. In such case, you can specify which adapter type between: e1000e*, e1000, vmxnet2 or vmxnet3. To do so, append the adapter type to the network adapter network as follows:

Folder

Logical folders can be listed by running vss-cli compute folder ls. Select the target moref folder to store the virtual machine on:

This version of the VSS CLI supports managing logical folders not only using the moref, but also using names. In case of multiple results, the CLI prompts to select the right instance.

Set the FOLDER environment variable to the target folder (the folder moref may vary):

ISO Image

Since this tutorial creates a virtual machine from scratch, an ISO image is required to install the operating system. Run vss-cli compute iso public ls to display available ISO images in both the VSS central store and your personal VSKEY-STOR space.

Save the desired path to ISO environment variable:

Deployment

Run vss-cli compute vm mk shell to deploy a virtual machine without an operating system installed. Before deploying the virtual machine, display what options and arguments the shell command takes:

Now that we have everything, proceed to deploy a new virtual machine with 1GB of memory, 1 vCPU, 20GB disk and 100GB disk (independent_persistent: not affected by snapshots) and a tag Project:CMS as follows:

A confirmation email will be sent and the command will return the request id and task_id as follows:

In matter of seconds, a confirmation email will be sent with the allocated IP address, if VL-1584-VSS-PUBLIC was selected.

Manage Request

If you prefer to validate the status of the request with VSS CLI, run vss-cli request new ls to display a list of your request history.

This command supports filter and sorting by using the --filter-by/-f and --sort/-s respectively. Filter list in the following format <field_name>=<operator>,<value> where operator is eq, ne, lt, le, gt, ge, like, in. For example: status,eq,Processed. Sort list in the following format <field_name> <asc|desc>.

In order to obtain the last request submitted, status and resulting virtual machine uuid, run the following command:

Access Instance

Since we added the --power-on option, the virtual machine should have been powered on right after the Guest Operating System Customization task completed.

In a few minutes the virtual machine will show the hostname and ip configuration by running vss-cli compute vm get <name-or-vm-id> guest:

The Guest Host Name shows that the hostname has been changed, and now you will be able to access via either ssh or the virtual machine console:

University of Toronto - Since 1827