Installing Containerized OpenStack using Kolla



#I use RDO repos for the host

# curl > /etc/yum.repos.d/delorean.repo
# curl > /etc/yum.repos.d/dlrn.repo

echo "Installing dependencies..."
yum install -y epel-release
yum install -y python-pip docker docker-python ntp ansible python-devel libffi-devel openssl-devel gcc python-openstackclient python-neutronclient git

pip install -U pip
pip install -U docker-py

systemctl enable ntpd.service
systemctl start ntpd.service

# Create the drop-in unit directory for docker.service
mkdir -p /etc/systemd/system/docker.service.d

# Create the drop-in unit file
tee /etc/systemd/system/docker.service.d/kolla.conf <<-'EOF'

#Change the storage driver from the slow devicemapper to overlay

sed -ie 's/DOCKER_STORAGE_OPTIONS=/DOCKER_STORAGE_OPTIONS=--storage-driver=overlay/' /etc/sysconfig/docker-storage
sed -e 's/--selinux-enabled/--selinux-enabled=false/' /etc/sysconfig/docker

sed -ie 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config

# Run these commands to reload the daemon
systemctl daemon-reload
systemctl enable docker
systemctl restart docker

If the machine name is not on a DNS server we add it to the /etc/hosts file:


Install Kolla

It has to be installed from source:

# git clone
# pip install kolla/
# cd kolla
# cp -r etc/kolla /etc/

Configure Kolla

You can modify Kolla settings in /etc/kolla/globals.yml

docker_namespace: "kolla"
network_interface: "eth0"
neutron_external_interface: "eth1"
kolla_internal_vip_address: ""

If we change the docker_namespace an error is thrown

Start Registry

Since we're running kolla from git master we have to run our own registry

# docker run -d -p 4000:5000 --restart=always --name registry registry

Enable remote registry in the config file:

docker_registry: "localhost:4000"

Build Images

Since we're running from master it's recommended to build the images

# kolla-build

I got out of memory errors building some images on a VM with 4GB of RAM.
I had to install neutron-lbaas-agent manually:

# kolla-build neutron-lbaas-agent

Some images can't be built from binary (still, don't understand what this is) I ignore this ones since i don't want this components

# kolla-build -t source watcher-applier watcher-engine senlin-api kuryr senlin-engine senlin-base watcher-base watcher-api

Deploy Kolla

Generate passwords for /etc/kolla/passwords.yml

# kolla-genpwd


# kolla-ansible prechecks

Verify images

# kolla-ansible pull

Run deployment

# kolla-ansible deploy

On a small VM i had to run this command three times. This does not happen with a full system.

Post Deploy

# kolla-ansible post-deploy
# . /etc/kolla/
# kolla/tools/init-runonce


On a 4GB VM i got a Cannot allocate memory error when i run kolla build, had to create the images one by one with calling kolla-build for each one