Install OpenStack yourself

Deploy your production Ubuntu OpenStack cloud across a rack of physical servers. You’ll use MAAS for physical server provisioning and conjure-up to guide you through the process.

If you run into issues, or if you want support, training or architecture design consulting, please contact Canonical — we help the world’s largest OpenStack users keep their clouds running smoothly.

Developer or cluster Edition?

These instructions cover two scenarios — developers who have a beefy workstation and want to setup a minimal OpenStack cluster, and production-grade cloud deployments, on a bare metal server cluster.

Workstation deployment

  • Single machine needed
  • 16GB RAM or more
  • Multi-core processor
  • 50GB of free disk space
  • Ubuntu 18.04 LTS or later
  • Uses MicroStack - snap-based installation
  • Includes all key OpenStack components
  • Fully compatible with the upstream
  • Supports development iteration

This is the recommended approach if you want to try OpenStack on your workstation. You will be able to perform all basic operations (e.g. upload images, create networks, launch instances, etc.) on a fully functional OpenStack. It takes just a few minutes to install it.

Deploy OpenStack on my workstation ›

Cluster deployment

  • Bare metal servers
  • At least 4 servers required, each with 8 GB RAM, IPMI BMCs, dual NICs
  • Network switch
  • Router port, gateway to Internet
  • Simple HA architecture supported
  • Scalable from 12 to 200 nodes

This is a starting point for your production cloud. You’ll step through the deployment of OpenStack services across machines in the cluster. A simple HA configuration is supported. For more sophisticated architectures, ongoing operations insight, alternative approaches to HA, or specialised telco, compliance, regulatory or HPC requirements, contact Canonical for consulting and support.

Deploy OpenStack on cluster ›

Workstation deployment

Single-node OpenStack installation instructions

These instructions use MicroStack, an upstream single-node OpenStack deployment which can run directly on your workstation. MicroStack is OpenStack in a snap which means that all services and supporting libraries are together in a single package that can be easily installed, upgraded or removed. MicroStack includes all key OpenStack components: Keystone, Nova, Neutron, Glance, and is evolving extremely fast. You can use it for development, prototyping and testing, but it is also perfectly suitable for the network edge, IoT and appliances.

Installation instructions

  1. Minimum requirements

    • Single machine with 16GB RAM and a multi-core processor, running Ubuntu 18.04 LTS or later and at least 50GB of free disk space.
  2. Install MicroStack

    If you are using Ubuntu 18.04 LTS or later, which we highly recommend, you can install MicroStack right away by running the following command from the terminal:

    However, if you are using an older Ubuntu version or different Linux distribution, you need to install snapd first. Refer to the documentation for more information on installing snapd on your Linux distribution.

    Once installed, you should see the following message on the terminal:

    microstack (beta) rocky from Canonical✓ installed

    The version displayed (here, Rocky) matches the most recent stable OpenStack release available with MicroStack.

  3. Initialise MicroStack

    Before using your OpenStack installation, it has to be initialised, so that networks and databases get configured. In order to do so, run:

    Your local OpenStack cloud is now running and is ready for being used!

  4. Interact with MicroStack

    You can interact with your OpenStack either via the web GUI or the CLI.

    Web GUI:

    To interact with your OpenStack via the web GUI visit http://10.20.20.1/ and log in with the following credentials:

    username: admin
    password: keystone

    Type the credentials and press the ‘Sign In’ button:

    OpenStack login page

    You should now see the OpenStack dashboard:

    OpenStack dashboard

    You can start playing with your local private cloud (i.e. create additional users, launch instances, etc.).

    CLI:

    You can also interact withOpenStack via the CLI by using the microstack.openstack command. The MicroStack CLI syntax is identical to the client delivered by the python-openstackclient package.

    For example, to list available OpenStack endpoints run:

    It should return the following list:

    +-----------+-----------+-----------------------------------------+
    | Name      | Type      | Endpoints                               |
    +-----------+-----------+-----------------------------------------+
    | neutron   | network   | microstack                              |
    |           |           |   public: http://10.20.20.1:9696        |
    |           |           | microstack                              |
    |           |           |   admin: http://10.20.20.1:9696         |
    |           |           | microstack                              |
    |           |           |   internal: http://10.20.20.1:9696      |
    |           |           |                                         |
    | keystone  | identity  | microstack                              |
    |           |           |   public: http://10.20.20.1:5000/v3/    |
    |           |           | microstack                              |
    |           |           |   internal: http://10.20.20.1:5000/v3/  |
    |           |           | microstack                              |
    |           |           |   admin: http://10.20.20.1:5000/v3/     |
    |           |           |                                         |
    | glance    | image     | microstack                              |
    |           |           |   admin: http://10.20.20.1:9292         |
    |           |           | microstack                              |
    |           |           |   public: http://10.20.20.1:9292        |
    |           |           | microstack                              |
    |           |           |   internal: http://10.20.20.1:9292      |
    |           |           |                                         |
    | placement | placement | microstack                              |
    |           |           |   public: http://10.20.20.1:8778        |
    |           |           | microstack                              |
    |           |           |   admin: http://10.20.20.1:8778         |
    |           |           | microstack                              |
    |           |           |   internal: http://10.20.20.1:8778      |
    |           |           |                                         |
    | nova      | compute   | microstack                              |
    |           |           |   public: http://10.20.20.1:8774/v2.1   |
    |           |           | microstack                              |
    |           |           |   admin: http://10.20.20.1:8774/v2.1    |
    |           |           | microstack                              |
    |           |           |   internal: http://10.20.20.1:8774/v2.1 |
    |           |           |                                         |
    +-----------+-----------+-----------------------------------------+

    Running microstack.openstack --help will get you a list of available subcommands and their required syntax.

  5. Launch an instance

    The quickest way to launch your first OpenStack instance (or a VM) is to run the following command:

    This should result in a lot of output from which the most important are the last two lines:

    Access your server with 'ssh -i /home/guardian/.ssh/id_microstack cirros@10.20.20.3'
    You can also visit the openstack dashboard at 'http://10.20.20.1/'

    Note that the IP address of the instance may be different in your environment. In order to connect to the instance run the ‘ssh’ command from the output:

    You are now connected to your first instance on your OpenStack cluster. You can start playing with it by executing various commands, for example:

    uptime
    14:51:42 up 4 min,  1 users,  load average: 0.00, 0.00, 0.00

    In order to disconnect from the instance type exit.

    You can also view the instance from the web GUI. Go to http://10.20.20.1/ and click on the "Instances" tab on the left:

    OpenStack instances page

    In order to perform a more advanced launch (e.g. specify the flavor, use a different image, etc.) refer to the python-openstackclient documentation. The syntax of the microstack.openstack command is the same as the syntax of the upstream client (for example microstack.openstack server list).

To learn more about MicroStack, visit https://opendev.org/x/microstack

Cluster deployment

Physical server cluster installation instructions

This is the simplest Ubuntu OpenStack deployment process across a small cluster of servers. It doesn’t try to do anything complicated with storage or networking, but it can expand to high availability configurations. We would recommend that this deployment process be followed for any small team looking to deploy their first OpenStack on a single rack. For more complex requirements or larger scale, please contact us for a workshop and architecture design session.

Installation instructions

  1. Minimum requirements

    4 x Intel, POWER or ARM servers each with:

    • 8GB RAM
    • IPMI BMC
    • 2 ethernet network interfaces

    You will also need a switch and router. The cluster must be on an isolated /24 network with a route to the internet. There must not be a DHCP server on this /24 network.

    High availability clouds require 12 nodes for service isolation, and you will need to setup an HA Postgres too.

  2. Set up your MAAS hardware

    Connect the both NICs of the servers to the same network switch.

    Identify the smallest server, if they are not identical. You will use this for MAAS, the ‘Metal as a Service’ provisioning system which will drive automated installation of the OS on the rest of the cluster.

    Install Ubuntu Server 18.04 LTS on the MAAS server. Give it an IP address on the /24 and static default route to the gateway router, so it can see the Internet. You might want to bond the two NICs for resilience and/or bandwidth aggregation.

  3. Install MAAS

    On your Ubuntu Server 18.04 LTS machine:

    Create your admin credentials:

    Login to the MAAS UI at http://<serverip>/MAAS/

    Complete the setup wizard for MAAS and import images for Ubuntu. Importing images may take a while, but you can ‘continue’ as soon as it’s started and work on other aspects of MAAS setup while the import happens.

    Add or import your SSH public keys. MAAS will ensure you can login with your normal SSH keys to any of the machines you deploy.

  4. Configure the subnet and DHCP

    Go to the ‘Subnets’ tab and verify that ‘gateway’ and ‘DNS’ are correct for your subnet.

    MAAS will provide DHCP and DNS for the /24 network on your isolated LAN switch.

    For the DHCP dynamic range, we recommend at least two IPs per NIC in the cluster (and remember you have at least two NICs per server, so probably 50 IPs in the range if you have 10 servers). Don’t use the entire /24 for DHCP though since you will need IP addresses for various OpenStack services and guests.

    Go back to the ‘subnets’ tab and this time click on the ‘untagged’ VLAN. Select ‘Take action’ and then ‘Provide dhcp’ with your dynamic range.

  5. Verify image syncing

    Go to the ‘Images’ tab and check if the Ubuntu images have all been downloaded and are in a ‘Synced’ state. Depending on your bandwidth it may take a while for it to finish. You can only proceed with the next steps if the images are synced.

  6. Register your hardware with
    MAAS

    For the rest of the machines in the cluster:

    • These are your OpenStack hosts
    • Set them to PXE boot by default
    • Connect both NICs to the ethernet switch

    We suggest you disable all other boot options in the BIOS for the OpenStack hosts in the cluster, including the local disk. MAAS will provide PXE so these servers boot successfully.

    Power the machines on. You should see them PXE boot ‘under MAAS control’ if they have monitors attached to them. They will all appear in the ‘Nodes’ tab of MAAS after a while once the initial PXE boot ‘enlistment’ process is done.

    Edit each machine, filling in the power type and other parameters, if they are not automatically set and correct already.

    Select all the machines and then ‘Take action’ and ‘Commission’ them.

    Wait until all machines have a “Ready” status

    Verify the networking on each server. Look at the interfaces tab for every server. The first NIC should be the PXE one and be on the /24 subnet with the IP address set to ‘Auto assign’. The second NIC (the non-PXE one) must be connected to the subnet with the IP address set to ‘Unconfigured’.

    You might want to test all the hardware by again selecting all the servers and ‘Take action’ then ‘Test hardware’ with whichever tests you care to run. Some tests are deep soak tests which will take a long time, others will comprehensively write all over the disks, so be thoughtful about which tests you run, although you are about to format these disks anyway.

  7. Install and launch conjure-up

    Install conjure-up on the MAAS server:

    If successful, you should see a screen as below:

    conjure-up's opening wizard in command line

  8. Select OpenStack hypervisor

    conjure-up offers two options with OpenStack:

    1. OpenStack with NovaLXD

    This installs OpenStack configured to use the LXC ‘machine container’ hypervisor — containers that behave like ultra-fast VMs. Choose this option to run Linux workloads in LXD containers, for higher density and for evaluation of OpenStack.

    2. OpenStack with NovaKVM

    This installs OpenStack configured to use the KVM hypervisor ready to launch full virtual machines. We recommend this option for production clouds.

    conjure-up's wizard with OpenStack with NovaKVM selected

  9. Configure a new cloud

    Once you have selected ‘OpenStack with ‘NovaKVM’, you will be prompted to create a new cloud with MAAS.

    conjure-up's wizard asking where to deploy the new cloud

  10. 10Add MAAS endpoint and credentials

    The MAAS REST API endpoint will be of the form: http://<maas.ip>/MAAS/.

    The api key is found under the MAAS ‘admin’ acouunt page as shown below.

    conjure-up's wizard asking for your MAAS credentials

    User preferences for admin interface on MAAS

    Next, you will have the opportunity to configure the individual OpenStack services.

    Review and configure applications screen on conjure-up

  11. 11Configure and deploy the OpenStack services

    Choose ‘Configure’ to change the default configuration of any component. When all components are configured to your liking, choose ‘Deploy’.

    conjure-up's status screens, showing a number of applications status

    OpenStack deploying

Need more help?

Let our cloud experts help you take the next step.

Contact us