计算节点扩容
- 配置yum源,这里选择从别的计算节点copy
scp node15:/etc/yum.repos.d/* /etc/yum.repos.d/
yum clean all && yum makecache
- 安装neutron依赖,修改neutron配置
# 依赖
yum install -y python-openstackclient openstack-neutron-linuxbridge --nogpgcheck
# copy相关配置
scp -r node15:/etc/neutron /etc/
# 启动验证
systemctl start neutron-linuxbridge-agent.service && systemctl enable neutron-linuxbridge-agent.service
# controller 节点
. admin-openrc
neutron agent-list
# 结果如下
+--------------------------------------+--------------------+--------+-------------------+-------+----------------+---------------------------+
| id | agent_type | host | availability_zone | alive | admin_state_up | binary |
+--------------------------------------+--------------------+--------+-------------------+-------+----------------+---------------------------+
| 0a14325c-42be-406a-836b-58948570cd34 | Linux bridge agent | node16 | | :-) | True | neutron-linuxbridge-agent |
| 72cfc947-7796-4f6e-a4a6-7a0413400e66 | DHCP agent | node15 | nova | :-) | True | neutron-dhcp-agent |
| 7592fa1d-303d-44f3-835b-9c2c58617f17 | Linux bridge agent | node12 | | :-) | True | neutron-linuxbridge-agent |
| 7c0e9bfd-3100-45c6-9a89-c5547a59a865 | Linux bridge agent | node15 | | :-) | True | neutron-linuxbridge-agent |
| 9ee6bd63-00c6-45e9-aa3f-40de93bc2819 | Metadata agent | node15 | | :-) | True | neutron-metadata-agent |
| a2d10142-59b0-4879-9dea-07353399e4dc | Linux bridge agent | node17 | | :-) | True | neutron-linuxbridge-agent |
+--------------------------------------+--------------------+--------+-------------------+-------+----------------+---------------------------+
- 安装nova依赖,修改nova配置
# 依赖
yum install -y openstack-nova-compute libvirt ceph-common python-rbd --nogpgcheck
systemctl enable libvirtd && systemctl start libvirtd
# copy相关配置
scp -r node15:/etc/nova /etc/
# 修改my_ip 为本机IP
# 启动
systemctl enable openstack-nova-compute.service && systemctl start openstack-nova-compute.service
# controller节点验证
. admin-openrc
nova service-list
# 结果
+--------------------------------------+------------------+--------+----------+---------+-------+----------------------------+-----------------+-------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason | Forced down |
+--------------------------------------+------------------+--------+----------+---------+-------+----------------------------+-----------------+-------------+
| 964d2413-9746-485d-ab01-d55475bc9ae1 | nova-consoleauth | node15 | internal | enabled | up | 2019-08-01T09:41:58.000000 | - | False |
| d81961ab-4bc6-444a-9488-6ab0858871f7 | nova-conductor | node15 | internal | enabled | up | 2019-08-01T09:41:56.000000 | - | False |
| 4bceeaf2-407f-429a-b76e-15794e65a826 | nova-scheduler | node15 | internal | enabled | up | 2019-08-01T09:41:56.000000 | - | False |
| aa217e88-e6db-46fc-a675-23d9c447d497 | nova-compute | node17 | nova | enabled | up | 2019-08-01T09:41:57.000000 | - | False |
| 21f72d5e-f153-47cb-850b-b069f448d5ad | nova-compute | node15 | nova | enabled | up | 2019-08-01T09:41:55.000000 | - | False |
| 8d11c260-3c76-4740-9211-90d4924db191 | nova-compute | node16 | nova | enabled | up | 2019-08-01T09:41:49.000000 | - | False |
| 54c7e8c9-f02e-478a-b4dc-94682cb6c981 | nova-compute | node12 | nova | enabled | up | 2019-08-01T09:41:53.000000 | - | False |
| 964d2413-9746-485d-ab01-d55475bc9ae1 | nova-consoleauth | node15 | internal | enabled | up | 2019-08-01T09:41:58.000000 | - | False |
| d81961ab-4bc6-444a-9488-6ab0858871f7 | nova-conductor | node15 | internal | enabled | up | 2019-08-01T09:41:56.000000 | - | False |
| 4bceeaf2-407f-429a-b76e-15794e65a826 | nova-scheduler | node15 | internal | enabled | up | 2019-08-01T09:41:56.000000 | - | False |
| aa217e88-e6db-46fc-a675-23d9c447d497 | nova-compute | node17 | nova | enabled | up | 2019-08-01T09:41:57.000000 | - | False |
| 21f72d5e-f153-47cb-850b-b069f448d5ad | nova-compute | node15 | nova | enabled | up | 2019-08-01T09:41:55.000000 | - | False |
| 8d11c260-3c76-4740-9211-90d4924db191 | nova-compute | node16 | nova | enabled | up | 2019-08-01T09:41:49.000000 | - | False |
| 54c7e8c9-f02e-478a-b4dc-94682cb6c981 | nova-compute | node12 | nova | enabled | up | 2019-08-01T09:41:53.000000 | - | False |
+--------------------------------------+------------------+--------+----------+---------+-------+----------------------------+-----------------+-------------+
# 打开dashboard管理员,虚拟机管理器是否看到新加入的节点,如果没有看到执行下面的命令
su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova
# copy ceph相关配置
scp node15:/etc/ceph/* /etc/ceph/
scp node15:/etc/libvirt/secrets/* /etc/libvirt/secrets/
# 修改迁移相关配置
cat /etc/libvirt/libvirtd.conf |grep -v '^#'|grep -v '^$'
listen_tls = 0
listen_tcp = 1
tcp_port = "16509"
listen_addr = "10.32.254.12"
auth_tcp = "none"
cat /etc/sysconfig/libvirtd |grep -v '^#'|grep -v '^$'
LIBVIRTD_ARGS="--listen"
# 重启服务
systemctl restart libvirtd openstack-nova-compute