Mirantis OpenStack Express 2.0 – Launching a VM from a Boot Image

This is the second in a series of short tutorials showing how to perform common cloud operations tasks in Mirantis OpenStack Express 2.0 – Mirantis’ “Private Cloud as a Service”

In our last video, we showed you how easy it was to find and import a pre-configured boot image to Mira

In our last video, we showed you how easy it was to find and import a pre-configured boot image to Mirantis OpenStack Express 2.0. Now that we have an image, we can configure and launch a new VM instance from it. Before doing this, though, it makes sense to set up a keypair that can be injected into your instance so you can access it via SSH and SCP.

 

 

Basic Ops Tutorials

Mirantis OpenStack Express 2.0 — Mirantis’ “Private Cloud as a Service” — is the fastest way to get your hands on a fully-functional, optimally-configured, private OpenStack cloud, running on hosted bare metal and able to scale on demand. This series of short tutorials shows how to perform common cloud operations tasks in MOX 2.0, and offers links to documentation and learning resources. Pro tip: though aimed at Mirantis OpenStack Express, many of the techniques discussed here will also work on a private OpenStack cloud deployed using Mirantis OpenStack.

Tutorials:

 

Step by Step

The OpenStack Horizon UI accessible under MOX 2.0 makes it very easy to configure and launch VM instances. Just go to Projects -> Compute -> Access and Security, click the Keypairs tab, and you can name and generate a new SSH keypair on the fly, downloading the .pem file, containing the private key, to your desktop.

MOX 2.0 Generate Keypair

Mirantis OpenStack Express 2.0 instances are generally accessed via SSH using keypair authentication, rather than username/password login. MOX 2.0 Horizon can generate an SSH keypair for you, letting you download the Private key for use with your SSH client.

MOS Horizon will record the keypair and present its name and fingerprint. Keypairs stored here will be offered in a popdown list, letting you select from among them to configure authentication on new instances at time of creation.

MOX 2.0 Keypairname-Fingerprint

Mirantis OpenStack Express 2.0 Horizon stores your keypairs, so they can be associated with single or multiple instances at launch.

If you use Linux with openssh, you can use the ssh-keygen command to generate a keypair.

MOX 2.0 Keypairname-Fingerprint

You can also create your own keypairs and upload them. In Linux with openssh, this is done using the ssh-keygen command.

Then open the plaintext public key file and copy the contents.

MOX 2.0 Keypairname-Fingerprint

Open the plaintext public key file and copy its contents. Here, we’re using gedit.

Then choose Import Key to name the keypair and copy the public portion to Horizon.

MOX 2.0 Keypairname-Fingerprint

Name your keypair and copy the public key to Horizon. MOX 2.0 Horizon will import your key and add it to the tabs and popdowns for configuring authentication on new instances.

Now that you’ve taken care of access security, you can launch a new VM instance from your image. Click on the Launch button, pick a name, and pick a flavor for this VM. Flavors are a quick way to select disk and RAM sizes and number of vCPUs. You can create custom flavors.

MOX 2.0 Keypairname-Fingerprint

Click launch against your image to begin the process of configuring and launching a VM instance.
MOX 2.0 Keypairname-Fingerprint

The first tab of the Launch dialog lets you name your instance, and set basic parameters, including choosing a flavor for your VM. Flavors are a way of packaging platform model criteria like amount of RAM and number of vCPUs, and you can create your own. Note that Horizon will not display available flavors that don’t satisfy image minimum requirements.

On the Access and Security tab, specify the SSH keypair you want to use to access this instance.

MOX 2.0 Keypairname-Fingerprint

On the Access and Security tab, select the keypair you want to use to authenticate to the instance.

On the Networking tab, drag and drop the basic networking model, which will connect the new VM to the internal network, but not give it a public-facing IP address.

MOX 2.0 Keypairname-Fingerprint

On the Networking tab, drag and drop the basic networking model.

Click Launch. In just seconds, your new instance will be spawned.

MOX 2.0 Keypairname-Fingerprint

Click Launch. Your new instance will begin to spawn and will normally become Active within a few seconds.

To prepare to access your new instance from the public internet, you begin by associating a Floating IP address with it, via the topmost option in the instance’s More menu. The new IP address appears in the list of IPs associated with the instance.

MOX 2.0 Keypairname-Fingerprint

Associate a floating IP with your instance, visible from the public net.
MOX 2.0 Keypairname-Fingerprint

Select from available floating IPs to associate one to your instance’s base port.
MOX 2.0 Keypairname-Fingerprint

The newly-associated IP is displayed with the instance, for easy reference.

To log into your VM instance, you can use SSH, the associated keypair, and the default username for this image — in this case, that’s ‘cirros’ — pointing SSH to the floating IP address you’ve just assigned.

MOX 2.0 Keypairname-Fingerprint

Use SSH to access your instance. Here, we’re using the standard Linux ssh client with the -i flag and your keypair. Aim for the default username for your instance, using your public-facing floating IP.

To do this from a Windows PC using the popular free SSH client, PuTTY, begin by using the companion application, PuTTYGen, to load the .pem file, then save the private key in PuTTY’s .ppk format, as shown here.

MOX 2.0 Keypairname-Fingerprint

To access from a Windows PC running PuTTY, begin by loading and converting the downloaded .pem file to .ppk format, with the PuttyGen utility.

Then configure a PuTTY session, using the floating IP address as the target, then click ‘Auth’ and browse to the .ppk file. Launch PuTTY, and your session will authenticate. Enter ‘cirros’ as the username.

MOX 2.0 Keypairname-Fingerprint

Configure a PuTTY session, aimed at the floating IP of your instance.
MOX 2.0 Keypairname-Fingerprint

Browse to the .ppk file created above under the Auth heading of the SSH menu, under Connection, to set your private key.
MOX 2.0 Keypairname-Fingerprint

Click Open and PuTTY will authenticate to your instance. We’re here using ‘cirros’ as the username.

You can also access Cirros and other appropriately-configured instances from the Horizon VNC console, with username/password authentication. In this case, the default username is ‘cirros’ and the default password is ‘cubswin:)’.

MOX 2.0 Keypairname-Fingerprint

You can also log into appropriately-configured instances using Mirantis OpenStack Express Horizon’s VNC console, username/password authentication.

Now that we know how to configure and launch an instance from an image, and how to access it securely afterward, our upcoming videos will examine Mirantis OpenStack Express 2.0 features for configuring and attaching block storage volumes.

Resources:

Check out Express for yourself at https://express.mirantis.com.

Latest Tweets

Suggested Content

WEBINAR
Edge Computing: A Unified Infrastructure for All the Different Pieces