Openstack installation : Networking service on Controller node

Had followed steps given in https://docs.openstack.org – Content mostly from openstack.org – This is just a compilation on steps followed by me.  Minor changes may be observed as I had installed on Debian 9.6.

Previous Post : Install Compute Service on Compute Node(s)
Recommended reading : Networking (neutron) concepts

On the controller node create database for neutron services and grant privileges for ‘neutron’ user.

sandeep@controller:~$ mysql -uroot -p
Enter password: 
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 32
Server version: 10.1.37-MariaDB-0+deb9u1 Debian 9.6

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> create database neutron;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY '<password>';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY '<password>';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]>

As openstack admin user

sandeep@controller:~$ . admin-openrc

Create an user account

sandeep@controller:~$ openstack user create --domain default --password-prompt neutron
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field               | Value                            |
+---------------------+----------------------------------+
| domain_id           | default                          |
| enabled             | True                             |
| id                  | 7ae65185b1ce4e18a00185a05913440a |
| name                | neutron                          |
| password_expires_at | None                             |
+---------------------+----------------------------------+

Add admin role to the neutron user

sandeep@controller:~$ openstack role add --project service --user neutron admin

Create neutron service entity

sandeep@controller:~$ openstack service create --name neutron --description "OpenStack Networking" network
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | OpenStack Networking             |
| enabled     | True                             |
| id          | 4b05fde8f48a4f6ba88d305840af3fdf |
| name        | neutron                          |
| type        | network                          |
+-------------+----------------------------------+

Create service end points

sandeep@controller:~$ openstack endpoint create --region RegionOne network public http://controller:9696
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 6bd6e16e7dd748a3b938516be83bbc9c |
| interface    | public                           |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 4b05fde8f48a4f6ba88d305840af3fdf |
| service_name | neutron                          |
| service_type | network                          |
| url          | http://controller:9696           |
+--------------+----------------------------------+

sandeep@controller:~$ openstack endpoint create --region RegionOne network internal http://controller:9696
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 966cdfee3f704b6fb3b6e580d67e1fe5 |
| interface    | internal                         |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 4b05fde8f48a4f6ba88d305840af3fdf |
| service_name | neutron                          |
| service_type | network                          |
| url          | http://controller:9696           |
+--------------+----------------------------------+

sandeep@controller:~$ openstack endpoint create --region RegionOne network admin http://controller:9696
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 906885d3f64f41d981b773529896968d |
| interface    | admin                            |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 4b05fde8f48a4f6ba88d305840af3fdf |
| service_name | neutron                          |
| service_type | network                          |
| url          | http://controller:9696           |
+--------------+----------------------------------+
sandeep@controller:~$