Install via Devstack

Overview

Devstack based installation requires local.conf file. This file contains different configuration options required for installation.

Tacker provides some sample local.conf templates which can be used for Devstack based Tacker installation. You can find them in ${TACKER_ROOT}/devstack directory in the tacker repository.

Devstack supports installation from different code branches by specifying branch name in your local.conf.

  • For latest version installation, use master branch.

  • For specific release based installation, use corresponding branch name. For ex, to install wallaby release, use stable/wallaby.

For installation, stack.sh script in Devstack should be run as a non-root user with sudo enabled. Add a separate user stack and granting relevant privileges is a good way to install via Devstack [1].

Hardware Requirements

We recommend that your system meets the following hardware requirements:

Note

These are reference values to install Openstack and Kubernetes as VIM which generally requires the most resources. In reality, more parameters affect required resources.

Criteria

Recommended

CPU

4 cores or more

RAM

16 GB or more

Storage

80 GB or more

Note

We recommend that you run DevStack in a VM, rather than on your bare-metal server. If you have to run devstack on a bare-metal server, It is recommended to use a server that has at least two network interfaces [2].

Install

Devstack installation script stack.sh expects local.conf.

So the first step of installing tacker is to clone Devstack and prepare your local.conf.

  1. Download DevStack

    Get Devstack via git, with specific branch optionally if you prefer, and go down to the directory.

    $ git clone https://opendev.org/openstack/devstack -b <branch-name>
    $ cd devstack
    
  2. Enable tacker related Devstack plugins in local.conf file

    The local.conf can be created manually, or copied from Tacker repo [3]. If copied, rename it as local.conf.

    We have two choices for configuration basically:

    1. All-in-one mode

      All-in-one mode installs full Devstack environment including Tacker in one PC or Laptop.

      There are two examples for all-in-one mode:

      1. OpenStack as VIM.

        The example local.conf file for all-in-one mode with OpenStack is available at ${TACKER_ROOT}/devstack/local.conf.example.

        Refer below the contents of local.conf.example:

        [[local|localrc]]
        ############################################################
        # Customize the following HOST_IP based on your installation
        ############################################################
        HOST_IP=127.0.0.1
        
        ADMIN_PASSWORD=devstack
        MYSQL_PASSWORD=devstack
        RABBIT_PASSWORD=devstack
        SERVICE_PASSWORD=$ADMIN_PASSWORD
        SERVICE_TOKEN=devstack
        
        ############################################################
        # 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=ovn
        
        # Disable security groups
        LIBVIRT_FIREWALL_DRIVER=nova.virt.firewall.NoopFirewallDriver
        
        # Enable heat, networking-sfc and barbican
        enable_plugin heat https://opendev.org/openstack/heat master
        enable_plugin networking-sfc https://opendev.org/openstack/networking-sfc master
        enable_plugin barbican https://opendev.org/openstack/barbican master
        
        # Aodh
        enable_plugin aodh https://opendev.org/openstack/aodh master
        
        # Tacker
        enable_plugin tacker https://opendev.org/openstack/tacker master
        
        enable_service n-novnc
        enable_service n-cauth
        
        disable_service tempest
        
        [[post-config|/etc/neutron/dhcp_agent.ini]]
        [DEFAULT]
        enable_isolated_metadata = True
        
        # NOTE: workaround for Cinder image volume cache problem.
        # https://bugs.launchpad.net/cinder/+bug/1953704
        [[post-config|/etc/cinder/cinder.conf]]
        [lvmdriver-1]
        image_volume_cache_enabled = False
        
      2. Openstack and Kubernetes as VIM.

        The difference between all-in-one mode with Kubernetes is to deploy kuryr-kubernetes and octavia.

        The example local.conf for all-in-one mode with Kubernetes is available at ${TACKER_ROOT}/devstack/local.conf.kubernetes

        Refer below the contents of local.conf.kubernetes

        [[local|localrc]]
        ############################################################
        # Customize the following HOST_IP based on your installation
        ############################################################
        HOST_IP=127.0.0.1
        
        ADMIN_PASSWORD=devstack
        MYSQL_PASSWORD=devstack
        RABBIT_PASSWORD=devstack
        SERVICE_PASSWORD=$ADMIN_PASSWORD
        SERVICE_TOKEN=devstack
        
        ############################################################
        # 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=ovn
        
        # Disable security groups
        LIBVIRT_FIREWALL_DRIVER=nova.virt.firewall.NoopFirewallDriver
        
        # Enable neutron, heat, networking-sfc and barbican
        enable_plugin neutron https://opendev.org/openstack/neutron master
        enable_plugin heat https://opendev.org/openstack/heat master
        enable_plugin networking-sfc https://opendev.org/openstack/networking-sfc master
        enable_plugin barbican https://opendev.org/openstack/barbican master
        
        # Aodh
        enable_plugin aodh https://opendev.org/openstack/aodh master
        
        # Tacker
        enable_plugin tacker https://opendev.org/openstack/tacker master
        
        enable_service n-novnc
        enable_service n-cauth
        
        disable_service tempest
        
        # Enable kuryr-kubernetes, crio, octavia
        KUBERNETES_VIM=True
        # It is necessary to specify the patch version
        # because it is the version used when executing "apt-get install" command.
        KURYR_KUBERNETES_VERSION="1.26.8"
        CONTAINER_ENGINE="crio"
        # It is not necessary to specify the patch version
        # because it is the version used when adding the apt repository.
        CRIO_VERSION="1.26"
        enable_plugin kuryr-kubernetes https://opendev.org/openstack/kuryr-kubernetes master
        enable_plugin octavia https://opendev.org/openstack/octavia master
        enable_plugin devstack-plugin-container https://opendev.org/openstack/devstack-plugin-container master
        #KURYR_K8S_CLUSTER_IP_RANGE="10.0.0.0/24"
        
        enable_service kubernetes-master
        enable_service kuryr-kubernetes
        enable_service kuryr-daemon
        
        [[post-config|/etc/neutron/dhcp_agent.ini]]
        [DEFAULT]
        enable_isolated_metadata = True
        
        [[post-config|$OCTAVIA_CONF]]
        [controller_worker]
        amp_active_retries=9999
        
        # NOTE: workaround for Cinder image volume cache problem.
        # https://bugs.launchpad.net/cinder/+bug/1953704
        [[post-config|/etc/cinder/cinder.conf]]
        [lvmdriver-1]
        image_volume_cache_enabled = False
        

        Note

        The above local.conf.kubernetes does not work on CentOS8. Because docker-ce is not supported on CentOS8.

    2. Standalone mode

      Standalone mode installs only Tacker environment with some mandatory OpenStack services. Nova, Neutron or other essential components are not included in this mode.

      The example local.conf for standalone mode is available at ${TACKER_ROOT}/devstack/local.conf.standalone

      Refer below the contents of local.conf.standalone

      [[local|localrc]]
      ############################################################
      # Customize the following HOST_IP based on your installation
      ############################################################
      HOST_IP=127.0.0.1
      SERVICE_HOST=127.0.0.1
      
      SERVICE_PASSWORD=devstack
      ADMIN_PASSWORD=devstack
      SERVICE_TOKEN=devstack
      DATABASE_PASSWORD=root
      RABBIT_PASSWORD=password
      ENABLE_HTTPD_MOD_WSGI_SERVICES=True
      KEYSTONE_USE_MOD_WSGI=True
      
      # Logging
      LOGFILE=$DEST/logs/stack.sh.log
      VERBOSE=True
      ENABLE_DEBUG_LOG_LEVEL=True
      ENABLE_VERBOSE_LOG_LEVEL=True
      GIT_BASE=${GIT_BASE:-https://opendev.org}
      
      TACKER_MODE=standalone
      USE_BARBICAN=True
      enable_plugin networking-sfc ${GIT_BASE}/openstack/networking-sfc
      enable_plugin barbican ${GIT_BASE}/openstack/barbican
      enable_plugin tacker ${GIT_BASE}/openstack/tacker
      
  3. In CentOS environment install and start ovn services before executing stack.sh.

    $ sudo yum install -y centos-release-openstack-victoria
    $ sudo yum install -y openvswitch
    $ sudo yum install -y openvswitch-ovn-common
    $ sudo yum install -y openvswitch-ovn-central
    $ sudo yum install -y openvswitch-ovn-host
    $ sudo systemctl start ovn-northd.service
    $ sudo systemctl start ovn-controller.service
    $ sudo systemctl start ovs-vswitchd.service
    $ sudo systemctl start ovsdb-server.service
    
  4. Execute installation script

    After saving the local.conf, we can run stack.sh in the terminal to start installation.

    $ ./stack.sh
    

Use PostgreSQL as Tacker database

When installing via Devstack, MySQL is used as Tacker database backend by default.

To use PostgreSQL as Tacker database backend, execute the following command.

  1. Install PostgreSQL and login.

    $ sudo apt install postgresql postgresql-contrib
    $ sudo -i -u postgres
    $ psql
    
  2. Create PostgreSQL database and user.

    CREATE DATABASE tacker;
    CREATE ROLE tacker WITH CREATEDB LOGIN PASSWORD '<TACKERDB_PASSWORD>';
    exit;
    
  3. Modify postgresql.conf and restart PostgreSQL server.

    Note

    The location of postgresql.conf is different for each distribution. For Ubuntu distribution, modify /etc/postgresql/{POSTGRESQL_VERSION}/main/postgresql.conf.

    Insert escape as the value of bytea_output in postgresql.conf.

    bytea_output = 'escape'
    

    Restart PostgreSQL server.

    $ sudo service postgresql restart
    
  4. Modify tacker.conf for PostgreSQL and restart Tacker server.

    Edit the configuration of [database] in /etc/tacker/tacker.conf as follows.

    [database]
    connection = postgresql://tacker:<POSTGRES_PASSWORD>@<POSTGRES_IP>/tacker?client_encoding=utf8
    

    Restart Tacker server.

    $ sudo systemctl restart devstack@tacker.service
    $ sudo systemctl restart devstack@tacker-conductor.service
    
  5. Populate Tacker database.

    $ /usr/local/bin/tacker-db-manage \
        --config-file /etc/tacker/tacker.conf \
        upgrade head
    

Footnotes