写在前面
本篇文章本应该是在周二的时候更新的,当时并没有更新,主要是在考虑怎样做才能把这个公众号给做好,给大家提供更好的帮助。思考了一天,仍没有什么好的想法。如果大家有好的建议,好的想法可在文章底部留言。
安装neutron
[root@compute ~]# yum install -y openstack-neutronopenstack-neutron-linuxbridge ebtables ipset
复制
配置neutron
控制节点和计算节点的配置一样,可以直接从控制节点拷贝。
[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就可以创建一台虚拟机了。下节就开始创建第一台虚拟机。
文章转载自DevOps视角,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
评论
相关阅读
Centos/RedHat 7.x服务器挂载ISCSI存储示例(无多路径非LVM)
小周的数据库进阶之路
36次阅读
2025-03-31 10:03:04
NineData社区版体验分享
bisal的个人杂货铺
30次阅读
2025-03-20 09:50:35
Linux中xfs文件系统的磁盘(quota)配额(上篇)
watson
29次阅读
2025-03-24 19:14:41
学习linux用centos哪个版本学习?
云知识CLOUD
15次阅读
2025-04-08 11:30:16
Centos系统云主机中nvme盘不可用解决方法
天翼云开发者社区
9次阅读
2025-04-03 19:07:44