Post

Deploy Openstack All-in-one with Kolla-ansible

image What is openstack ?> “OpenStack is an open source cloud computing infrastructure software project and is one of the three most active open source projects in the world”. More details about openstack click here

Requirements for this tutorial:- Ubuntu 18.04 CPU 8 core,

  • 8 GB RAM
  • storage vda 50 GB, vdb 50G
  • 2 network interfaces ens3 > 10.20.20.10. ens9 > 10.30.30.10
  • Kolla ansible, - here

Lets build, setup on vm ubuntu

  1. Update, upgrade server and install dependency
    1
    2
    3
    
    $ sudo apt-get update; sudo apt-get upgrade
    $ sudo apt-get install python3-dev libffi-dev gcc libssl-dev
    $ sudo apt-get install python3-pip
    
  2. create a new userThis case user named kolla, then set kolla user as sudoer without password.
1
2
3
4
5
$ sudo useradd kolla -m -s /bin/bash
$ sudo vim /etc/sudoers.d/kolla
...
kolla ALL=(ALL) NOPASSWD: ALL
...
1
$ su - kolla
  1. Install kolla-ansible
    1
    2
    3
    4
    5
    6
    7
    
    $ sudo pip3 install -U pip
    $ sudo pip3 install ansible
    $ pip3 install kolla-ansible==10.0
    $ sudo mkdir -p /etc/kolla
    $ sudo chown $USER:$USER /etc/kolla
    $ cp -r /usr/local/share/kolla-ansible/etc_examples/kolla/* /etc/kolla
    $ cp /usr/local/share/kolla-ansible/ansible/inventory/* .
    
  2. create a partition for cinder volumefor tutorial create partition lvm you can see here.
1
$ sudo fdisk /dev/vdb
1
2
3
4
5
+--------+------+----------------+
| Device | Size |      Type      |
+--------+------+----------------+
| vdb1   | 100G | 8e (Linux LVM) |
+--------+------+----------------+
  1. Create LVM disk for cinder service
    1
    2
    3
    4
    
    sudo pvcreate -f /dev/vdb1
    sudo pvs
    sudo vgcreate -f cinder-volumes /dev/vdb1
    sudo vgs
    
  2. Edit ansible config
    1
    2
    3
    4
    5
    6
    7
    
    $ sudo vim /etc/ansible/ansible.cfg
    ...
    [defaults]
    host_key_checking=False
    pipelining=True
    forks=100
    ...
    
  3. Generate kolla password
    1
    
    $ kolla-genpwd
    
  4. Edit kolla configuration
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    
    $ vi /etc/kolla/globals.yml
    ...
    kolla_base_distro: "ubuntu"
    kolla_install_type: "source"
    openstack_release: "ussuri"
    kolla_internal_vip_address: "10.20.20.10"
    network_interface: "ens3"
    neutron_external_interface: "ens9"
    neutron_plugin_agent: "openvswitch"
    enable_heat: "yes"
    enable_neutron_provider_networks: "yes"
    nova_compute_virt_type: "kvm"
    enable_cinder: "yes"
    enable_cinder_backend_lvm: "yes"
    cinder_volume_group: "cinder-volumes"
    enable_neutron_qos: "yes"
    enable_openstack_core: "yes"
    enable_haproxy: "no"
    ...
    
  5. Deployment kolla
    1
    2
    3
    4
    5
    
    kolla-ansible -i all-in-one bootstrap-servers
    kolla-ansible -i all-in-one prechecks
    kolla-ansible -i all-in-one deploy
    kolla-ansible -i all-in-one post-deploy
    kolla-ansible -i all-in-one check
    
  6. install openstack CLI client
    1
    
    pip install python3-openstackclient
    
  7. Testing installationThere is a script that will create example networks, images, and so on.
1
2
$ cd /usr/local/share/kolla-ansible/
$ ./init-runonce
  1. Check openstack services
    1
    
    $ source /etc/kolla/admin-openrc.sh
    
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$ openstack service list
+----------------------------------+-------------+----------------+
| ID                               | Name        | Type           |
+----------------------------------+-------------+----------------+
| 211967ceae3b4cf1bc04ca1587c73073 | nova        | compute        |
| 4b0a44c2ae654e45a22ec6539d8c5634 | glance      | image          |
| 53b944270b7f489ea37f00027e5999a3 | neutron     | network        |
| 6dc350336f8c4a14831dda920545f64a | keystone    | identity       |
| 83bafae712084e76b09d6da590152bd0 | cinderv2    | volumev2       |
| 988dab40890d452a8f55eef7f85bfd46 | placement   | placement      |
| ab8d636872db481ea04b6c6075d63f8e | heat        | orchestration  |
| ae288e6298ea42af8cabb9d8865d0fac | cinderv3    | volumev3       |
| ba92ae6b96a04d2d9671a92802c90e61 | nova_legacy | compute_legacy |
| ea54bc5ca34846c894d12a054c1969a9 | heat-cfn    | cloudformation |
+----------------------------------+-------------+----------------+

Openstack all-in-one has been installed on ubuntu 18.04.

Reference:

https://docs.openstack.org/kolla-ansible/latest/

This post is licensed under CC BY 4.0 by the author.