next up previous contents
Next: Provider Networks Up: Neutron Previous: 安裝前資料庫準備   Contents

安裝前環境準備-控制節點

  1. 先讀取 openstack 管理者 admin 環境變數。
    [root@ip112 ~]# source admin.token
    
  2. 新增 neutron 用戶,輸入密碼後產生。
    [root@ip112 ~]# openstack user create --domain default --password-prompt neutron
    User Password:
    Repeat User Password:
    +---------------------+----------------------------------+
    | Field               | Value                            |
    +---------------------+----------------------------------+
    | domain_id           | default                          |
    | enabled             | True                             |
    | id                  | a8cdd73f42c145019b6d622a1a730646 |
    | name                | neutron                          |
    | options             | {}                               |
    | password_expires_at | None                             |
    +---------------------+----------------------------------+
    
  3. 新增 admin role 到 neutron user 及 service project。
    [root@ip112 ~]# openstack role add --project service --user neutron admin
    
  4. 新增 neutron service。
    [root@ip112 ~]# openstack service create --name neutron \
    --description "OpenStack Networking" network
    +-------------+----------------------------------+
    | Field       | Value                            |
    +-------------+----------------------------------+
    | description | OpenStack Networking             |
    | enabled     | True                             |
    | id          | 216edf9649f24fb3bb8a15f5c917e9b2 |
    | name        | neutron                          |
    | type        | network                          |
    +-------------+----------------------------------+
    
  5. 新增 Networking API service endpoints,interface public。
    [root@ip112 ~]# openstack endpoint create --region RegionOne \
    network public http://controller:9696
    +--------------+----------------------------------+
    | Field        | Value                            |
    +--------------+----------------------------------+
    | enabled      | True                             |
    | id           | f4ffec0c55bd44018be966980ff0a772 |
    | interface    | public                           |
    | region       | RegionOne                        |
    | region_id    | RegionOne                        |
    | service_id   | 216edf9649f24fb3bb8a15f5c917e9b2 |
    | service_name | neutron                          |
    | service_type | network                          |
    | url          | http://controller:9696           |
    +--------------+----------------------------------+
    
  6. 新增 Networking API service endpoints,interface internal。
    [root@ip112 ~]# openstack endpoint create --region RegionOne \
    network internal http://controller:9696
    +--------------+----------------------------------+
    | Field        | Value                            |
    +--------------+----------------------------------+
    | enabled      | True                             |
    | id           | b946fece6fc5401eb29898c18b44e040 |
    | interface    | internal                         |
    | region       | RegionOne                        |
    | region_id    | RegionOne                        |
    | service_id   | 216edf9649f24fb3bb8a15f5c917e9b2 |
    | service_name | neutron                          |
    | service_type | network                          |
    | url          | http://controller:9696           |
    +--------------+----------------------------------+
    
  7. 新增 Networking API service endpoints,interface admin。
    [root@ip112 ~]# openstack endpoint create --region RegionOne \
    network admin http://controller:9696
    +--------------+----------------------------------+
    | Field        | Value                            |
    +--------------+----------------------------------+
    | enabled      | True                             |
    | id           | fa883698df874c6d8a22db2de9a221ee |
    | interface    | admin                            |
    | region       | RegionOne                        |
    | region_id    | RegionOne                        |
    | service_id   | 216edf9649f24fb3bb8a15f5c917e9b2 |
    | service_name | neutron                          |
    | service_type | network                          |
    | url          | http://controller:9696           |
    +--------------+----------------------------------+
    



2018-09-19