CentOS 7部署OpenStack(6)—部署Newtron(控制节点)

同步数据库

[[email protected] ~]# mysql -u root -p -e "CREATE DATABASEneutron;"

Enter password:

[[email protected] ~]# mysql -u root -p -e "GRANT ALL PRIVILEGES ONneutron.* TO ‘neutron‘@‘localhost‘ IDENTIFIED BY ‘neutron‘;"

Enter password:

[[email protected] ~]# mysql -u root -p -e "GRANT ALL PRIVILEGES ONneutron.* TO ‘neutron‘@‘%‘ IDENTIFIED BY ‘neutron‘;"

Enter password:

[[email protected] ~]# vim /etc/neutron/neutron.conf

729 connection = mysql://neutron:[email protected]:3306/neutron

[[email protected] ~]# 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

安装neutron

[[email protected] ~]# yum install -y openstack-neutronopenstack-neutron-ml2 openstack-neutron-linuxbridge python-neutronclientebtables ipset

配置neutron

[[email protected] ~]# vim /etc/neutron/neutron.conf

锁路径

20 state_path = /var/lib/neutron

使用keystone验证

92 auth_strategy = keystone

配置连接keystone

716 [keystone_authtoken]

717 auth_uri = http://192.168.1.11:5000

718 auth_url = http://192.168.1.11:35357

719 auth_plugin = password

720 project_domain_id = default

721 user_domain_id = default

722 project_name = service

723 username = neutron

724 password = neutron

配置连接rabbitmq

985 rabbit_host = 192.168.1.11

989 rabbit_port = 5672

1001 rabbit_userid = openstack

1005 rabbit_password = openstack

Neutron相关配置

60 core_plugin = ml2

77 service_plugins = router

Nova相关配置

360 notify_nova_on_port_status_changes = True

364 notify_nova_on_port_data_changes = True

367 nova_url = http://192.168.1.11:8774/v2

774[nova]

775 auth_url =http://192.168.1.11:35357

776 auth_plugin = password

777 project_domain_id = default

778 user_domain_id = default

779 region_name = RegionOne

780 project_name = service

781 username = nova

782 password = nova

[[email protected] ~]# vim /etc/neutron/plugins/ml2/ml2_conf.ini

5 type_drivers = flat,vlan,gre,vxlan,geneve //支持的网络驱动

12 tenant_network_types = vlan,gre,vxlan,geneve//网络类型

18 mechanism_drivers = openvswitch,linuxbridge  //底层驱动

27 extension_drivers = port_security //端口安全

67 flat_networks = physnet1   //使用单一扁平网络

120 enable_ipset = True

[[email protected] ~]# vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini

9 physical_interface_mappings = physnet1:eth0

16 enable_vxlan = False

51 prevent_arp_spoofing= True

56 firewall_driver =neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

60 enable_security_group = True

[[email protected] ~]# vim /etc/neutron/dhcp_agent.ini

27 interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver

31 dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq

52 enable_isolated_metadata = True

[[email protected] ~]# vim /etc/neutron/metadata_agent.ini

5 auth_uri =http://192.168.1.11:5000

6 auth_url =http://192.168.1.11:35357

7 auth_region = RegionOne

8 auth_plugin = password

9 project_domain_id = default

10 user_domain_id = default

11 project_name = service

12 username = neutron

13 password = neutron

27 nova_metadata_ip = 192.168.1.1127 nova_metadata_ip = 192.168.1.11

52 metadata_proxy_shared_secret = neutron

修改nova配置

[[email protected] ~]# vim /etc/nova/nova.con

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

3048 service_metadata_proxy=true

3052 metadata_proxy_shared_secret=neutron

[[email protected] ~]# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini/etc/neutron/plugin.ini

创建用户

[[email protected] ~]# openstack user create --domain default--password=neutron neutron

+-----------+----------------------------------+

| Field     | Value                            |

+-----------+----------------------------------+

| domain_id | default                          |

| enabled   | True                             |

| id        |33d0790e74e24a4bb0de3b21263155a5 |

| name      | neutron                          |

+-----------+----------------------------------+

[[email protected] ~]# openstack role add --project service --user neutronadmin

注册服务

[[email protected] ~]# openstack service create --name neutron--description "OpenStack Networking" network

+-------------+----------------------------------+

| Field       | Value                            |

+-------------+----------------------------------+

| description | OpenStack Networking             |

| enabled     | True                             |

| id          |a057284a51ae4ea896fce082d0242fa6 |

| name        | neutron                          |

| type        | network                          |

+-------------+----------------------------------+

[[email protected] ~]# openstack endpoint create --region RegionOne networkpublic http://192.168.1.11:9696

+--------------+----------------------------------+

| Field        | Value                            |

+--------------+----------------------------------+

| enabled      | True                             |

| id           |77d289a63ccf4fa289a42f3ebba18fad |

| interface    | public                           |

| region       | RegionOne                        |

| region_id    | RegionOne                        |

| service_id   |a057284a51ae4ea896fce082d0242fa6 |

| service_name | neutron                          |

| service_type | network                          |

| url          |http://192.168.1.11:9696         |

+--------------+----------------------------------+

[[email protected] ~]# openstack endpoint create --region RegionOne networkinternal http://192.168.1.11:9696

+--------------+----------------------------------+

| Field        | Value                            |

+--------------+----------------------------------+

| enabled      | True                             |

| id           |571a7fb989f14efb9db43c20a03e3aff |

| interface    | internal                         |

| region       | RegionOne                        |

| region_id    | RegionOne                        |

| service_id   |a057284a51ae4ea896fce082d0242fa6 |

| service_name | neutron                          |

| service_type | network                         |

| url          |http://192.168.1.11:9696         |

+--------------+----------------------------------+

[[email protected] ~]# openstack endpoint create --region RegionOne networkadmin http://192.168.1.11:9696

+--------------+----------------------------------+

| Field        | Value                            |

+--------------+----------------------------------+

| enabled      | True                             |

| id           |008aac0f57e64e3084a76c2743f6c096 |

| interface    | admin                            |

| region       | RegionOne                        |

| region_id    | RegionOne                        |

| service_id   |a057284a51ae4ea896fce082d0242fa6 |

| service_name | neutron                          |

| service_type | network                          |

| url          |http://192.168.1.11:9696         |

+--------------+----------------------------------+

启动服务

[[email protected] ~]# systemctl restart openstack-nova-api

[[email protected] ~]# systemctl enable neutron-server.service \

neutron-linuxbridge-agent.service \

neutron-dhcp-agent.service \

neutron-metadata-agent.service

[[email protected] ~]# systemctl start neutron-server.service \

neutron-linuxbridge-agent.service \

neutron-dhcp-agent.service \

neutron-metadata-agent.service

查看验证

[[email protected] ~]# 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        |

| 7df41d2f-f4a6-42cc-a761-83d9eab0a0f0 | Linux bridge agent | controller| :-)   | True           | neutron-linuxbridge-agent |

+--------------------------------------+--------------------+------------+-------+----------------+---------------------------+

Linux运维开发群:298324302

北京linux运维求职招聘群:153677549

时间: 2024-10-12 18:00:56

CentOS 7部署OpenStack(6)—部署Newtron(控制节点)的相关文章

openstack Juno系列之控制节点搭建

openstack Juno系列之控制节点搭建 controller控制节点搭建 安装keystone ------------- 所有主机hosts: 取消其中127.0.0.1 10.0.0.11  controller 10.0.0.21  neutron 10.0.0.31  compute to configure prerequisites: apt-get install python-software-properties add-apt-repository cloud-arc

openstack icehouse系列之控制节点搭建

大家都知道openstack是目前最热门.最火的一个开源云计算软件.openstack是IaaS(基础设施即服务)组件,让任何人都可以自行建立和提供云端运算服务. 今天学习搭建下openstack icehouse版本的搭建.下面是环境介绍 网络节点:ml2.openvswitch.DHCP.l3.metadata 控制节点:mysql.keystone.glance.nova.neutron.dashboard.cinder 计算节点:nova-compute.qemu-kvm.openvsw

openstack常用命令及控制节点端口一览

[常用命令]1,查看服务openstack service list2,查看endpointopenstack endpoint list,3,查看域openstack domain list4,查看项目openstack project list5,查看用户openstack user list6,查看角色openstack role list7,查看镜像openstack image list8,列出可用类型: openstack flavor list9,列出可用镜像: openstack

Openstack云计算(二):openstack rocky部署三:nova 部署与验证(控制节)

Openstack 云计算(二): Openstack Rocky部署三 nova 部署与验证 (控制节点) 标签(空格分隔): openstack系列 一: nova 的部署 二: nova 验证 一: nova的部署 ###1.1 nova 数据库创建 mysql -uroot -p flyfish225 CREATE DATABASE nova_api; CREATE DATABASE nova; CREATE DATABASE nova_cell0; CREATE DATABASE pl

openstack项目【day24】:OpenStack mitaka部署

前言: openstack的部署非常简单,简单的前提建立在扎实的理论功底,本人一直觉得,玩技术一定是理论指导实践,网上遍布个种搭建方法都可以实现一个基本的私有云环境,但是诸位可曾发现,很多配置都是重复的,为何重复?到底什么位置该不该配?具体配置什么参数?很多作者本人都搞不清楚,今天本人就是要在这里正本清源. 介绍:本次案列为基本的三节点部署,集群案列后期有时间再整理 一:网络: 1.管理网络:172.16.209.0/24 2.数据网络:1.1.1.0/24 二:操作系统:CentOS Linu

kolla-ansible部署openstack

设计规划目前设计了2类角色, ceph和nova. 只要不是ceph集群的节点, 则都是nova, 需要承担计算服务,控制节点和网络节点目前由ceph{01..03}担任. 接双线. vlan 名称 网段(CIDR标记) 用途 设备 备注 1031-1060 os-tenant 用户自定义 项目私有网络 计算及网络节点所在的二层交换机 31个私有网络, 应该够了, 不然今后扩展为900-1030吧.? 1031 os-wuhan31 100.100.31.0/24 业务区(wuhan31)主机网

openstack实战部署

简介:Openstack系统是由几个关键服务组成,他们可以单独安装,这些服务根据你的云需求工作在一起,这些服务包括计算服务.认证服务.网络服务.镜像服务.块存储服务.对象存储服务.计量服务.编排服务和数据库服务.可以独立安装这些服务.肚子配置他们.或者连接成一个整体. #所有节点修改ip,主机名和hosts解析 # controller 10.0.0.11 controller # compute1 10.0.0.31 compute1 #所有节点准备本地repo源 rm -fr /etc/yu

openstack icehouse系列之网络节点搭建

我们接着上一篇博文openstack icehouse系列之控制节点搭建继续往下开始搭建下面是环境介绍. 网络节点:ml2.openvswitch.DHCP.l3.metadata 控制节点:mysql.keystone.glance.nova.neutron.dashboard.cinder 计算节点:nova-compute.qemu-kvm.openvswitch.ml2 keystone:验证 glance:镜像 nova:计算 neutron:网络 Network setup (网络节

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

首先非常抱歉,最近一直比较忙没有更新. 安装neutron [[email protected] ~]# yum install -y openstack-neutronopenstack-neutron-linuxbridge ebtables ipset 配置neutron 控制节点和计算节点的配置一样,可以直接从控制节点拷贝. [[email protected] ~]# scp /etc/neutron/neutron.conf 192.168.1.12:/etc/neutron/ [[