OpenStackのCentOS7デプロイメント-Newtron(コンピューティングノード)のデプロイメント

OpenStackのCentOS7デプロイメント-Newtron(コンピューティングノード)のデプロイメント

HaoChaoyangのDevOpsの視点

前の
記事に書かれた記事は火曜日に更新されるべきでしたが、その時点では更新されていませんでした。主な理由は、この公式アカウントをうまく作成し、より良い支援を提供する方法を検討することです。一日考えてもいいアイデアはありません。良い提案があれば、記事の最後に良いアイデアを残すことができます。

中性子をインストールする


[root @ compute〜] #yum install -y openstack-neutronopenstack-neutron-linuxbridge ebtables ipset

中性子を構成する


制御ノードの構成は計算ノードの構成と同じであり、制御ノードから直接コピーできます。


[root@controller ~]# scp /etc/neutron/neutron.conf 192.168.1.12:/etc/neutron/
[root@controller ~]# scp /etc/neutron/plugins/ml2/linuxbridge_agent.ini192.168.1.12:/etc/neutron/plugins/ml2/
[root@controller ~]# scp /etc/neutron/plugins/ml2/ml2_conf.ini192.168.1.12:/etc/neutron/plugins/ml2
[root@compute ~]# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini/etc/neutron/plugin.ini

novaを構成する



[root@compute ~]# vim /etc/nova/nova.conf
3031 [neutron]
3032 url = http://192.168.1.11:9696
3033 auth_url = http://192.168.1.11:35357
3034 auth_plugin = password
3035 project_domain_id = default
3036 user_domain_id = default
3037 region_name = RegionOne
3038 project_name = service
3039 username = neutron
3040 password = neutron

サービス開始



[root@compute ~]# systemctl restart openstack-nova-compute
[root@compute ~]# systemctl enable neutron-linuxbridge-agent.service
[root@compute ~]# systemctl start neutron-linuxbridge-agent.service

確認を表示



[root@controller ~]# neutron agent-list
+--------------------------------------+--------------------+------------+-------+----------------+---------------------------+
| id                                  | agent_type         | host       | alive | admin_state_up | binary                    |
+--------------------------------------+--------------------+------------+-------+----------------+---------------------------+
| 41bcc4cb-dea4-4a4d-9ffa-18209c746762 | Metadata agent     | controller | :-)   | True           | neutron-metadata-agent    |
| 5c7c894f-5260-49d7-9da4-c90c0a591fb6 | DHCP agent         | controller | :-)   | True          | neutron-dhcp-agent        |
| 681419da-ab0d-4721-a82c-ac9fadcced67 | Linux bridge agent |compute    | :-)   | True           | neutron-linuxbridge-agent |
| 7df41d2f-f4a6-42cc-a761-83d9eab0a0f0 | Linux bridge agent | controller| :-)   | True           | neutron-linuxbridge-agent |
+--------------------------------------+--------------------+------------+-------+----------------+---------------------------+

ネットワークを作成する



[root@controller ~]# neutron net-create flat --shared--provider:physical_network physnet1 --provider:network_type flat
Created a new network:
+---------------------------+--------------------------------------+
| Field                     |Value                                |
+---------------------------+--------------------------------------+
| admin_state_up            |True                                 |
| id                        |d9aa89ae-01ba-4a3d-b553-7e63d48d0acb |
| mtu                       |0                                    |
| name                      |flat                                 |
| port_security_enabled     |True                                 |
| provider:network_type     |flat                                 |
| provider:physical_network | physnet1                             |
| provider:segmentation_id  |                                      |
| router:external           |False                                |
| shared                    |True                                 |
| status                    |ACTIVE                               |
| subnets                   |                                      |
| tenant_id                 |69d1967e59d247e6b7c4c3937d5baa89     |
+---------------------------+--------------------------------------+
[root@controller ~]# neutron net-list
+--------------------------------------+------+-----------------------------------------------------+
| id                                  | name | subnets                                             |
+--------------------------------------+------+-----------------------------------------------------+
| d9aa89ae-01ba-4a3d-b553-7e63d48d0acb | flat |a645f499-90a2-4e90-8bcb-f9040392c6bb 192.168.1.0/24 |
+--------------------------------------+------+-----------------------------------------------------+

サブネットを作成する


[root@controller ~]# neutron subnet-create flat 192.168.1.0/24 --nameflat-subnet --allocation-pool start=192.168.1.100,end=192.168.1.200--dns-nameserver 192.168.1.1 --gateway 192.168.1.1
Created a new subnet:
+-------------------+----------------------------------------------------+
| Field             | Value                                              |
+-------------------+----------------------------------------------------+
| allocation_pools  | {"start":"192.168.1.100", "end": "192.168.1.200"} |
| cidr              |192.168.1.0/24                                     |
| dns_nameservers   |192.168.1.1                                        |
| enable_dhcp       | True                                               |
| gateway_ip        |192.168.1.1                                        |
| host_routes       |                                                   |
| id                |a645f499-90a2-4e90-8bcb-f9040392c6bb               |
| ip_version        | 4                                                 |
| ipv6_address_mode |                                                   |
| ipv6_ra_mode      |                                                   |
| name              |flat-subnet                                        |
| network_id        |d9aa89ae-01ba-4a3d-b553-7e63d48d0acb               |
| subnetpool_id     |                                                   |
| tenant_id         |69d1967e59d247e6b7c4c3937d5baa89                   |
+-------------------+----------------------------------------------------+
[root@controller ~]# neutron subnet-list
+--------------------------------------+-------------+----------------+----------------------------------------------------+
| id                                   | name        | cidr           | allocation_pools                                   |
+--------------------------------------+-------------+----------------+----------------------------------------------------+
| a645f499-90a2-4e90-8bcb-f9040392c6bb | flat-subnet | 192.168.1.0/24 |{"start": "192.168.1.100", "end":"192.168.1.200"} |
+--------------------------------------+-------------+----------------+----------------------------------------------------+
    此时网络、存储(本地存储)、镜像已经完全具备,因此即使不安装cinder、dashboard就可以创建一台虚拟机了。下节就开始创建第一台虚拟机。

おすすめ

転載: blog.51cto.com/15127511/2658226