最近在工作环境安装部署了juno版本,在GE口测试网络性能不太满意,发现mitaka版本支持ovs-dpdk,于是抽时间安装实验一番。

参考官网的安装文档,先准备将mitaka版本安装好再配置ovs。

实验环境:

1、vmware 12

2、controller节点:2vcpus,1G ram,20G disk,2 网卡

compute1节点:4vcpus,2G ram,20G disk,2 网卡

简便快速方式:在vm安装一个ubuntu14.04的server版本的虚拟机,配置好ssh,然后克隆出控制节点和计算节点。

网络布局:

存储节点暂时不安装,等需要研究需要再安装。

管理网络:

controller eth1配置10.0.0.11,compute1  eth1 配置10.0.0.21

提供外部网络的网卡配置,都如下:

在/etc/network/interfaces下添加
auto eth2
iface eth2 inet manual
up ip link set dev $IFACE up
down ip link set dev $IFACE down

每个节点都执行如下操作:

安装ntp:

apt-get install chrony

更新源

apt-get install software-properties-common

add-apt-repository cloud-archive:mitaka

apt-get update && apt-get dist-upgrade

apt-get install python-openstackclient

在控制节点:

1.安装数据库

apt-get install mariadb-server python-pymysql

/etc/mysql/conf.d/openstack.cnf

[mysqld]
bind-address = 10.0.0.11
default-storage-engine = innodb
innodb_file_per_table
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8

service mysql restart

mysql_secure_installation

2.安装消息队列

apt-get install rabbitmq-server
rabbitmqctl add_user openstack 123456
rabbitmqctl set_permissions openstack ".*" ".*" ".*"

3.安装memcache

apt-get install memcached python-memcache

/etc/memcached.conf
-l 10.0.0.11

service memcached restart

接下来安装keystone:

控制节点:

mysql -u root -p
CREATE DATABASE keystone;
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' \
  IDENTIFIED BY '123456';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' \
  IDENTIFIED BY '123456';
 
trait@controller:~$ openssl rand -hex 10
4200b5b54aa051fd9234

echo "manual" > /etc/init/keystone.override
apt-get install keystone apache2 libapache2-mod-wsgi

vim  /etc/keystone/keystone.conf

[DEFAULT]
admin_token = 4200b5b54aa051fd9234

[database]
connection = mysql+pymysql://keystone:123456@controller/keystone

[token]
provider = fernet

su -s /bin/sh -c "keystone-manage db_sync" keystone

keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone

vim /etc/apache2/apache2.conf 添加如下内容:

ServerName controller

vim /etc/apache2/sites-available/wsgi-keystone.conf 添加如下内容:
Listen 5000
Listen 35357

<VirtualHost *:5000>
    WSGIDaemonProcess keystone-public processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
    WSGIProcessGroup keystone-public
    WSGIScriptAlias / /usr/bin/keystone-wsgi-public
    WSGIApplicationGroup %{GLOBAL}
    WSGIPassAuthorization On
    ErrorLogFormat "%{cu}t %M"
    ErrorLog /var/log/apache2/keystone.log
    CustomLog /var/log/apache2/keystone_access.log combined

    <Directory /usr/bin>
        Require all granted
    </Directory>
</VirtualHost>

<VirtualHost *:35357>
    WSGIDaemonProcess keystone-admin processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
    WSGIProcessGroup keystone-admin
    WSGIScriptAlias / /usr/bin/keystone-wsgi-admin
    WSGIApplicationGroup %{GLOBAL}
    WSGIPassAuthorization On
    ErrorLogFormat "%{cu}t %M"
    ErrorLog /var/log/apache2/keystone.log
    CustomLog /var/log/apache2/keystone_access.log combined

    <Directory /usr/bin>
        Require all granted
    </Directory>
</VirtualHost>

ln -s /etc/apache2/sites-available/wsgi-keystone.conf /etc/apache2/sites-enabled
service apache2 restart
rm -f /var/lib/keystone/keystone.db

创建服务:

trait@controller:~$ export OS_TOKEN=4200b5b54aa051fd9234
trait@controller:~$ export OS_URL=http://controller:35357/v3
trait@controller:~$ export OS_IDENTITY_API_VERSION=3
trait@controller:~$ openstack service create --name keystone --description "OpenStack Identity" identity
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | OpenStack Identity               |
| enabled     | True                             |
| id          | 370765e770414ccbafa044d67e6b2997 |
| name        | keystone                         |
| type        | identity                         |
+-------------+----------------------------------+

trait@controller:~$ openstack endpoint create --region RegionOne identity public http://controller:5000/v3
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | b56b1648d5974882b7a2d06469a89d1c |
| interface    | public                           |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 370765e770414ccbafa044d67e6b2997 |
| service_name | keystone                         |
| service_type | identity                         |
| url          | http://controller:5000/v3        |
+--------------+----------------------------------+

trait@controller:~$ openstack endpoint create --region RegionOne identity admin http://controller:35357/v3
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 90e1e646f9114534bfee2049410065f7 |
| interface    | admin                            |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 370765e770414ccbafa044d67e6b2997 |
| service_name | keystone                         |
| service_type | identity                         |
| url          | http://controller:35357/v3       |
+--------------+----------------------------------+

创建域,项目,用户

trait@controller:~$ openstack domain create --description "Default Domain" default
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | Default Domain                   |
| enabled     | True                             |
| id          | ba70a48abe5941179904fee58d20ab66 |
| name        | default                          |
+-------------+----------------------------------+

trait@controller:~$ openstack project create --domain default --description "Admin Project" admin
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | Admin Project                    |
| domain_id   | ba70a48abe5941179904fee58d20ab66 |
| enabled     | True                             |
| id          | 5648f07e1ded400caba4e0ff25f9e2a8 |
| is_domain   | False                            |
| name        | admin                            |
| parent_id   | ba70a48abe5941179904fee58d20ab66 |
+-------------+----------------------------------+
trait@controller:~$ openstack user create --domain default --password-prompt admin
User Password:
Repeat User Password:
+-----------+----------------------------------+
| Field     | Value                            |
+-----------+----------------------------------+
| domain_id | ba70a48abe5941179904fee58d20ab66 |
| enabled   | True                             |
| id        | 4b370d2454d5461b8cbe2fea56096b5a |
| name      | admin                            |
+-----------+----------------------------------+
trait@controller:~$ openstack role create admin
+-----------+----------------------------------+
| Field     | Value                            |
+-----------+----------------------------------+
| domain_id | None                             |
| id        | 7e9491f8a9f2438fbc60f7f58ef6c100 |
| name      | admin                            |
+-----------+----------------------------------+
trait@controller:~$ openstack role add --project admin --user admin admin
trait@controller:~$

trait@controller:~$ openstack project create --domain default --description "Service Project" service
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | Service Project                  |
| domain_id   | ba70a48abe5941179904fee58d20ab66 |
| enabled     | True                             |
| id          | 8042914fb1ee454db0d7701c408820cf |
| is_domain   | False                            |
| name        | service                          |
| parent_id   | ba70a48abe5941179904fee58d20ab66 |
+-------------+----------------------------------+
trait@controller:~$ openstack project create --domain default --description "Demo Project" demo
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | Demo Project                     |
| domain_id   | ba70a48abe5941179904fee58d20ab66 |
| enabled     | True                             |
| id          | 1ac8bc179dd54ef8b7d8213174dee9aa |
| is_domain   | False                            |
| name        | demo                             |
| parent_id   | ba70a48abe5941179904fee58d20ab66 |
+-------------+----------------------------------+
trait@controller:~$ openstack user create --domain default --password-prompt demo
User Password:
Repeat User Password:
+-----------+----------------------------------+
| Field     | Value                            |
+-----------+----------------------------------+
| domain_id | ba70a48abe5941179904fee58d20ab66 |
| enabled   | True                             |
| id        | 23c004d3fe2942c4922d7c27dc71c7a8 |
| name      | demo                             |
+-----------+----------------------------------+

trait@controller:~$ openstack role create user
+-----------+----------------------------------+
| Field     | Value                            |
+-----------+----------------------------------+
| domain_id | None                             |
| id        | c714aa17116b4e7985b15518f81127b9 |
| name      | user                             |
+-----------+----------------------------------+

trait@controller:~$ openstack role add --project demo --user demo user
trait@controller:~$

OK 到这里keystone安装完成,第一次安装的话,可以按照官网的验证方法验证一下。

创建admin-openrc脚本:

export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default
export OS_PROJECT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=123456
export OS_AUTH_URL=http://controller:35357/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2

export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default
export OS_PROJECT_NAME=demo
export OS_USERNAME=demo
export OS_PASSWORD=123456
export OS_AUTH_URL=http://controller:5000/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2
 

创建demo-openrc脚本:

接下来,开始安装glance:

mysql -u root -p
CREATE DATABASE glance;

GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' \
  IDENTIFIED BY '123456';
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' \
  IDENTIFIED BY '123456';

trait@controller:~$ . admin-openrc
trait@controller:~$ openstack user create --domain default --password-prompt glance
User Password:
Repeat User Password:
+-----------+----------------------------------+
| Field     | Value                            |
+-----------+----------------------------------+
| domain_id | ba70a48abe5941179904fee58d20ab66 |
| enabled   | True                             |
| id        | e635a5acc68a4a0e966ecdb6509b07a9 |
| name      | glance                           |
+-----------+----------------------------------+

trait@controller:~$ openstack role add --project service --user glance admin
trait@controller:~$ openstack service create --name glance --description "OpenStack Image" image
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | OpenStack Image                  |
| enabled     | True                             |
| id          | 29dc2fd78f5b41d79ef7738f9e5530c1 |
| name        | glance                           |
| type        | image                            |
+-------------+----------------------------------+

trait@controller:~$ openstack endpoint create --region RegionOne image public http://controller:9292
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 3d07b7ee32b543868c049ecf6ff5b82b |
| interface    | public                           |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 29dc2fd78f5b41d79ef7738f9e5530c1 |
| service_name | glance                           |
| service_type | image                            |
| url          | http://controller:9292           |
+--------------+----------------------------------+

trait@controller:~$ openstack endpoint create --region RegionOne image internal http://controller:9292
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 98ee7d04e288469d80762f6e2860920e |
| interface    | internal                         |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 29dc2fd78f5b41d79ef7738f9e5530c1 |
| service_name | glance                           |
| service_type | image                            |
| url          | http://controller:9292           |
+--------------+----------------------------------+

trait@controller:~$ openstack endpoint create --region RegionOne image admin http://controller:9292
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 33d3f1bc8cad44b69c846026e2ed0fdb |
| interface    | admin                            |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 29dc2fd78f5b41d79ef7738f9e5530c1 |
| service_name | glance                           |
| service_type | image                            |
| url          | http://controller:9292           |
+--------------+----------------------------------+

apt-get install glance

在/etc/glance/glance-api.conf下添加,keystone_authtoken里只使用如下的内容。
[database]
connection = mysql+pymysql://glance:123456@controller/glance

[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = glance
password = 123456

[paste_deploy]
flavor = keystone

[glance_store]
stores = file,http
default_store = file
filesystem_store_datadir = /var/lib/glance/images/

在/etc/glance/glance-registry.conf添加如下内容:
[database]
connection = mysql+pymysql://glance:123456@controller/glance

[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = glance
password = 123456

[paste_deploy]
flavor = keystone

OK 可以 grep -v "^#" /etc/glance/glance-api.conf | grep -v "^$"   和 grep -v "^#" /etc/glance/glance-registry.conf | grep -v "^$" 检查一下是否正确。

su -s /bin/sh -c "glance-manage db_sync" glance

service glance-registry restart
service glance-api restart

glance 安装完成,可以上传cirros-0.3.4-x86_64-disk.img也可以自己制作镜像,后面我会再写一篇博客介绍一种比较方便的制作openstack镜像的方法。

开始安装nova:控制节点:

mysql -u root -p

CREATE DATABASE nova_api;
CREATE DATABASE nova;

GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' \
  IDENTIFIED BY '123456';
GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' \
  IDENTIFIED BY '123456';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' \
  IDENTIFIED BY '123456';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' \
  IDENTIFIED BY '123456';

trait@controller:~$ . admin-openrc
trait@controller:~$ openstack user create --domain default --password-prompt nova
User Password:
Repeat User Password:
+-----------+----------------------------------+
| Field     | Value                            |
+-----------+----------------------------------+
| domain_id | ba70a48abe5941179904fee58d20ab66 |
| enabled   | True                             |
| id        | 8b35eaf6aa47472f84f2001ed132f668 |
| name      | nova                             |
+-----------+----------------------------------+

trait@controller:~$ openstack role add --project service --user nova admin
trait@controller:~$

trait@controller:~$ openstack service create --name nova --description "OpenStack Compute" compute
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | OpenStack Compute                |
| enabled     | True                             |
| id          | 633998d68bb3418095453d7b3d337764 |
| name        | nova                             |
| type        | compute                          |
+-------------+----------------------------------+

trait@controller:~$ openstack endpoint create --region RegionOne compute public http://controller:8774/v2.1/%\(tenant_id\)s
+--------------+-------------------------------------------+
| Field        | Value                                     |
+--------------+-------------------------------------------+
| enabled      | True                                      |
| id           | a26320f613c847d88efac47b1306a786          |
| interface    | public                                    |
| region       | RegionOne                                 |
| region_id    | RegionOne                                 |
| service_id   | 633998d68bb3418095453d7b3d337764          |
| service_name | nova                                      |
| service_type | compute                                   |
| url          | http://controller:8774/v2.1/%(tenant_id)s |
+--------------+-------------------------------------------+

trait@controller:~$ openstack endpoint create --region RegionOne compute internal http://controller:8774/v2.1/%\(tenant_id\)s
+--------------+-------------------------------------------+
| Field        | Value                                     |
+--------------+-------------------------------------------+
| enabled      | True                                      |
| id           | 73a3f4a2b2e2442cb368d54c381988d1          |
| interface    | internal                                  |
| region       | RegionOne                                 |
| region_id    | RegionOne                                 |
| service_id   | 633998d68bb3418095453d7b3d337764          |
| service_name | nova                                      |
| service_type | compute                                   |
| url          | http://controller:8774/v2.1/%(tenant_id)s |
+--------------+-------------------------------------------+

trait@controller:~$ openstack endpoint create --region RegionOne compute admin http://controller:8774/v2.1/%\(tenant_id\)s
+--------------+-------------------------------------------+
| Field        | Value                                     |
+--------------+-------------------------------------------+
| enabled      | True                                      |
| id           | bffb5359cc324325a77a94f5b4576071          |
| interface    | admin                                     |
| region       | RegionOne                                 |
| region_id    | RegionOne                                 |
| service_id   | 633998d68bb3418095453d7b3d337764          |
| service_name | nova                                      |
| service_type | compute                                   |
| url          | http://controller:8774/v2.1/%(tenant_id)s |
+--------------+-------------------------------------------+

apt-get install nova-api nova-conductor nova-consoleauth nova-novncproxy nova-scheduler

在 /etc/nova/nova.conf 添加如下内容:

[api_database]
connection = mysql+pymysql://nova:123456@controller/nova_api

[database]
connection = mysql+pymysql://nova:123456@controller/nova

[DEFAULT]
enabled_apis = osapi_compute,metadata
rpc_backend = rabbit
my_ip = 10.0.0.11
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver
auth_strategy = keystone

[vnc]
vncserver_listen = $my_ip
vncserver_proxyclient_address = $my_ip

[glance]
api_servers = http://controller:9292

[oslo_concurrency]
lock_path = /var/lib/nova/tmp

[oslo_messaging_rabbit]
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = 123456

[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = 123456

在计算节点:

apt-get install nova-compute

在/etc/nova/nova.conf

[DEFAULT]
rpc_backend = rabbit
auth_strategy = keystone
my_ip = 10.0.0.21
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver

[oslo_messaging_rabbit]
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = 123456

[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = 123456

[vnc]
enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = $my_ip
novncproxy_base_url = http://controller:6080/vnc_auto.html

[glance]
api_servers = http://controller:9292

[oslo_concurrency]
lock_path = /var/lib/nova/tmp

root@compute1:~#  egrep -c '(vmx|svm)' /proc/cpuinfo
4
root@compute1:~#

如上的话就不用修改nova-compute.conf了。如果你的返回是0,那么如下修改:

[libvirt]

virt_type = qemu

OK,下面开始安装neutron:

在控制节点:

mysql -u root -p
CREATE DATABASE neutron;
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' \
  IDENTIFIED BY '123456';
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' \
  IDENTIFIED BY '123456';

trait@controller:~$ . admin-openrc
trait@controller:~$ openstack user create --domain default --password-prompt neutron
User Password:
Repeat User Password:
+-----------+----------------------------------+
| Field     | Value                            |
+-----------+----------------------------------+
| domain_id | ba70a48abe5941179904fee58d20ab66 |
| enabled   | True                             |
| id        | fceb7cf67b984803819f01b88e99c42d |
| name      | neutron                          |
+-----------+----------------------------------+

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

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

trait@controller:~$ openstack endpoint create --region RegionOne network public http://controller:9696
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 1bf3dc5f15ba4bb79fbbc5c478a9f7aa |
| interface    | public                           |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 361a7983524c4ff6be00765bf2bbd03b |
| service_name | neutron                          |
| service_type | network                          |
| url          | http://controller:9696           |
+--------------+----------------------------------+

trait@controller:~$ openstack endpoint create --region RegionOne  network internal http://controller:9696
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 52341779fb3344b5bbcd6d6397a4a4af |
| interface    | internal                         |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 361a7983524c4ff6be00765bf2bbd03b |
| service_name | neutron                          |
| service_type | network                          |
| url          | http://controller:9696           |
+--------------+----------------------------------+

trait@controller:~$ openstack endpoint create --region RegionOne  network admin http://controller:9696
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | fabf84db1fdf4be0a774e0d1e36bc3c8 |
| interface    | admin                            |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 361a7983524c4ff6be00765bf2bbd03b |
| service_name | neutron                          |
| service_type | network                          |
| url          | http://controller:9696           |
+--------------+----------------------------------+

安装L3代理的网络:

apt-get install neutron-server neutron-plugin-ml2 \
  neutron-linuxbridge-agent neutron-l3-agent neutron-dhcp-agent \
  neutron-metadata-agent

在/etc/neutron/neutron.conf 添加:
[database]
connection = mysql+pymysql://neutron:123456@controller/neutron

[DEFAULT]
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = True
rpc_backend = rabbit
notify_nova_on_port_status_changes = True
notify_nova_on_port_data_changes = True

auth_strategy = keystone

[oslo_messaging_rabbit]
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = 123456

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

[nova]
auth_url = http://controller:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = nova
password = 123456

/etc/neutron/plugins/ml2/ml2_conf.ini
[ml2]
type_drivers = flat,vlan,vxlan
tenant_network_types = vxlan
mechanism_drivers = linuxbridge,l2population
extension_drivers = port_security

[ml2_type_flat]
flat_networks = provider

[ml2_type_vxlan]
vni_ranges = 1:1000

[securitygroup]
enable_ipset = True

/etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]
physical_interface_mappings = provider:eth2

[vxlan]
enable_vxlan = True
local_ip = 10.0.0.11
l2_population = True

[securitygroup]
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

/etc/neutron/l3_agent.ini
[DEFAULT]
interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
external_network_bridge =

/etc/neutron/dhcp_agent.ini
[DEFAULT]
interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = True

/etc/neutron/metadata_agent.ini
[DEFAULT]
nova_metadata_ip = controller
metadata_proxy_shared_secret = 123456

/etc/nova/nova.conf
[neutron]
url = http://controller:9696
auth_url = http://controller:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = 123456

service_metadata_proxy = True
metadata_proxy_shared_secret = 123456

su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf \
  --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron

service nova-api restart
service neutron-server restart
service neutron-linuxbridge-agent restart
service neutron-dhcp-agent restart
service neutron-metadata-agent restart
service neutron-l3-agent restart

在计算节点:

apt-get install neutron-linuxbridge-agent

/etc/neutron/neutron.conf

 在[database]这节 , 注释 connection 选项。because compute nodes do not directly access the database.

[DEFAULT]
rpc_backend = rabbit
auth_strategy = keystone

[oslo_messaging_rabbit]
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = 123456

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

/etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]
physical_interface_mappings = provider:eth2

[vxlan]
enable_vxlan = True
local_ip = 10.0.0.21
l2_population = True

[securitygroup]
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

/etc/nova/nova.conf
[neutron]
url = http://controller:9696
auth_url = http://controller:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = 123456

service nova-compute restart
service neutron-linuxbridge-agent restart

trait@controller:~$ . admin-openrc
trait@controller:~$ neutron ext-list
+---------------------------+-----------------------------------------------+
| alias                     | name                                          |
+---------------------------+-----------------------------------------------+
| default-subnetpools       | Default Subnetpools                           |
| network-ip-availability   | Network IP Availability                       |
| network_availability_zone | Network Availability Zone                     |
| auto-allocated-topology   | Auto Allocated Topology Services              |
| ext-gw-mode               | Neutron L3 Configurable external gateway mode |
| binding                   | Port Binding                                  |
| agent                     | agent                                         |
| subnet_allocation         | Subnet Allocation                             |
| l3_agent_scheduler        | L3 Agent Scheduler                            |
| tag                       | Tag support                                   |
| external-net              | Neutron external network                      |
| net-mtu                   | Network MTU                                   |
| availability_zone         | Availability Zone                             |
| quotas                    | Quota management support                      |
| l3-ha                     | HA Router extension                           |
| provider                  | Provider Network                              |
| multi-provider            | Multi Provider Network                        |
| address-scope             | Address scope                                 |
| extraroute                | Neutron Extra Route                           |
| timestamp_core            | Time Stamp Fields addition for core resources |
| router                    | Neutron L3 Router                             |
| extra_dhcp_opt            | Neutron Extra DHCP opts                       |
| security-group            | security-group                                |
| dhcp_agent_scheduler      | DHCP Agent Scheduler                          |
| router_availability_zone  | Router Availability Zone                      |
| rbac-policies             | RBAC Policies                                 |
| standard-attr-description | standard-attr-description                     |
| port-security             | Port Security                                 |
| allowed-address-pairs     | Allowed Address Pairs                         |
| dvr                       | Distributed Virtual Router                    |
+---------------------------+-----------------------------------------------+
trait@controller:~$ neutron agent-list
+--------------------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+
| id                                   | agent_type         | host       | availability_zone | alive | admin_state_up | binary                    |
+--------------------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+
| 4e0b9ef6-f1af-40fa-8e12-71dbea095bc1 | L3 agent           | controller | nova              | :-)   | True           | neutron-l3-agent          |
| 705d2004-8b9b-46e1-b583-53372cf4b857 | Linux bridge agent | controller |                   | :-)   | True           | neutron-linuxbridge-agent |
| 75436579-b6c3-4a4d-a1f4-8bbf9e84e895 | Metadata agent     | controller |                   | :-)   | True           | neutron-metadata-agent    |
| 9b2ac64b-3c8c-4499-a063-e0515360827b | Linux bridge agent | compute1   |                   | :-)   | True           | neutron-linuxbridge-agent |
| ed38d626-c322-45bd-9c4e-7766d8654c35 | DHCP agent         | controller | nova              | :-)   | True           | neutron-dhcp-agent        |
+--------------------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+

OK
neutron安装完成。

在ubuntu14.04上安装openstack mitaka的更多相关文章

  1. [译]How to Install Node.js on Ubuntu 14.04 如何在ubuntu14.04上安装node.js

    原文链接为 http://www.hostingadvice.com/how-to/install-nodejs-ubuntu-14-04/ 由作者Jacob Nicholson 发表于October ...

  2. Ubuntu14.04上安装pip的方法

    在Ubuntu14.04上,建议通过下面的方法安装,这是一种通用的方法,也适用于Windows,当然在Windows下 手动下载下来就行了 wget https://bootstrap.pypa.io ...

  3. Caffe初学者第一部:Ubuntu14.04上安装caffe(CPU)+Python的详细过程 (亲测成功, 20180524更新)

    前言: 最近在学习深度学习,最先要解决的当然是开源框架的环境安装了.之前一直在学习谷歌的Tensorflow开源框架,最近实验中需要跟别人的算法比较,下载的别人的代码很多都是Caffe的,所以想着搭建 ...

  4. AWS ec2的ubuntu14.04上安装git服务

    http://imerc.xyz/2015/11/13/Ubuntu-14-04%E4%B8%8AGit%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%9A%84%E6%90%AD%E5 ...

  5. 在Ubuntu14.04上安装WordPress4搭建技术博客

    1.安装LAMP环境 1.1 安装Apache2 1.2 安装MySQL5 1.3 安装PHP5 1.4 安装phpMyAdmin 2.初始化数据库 3.下载并配置WordPress 4.配置Apac ...

  6. [原创]在Linux系统Ubuntu14.04上安装部署docker。

    Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化.容器是完全使用沙箱机制,相互之间不会有任何 ...

  7. ubuntu14.04上安装Mysql-5.7.11

    先安装好操作系统   在Mysql官网上下载最新版的Ubuntu Linux专用的Mysql.我这里下载的是:mysql-server_5.7.11-1ubuntu14.04_amd64.deb-bu ...

  8. 在ubuntu14.04上安装mono4.4 + jexus + mvc6

    0.准备工作 在/usr下建立一个文件夹,方便管理源码 cd /usr mkdir opensource cd opensource 安装vim(文本编辑器,不习惯用vim可以换成其他的) apt-g ...

  9. Ubuntu14.04上安装Composer

    1,查看机子上有没有安装php 2,下载Composer的安装包 3,安装Composer 4,设置Composer全局可访问

随机推荐

  1. CSLA .NET是一个.NET软件开发框架

    CSLA .NET是一个.NET软件开发框架,帮助开发者“为Windows.Web.面向服务和工作流等应用构建强大和可维护的业务逻辑层”. CSLA是Component-based, Scalable ...

  2. IIS 7.5配置PHP站点

    准备工作 首先下载并解压PHP程序文件,比如解压到C:/PHP/,不需要安装.IIS安装略. 第一步:添加ISAPI筛选器和CGI功能 控制面板—>程序和功能—>打开或关闭Windows功 ...

  3. git命令与github使用

    GitHub 是一个类似 SourceForge 的免费项目管理及分享的服务平台,要想使用 github,用户可以免费注册成为 github 注册用户,之后使用git命令进行操作使用.github 的 ...

  4. ASP.NET开发大杂烩

    ASP.NET开发大杂烩 正巧今天遇到一个获取动态生成table中的一个动态生成的TextBox的值的时候总是findcontrol不到.后来经过我们的徐总,瞬间解决,但是我觉得对于一个页面的声明周期 ...

  5. [转]Building a Basic Fuzzer with GDB: The Five Minute GDB Scripting Tutorial

    link:http://www.praetorian.com/blog/building-a-basic-fuzzer-with-gdb-the-five-minute-gdb-scripting-t ...

  6. 企业架构与建模之Archimate视图和视角

    企业架构与建模之Archimate视图和视角 3. ArchiMate的视角与视图 创建.维护一个企业架构是一件非常复杂繁琐的事情,因为这项工作需要面对许多背景.利益各异的干系人,对他们所关注的问题进 ...

  7. General Structure of Quartz.NET and How To Implement It

    General Structure of Quartz.NET and How To Implement It   General Structure of Quartz.NET and How To ...

  8. Memcache Slab Eviction 功能测试

    Memcache Slab Eviction 功能测试 1 功能简述 1.1 Automove功能背景 由于memcache的内存分配是基于slab的,每个1M的page内只能存放对应slab大小范围 ...

  9. ACM 位运算

    的幂 boolean power2(int x) { return((x&(x-1))==0)&&(x!=0): } For example: #include<stdi ...

  10. 桥接模式及C++实现 C++设计模式-AbstractFactory抽象工厂模式

    桥接模式及C++实现 桥接模式 先说说桥接模式的定义:将抽象化(Abstraction)与实现化(Implementation)分离,使得二者可以独立地变化. 桥接模式号称设计模式中最难理解的模式之一 ...