Want to install a single node OpenStack on Ubuntu easily?. The conjure-up project lets you install complex pieces of software stack in an easy and automated manner. This will take you from no skill of big software to using it instead of learning how to deploy it. We have another article on setting up OpenStack on Ubuntu with DevStack. Check it out if you want an alternative solution.
A list of conjure-up spells are available on the registry. Some of the popular spells installable via conjure-up are:
- Kubernetes – microk8s, charmed-kubernetes
- OpenStack
- bigdata – hadoop
- e.t.c
My Computer Specs
- RAM: 16 GB
- Disk: 512 GB (SSD)
- CPU: 8 cores
- OS: Ubuntu 18.04
Step 1: Update Ubuntu:
Update your Ubuntu machine.
$ sudo apt update
$ sudo apt -y upgrade
[sudo] password for jkmutai:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
You can choose to reboot the machine after upgrade if not actively in use:
sudo reboot
Step 2: Install conjure-up
conjure-up is available on Ubuntu as snap.
$ sudo apt install snapd
$ sudo snap install conjure-up --classic
conjure-up 2.6.10-20191109.1611 from Canonical✓ installed
Step 3: Install LXD on Ubuntu
The conjure-up requires that the minimum version of LXD be 3.0.0. We need to install and configure LXD prior to using conjure-up. You can follow the LXD setup documentation.
Install LXD:
$ sudo snap install lxd
lxd 3.18 from Canonical✓ installed
Your $USER need to be part of the lxd group to access the LXD service. Add your $USER to lxd group perform the following:
sudo usermod -a -G lxd $USER
newgrp lxd
Initialize LXD by running the following command:
/snap/bin/lxd init
Default values should be enough for most settings.
Would you like to use LXD clustering? (yes/no) [default=no]:
Do you want to configure a new storage pool? (yes/no) [default=yes]:
Name of the new storage pool [default=default]:
Name of the storage backend to use (btrfs, ceph, dir, lvm, zfs) [default=zfs]:
Create a new ZFS pool? (yes/no) [default=yes]:
Would you like to use an existing block device? (yes/no) [default=no]:
Size in GB of the new loop device (1GB minimum) [default=93GB]:
Would you like to connect to a MAAS server? (yes/no) [default=no]:
Would you like to create a new local network bridge? (yes/no) [default=yes]:
What should the new bridge be called? [default=lxdbr0]:
What IPv4 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]:
What IPv6 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]:
Would you like LXD to be available over the network? (yes/no) [default=no]:
Would you like stale cached images to be updated automatically? (yes/no) [default=yes]
Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]:
Confirm bridge creation.
$ ip ad
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: wlp6s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether a4:c4:94:95:1b:45 brd ff:ff:ff:ff:ff:ff
inet 192.168.100.110/24 brd 192.168.100.255 scope global dynamic noprefixroute wlp6s0
valid_lft 85559sec preferred_lft 85559sec
inet6 fe80::3851:679f:eafe:2553/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: lxdbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
link/ether 5a:e5:cb:27:5d:e8 brd ff:ff:ff:ff:ff:ff
inet 10.60.49.1/24 scope global lxdbr0
valid_lft forever preferred_lft forever
inet6 fd42:81d3:730a:7bdf::1/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::58e5:cbff:fe27:5de8/64 scope link
valid_lft forever preferred_lft forever
For localhost deployments, LXD must have a network bridge defined:
lxc network set lxdbr0 ipv4.address=auto ipv4.nat=true ipv6.address=none ipv6.nat=false
Confirm IPv6 is disabled:
$ lxc network show lxdbr0
config:
ipv4.address: 10.173.59.1/24
ipv4.nat: "true"
ipv6.address: none
ipv6.nat: "false"
description: ""
name: lxdbr0
type: bridge
used_by:
- /1.0/containers/juju-4569b7-0
- /1.0/containers/juju-4569b7-1
- /1.0/containers/juju-4569b7-2
- /1.0/containers/juju-4569b7-3
- /1.0/containers/juju-63515f-0
managed: true
status: Created
locations:
- none
For guys using corporate proxy in their network, you need to configure LXD to use proxy for external access.
lxc config set core.proxy_http <http_proxy_server>
lxc config set core.proxy_https <https_proxy_server>
lxc config set core.proxy_ignore_hosts <no_proxy_hosts>
Step 4: Install OpenStack on Ubuntu with LXD and conjure-up
After installing both LXD and conjure-up, it’s time to install OpenStack on Ubuntu. Generate ssh keys:
$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/jkmutai/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/jkmutai/.ssh/id_rsa. Your public key has been saved in /home/jkmutai/.ssh/id_rsa.pub. The key fingerprint is: SHA256:02cZvM0AwvpQZji7Jnuccr6FOgci7LrgLaGj5e2SjEs jkmutai@hackszone The key's randomart image is: +---[RSA 2048]----+ | o. . | | o =. o | | B + | | + . B | |. +S . = o | |.o. o o... o | |+Eoo *... | |B==.+.*. | |B=o++Bo. | +----[SHA256]-----+
Installation of Single node OpenStack on Ubuntu can be done in interactive session. Run the command. This will give you a list of all available spells run:
$ conjure-up
Choose “OpenStack with NovaLXD” spell in the dialog.
In the screen, select “localhost“.
Choose LXD bridge for deployment.
Provide path to ssh public key to be used when launching OpenStack instances.
Conform OpenStack services being deployed and hit DEPLOY.
Be patient as deployment on OpenStack on LXD with conjure-up may take some time to complete. Juju controller will be initialized first then it takes control and perform other steps of installation.
A screen similar to below will show after a successful installation.
Take note of the Horizon URL and access credentials.
The default credentials are:
Username: admin Password: openstack
To remove deployments:
$ conjure-down
To uninstall conjure-up itself:
sudo snap remove conjure-up
That’s all. Enjoy running OpenStack on Ubuntu. More guides on OpenStack administration are shared below.
How To resize/extend Cinder Volume in OpenStack
How To rename an Instance/Server in OpenStack
How To Assign a Floating IP Address to an Instance in OpenStack
How To Create OpenStack Instance With a Fixed / Static IP Address
How To Create OpenStack projects, users and roles