Install OpenStack on your workstation and launch your first instance

Key Value
Summary Install OpenStack on your workstation and launch your first instance.
Categories openstack
Difficulty 1
Author Tytus Kurek tytus.kurek@canonical.com

Overview

Duration: 3:00

Before you get started!

Welcome to OpenStack!

In this series of tutorials, we will walk you through all the necessary steps to install, configure and get started with OpenStack. Using just your workstation, you will learn how to use OpenStack for cloud infrastructure implementation purposes, from a single-node installation to large-scale clusters.

This tutorial is the first in the “Phase I - Single-node OpenStack on your workstation” series.

Explore other tutorials >

What is OpenStack?

OpenStack is the most popular open source cloud platform that aggregates distributed compute, network and storage resources in the data centre and enables on-demand provisioning of virtual machines through a self-service portal. OpenStack powers thousands of public and private clouds all over the world, providing rapid access for greater innovation and better economics.

Learn more about OpenStack >

What is MicroStack?

MicroStack is a micro cloud platform based on OpenStack, designed for the edge and small-scale data centre deployments, that can be installed and maintained with minimal effort. MicroStack eliminates the complexity behind OpenStack, providing an opinionated approach to OpenStack architecture design and a straightforward installation method.

Learn more about MicroStack >

What is Charmed OpenStack?

Charmed OpenStack is an enterprise cloud platform based on OpenStack, designed for large-scale data centre deployments, that provides full automation around the initial installation and day-2 operations. Charmed OpenStack abstracts the complexity behind OpenStack, using a composable approach to OpenStack architecture design with model-driven operators (charms).

Learn more about Charmed OpenStack >

In this tutorial, you will learn how to:

  • Install OpenStack on your workstation
  • Launch your first instance on OpenStack

You will only need:

One physical machine with:

MicroStack
These instructions use MicroStack - OpenStack in a snap. MicroStack is also available on other Linux distros, Windows and macOS. Refer to the MicroStack website for more information on how to install MicroStack on an OS other than Ubuntu.

Install OpenStack

Duration: 20:00

We’re going to use MicroStack, since it provides the most straightforward installation experience. First, execute the following command to install the microstack snap:

$ sudo snap install microstack --beta

If you are using an older Ubuntu version or some other Linux distribution, you may have to install snapd first. Refer to snapd documentation for more information on installing snapd on your workstation.

When the installation process has finished, you should see the following message in the terminal:

microstack (beta) ussuri from Canonical✓ installed

Note that at the time of writing this tutorial, the installed version of OpenStack was Ussuri.

MicroStack can be initialised in either single or multi-node mode. Execute the following command to initialise it in the single-node mode:

$ sudo microstack init --auto --control

The command takes ~20 minutes to complete. Once it finishes, OpenStack is up and running.

Launch an instance

Duration: 5:00

In order to launch your first instance on OpenStack, execute the following command:

$ microstack launch cirros --name test

The resulting output provides the information you need to SSH to the instance:

Access it with `ssh -i /home/guardian/snap/microstack/common/.ssh/id_microstack cirros@10.20.20.137`

Note that the IP address of the instance (here 10.20.20.137) may be different in your environment. In order to connect to the instance, run the following command from the terminal output. In case you’re asked for the password, the default password for the CirrOS image is gocubsgo.

$ ssh -o "PubkeyAcceptedKeyTypes +ssh-rsa" -i /home/guardian/snap/microstack/common/.ssh/id_microstack cirros@10.20.20.137

That’s it. You’re connected to the instance. You can use regular shell commands to execute various tasks.

Note that the CirrOS image we used in this example provides a minimalistic operating system only, so the list of commands might be limited. For example, we can check the uptime of the instance:

$ uptime
 11:08:36 up 2 min,  1 users,  load average: 0.05, 0.05, 0.01

In the following tutorials, we’ll demonstrate how to use other images and how to customise instances during the provisioning process.

To disconnect from the instance, type exit (or press CTRL+D).

Next steps

Duration: 2:00

Congratulations! You have reached the end of this tutorial.

You can now move to the next tutorial - “2. Components” - or explore other tutorials.

In this tutorial, you have learnt how to:

  • Install OpenStack on your workstation
  • Launch your first instance on OpenStack

Where to go from here?

2 Likes

The issue

Hi there. Following this tutorial, I noticed some interesting behavior with CirrOS when trying into the instance after launching it. Using the original command ssh -i <path/to/id_microstack> cirros@<id_address>, I am met with the following output:

nucci@baragon:~$ ssh -i /home/nucci/snap/microstack/common/.ssh/id_microstack cirros@10.20.20.191
sign_and_send_pubkey: no mutual signature supported
cirros@10.20.20.191's password:

It seems like the CirrOS that comes with Microstack does not support RSA encrypted keys and thus defaults to asking for a password.

How I fixed this

In order to use the auto-generated ssh key, I had to include the additional option to my ssh command:

ssh -o "PubkeyAcceptedKeyTypes +ssh-rsa" -i <path/to/id_microstack> cirros@<ip_address>

Where to go from here

I am thinking that it might be beneficial to update the tutorials to use the extra ssh option -o "PubkeyAcceptedKeyTypes +ssh-rsa" when connecting to a CirrOS instance or just using the password login instead. Might be worth to include that the default password for CirrOS is gocubsgo (personally I am a Pirates fan) so that new users do not panic and think that they need to destroy their CirrOS instance.

@nuccitheboss thanks for reaching out!

I have no idea where is it coming, but for me the CirrOS image works just fine. I have updated the tutorial, however, based on your input to make sure that whoever faces this issue, knows how to bypass it. Thank you for reporting it!

1 Like

No problem! If it adds anything, I did deploy microstack on my Jammy machine. I do not believe it is an issue with the prior series of Ubuntu, but I have not been able to test it thoroughly.

Suggestion

Hello again! I would also like to suggest here is that we have new user’s install microstack with the --devmode flag with the --beta (sudo snap install microstack --beta --devmode), and then add a short blurb about Microstack still being in beta, open to contributions, and working on getting the snap to work in strict rather than classic/devmode confinement.

Reasoning

I think it will save new user’s a lot of pain in the long run as they will not be blocked by AppArmor/snap confinement in later tutorials. For example, for tutorial #5 (templates) when we import an image file, if strict confinement is enabled, you will be presented with this bug: https://bugs.launchpad.net/microstack/+bug/1980993.

Someone new to Microstack (and the Ubuntu ecosystem) might not necessarily be familiar with the rules of snap confinement, so they might just think Microstack is broken and uninstall it rather than we’re still hammering out the kinks with strict confinement. I think I might have the fix for the confinement issues, but I think the addition of the --devmode flag to the snap install ... command would make it easier for new users who want to try MicroStack out.

@nuccitheboss we intentionally removed the --devmode flag some time ago once we completed the work around strict confinement. If you’re facing issues, this means there’s something wrong with it. Note that we’re currently testing MicroStack on Ubuntu 20.04 LTS only.

@billy-olsen FYI