Installing OpenStack on Bionic Beaver and Failing
Tags: openstack, ubuntu
Published: 2019-09-14 23:31:23

For a bit of fun, I tried to get a workstation install of Open Stack running on a brand new install of Ubuntu 18.04. I just wanted to play so I thought a localhost install would be simple enough. 

It wasn't straight forward unfortunately because I followed the wrong  instructions.

tldr; Follow these instructions if you want to install OpenStack workstation on Ubuntu 18.04: [https://www.journaldev.com/30037/install-openstack-ubuntu-devstack](https://www.journaldev.com/30037/install-openstack-ubuntu-devstack)

Instead I dutifully followed these instructions: [Install OpenStack on Ubuntu](https://ubuntu.com/openstack/install#workstation-deployment)
 
It wasn't until I was part way through the conjure-up step that it suggested that I check the output of the command:

> Unable to parse JSON output from LXD, does /snap/bin/lxc query - wait -X GET /1.0 return info about the LXD server?

Running the command <b>sudo</b> worked fine. After much searching I found I needed to run the following:

```bash
$ sudo usermod -a -G lxd $USER
```

Then I needed to log off and log back in again for the change to take effect although there are smarter ways to do this. (Note I also sent off a ticket to Canonical in the hope they fix the instructions).

When I ran conjure-up again I got another error:

> waiting for 6 kube-system pods to start

It sat like this for over an hour so I got cranky and quit. I thought I would conjure-down and start again. I decided I would also to do a <b>lxd init</b>. It is very hard to find out how to do this but this article is of great help: [How to initialize LXD again](https://blog.simos.info/how-to-initialize-lxd-again/)

So back to trying to run <b>lxd init</b>. Note that depending on how much your conjure-up conjured up, you may not have to run all these steps:
```bash
$ conjure-down # This command will likely fail
$ lxc list 
# Delete all containers created by juju …
$ lxc list | grep juju | cut -f2 -d"|" | while read ii; do lxc stop $ii; lxc delete $ii; done
$ lxc network delete lxdbr0
$ lxc profile list | grep juju | cut -f2 -d"|" | while read ii; do printf 'config: {}\ndevices: {}' | sudo lxc profile edit $ii; done
# Note you may have to run the above command on other created profiles.
$ lxc storage delete default
$ sudo juju list-controllers
$ sudo juju destroy-controller name-of-the-controller-to-destroy
# You may want to take a copy of the following directory before running the rm command …
$ rm -rf ~/.local/share/juju
```

This had me back on track again. I had initially selected "zfs" for the storage back-end and "auto" for IPv6 during <b>lxd init</b>. But after finding [Install Single-server OpenStack with conjure-up](https://tutorials.ubuntu.com/tutorial/install-openstack-with-conjure-up#0), I realised I should have set the pool storage to "dir" and the IPv6 CIDR to "none".

So I ran <b>conjure-up</b> again and ... it failed again complaining that it could not connect to 10.x.x.x address. 

I read somewhere about it not liking the "auto" IPv4 CIDR so I picked an address with a width of 24 instead and ... it failed again
> Some applications failed to start successfully.

So which ones and why is the next logical step. I look at ~/.cache/conjure-up/conjure-up.log and find one lonely line:

>ERROR:root:neutron-gateway/0 failed: workload status is error

I am down but not defeated. I think I need a break and I will come back to it later.