您的位置:首页 > 运维架构 > Linux

CentOS 7部署OpenStack(7)―部署Newtron(计算节点)

2016-01-11 09:07 696 查看
首先非常抱歉,最近一直比较忙没有更新。
安装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.conf3031 [neutron]3032 url = http://192.168.1.11:96963033 auth_url = http://192.168.1.11:353573034 auth_plugin = password3035 project_domain_id = default3036 user_domain_id = default3037 region_name = RegionOne3038 project_name = service3039 username = neutron3040 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 flatCreated 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.1Created 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就可以创建一台虚拟机了。下节就开始创建第一台虚拟机。
Linux运维开发群:298324302北京linux运维求职招聘群:153677549本文出自 “黑夜路人” 博客,请务必保留此出处/article/4422513.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: