本节介绍了在写入模式下部署控制器集群的步骤。
您可以按以下方式使用写入模式部署控制器集群:
访问 OpenStack CLI 并列出 OpenStack 网络列表。这表示配置的所需网络。
root@openstack-mitaka:/root# openstack network list +--------------------------------------+---------------+------------------------------------------------------+ | id | name | subnets | +--------------------------------------+---------------+------------------------------------------------------+ | 10a514a3-d843-499d-80fd-28274d4a4912 | webserver-net | 3ebfb2ef-9b47-44f7-9da5-5245e1d0ed53 192.168.10.0/24 | | 5dd0b1cb-ebba-4ff9-84fd-74dcf13c7f86 | client-net | a9a00d61-6ee8-4fac-80df-4e0bb8c8b4f3 192.168.11.0/24 | | c1c045f5-2d0f-43e3-ab43-55f990cde9b7 | provider1 | 1b65c0da-38c7-4c85-88a9-30c52c6a4558 10.130.128.0/18 | | dd9dab27-9228-4765-96f2-d56194136ba0 | avimgmt | 5785c1cf-a222-4b0a-9343-003153f37a65 172.16.0.0/24 | +--------------------------------------+---------------+------------------------------------------------------+
使用 openstack floating ip create provider1 命令创建浮动 IP,其中
provider1
是使用的网络。root@openstack-mitaka:/root# openstack floating ip create provider1
此时将创建新的浮动 IP。
+---------------------+--------------------------------------+ | Field | Value | +---------------------+--------------------------------------+ | description | | | fixed_ip_address | | | floating_ip_address | 10.130.170.86 | | floating_network_id | c1c045f5-2d0f-43e3-ab43-55f990cde9b7 | | id | 4ec57a12-7357-461a-80f6-d87ae7536335 | | port_id | | | router_id | | | status | DOWN | | tenant_id | 904fb201a92f443297bffca3b354d52d | +---------------------+--------------------------------------+
获取集群 IP 的
port-id
,如下所示:openstack port list -c ID -c 'Fixed IP Addresses'|grep 172.16.0.65 95665123-64a4-453a-abde-70fdb3d2ae2a| ip_address='172.16.0.65', subnet_id='5785c1cf-a222-4b0a-9343-003153f37a65'
将集群 IP 与浮动 IP 相关联。使用上述命令中的
port-id
(在本例中为95665123-64a4-453a-abde-70fdb3d2ae2a
),将其与上面创建的浮动 IP(步骤 2)相关联。root@openstack-mitaka:/root# openstack floating ip set --port 95665123-64a4-453a-abde-70fdb3d2ae2a 4ec57a12-7357-461a-80f6-d87ae7536335
+--------------------------+--------------------------------------+ | Field | Value | +--------------------------+--------------------------------------+ | description | | | fixed_ip_address | 172.16.0.65 | | floating_ip_address | 10.130.170.86 | | floating_network_id | c1c045f5-2d0f-43e3-ab43-55f990cde9b7 | | id | 4ec57a12-7357-461a-80f6-d87ae7536335 | | port_id | 95665123-64a4-453a-abde-70fdb3d2ae2a | | router_id | 2d3b93a2-7804-4841-90c4-be15b148d099 | | status | ACTIVE | | tenant_id | 904fb201a92f443297bffca3b354d52d | +--------------------------+--------------------------------------+
添加集群 IP 和集群主节点的辅助 IP。例如,集群 IP 为 172.16.0.65,它添加为集群主节点的辅助 IP。
root@172-16-0-66:~# ip a eth0: (BROADCAST,MULTICAST,UP,LOWER_UP) mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:50:56:bd:5a:0f brd ff:ff:ff:ff:ff:ff inet 172.16.0.66/24 brd 172.16.0.255 scope global eth0 valid_lft forever preferred_lft forever inet 172.16.0.65/32 scope global eth0:1 Cluster IP
限制 SE 并行创建数
无法从 CLI 命令修改 SE 并行创建数。但是,可以从下述文件中执行该操作:
/opt/avi/scripts/update_cc_ops_limit.py --help usage: update_cc_ops_limit.py [-h] --cloud-name CLOUD_NAME [--show] [--se-creations-limit SE_CREATIONS_LIMIT] [--vnic-ops-limit VNIC_OPS_LIMIT] optional arguments: -h, --help show this help message and exit --cloud-name CLOUD_NAME Name of cloud to be updated --show Show existing limits --se-creations-limit SE_CREATIONS_LIMIT Maximum number of concurrent SE creations. The default value of -1 means no limit. A value of 0 means this operation is currently disabled. --vnic-ops-limit VNIC_OPS_LIMIT Maximum number of concurrent vNIC (both add and delete) operations. The default value of -1 means no limit. A value of 0 means this operation is currently disabled.
SE 并行创建限制
以下是配置 OpenStack 最大 SE 限制的步骤:
显示现有的 SE 限制
====================== root@10-50-56-243:/opt/avi/scripts# python3 update_cc_ops_limit.py --cloud-name 'openstack_cloud' --show Existing max_concurrent_se_creations limit = -1 Existing max_concurrent_vnic_ops limit = -1
将创建限制设置为 2
====================== root@10-50-56-243:/opt/avi/scripts# python3 update_cc_ops_limit.py --cloud-name 'openstack_cloud' --se-creations-limit '2' updating concurrent SE creations limit to 2
显示 SE 创建限制
===================== root@10-50-56-243:/opt/avi/scripts# python3 update_cc_ops_limit.py --cloud-name 'openstack_cloud' --show Existing max_concurrent_se_creations limit = 2 Existing max_concurrent_vnic_ops limit = -1