0%

ops-install-service-openstack_neutron

安装

预配置

  • 创建数据库

    1
    2
    create database neutron;
    grant all privileges on neutron.* to 'neutron'@'%' identified by 'neutron_dbpass';
  • 引用环境变量

    1
    source /opt/data/openstack/admin_openrc
  • 创建用户

    1
    2
    openstack user create --domain default --password-prompt neutron  # 输入 neutron 密码
    openstack role add --project service --user neutron admin
  • 创建服务

    1
    openstack service create --name neutron --description "OpenStack Networking" network
  • 创建 api 端点

    1
    2
    3
    openstack endpoint create --region RegionOne network public http://controller:9696
    openstack endpoint create --region RegionOne network internal http://controller:9696
    openstack endpoint create --region RegionOne network admin http://controller:9696

安装服务 - controller 节点

选择 self-service 网络模式

1
2
3
apt install -y neutron-server neutron-plugin-ml2 \
neutron-linuxbridge-agent neutron-l3-agent neutron-dhcp-agent \
neutron-metadata-agent

修改配置文件

  • 修改 /etc/neutron/neutron.conf 文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
[database]
connection = mysql+pymysql://neutron:neutron_dbpass@controller/neutron
# ...

[DEFAULT]
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = true
# ...
transport_url = rabbit://openstack:rabbit_pass@controller
# ...
auth_strategy = keystone
# ...
notify_nova_on_port_status_changes = true
notify_nova_on_port_data_changes = true

[keystone_authtoken]
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron_pass

[nova]
# ...
auth_url = http://controller:5000
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = nova
password = nova_pass

[oslo_concurrency]
# ...
lock_path = /var/lib/neutron/tmp

安装服务-compute

1
apt install -y neutron-linuxbridge-agent