openstack queens 计算节点扩容

本文详细介绍了一种计算节点扩容的方法,包括配置yum源、安装neutron和nova依赖、修改相关配置及验证过程。通过具体步骤展示了如何成功将新节点加入到现有集群中。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

计算节点扩容

  1. 配置yum源,这里选择从别的计算节点copy
scp node15:/etc/yum.repos.d/*  /etc/yum.repos.d/
yum clean all && yum makecache
  1. 安装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 |
+--------------------------------------+--------------------+--------+-------------------+-------+----------------+---------------------------+
  1. 安装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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值