Single-node

Installation

The installation step consists solely of installing the MicroStack snap.

Requirements:
You will need at least 2 CPUs, 8 GiB of memory, and 100 GiB of disk space. MicroStack has been tested on x86-based physical and virtual (KVM) machines running either Ubuntu 18.04 LTS or Ubuntu 20.04 LTS.

At this time use devmode and the beta channel:

sudo snap install microstack --devmode --beta

Information on the installed snap can be viewed like this:

snap list microstack
Name        Version  Rev  Tracking     Publisher   Notes
microstack  ussuri   222  latest/beta  canonical✓  devmode

Here we see that OpenStack Ussuri has been deployed!

Initialisation

The initialisation step automatically deploys, configures, and starts OpenStack services. In particular, it will create the database, networks, an image, several flavors, ICMP/SSH security groups, and an SSH keypair. This can all be done within 10 to 20 minutes depending on your machine:

sudo microstack init --auto --control

Verification

The purpose of the verification step is to confirm that the cloud is in working order and to discover some of the defaults used by MicroStack. Verification will consist of the following actions:

  • perform various OpenStack queries
  • create an instance
  • connect to the instance over SSH
  • access the cloud dashboard

Query OpenStack

The standard openstack client comes pre-installed and is invoked like so:

microstack.openstack <command>

To list the default keypair:

microstack.openstack keypair list
+------------+-------------------------------------------------+
| Name       | Fingerprint                                     |
+------------+-------------------------------------------------+
| microstack | 98:f4:89:0b:5f:71:0d:24:3d:64:62:1b:1c:08:88:a4 |
+------------+-------------------------------------------------+

To list the default image:

microstack.openstack image list
+--------------------------------------+--------+--------+
| ID                                   | Name   | Status |
+--------------------------------------+--------+--------+
| 7fefc80f-d745-4764-9389-00cc4a12585d | cirros | active |
+--------------------------------------+--------+--------+

To get the default list of flavors:

microstack.openstack flavor list
+----+-----------+-------+------+-----------+-------+-----------+
| ID | Name      |   RAM | Disk | Ephemeral | VCPUs | Is Public |
+----+-----------+-------+------+-----------+-------+-----------+
| 1  | m1.tiny   |   512 |    1 |         0 |     1 | True      |
| 2  | m1.small  |  2048 |   20 |         0 |     1 | True      |
| 3  | m1.medium |  4096 |   20 |         0 |     2 | True      |
| 4  | m1.large  |  8192 |   20 |         0 |     4 | True      |
| 5  | m1.xlarge | 16384 |   20 |         0 |     8 | True      |
+----+-----------+-------+------+-----------+-------+-----------+

Create an instance

MicroStack comes with a convenient instance creation command called microstack launch. It uses the following defaults for its instances:

  • keypair ‘microstack’
  • flavor ‘m1.tiny’
  • floating IP address on subnet ‘10.20.20.0/24’

To create an instance named ‘test’ based on the ‘cirros’ image:

microstack launch cirros -n test

The microstack launch command also supports arguments --key, --flavor, --image, and --net-id, in which case you will need to create objects using the standard client if non-default values are desired.

Note:
The launch command can be replaced with the traditional microstack.openstack server create command.

Connect to the instance

Output from the microstack launch command includes all the information needed to connect to the instance over SSH:

Launching server ...
Allocating floating ip ...
Server test launched! (status is BUILD)

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

Access the instance using the private SSH key associated with the default keypair:

ssh -i /home/ubuntu/snap/microstack/common/.ssh/id_microstack cirros@10.20.20.199

Access the cloud dashboard

You can log in to the web UI by pointing your browser to the following URL:

http://10.20.20.1

The username is ‘admin’ and the password is obtained in this way:

sudo snap get microstack config.credentials.keystone-password

Sample password:

OAEHxLgCBz7Wz4usvolAAt61TrDUz6zz

Upon logging in you should see the created instance: