Install OpenStack yourself
Try OpenStack on your workstation, set up a micro cloud or deploy a production-grade OpenStack cluster across hundreds of physical machines. You will use MicroStack or OpenStack Charms depending on the requirements.
If you run into any issues, or if you want OpenStack consulting, support or fully managed service, speak to an expert.
Single-node, multi-node or large-scale cluster?
Choose the OpenStack installation option that suits you best:
- One physical machine needed
- Uses MicroStack – OpenStack in a snap
- Core services included
- All services on a single node
- Opinionated OpenStack
- Straightforward installation
- OpenStack "on-rails"
- At least two physical machines needed
- Uses MicroStack – OpenStack in a snap
- Core services included
- One control node, many compute/storage nodes
- Opinionated OpenStack
- Straightforward installation
- OpenStack "on-rails"
- At least six physical machines needed
- Uses OpenStack Charms
- Core and additional services included
- Architectural freedom, full HA option
- Composable OpenStack
- Fully automated installation and day-2 operations
- Enterprise private cloud
Single-node OpenStack deployment
These instructions use MicroStack ‐ OpenStack in a snap, MicroStack is a pure upstream OpenStack distribution designed for small scale and edge deployments, that can be installed and maintained with a minimal effort.
Installation
The installation step consists solely of installing the MicroStack snap.
Requirements:
You will need a multi-core processor and at least 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 the beta
channel:
sudo snap install microstack --beta
Information on the installed snap can be viewed like this:
snap list microstack
Name Version Rev Tracking Publisher Notes
microstack ussuri 245 latest/beta canonical✓ -
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, and ICMP/SSH security groups. 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 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:
Creating local "microstack" ssh key at /home/ubuntu/snap/microstack/common/.ssh/id_microstack
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`
Note:
The launch command, upon its initial invocation, will set up a default OpenStack keypair.
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
Note:
If you receive the error message sign_and_send_pubkey: no mutual signature supported
then you will need to use the PubkeyAcceptedKeyTypes
option to allow for older key types. The complete command will look like this: ssh -o "PubkeyAcceptedKeyTypes +ssh-rsa" -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:
https://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:
To learn more about MicroStack, visit https://microstack.run.
Multi-node OpenStack deployment
These instructions use MicroStack ‐ in a snap. MicroStack is a pure upstream OpenStack distribution, designed for small scale and edge deployments, that can be installed and maintained with a minimal effort.
Installation
The installation step consists solely of installing the MicroStack snap.
Requirements:
You will need a multi-core processor and at least 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 the beta
channel:
sudo snap install microstack --beta
Install the snap on the machine designate as the control node and on any machines designated as compute nodes.
Information on the installed snap can be viewed like this:
snap list microstack
Name Version Rev Tracking Publisher Notes
microstack ussuri 245 latest/beta canonical✓ -
Here we see that OpenStack Ussuri has been deployed!
Initialisation
Both the control node and the compute nodes must be initialised.
Control node
Perform this step on the machine designated as the control node.
The control node initialisation step automatically deploys, configures, and starts OpenStack services. In particular, it will create the database, networks, an image, several flavors, and ICMP/SSH security groups. This can all be done within 10 to 20 minutes depending on your machine:
sudo microstack init --auto --control
When finished, generate a connection string that a designated compute node will need in order to join the cluster:
sudo microstack add-compute
Sample output:
Use the following connection string to add a new compute node to the cluster (valid for 20 minutes from this moment):
hKhob3N0bmFtZa0xMC4yNDYuMTE0LjEwq2ZpbmdlcnByaW50xCAdnnsr99XBP9rLu0/+McUBiXTr4TG7ScdsMZJCgzpLzKJpZNkgNzFkMTY3YjU0ZmUwNGY2ZDgyODM0MGY4MmE0ZjE5NWamc2VjcmV02SBjN1ZuTUhnV1o3bmw3aX
puMXFTd3NxNncwRjE3ZG80OQ==
Compute node
Perform this step on a machine designated as a compute node using the previously generated connection string.
Since the compute node only manages the OpenStack compute service a compute node’s initialisation step is much shorter than that of a control node’s. It can take as little as 30 seconds for a compute node to join the cluster:
sudo microstack init --auto --compute --join <connection-string>
Note:
Each additional compute node will require a new connection string to be generated. Add as many compute nodes as desired by repeating the join process.
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 commands in this section can be invoked on either the control node or on a compute node.
The standard openstack
client comes pre-installed and is invoked like so:
microstack.openstack <command>
To list the default image:
microstack.openstack image list
+--------------------------------------+--------+--------+
| ID | Name | Status |
+--------------------------------------+--------+--------+
| 3ed06ce7-6ad6-4639-a001-747ac6bf4563 | 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
The commands in this section can be invoked on either the control node or on a compute node.
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’
The instance will be created on a compute node that the creating node sees as an availability zone, which in turn is based on hypervisor names.
To get the list of hypervisors:
microstack.openstack hypervisor list
Sample output:
+----+------------------------------------------+-----------------+-----------+-------+
| ID | Hypervisor Hostname | Hypervisor Type | Host IP | State |
+----+------------------------------------------+-----------------+-----------+-------+
| 1 | pmatulis-ss-mstack-1.project.serverstack | QEMU | 10.5.0.41 | up |
| 2 | pmatulis-ss-mstack-2.project.serverstack | QEMU | 10.5.0.6 | up |
+----+------------------------------------------+-----------------+-----------+-------+
There should be at least two. One that is bundled with the control node and one for each compute node.
Important:
To create an instance from a compute node you will need to first manually import an OpenStack keypair (i.e. ssh-keygen
and microstack.openstack keypair create
).
From the control node, to create an instance (on hypervisor ‘pmatulis-ss-mstack-2’) named ‘test’ that is based on the ‘cirros’ image:
microstack launch cirros --name test --availability-zone nova:pmatulis-ss-mstack-2.project.serverstack
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:
Creating local "microstack" ssh key at /home/ubuntu/snap/microstack/common/.ssh/id_microstack
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.204`
Important:
When connecting to the instance over SSH from a compute node, OpenStack security groups will need to be configured.
From the control node, 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.204
Note:
If you receive the error message sign_and_send_pubkey: no mutual signature supported
then you will need to use the PubkeyAcceptedKeyTypes
option to allow for older key types. The complete command will look like this: ssh -o "PubkeyAcceptedKeyTypes +ssh-rsa" -i /home/ubuntu/snap/microstack/common/.ssh/id_microstack cirros@10.20.20.204
Access the cloud dashboard
You can log in to the web UI by pointing your browser to the following URL:
https://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:
OXUJ4zZWTTCuPetUQbbBm3LFL2IWXioK
Upon logging in you should see both hypervisors and a single instance running on hypervisor ‘pmatulis-ss-mstack-2.project.serverstack’:
To learn more about MicroStack, visit https://microstack.run.
Large-scale deployment
These instructions use OpenStack Charms. OpenStack Charms are the foundation of Canonical’s Charmed OpenStack distribution which is an enterprise private cloud, designed to run mission-critical workloads.
Find the documentation for "Installation" of OpenStack Charms Deployment Guide here.
To learn more about OpenStack Charms, visit OpenStack Charms Deployment Guide.
Got it working? Fill in the survey.
OpenStack User Survey provides users an opportunity to influence the community and software direction. By sharing information about your configuration and requirements, the Open Infrastructure Foundation User Committee will be able to advocate on your behalf.
Got stuck with OpenStack installation?
Let our cloud experts help you take the next step.