Quick Start

Quick Start

This guide provides step by step instructions to deploy OpenStack using Kolla on bare metal servers or virtual machines.

Host machine requirements

The host machine must satisfy the following minimum requirements:

  • 2 network interfaces
  • 8GB main memory
  • 40GB disk space

Install dependencies

  1. Install and upgrad pip to the latest before proceeding.

    For CentOS, run:

    yum install epel-release
    yum install python-pip
    pip install -U pip
    

    For Ubuntu, run:

    apt-get update
    apt-get install python-pip
    pip install -U pip
    
  2. Install the following dependencies:

    For CentOS, run:

    yum install python-devel libffi-devel gcc openssl-devel libselinux-python
    

    For Ubuntu, run:

    apt-get install python-dev libffi-dev gcc libssl-dev python-selinux python-setuptools
    
  3. Install Ansible from distribution packaging:

    Note

    Some implemented distro versions of Ansible are too old to use distro packaging. Currently, CentOS and RHEL package Ansible >=2.4 which is suitable for use with Kolla. Note that you will need to enable access to the EPEL repository to install via yum to do so, take a look at Fedora’s EPEL docs and FAQ.

    For CentOS or RHEL, this can be done using:

    yum install ansible
    

    For Ubuntu, it can be installed by:

    apt-get install ansible
    
  4. Use pip to install or upgrade Ansible to latest version:

    pip install -U ansible
    

    Note

    It is recommended to use virtualenv to install non-system packages.

  5. (optional) Add the following options to ansible configuration file /etc/ansible/ansible.cfg:

    [defaults]
    host_key_checking=False
    pipelining=True
    forks=100
    

Install Kolla-ansible

Install Kolla-ansible for deployment or evaluation

  1. Install kolla-ansible and its dependencies using pip.

    pip install kolla-ansible
    
  2. Copy globals.yml and passwords.yml to /etc/kolla directory.

    For CentOS, run:

    cp -r /usr/share/kolla-ansible/etc_examples/kolla /etc/
    

    For Ubuntu, run:

    cp -r /usr/local/share/kolla-ansible/etc_examples/kolla /etc/
    
  3. Copy all-in-one and multinode inventory files to the current directory.

    For CentOS, run:

    cp /usr/share/kolla-ansible/ansible/inventory/* .
    

    For Ubuntu, run:

    cp /usr/local/share/kolla-ansible/ansible/inventory/* .
    

Install Kolla for development

  1. Clone kolla and kolla-ansible repositories from git.

    git clone https://github.com/openstack/kolla
    git clone https://github.com/openstack/kolla-ansible
    
  2. Install requirements of kolla and kolla-ansible:

    pip install -r kolla/requirements.txt
    pip install -r kolla-ansible/requirements.txt
    
  3. Copy the configuration files to /etc/kolla directory. kolla-ansible holds the configuration files ( globals.yml and passwords.yml) in etc/kolla.

    mkdir -p /etc/kolla
    cp -r kolla-ansible/etc/kolla/* /etc/kolla
    
  4. Copy the inventory files to the current directory. kolla-ansible holds inventory files ( all-in-one and multinode) in the ansible/inventory directory.

    cp kolla-ansible/ansible/inventory/* .
    

Prepare initial configuration

Inventory

Next step is to prepare our inventory file. Inventory is an ansible file where we specify node roles and access credentials.

Kolla-Ansible comes with all-in-one and multinode example inventory files. Difference between them is that the former is ready for deploying single node OpenStack on localhost. If you need to use separate host or more than one node, edit multinode inventory:

  1. Edit the first section of multinode with connection details of your environment, for example:

    [control]
    10.0.0.[10:12] ansible_user=ubuntu ansible_password=foobar ansible_become=true
    # Ansible supports syntax like [10:12] - that means 10, 11 and 12.
    # Become clause means "use sudo".
    
    [network:children]
    control
    # when you specify group_name:children, it will use contents of group specified.
    
    [compute]
    10.0.0.[13:14] ansible_user=ubuntu ansible_password=foobar ansible_become=true
    
    [monitoring]
    10.0.0.10
    # This group is for monitoring node.
    # Fill it with one of the controllers' IP address or some others.
    
    [storage:children]
    compute
    
    [deployment]
    localhost       ansible_connection=local become=true
    # use localhost and sudo
    

    To learn more about inventory files, check Ansible documentation.

  2. Check whether the configuration of inventory is correct or not, run:

    ansible -i multinode all -m ping
    

    Note

    Ubuntu might not come with python pre-installed. That will cause errors in ping module. To quickly install python with ansible you can run ansible -i multinode all -m raw -a "apt-get -y install python-dev"

Kolla passwords

Passwords used in our deployment are stored in /etc/kolla/passwords.yml file. All passwords are blank in this file and have to be filled either manually or by running random password generator:

For deployment or evaluation, run:

kolla-genpwd

For development, run:

cd kolla-ansible/tools
./generate_passwords.py

Kolla globals.yml

globals.yml is the main configuration file for Kolla-Ansible. There are a few options that are required to deploy Kolla-Ansible:

  • Image options

    User has to specify images that are going to be used for our deployment. In this guide DockerHub provided pre-built images are going to be used. To learn more about building mechanism, please refer image building documentation.

    Kolla provides choice of several Linux distributions in containers:

    • Centos
    • Ubuntu
    • Oraclelinux
    • Debian
    • RHEL

    For newcomers, we recommend to use CentOS 7 or Ubuntu 16.04.

    kolla_base_distro: "centos"
    

    Next “type” of installation needs to be configured. Choices are:

    binary

    using repositories like apt or yum

    source

    using raw source archives, git repositories or local source directory

    Note

    This only affects OpenStack services. Infrastructure services like Ceph are always “binary”.

    Note

    Source builds are proven to be slightly more reliable than binary.

    kolla_install_type: "source"
    

    To use DockerHub images, the default image tag has to be overridden. Images are tagged with release names. For example to use stable Rocky images set

    openstack_release: "rocky"
    

    It’s important to use same version of images as kolla-ansible. That means if pip was used to install kolla-ansible, that means it’s latest stable version so openstack_release should be set to rocky. If git was used with master branch, DockerHub also provides daily builds of master branch (which is tagged as master):

    openstack_release: "master"
    
  • Networking

    Kolla-Ansible requires a few networking options to be set. We need to set network interfaces used by OpenStack.

    First interface to set is “network_interface”. This is the default interface for multiple management-type networks.

    network_interface: "eth0"
    

    Second interface required is dedicated for Neutron external (or public) networks, can be vlan or flat, depends on how the networks are created. This interface should be active without IP address. If not, instances won’t be able to access to the external networks.

    neutron_external_interface: "eth1"
    

    To learn more about network configuration, refer Network overview.

    Next we need to provide floating IP for management traffic. This IP will be managed by keepalived to provide high availability, and should be set to be not used address in management network that is connected to our network_interface.

    kolla_internal_vip_address: "10.1.0.250"
    
  • Enable additional services

    By default Kolla-Ansible provides a bare compute kit, however it does provide support for a vast selection of additional services. To enable them, set enable_* to “yes”. For example, to enable Block Storage service:

    enable_cinder: "yes"
    

    Kolla now supports many OpenStack services, there is a list of available services. For more information about service configuration, Please refer to the Services Reference Guide.

Deployment

After configuration is set, we can proceed to the deployment phase. First we need to setup basic host-level dependencies, like docker.

Kolla-Ansible provides a playbook that will install all required services in the correct versions.

  • For deployment or evaluation, run:

    1. Bootstrap servers with kolla deploy dependencies:

      kolla-ansible -i ./multinode bootstrap-servers
      
    2. Do pre-deployment checks for hosts:

      kolla-ansible -i ./multinode prechecks
      
    3. Finally proceed to actual OpenStack deployment:

      kolla-ansible -i ./multinode deploy
      
  • For development, run:

    1. Bootstrap servers with kolla deploy dependencies:

      cd kolla-ansible/tools
      ./kolla-ansible -i ../ansible/inventory/multinode bootstrap-servers
      
    2. Do pre-deployment checks for hosts:

      ./kolla-ansible -i ../ansible/inventory/multinode prechecks
      
    3. Finally proceed to actual OpenStack deployment:

      ./kolla-ansible -i ../ansible/inventory/multinode deploy
      

When this playbook finishes, OpenStack should be up, running and functional! If error occurs during execution, refer to troubleshooting guide.

Using OpenStack

  1. Install basic OpenStack CLI clients:

    pip install python-openstackclient python-glanceclient python-neutronclient
    
  2. OpenStack requires an openrc file where credentials for admin user are set. To generate this file:

    • For deployment or evaluation, run:

      kolla-ansible post-deploy
      . /etc/kolla/admin-openrc.sh
      
    • For development, run:

      cd kolla-ansible/tools
      ./kolla-ansible post-deploy
      . /etc/kolla/admin-openrc.sh
      
  3. Depending on how you installed Kolla-Ansible, there is a script that will create example networks, images, and so on.

    • For deployment or evaluation, run init-runonce script on CentOS:

      . /usr/share/kolla-ansible/init-runonce
      

      Run init-runonce script on Ubuntu:

      . /usr/local/share/kolla-ansible/init-runonce
      
    • For development, run:

      . kolla-ansible/tools/init-runonce
      
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.