#以root身份登录数据库
mysql -u root -p
#创建keystone数据库
CREATE DATABASE keystone;
#授予对keystone数据库的适当访问权限,请把下方KEYSTONE_DBPASS你自己设置的合适的密码
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' \
IDENTIFIED BY 'KEYSTONE_DBPASS';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' \
IDENTIFIED BY 'KEYSTONE_DBPASS';
#完成之后即可退出
openstack domain create --description "An Example Domain" example
#你将看到类似于如下的输出
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | An Example Domain |
| enabled | True |
| id | 2f4f80574fd84fe6ba9067228ae0a50c |
| name | example |
| tags | [] |
+-------------+----------------------------------+
本指南使用一个服务项目,该项目包含您添加到环境中的每个服务的唯一用户。创建服务 项目:
openstack project create --domain default \
--description "Service Project" service
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Service Project |
| domain_id | default |
| enabled | True |
| id | b75970c0f49b4d23933f01c44223f46c |
| is_domain | False |
| name | service |
| options | {} |
| parent_id | default |
| tags | [] |
+-------------+----------------------------------+
openstack user create --domain default \
--password-prompt myuser
User Password:
Repeat User Password:
No password was supplied, authentication will fail when a user does not have a password.
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| default_project_id | None |
| domain_id | default |
| email | None |
| enabled | True |
| id | 159f3e286d2c4c809d21e8918f5382af |
| name | myuser |
| description | None |
| password_expires_at | None |
+---------------------+----------------------------------+
创建 myrole 角色
openstack role create myrole
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | None |
| domain_id | None |
| id | 1f43c85377d84bd5aef2e01fa0676fcb |
| name | myrole |
| options | {} |
+-------------+----------------------------------+
将 myrole角色添加到myproject项目和myuser用户
openstack role add --project myproject --user myuser myrole
#执行以下命令时
openstack domain create --description "An Example Domain" example
#出现报错
Failed to discover available identity versions when contacting http://192.168.1.150:5000/v3. Attempting to parse version from URL.
Unable to establish connection to http://192.168.1.150:5000/v3/auth/tokens: HTTPConnectionPool(host='192.168.1.150', port=5000): Max retries exceeded with url: /v3/auth/tokens (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7ff6650208e0>: Failed to establish a new connection: [Errno 111] 拒绝连接'))
#这个问题排查分为两步
#1.检查你有没有运行用户环境变量的脚本是否出错,是否运行了用户环境变量的脚本
#2.检查httpd服务是否在运行,运行是否正常,配置文件是否正常,以及是否创建了wsgi-keystone.conf与/etc/httpd/conf.d/的链接
mysql -u root -p
#创建Glance数据库
CREATE DATABASE glance;
#授予对 glance 数据库的适当访问权限:
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' \
IDENTIFIED BY 'GLANCE_DBPASS';
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' \
IDENTIFIED BY 'GLANCE_DBPASS';
#退出数据库
exit;
将 GLANCE_DBPASS 替换为合适的密码。
创建服务凭证
获取管理员凭证以获取仅限管理员的 CLI 命令的访问权限
#如果不执行此步骤,后续服务创建会报凭证错误一类的东西
. admin-openrc
创建 glance 用户
#创建 glance 用户
openstack user create --domain default --password-prompt glance
User Password:
Repeat User Password:
No password was supplied, authentication will fail when a user does not have a password.
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| default_project_id | None |
| domain_id | default |
| email | None |
| enabled | True |
| id | ab9980873c564a3da9bec0a416784a54 |
| name | glance |
| description | None |
| password_expires_at | None |
+---------------------+----------------------------------+
将 admin 角色添加到glance用户和服务项目中
openstack role add --project service --user glance admin
创建 glance 服务实体
openstack service create --name glance \
--description "OpenStack Image" image
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| id | bf5b8fe67633426ebf0b16313496ef56 |
| name | glance |
| type | image |
| enabled | True |
| description | OpenStack Image |
+-------------+----------------------------------+
创建镜像(Image)服务 API 终端节点
#创建镜像服务 API 终端节点:
openstack endpoint create --region RegionOne \
image public http://controller:9292
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 6b1345b2a63240b0835ff2a456793264 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | f8c14710fbd34fdda67208e3ca63a9f8 |
| service_name | glance |
| service_type | image |
| url | http://192.168.1.150:9292 |
+--------------+----------------------------------+
###################################################################################
openstack endpoint create --region RegionOne \
image internal http://controller:9292
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 4d801549263a4861ae025c5dfe71d0dd |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | f8c14710fbd34fdda67208e3ca63a9f8 |
| service_name | glance |
| service_type | image |
| url | http://192.168.1.150:9292 |
+--------------+----------------------------------+
###################################################################################
openstack endpoint create --region RegionOne \
image admin http://controller:9292
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | f6357fdb1040416c93a8d81a88d49058 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | f8c14710fbd34fdda67208e3ca63a9f8 |
| service_name | glance |
| service_type | image |
| url | http://192.168.1.150:9292 |
+--------------+----------------------------------+
mysql -u root -p
#创建placement数据库
CREATE DATABASE placement;
#授予对数据库的适当访问权限
GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'localhost' \
IDENTIFIED BY 'PLACEMENT_DBPASS';
GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'%' \
IDENTIFIED BY 'PLACEMENT_DBPASS';
将 PLACEMENT_DBPASS 替换为合适的密码
退出数据库访问客户端以进行下一步
配置用户和端点
获取管理员凭证以获取仅限管理员的 CLI 命令的访问权限
. admin-openrc
创建placement服务
openstack user create --domain default --password-prompt placement
User Password:
Repeat User Password:
No password was supplied, authentication will fail when a user does not have a password.
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| default_project_id | None |
| domain_id | default |
| email | None |
| enabled | True |
| id | 7e211845b77b486f95fb79c8907e4bc0 |
| name | placement |
| description | None |
| password_expires_at | None |
+---------------------+----------------------------------+
将 Placement 用户添加到具有 admin 角色的服务项目中
openstack role add --project service --user placement admin
在服务目录中创建Placement API条目
openstack service create --name placement \
--description "Placement API" placement
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| id | 3ae6b7aa438246ec8612ebadc5ef4850 |
| name | placement |
| type | placement |
| enabled | True |
| description | Placement API |
+-------------+----------------------------------+
创建 Placement API 服务终端节点
openstack endpoint create --region RegionOne \
placement public http://controller:8778
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 010e3e2cc1ff49ebba59fdd8d39f72da |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 3ae6b7aa438246ec8612ebadc5ef4850 |
| service_name | placement |
| service_type | placement |
| url | http://192.168.1.150:8778 |
+--------------+----------------------------------+
##################################################################################
openstack endpoint create --region RegionOne \
placement internal http://controller:8778
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 2354cabc24ae4e32984c933c4f039c4c |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 3ae6b7aa438246ec8612ebadc5ef4850 |
| service_name | placement |
| service_type | placement |
| url | http://192.18.1.150:8778 |
+--------------+----------------------------------+
##################################################################################
openstack endpoint create --region RegionOne \
placement admin http://controller:8778
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | ac786f46a5cf47c189b0e64119efcce8 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 3ae6b7aa438246ec8612ebadc5ef4850 |
| service_name | placement |
| service_type | placement |
| url | http://192.168.1.150:8778 |
+--------------+----------------------------------+
mysql -u root -p
#创建nova_api、nova和nova_cell0数据库:
CREATE DATABASE nova_api;
CREATE DATABASE nova;
CREATE DATABASE nova_cell0;
#授予对数据库的适当访问权限
GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' \
IDENTIFIED BY 'NOVA_DBPASS';
GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' \
IDENTIFIED BY 'NOVA_DBPASS';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' \
IDENTIFIED BY 'NOVA_DBPASS';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' \
IDENTIFIED BY 'NOVA_DBPASS';
GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'localhost' \
IDENTIFIED BY 'NOVA_DBPASS';
GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' \
IDENTIFIED BY 'NOVA_DBPASS';
将 NOVA_DBPASS 替换为合适的密码
退出数据库访问客户端
获取管理员凭证以获取仅限管理员的 CLI 命令的访问权限
. admin-openrc
创建Nova服务的凭证
创建 nova 用户
openstack user create --domain default --password-prompt nova
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
User Password:
Repeat User Password:
No password was supplied, authentication will fail when a user does not have a password.
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| default_project_id | None |
| domain_id | default |
| email | None |
| enabled | True |
| id | c5981ffdb052447a8f3ed236cc8d593b |
| name | nova |
| description | None |
| password_expires_at | None |
+---------------------+----------------------------------+
将 admin 角色添加到 nova 用户
openstack role add --project service --user nova admin
创建nova服务实体
openstack service create --name nova \
--description "OpenStack Compute" compute
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| id | b1492fba9cc64f6483845e3924ee5caa |
| name | nova |
| type | compute |
| enabled | True |
| description | OpenStack Compute |
+-------------+----------------------------------+
创建 Compute API 服务终端节点
openstack endpoint create --region RegionOne \
compute public http://controller:8774/v2.1
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | dd469cbdc97c4493bbba5302d9c854b4 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | b1492fba9cc64f6483845e3924ee5caa |
| service_name | nova |
| service_type | compute |
| url | http://192.168.1.150:8774/v2.1 |
+--------------+----------------------------------+
###################################################################################
openstack endpoint create --region RegionOne \
compute internal http://controller:8774/v2.1
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 981341ba97be44128cff8a8990fb4047 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | b1492fba9cc64f6483845e3924ee5caa |
| service_name | nova |
| service_type | compute |
| url | http://192.168.1.150:8774/v2.1 |
+--------------+----------------------------------+
###################################################################################
openstack endpoint create --region RegionOne \
compute admin http://controller:8774/v2.1
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 3e7d802c623b4b2394025fd22f9543b1 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | b1492fba9cc64f6483845e3924ee5caa |
| service_name | nova |
| service_type | compute |
| url | http://192.168.1.150:8774/v2.1 |
+--------------+----------------------------------+
File "/usr/lib/python3.9/site-packages/nova/scheduler/client/report.py", line 277, in _create_client
client = self._adapter or utils.get_sdk_adapter('placement')
File "/usr/lib/python3.9/site-packages/nova/utils.py", line 995, in get_sdk_adapter
return getattr(conn, service_type)
File "/usr/lib/python3.9/site-packages/openstack/service_description.py", line 89, in __get__
proxy = self._make_proxy(instance)
File "/usr/lib/python3.9/site-packages/openstack/service_description.py", line 293, in _make_proxy
raise exceptions.NotSupported(
openstack.exceptions.NotSupported: The placement service for 192.168.1.150:RegionOne exists but does not have any supported versions.
关于这个报错,是在配置好controller节点的时候出现的
启动openstack-nova-scheduler.service,openstack-nova-conductor.service,openstack-nova-novncproxy.service出现服务启动失败,systemctl status openstack-nova-scheduler时出现在状态里面显示的,要多试几次,他一直在重启,状态只能看命令输入时的,所以要一直查看状态才能发现。我的问题是因为最开始在placement配置的时候没有配置/etc/httpd/conf.d/00-placement-api.conf导致的,毕竟官方没给(或许是给了但是放在了用法里面我没看到)
openstack compute service list --service nova-compute
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+----------------+--------------+---------+------+---------+-------+-----------------+
| ID | Binary | Host | Zone | Status | State | Updated At |
+----------------+--------------+---------+------+---------+-------+-----------------+
| 1a727e25-9c9c- | nova-compute | compute | nova | enabled | up | 2025-04-13T17:4 |
| 48eb-9c26-b454 | | | | | | 6:38.000000 |
| 1b913a93 | | | | | | |
+----------------+--------------+---------+------+---------+-------+-----------------+
发现计算节点主机
su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
Found 2 cell mappings.
Skipping cell0 since it does not contain hosts.
Getting computes from cell 'cell1': b87d47a8-f346-41cd-ac2d-7a278da76b2a
Checking host mapping for compute host 'compute': 9f3f70da-ad3f-46d2-ba14-435b0b82cb5b
Creating host mapping for compute host 'compute': 9f3f70da-ad3f-46d2-ba14-435b0b82cb5b
Found 1 unmapped computes in cell: b87d47a8-f346-41cd-ac2d-7a278da76b2a
mysql -u root -p
#创建neutron数据库
CREATE DATABASE neutron;
#授予对 neutron 数据库的适当访问权限
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' \
IDENTIFIED BY 'NEUTRON_DBPASS';
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' \
IDENTIFIED BY 'NEUTRON_DBPASS';
#退出数据库
将NEUTRON_DBPASS替换成合适的密码
创建neutron服务
获取管理员凭证以获取仅限管理员的 CLI 命令的访问权限
. admin-openrc
创建 neutron 用户
openstack user create --domain default --password-prompt neutron
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
User Password:
Repeat User Password:
No password was supplied, authentication will fail when a user does not have a password.
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| default_project_id | None |
| domain_id | default |
| email | None |
| enabled | True |
| id | 2ec4fa2ca308472ca34e9621da51b0cc |
| name | neutron |
| description | None |
| password_expires_at | None |
+---------------------+----------------------------------+
将admim角色添加到neutron用户
openstack role add --project service --user neutron admin
创建 neutron 服务实体
openstack service create --name neutron \
--description "OpenStack Networking" network
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| id | 6759eb96018f4d5a8ae2a9a41ca407de |
| name | neutron |
| type | network |
| enabled | True |
| description | OpenStack Networking |
+-------------+----------------------------------+
创建网络服务 API 终端节点
openstack endpoint create --region RegionOne \
network public http://controller:9696
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 52277aa4e4c04bfaa719f0ec65f525b3 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 6759eb96018f4d5a8ae2a9a41ca407de |
| service_name | neutron |
| service_type | network |
| url | http://192.168.1.150:9696 |
+--------------+----------------------------------+
###################################################################################
openstack endpoint create --region RegionOne \
network internal http://controller:9696
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | c81d4ecb788d483aa10e3060fc5f7393 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 6759eb96018f4d5a8ae2a9a41ca407de |
| service_name | neutron |
| service_type | network |
| url | http://192.168.1.150:9696 |
+--------------+----------------------------------+
###################################################################################
openstack endpoint create --region RegionOne \
network admin http://controller:9696
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 6ac15c332fcb40e1b2b330016be3ac67 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 6759eb96018f4d5a8ae2a9a41ca407de |
| service_name | neutron |
| service_type | network |
| url | http://192.168.1.150:9696 |
+--------------+----------------------------------+
配置网络选项
选项 1 部署了最简单的架构,该架构仅支持将实例连接到提供商(外部)网络。没有自助式(专用)网络、路由器或浮动 IP 地址。只有管理员或其他特权用户才能管理提供商网络。
选项 2 使用支持将实例连接到自助服务网络的第 3 层服务对选项 1 进行了补充。演示者或其他非特权用户可以管理自助服务网络,包括在自助服务网络和提供商网络之间提供连接的路由器。此外,浮动 IP 地址使用来自外部网络(如 Internet)的自助服务网络提供与实例的连接。
自助服务网络通常使用叠加网络。叠加网络协议(如 VXLAN)包括额外的标头,这些标头会增加开销并减少有效负载或用户数据的可用空间。在不知道虚拟网络基础设施的情况下,实例会尝试使用 1500 字节的默认以太网最大传输单元 (MTU) 发送数据包。联网服务通过 DHCP 自动为实例提供正确的 MTU 值。但是,某些云映像不使用 DHCP 或忽略 DHCP MTU 选项,并且需要使用元数据或脚本进行配置。
echo "net.bridge.bridge-nf-call-iptables=1" | sudo tee -a /etc/sysctl.d/99-bridge-nf.conf
echo "net.bridge.bridge-nf-call-ip6tables=1" | sudo tee -a /etc/sysctl.d/99-bridge-nf.conf
openstack network agent list
+-----------------------------------------------------------------+---------------------------------------------+------------------------------------------------------------------+
| Name | Alias | Description |
+-----------------------------------------------------------------+---------------------------------------------+------------------------------------------------------------------+
| Address group | address-group | Support address group |
| Address scope | address-scope | Address scopes extension. |
| Enforce Router's Admin State Down Before Update Extension | router-admin-state-down-before-update | Ensure that the admin state of a router is DOWN |
| | | (admin_state_up=False) before updating the distributed attribute |
| agent | agent | The agent management extension. |
| Agent's Resource View Synced to Placement | agent-resources-synced | Stores success/failure of last sync to Placement |
| Allowed Address Pairs | allowed-address-pairs | Provides allowed address pairs |
| Auto Allocated Topology Services | auto-allocated-topology | Auto Allocated Topology Services. |
| Availability Zone | availability_zone | The availability zone extension. |
| Availability Zone Filter Extension | availability_zone_filter | Add filter parameters to AvailabilityZone resource |
| Default Subnetpools | default-subnetpools | Provides ability to mark and use a subnetpool as the default. |
| DHCP Agent Scheduler | dhcp_agent_scheduler | Schedule networks among dhcp agents |
| Distributed Virtual Router | dvr | Enables configuration of Distributed Virtual Routers. |
| Empty String Filtering Extension | empty-string-filtering | Allow filtering by attributes with empty string value |
| Neutron external network | external-net | Adds external network attribute to network resource. |
| Neutron Extra DHCP options | extra_dhcp_opt | Extra options configuration for DHCP. For example PXE boot |
| | | options to DHCP clients can be specified (e.g. tftp-server, |
| | | server-ip-address, bootfile-name) |
| Neutron Extra Route | extraroute | Extra routes configuration for L3 router |
| Atomically add/remove extra routes | extraroute-atomic | Edit extra routes of a router on server side by atomically |
| | | adding/removing extra routes |
| Filter parameters validation | filter-validation | Provides validation on filter parameters. |
| Floating IP port forwarding detail | floating-ip-port-forwarding-detail | Allow list floating ip return more port forwarding data, |
| | | include'id' and 'internal_port_id' |
| Floating IP Port Details Extension | fip-port-details | Add port_details attribute to Floating IP resource |
| Neutron Service Flavors | flavors | Flavor specification for Neutron advanced services. |
| Floating IP Pools Extension | floatingip-pools | Provides a floating IP pools API. |
| IP address substring filtering | ip-substring-filtering | Provides IP address substring filtering when listing ports |
| Neutron L3 Router | router | Router abstraction for basic L3 forwarding between L2 Neutron |
| | | networks and access to external networks via a NAT gateway. |
| Neutron L3 Configurable external gateway mode | ext-gw-mode | Extension of the router abstraction for specifying whether SNAT |
| | | should occur on the external gateway |
| HA Router extension | l3-ha | Adds HA capability to routers. |
| Router Flavor Extension | l3-flavors | Flavor support for routers. |
| Prevent L3 router ports IP address change extension | l3-port-ip-change-not-allowed | Prevent change of IP address for some L3 router ports |
| L3 Agent Scheduler | l3_agent_scheduler | Schedule routers among l3 agents |
| Multi Provider Network | multi-provider | Expose mapping of virtual networks to multiple physical networks |
| Network MTU | net-mtu | Provides MTU attribute for a network resource. |
| Network MTU (writable) | net-mtu-writable | Provides a writable MTU attribute for a network resource. |
| Network Availability Zone | network_availability_zone | Availability zone support for network. |
| Network HA creation flag | network_ha | Network high availability creation flag. |
| Network IP Availability | network-ip-availability | Provides IP availability data for each network and subnet. |
| Pagination support | pagination | Extension that indicates that pagination is enabled. |
| Port device profile | port-device-profile | Expose the port device profile (Cyborg) |
| Neutron Port MAC address override | port-mac-override | Allow overriding the MAC address of a direct-physical Port via |
| | | the active binding profile |
| Neutron Port MAC address regenerate | port-mac-address-regenerate | Network port MAC address regenerate |
| Port NUMA affinity policy | port-numa-affinity-policy | Expose the port NUMA affinity policy |
| Port NUMA affinity policy "socket" | port-numa-affinity-policy-socket | Adds "socket" to the supported port NUMA affinity policies |
| Port Binding | binding | Expose port bindings of a virtual port to external application |
| Port Bindings Extended | binding-extended | Expose port bindings of a virtual port to external application |
| Port Security | port-security | Provides port security |
| project_id field enabled | project-id | Extension that indicates that project_id field is enabled. |
| Provider Network | provider | Expose mapping of virtual networks to physical networks |
| Quota engine limit check | quota-check-limit | Support for checking the resource usage before applying a new |
| | | quota limit |
| Quota management support | quotas | Expose functions for quotas management per project |
| Quota details management support | quota_details | Expose functions for quotas usage statistics per project |
| RBAC Policies | rbac-policies | Allows creation and modification of policies that control tenant |
| | | access to resources. |
| Add address_group type to RBAC | rbac-address-group | Add address_group type to network RBAC |
| Add address_scope type to RBAC | rbac-address-scope | Add address_scope type to RBAC |
| Add security_group type to network RBAC | rbac-security-groups | Add security_group type to network RBAC |
| Add subnetpool type to RBAC | rbac-subnetpool | Add subnetpool type to RBAC |
| If-Match constraints based on revision_number | revision-if-match | Extension indicating that If-Match based on revision_number is |
| | | supported. |
| Resource revision numbers | standard-attr-revisions | This extension will display the revision number of neutron |
| | | resources. |
| Router Availability Zone | router_availability_zone | Availability zone support for router. |
| Default rules for security groups | security-groups-default-rules | Configure set of security group rules used as default rules for |
| | | every new security group |
| Normalized CIDR field for security group rules | security-groups-normalized-cidr | Add new field with normalized remote_ip_prefix cidr in SG rule |
| Port filtering on security groups | port-security-groups-filtering | Provides security groups filtering when listing ports |
| Remote address group id field for security group rules | security-groups-remote-address-group | Add new field of remote address group id in SG rules |
| Security group rule belongs to the project's default security | security-groups-rules-belongs-to-default-sg | Flag to determine if the security group rule belongs to the |
| group | | project's default security group |
| Security group filtering on the shared field | security-groups-shared-filtering | Support filtering security groups on the shared field |
| security-group | security-group | The security groups extension. |
| Neutron Service Type Management | service-type | API for retrieving service providers for Neutron advanced |
| | | services |
| Sorting support | sorting | Extension that indicates that sorting is enabled. |
| standard-attr-description | standard-attr-description | Extension to add descriptions to standard attributes |
| Stateful security group | stateful-security-group | Indicates if the security group is stateful or not |
| Subnet belongs to an external network | subnet-external-network | Informs if the subnet belongs to an external network |
| Subnet Onboard | subnet_onboard | Provides support for onboarding subnets into subnet pools |
| Subnet service types | subnet-service-types | Provides ability to set the subnet service_types field |
| Subnet Allocation | subnet_allocation | Enables allocation of subnets from a subnet pool |
| Subnet Pool Prefix Operations | subnetpool-prefix-ops | Provides support for adjusting the prefix list of subnet pools |
| Tag creation extension | tag-creation | Allow to create multiple tags for a resource |
| Tag support for resources with standard attribute: port, | standard-attr-tag | Enables to set tag on resources with standard attribute. |
| subnet, subnetpool, network, security_group, router, | | |
| floatingip, policy, trunk, network_segment_range | | |
| Resource timestamps | standard-attr-timestamp | Adds created_at and updated_at fields to all Neutron resources |
| | | that have Neutron standard attributes. |
+-----------------------------------------------------------------+---------------------------------------------+------------------------------------------------------------------+
对于自服务节点(controller)有
openstack network agent list
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
| ID | Agent Type | Host | Availability Zone | Alive | State | Binary |
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
| 298aaa2f-babc-4e3b-968a-e2c79b36f9b3 | Open vSwitch agent | controller | None | :-) | UP | neutron-openvswitch-agent |
| 2e5f397f-f79c-4dd3-b812-9cb4b2aba543 | Metadata agent | controller | None | :-) | UP | neutron-metadata-agent |
| 3f4d1a9c-1c87-4f20-b873-bbc0a82345b5 | L3 agent | controller | nova | :-) | UP | neutron-l3-agent |
| 3f987477-b01c-4b39-af35-71845701c2ca | Open vSwitch agent | compute | None | :-) | UP | neutron-openvswitch-agent |
| c66e7560-508b-46dd-8bf0-a3ba0df71463 | DHCP agent | controller | nova | :-) | UP | neutron-dhcp-agent |
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
#要确保五个都起来了
对于自服务节点(controller)有
openstack network agent list
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
| ID | Agent Type | Host | Availability Zone | Alive | State | Binary |
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
| 298aaa2f-babc-4e3b-968a-e2c79b36f9b3 | Open vSwitch agent | controller | None | :-) | UP | neutron-openvswitch-agent |
| 2e5f397f-f79c-4dd3-b812-9cb4b2aba543 | Metadata agent | controller | None | :-) | UP | neutron-metadata-agent |
| 3f4d1a9c-1c87-4f20-b873-bbc0a82345b5 | L3 agent | controller | nova | :-) | UP | neutron-l3-agent |
| 3f987477-b01c-4b39-af35-71845701c2ca | Open vSwitch agent | compute | None | :-) | UP | neutron-openvswitch-agent |
| c66e7560-508b-46dd-8bf0-a3ba0df71463 | DHCP agent | controller | nova | :-) | UP | neutron-dhcp-agent |
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
#要确保五个都起来了
mysql -u root -p
#创建cinder数据库
CREATE DATABASE cinder;
#授予对 cinder 数据库的适当访问权限
GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' \
IDENTIFIED BY 'CINDER_DBPASS';
GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' \
IDENTIFIED BY 'CINDER_DBPASS';
将 CINDER_DBPASS 替换为合适的密码
创建Cinder服务
获取 admin 凭据以访问仅限管理员使用的 CLI 命令:
. admin-openrc
要创建服务凭证,请完成以下步骤
创建 cinder 用户
openstack user create --domain default --password-prompt cinder
User Password:
Repeat User Password:
No password was supplied, authentication will fail when a user does not have a password.
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| default_project_id | None |
| domain_id | default |
| email | None |
| enabled | True |
| id | 8f93e536cda74de5a12714b110854fb7 |
| name | cinder |
| description | None |
| password_expires_at | None |
+---------------------+----------------------------------+
将 admin 角色添加到 cinder 用户
openstack role add --project service --user cinder admin
创建 cinder_v3 服务实体
openstack service create --name cinderv3 \
--description "OpenStack Block Storage" volumev3
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| id | 65980a608b1b4c139529effc667c9184 |
| name | cinderv3 |
| type | volumev3 |
| enabled | True |
| description | OpenStack Block Storage |
+-------------+----------------------------------+
创建块存储服务 API 端点
openstack endpoint create --region RegionOne \
volumev3 public http://controller:8776/v3/%\(project_id\)s
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+--------------+---------------------------------------------+
| Field | Value |
+--------------+---------------------------------------------+
| enabled | True |
| id | 2ae60f38ce354a07a127a423f1a0f9f9 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 65980a608b1b4c139529effc667c9184 |
| service_name | cinderv3 |
| service_type | volumev3 |
| url | http://192.168.1.150:8776/v3/%(project_id)s |
+--------------+---------------------------------------------+
########################################################################
openstack endpoint create --region RegionOne \
volumev3 internal http://controller:8776/v3/%\(project_id\)s
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+--------------+---------------------------------------------+
| Field | Value |
+--------------+---------------------------------------------+
| enabled | True |
| id | 786d8a81213f4f298a04e2be1cf3897e |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 65980a608b1b4c139529effc667c9184 |
| service_name | cinderv3 |
| service_type | volumev3 |
| url | http://192.168.1.150:8776/v3/%(project_id)s |
+--------------+---------------------------------------------+
########################################################################
openstack endpoint create --region RegionOne \
volumev3 admin http://controller:8776/v3/%\(project_id\)s
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+--------------+---------------------------------------------+
| Field | Value |
+--------------+---------------------------------------------+
| enabled | True |
| id | 3fb7c382c81f4868b6baeba3e907fd58 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 65980a608b1b4c139529effc667c9184 |
| service_name | cinderv3 |
| service_type | volumev3 |
| url | http://192.168.1.150:8776/v3/%(project_id)s |
+--------------+---------------------------------------------+
openstack volume service list
/usr/lib/python3.9/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
+----------------+------------+------+---------+-------+----------------+
| Binary | Host | Zone | Status | State | Updated At |
+----------------+------------+------+---------+-------+----------------+
| cinder- | controller | nova | enabled | up | 2025-04-15T11: |
| scheduler | | | | | 39:16.000000 |
| cinder-volume | block@lvm | nova | enabled | up | 2025-04-15T11: |
| | | | | | 39:10.000000 |
+----------------+------------+------+---------+-------+----------------+
#官方给的其实有个backup,因为我没部署Swift这个所以就没有,应该没有吧
安装并配置Skyline
安装Docker
安装Docker的部分请在我的另一篇文章中查看
创建Skyline数据库
在安装和配置 Skyline 服务之前,您必须先创建一个数据库
mysql -u root -p
#创建 skyline 数据库
CREATE DATABASE skyline DEFAULT CHARACTER SET \
utf8 DEFAULT COLLATE utf8_general_ci;
#授予对 skyline 数据库的适当访问权限
GRANT ALL PRIVILEGES ON skyline.* TO 'skyline'@'localhost' \
IDENTIFIED BY 'SKYLINE_DBPASS';
GRANT ALL PRIVILEGES ON skyline.* TO 'skyline'@'%' \
IDENTIFIED BY 'SKYLINE_DBPASS';
将 SKYLINE_DBPASS 替换为合适的密码
创建服务凭证
导入 admin 凭证以获取管理员专用 CLI 命令的访问权限
. admin-openrc
要创建服务凭证,请完成以下步骤
创建 skyline 用户
openstack user create --domain default --password-prompt skyline
User Password:
Repeat User Password:
No password was supplied, authentication will fail when a user does not have a password.
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| default_project_id | None |
| domain_id | default |
| email | None |
| enabled | True |
| id | 4f28c0b1f1344ae8943f9bfd111e8d1e |
| name | skyline |
| description | None |
| password_expires_at | None |
+---------------------+----------------------------------+
将 admin 角色添加到 skyline 用户
openstack role add --project service --user skyline admin
评论(0)
暂无评论