Openstack

Aka the gate to hell

Preamble

Openstackarrow-up-right is a useful tool that allows the creation of in-house cloud solutions. In our case, Openstack is fundamental because it's used by the VIM (see Openbaton installation instructionsarrow-up-right) to launch instances and deploy services, other than create internal networking and routing.

Installation

The Openstack installation is not an easy one, particularly for newcomers, that have to deal with a great set of tools and not-always-clear instruction. Here we won't try to explain you how to perfectly install an Openstack instance, but we'll describe how we managed to get a single-node deployment up and running.

First of all, you need a machine with at least 16GB of ram and 50GB of HD space.

Devstack

Devstackarrow-up-right (god bless) allows to deploy a developer version of Openstack in a single node, and it makes modules activation and installation a piece of cake. In our case, we need to have an active version of:

  • Keystone (for identity management)

  • Object storage

  • Compute

  • Tacker (not mandatory if you're gonna use Openbaton as VIM)

Using Devstack is a brain-dead operation, but configuring it, oh boy, is not an easy one. In particular, the time required to install Openstack ranges from 20 to 1 hour, and every time your configuration is wrong you have to start all over again from scratch. For reference, after many tries, our local.conf file was:

local.conf
[[local|localrc]]
############################################################
# Customize the following HOST_IP based on your installation
############################################################
HOST_IP=<your ip address>

ADMIN_PASSWORD=Password1
MYSQL_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
SERVICE_TOKEN=$ADMIN_PASSWORD

############################################################
# Customize the following section based on your installation
############################################################

# Pip
PIP_USE_MIRRORS=False
USE_GET_PIP=1

#OFFLINE=False
#RECLONE=True

# Logging
LOGFILE=$DEST/logs/stack.sh.log
VERBOSE=True
ENABLE_DEBUG_LOG_LEVEL=True
ENABLE_VERBOSE_LOG_LEVEL=True

# Neutron ML2 with OpenVSwitch
Q_PLUGIN=ml2
Q_AGENT=openvswitch

SWIFT_REPLICAS=1
SWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5
FLOATING_RANGE=<your ip address.224/27>
FLOAT_INTERFACE=<select your interface where expose the service>

enable_service s-proxy s-object s-container s-account
enable_service h-eng h-api h-api-cfn h-api-cw

# Disable security groups
Q_USE_SECGROUP=False
LIBVIRT_FIREWALL_DRIVER=nova.virt.firewall.NoopFirewallDriver

# Enable heat, networking-sfc, barbican and mistral
enable_plugin heat https://git.openstack.org/openstack/heat stable/queens
enable_plugin networking-sfc git://git.openstack.org/openstack/networking-sfc stable/queens
enable_plugin barbican https://git.openstack.org/openstack/barbican stable/queens
enable_plugin mistral https://git.openstack.org/openstack/mistral stable/queens

# Ceilometer
#CEILOMETER_PIPELINE_INTERVAL=300
enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer stable/queens
enable_plugin aodh https://git.openstack.org/openstack/aodh stable/queens

# Tacker
enable_plugin tacker https://git.openstack.org/openstack/tacker stable/queens

enable_service n-novnc
enable_service n-cauth

disable_service tempest

# Enable Kubernetes and kuryr-kubernetes
#KUBERNETES_VIM=True
#NEUTRON_CREATE_INITIAL_NETWORKS=False
#enable_plugin kuryr-kubernetes https://git.openstack.org/openstack/kuryr-kubernetes stable/queens
#enable_plugin neutron-lbaas git://git.openstack.org/openstack/neutron-lbaas stable/queens
#enable_plugin devstack-plugin-container https://git.openstack.org/openstack/devstack-plugin-container stable/queens

[[post-config|/etc/neutron/dhcp_agent.ini]]
[DEFAULT]
enable_isolated_metadata = True
circle-exclamation
circle-info

In our case, we were able to develop a simple wrapper around the stack.shcommand (necessary to launch Openstack installation), that you can find in our repositoryarrow-up-right, but, for reference, we copy it here:

You need to pass two arguments to this script, that are:

  • b: the branch of the openstack version you want to use

  • l: the network link where openstack will listen for incoming requests

To sum up, here there is a valid example: ./bootstrap.sh -b stable/queens -l ens3

After that, you should able to login using admin and Password1 as credentials to your new, shining, Openstack installation. The script automatically adds a stack user into the system, where it performs the devstack installation. You should be able to log in this user simply typing: sudo su -l stack

Configurations

Tacker

If you used our script or our configuration, you should have Tacker installed and working. Here you can find a guide to how setup a default VIM and how to launch VNF instances.

Set up default VIM

In order to add new VNF, you need to have a VIM already set up. To set it up, you first need to login as nfv_user (the default password is devstack), then download the v3 openrc script, and then from the console include it (with source <namefile>).

circle-info

The openrc file should look like this:

The script will ask for the NFV user password, type it again. After this, you need to add a VIM site from a YAML file. A tipical YAML configuration is:

To add the VIM site to you Openstack installation, type the following command in your console:

After that, you should have the VIM in your list, like in the picture below.

Last updated