Skip to content
VirtualLP Virtual Learning Platform

Private Cloud Building Blocks and OpenStack Deployment

16 min read Topic 21 of 34

An OpenStack cloud needs several parts. Compute nodes run VMs (Virtual Machines). Storage nodes hold data. Network services connect resources. A controller runs services that manage the cloud.

This lesson shows what each part does and how the parts connect. Follow one service at a time, then use the diagrams to see the full setup.

hospital
  • The controller is the reception and admin office: it takes requests, keeps records and decides which ward a patient goes to.
  • The network node is the corridors and main gate: how people move inside and in/out of the building.
  • The storage node is the records room and lockers.
  • The compute nodes are the wards with beds, where the actual work (VMs) happens. To grow the hospital, you add more wards.

Private cloud building blocks

flowchart TB
    C[Controller node<br/>Keystone · Glance · Placement ·<br/>Nova API/scheduler/conductor ·<br/>Neutron server · Cinder API/scheduler ·<br/>Horizon · Heat · MariaDB · RabbitMQ · Memcached · etcd]
    N["Network node – optional<br/>Neutron L3 · DHCP · metadata agents"]
    S[Block storage node<br/>Cinder volume · LVM/Ceph]
    K1[Compute node 1<br/>Nova compute · KVM/libvirt ·<br/>Neutron OVS/OVN agent]
    K2[Compute node 2]
    C --- N --- S --- K1 --- K2
    N --- EXT[(External / provider network<br/>Internet)]
Building block Purpose
Identity & access Who can do what – Keystone
Compute Run virtual machines – Nova + hypervisor
Networking Virtual networks, routing, IP (Internet Protocol) addresses, firewalls – Neutron
Storage Images (Glance), permanent disks (Cinder), objects/files (Swift)
Shared infrastructure SQL (Structured Query Language) database, message queue, cache, time sync (NTP (Network Time Protocol)/chrony)
Self-service interface Horizon, APIs (Application Programming Interfaces), CLI (Command-Line Interface)
Automation & metering Heat, Ceilometer/Gnocchi, quotas

Physical networks in a typical deployment

The servers are connected by several separate networks, each for one kind of traffic (like separate roads for cars, buses and trucks):

Network Carries
Management Internal API calls, database and message-queue traffic between the nodes
Provider / external Traffic to and from the Internet; floating IPs
Tenant (overlay) VM-to-VM traffic, sent through VXLAN (Virtual Extensible Local Area Network)/Geneve tunnels between compute nodes
Storage iSCSI/Ceph traffic between compute and storage nodes

Prerequisites on every node

  1. A supported operating system (Ubuntu 22.04/24.04 LTS, Rocky/RHEL 9).
  2. Fixed (static) IP addresses and /etc/hosts entries (controller, compute1, block1) so nodes can find each other by name.
  3. Time synchronisation (NTP/chrony) – tokens and clustering fail if the clocks don't match.
  4. The OpenStack package repository (Ubuntu Cloud Archive / RDO).
  5. On the controller: MariaDB (SQL database), RabbitMQ (message queue), Memcached (fast cache for tokens), etcd (a shared key-value store).
# Controller infrastructure (Ubuntu)
sudo apt install mariadb-server python3-pymysql rabbitmq-server memcached etcd-server
sudo rabbitmqctl add_user openstack RABBIT_PASS
sudo rabbitmqctl set_permissions openstack ".*" ".*" ".*"

These commands install the shared infrastructure, then create a RabbitMQ user called openstack and allow it to use the message queue.

Deployment order

Order matters

Services must be installed in the order they depend on each other: Keystone → Glance → Placement → Nova (controller, then compute) → Neutron (controller, then compute) → Horizon → Cinder → Heat (and Swift if needed). Keystone is first because every other service registers its user and addresses in it.

For each service, the steps are always the same:

  1. Create its database and give it access rights.
  2. Create its service user in Keystone and give it the admin role in the service project.
  3. Register the service and its API addresses (public, internal, admin) in Keystone.
  4. Install the packages and edit the settings file (/etc/<service>/<service>.conf).
  5. Fill the database with tables (<service>-manage db sync).
  6. Restart and check the service.

Controller deployment

The controller runs the API servers, the schedulers and the shared infrastructure.

Keystone (identity)

mysql -e "CREATE DATABASE keystone; GRANT ALL ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'KEYSTONE_DBPASS';"
sudo apt install keystone
# /etc/keystone/keystone.conf
#   [database] connection = mysql+pymysql://keystone:KEYSTONE_DBPASS@controller/keystone
#   [token]    provider = fernet
sudo keystone-manage db_sync
sudo keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
sudo keystone-manage bootstrap --bootstrap-password ADMIN_PASS \
  --bootstrap-admin-url http://controller:5000/v3/ \
  --bootstrap-internal-url http://controller:5000/v3/ \
  --bootstrap-public-url http://controller:5000/v3/ \
  --bootstrap-region-id RegionOne
openstack project create --domain default --description "Service Project" service

The commands create Keystone's database, install the service and choose Fernet tokens. They then create the database tables, token keys, first admin account, service addresses and service project.

Glance (images) and Placement

openstack user create --domain default --password-prompt glance
openstack role add --project service --user glance admin
openstack service create --name glance --description "OpenStack Image" image
openstack endpoint create --region RegionOne image public http://controller:9292
openstack endpoint create --region RegionOne image internal http://controller:9292
openstack endpoint create --region RegionOne image admin http://controller:9292
sudo apt install glance && sudo glance-manage db_sync && sudo systemctl restart glance-api

Repeat the service setup pattern: create its user, assign a role, register the service and its addresses, install it, prepare its database and restart it.

Placement keeps a list of how much vCPU, RAM (Random Access Memory) and disk every compute node has and uses. The Nova scheduler asks Placement before choosing a host.

Nova on the controller

Nova's controller parts:

  • nova-api – receives REST (Representational State Transfer) requests,
  • nova-scheduler – chooses a host using filters (enough RAM? enough CPU (Central Processing Unit)? right zone?) and weighers (which of the remaining hosts is best),
  • nova-conductor – talks to the database for the compute nodes (so compute nodes never touch the database directly – safer),
  • nova-novncproxy – gives VM consoles in the browser.
sudo apt install nova-api nova-conductor nova-novncproxy nova-scheduler
sudo nova-manage api_db sync
sudo nova-manage cell_v2 map_cell0
sudo nova-manage cell_v2 create_cell --name=cell1 --verbose
sudo nova-manage db sync

(Cells are groups of compute nodes; cell0 holds VMs that failed to be scheduled, cell1 holds the real compute nodes.)

Horizon

sudo apt install openstack-dashboard
# /etc/openstack-dashboard/local_settings.py → OPENSTACK_HOST = "controller"

Networking deployment (Neutron)

Neutron provides networking as a service. Its parts:

Component Runs on Role
neutron-server Controller The API and the plug-in (ML2)
ML2 plug-in Controller Modular Layer 2 – type drivers (flat, VLAN (Virtual Local Area Network), VXLAN, Geneve: what kind of network) and mechanism drivers (Open vSwitch, Linux bridge, OVN (Open Virtual Network): how it is built)
L2 agent (OVS/Linux bridge) Network + compute nodes Plugs VM network ports into virtual switches
L3 agent Network node Virtual routers, NAT (Network Address Translation) and floating IPs
DHCP (Dynamic Host Configuration Protocol) agent Network node Gives IP addresses to VMs (using dnsmasq)
Metadata agent Network node Answers at 169.254.169.254 so cloud-init can get the VM's settings

Provider networks vs self-service networks

Provider networks (option 1) Self-service networks (option 2)
VMs connect directly to physical (VLAN/flat) networks Tenants create their own private networks (VXLAN overlays) and routers
Only admins create networks Any project can create its own networks
No virtual routers or floating IPs Uses the L3 agent for routing, NAT and floating IPs
Simple and fast The full self-service cloud experience (like AWS (Amazon Web Services) VPC (Virtual Private Cloud))
# /etc/neutron/plugins/ml2/ml2_conf.ini (self-service)
[ml2]
type_drivers = flat,vlan,vxlan
tenant_network_types = vxlan
mechanism_drivers = openvswitch,l2population
[ml2_type_flat]
flat_networks = provider
[ml2_type_vxlan]
vni_ranges = 1:1000

These settings allow flat, VLAN and VXLAN networks. Project networks use VXLAN. Open vSwitch connects them. The external network is named provider, and VXLAN IDs 1–1000 are available.

How a VM's packet reaches the Internet:

flowchart LR
    VM1[VM 10.10.0.5] --- BR[br-int] --- T[br-tun<br/>VXLAN] ==tunnel==> T2[br-tun on network node] --- R((Virtual router<br/>qrouter namespace)) --- EX[br-ex] --- INET[(Internet)]

Follow the traffic path: VM → integration bridge br-int → tunnel bridge br-tun → network node → project router → external bridge br-ex → Internet. The project router handles NAT in this example.

Block storage deployment (Cinder)

Component Runs on Role
cinder-api Controller REST API
cinder-scheduler Controller Chooses which storage back end gets the volume
cinder-volume Storage node Creates and manages volumes on the back end
cinder-backup Storage node Backs up volumes to Swift/NFS (Network File System)/Ceph

Back ends (where the data really lives): LVM (Logical Volume Manager) with iSCSI (simple), Ceph RBD (RADOS Block Device) (most popular – spread over many servers with copies), NFS, or company SAN (Storage Area Network) storage arrays (NetApp, Dell, Pure).

# Storage node with a spare disk /dev/sdb
sudo apt install lvm2 thin-provisioning-tools cinder-volume tgt
sudo pvcreate /dev/sdb
sudo vgcreate cinder-volumes /dev/sdb
# /etc/cinder/cinder.conf
#   [DEFAULT] enabled_backends = lvm
#   [lvm] volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
#         volume_group = cinder-volumes
#         target_protocol = iscsi
#         target_helper = tgtadm
sudo systemctl restart cinder-volume tgt
openstack volume service list

Install the storage tools. Prepare the spare disk for LVM, create the cinder-volumes group and tell Cinder to use it through iSCSI. Restart the service and check that it is listed as up.

Compute deployment (Nova on compute nodes)

Compute nodes run the hypervisor and nova-compute, plus the Neutron L2 agent.

egrep -c '(vmx|svm)' /proc/cpuinfo        # 0 → use virt_type = qemu
sudo apt install nova-compute
# /etc/nova/nova-compute.conf
#   [libvirt] virt_type = kvm
# /etc/nova/nova.conf
#   transport_url = rabbit://openstack:RABBIT_PASS@controller
#   [vnc] server_proxyclient_address = $my_ip ; novncproxy_base_url = http://controller:6080/vnc_auto.html
#   [glance] api_servers = http://controller:9292
#   [placement] … credentials …
sudo systemctl restart nova-compute

# Back on the controller: discover the new host
sudo nova-manage cell_v2 discover_hosts --verbose
openstack compute service list --service nova-compute
openstack hypervisor list

Check processor support, install nova-compute and set its connections to the controller services. Restart it. On the controller, discover the new compute node and check that it appears in the host list.

Adding capacity to the cloud is simply repeating this on more compute nodes – this is horizontal scaling of the private cloud.

Verification checklist

Check Command
Identity works openstack token issue
Service addresses registered openstack catalog list
Images available openstack image list
Compute services up openstack compute service list
Network agents alive openstack network agent list
Volume services up openstack volume service list
End-to-end test Launch an instance, attach a volume, give it a floating IP, ping it

Summary

  • Building blocks: identity, compute, networking, storage, shared infrastructure (database, message queue, cache, NTP), interface and automation.
  • Node roles: controller (APIs, schedulers, database, message queue, Horizon), network (L3/DHCP/metadata agents), storage (cinder-volume), compute (nova-compute + KVM (Kernel-based Virtual Machine) + L2 agent).
  • Install order: Keystone → Glance → Placement → Nova → Neutron → Horizon → Cinder → Heat; each service needs a database, a Keystone user, endpoints, settings and db sync.
  • Neutron offers provider networks (admin-defined, flat/VLAN) or self-service networks (tenant VXLAN + routers + floating IPs).
  • Cinder back ends: LVM/iSCSI, Ceph, NFS, SAN; new compute nodes are added with nova-manage cell_v2 discover_hosts.

Practice questions

  1. What are the building blocks of a private cloud? Map them to OpenStack services.
  2. Draw the OpenStack reference architecture showing controller, network, storage and compute nodes.
  3. Explain the controller deployment steps and the services it runs.
  4. Differentiate provider networks and self-service networks in Neutron.
  5. Explain the components of Neutron and Cinder.
  6. Describe how a new compute node is added to an OpenStack cloud.
  7. Why must Keystone be installed first?

Create a free account to track your progress and unlock virtual labs.