计算节点环境准备

1. 部署说明

部署地点: 计算节点(ip:192.168.0.184)。

2. hostname主机名配置

hostnamectl set-hostname computer
exec bash

添加host:

controller_ip="192.168.0.142"
computer_ip="192.168.0.184"
echo "$controller_ip controller" >> /etc/hosts
echo "$computer_ip computer" >> /etc/hosts

在此需要注意的是,计算节点需要重启。

重启:

reboot

3. 免密登录(可选)

ssh-keygen

选取默认路径存储:/root/.ssh/id_rsa。

ssh-copy-id -i /root/.ssh/id_rsa.pub root@192.168.0.142

4. 禁用防火墙

4.1. 关闭防火墙

systemctl stop firewalld
systemctl disable firewalld

4.2. 关闭SELinux

setenforce 0
sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config

4.3. 关闭swap分区

swapoff -a
sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab

5. 设置内核

modprobe bridge
modprobe br_netfilter
cat > /etc/sysconfig/modules/neutron.modules <<EOF
#!/bin/bash
modprobe -- bridge
modprobe -- br_netfilter
EOF
chmod 755 /etc/sysconfig/modules/neutron.modules && bash /etc/sysconfig/modules/neutron.modules
echo "vm.max_map_count=262144" >> /etc/sysctl.conf
echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
echo "net.bridge.bridge-nf-call-iptables=1" >> /etc/sysctl.conf
echo "net.bridge.bridge-nf-call-ip6tables=1" >> /etc/sysctl.conf
sysctl -p

6. yum源配置

配置openstack及虚拟化相关源。

loongnix-server-23平台openstack-wallaby源对应的包是loongnix-release-openstack-wallaby。

安装openstack-wallaby源。

yum install loongnix-release-openstack-wallaby -y

其它平台需安装该平台提供的openstack-wallaby源对应的包。

此处需要注意openstack-w的源优先级设置为最高 priority=1。

配置完成后,通常需要清除yum中原有的cache,并重新生成cache。清除yum陈旧cache的命令如下:

yum clean all
yum makecache

7. 系统基础软件工具安装与配置

7.1. NTP时间同步

yum install -y chrony  autoremove
sed -i '/^pool/d' /etc/chrony.conf
sed -i '/^server/d' /etc/chrony.conf
echo "pool ntp.aliyun.com iburst" >> /etc/chrony.conf
systemctl start chronyd.service && systemctl enable chronyd.service

7.2. Openstack配置工具安装

yum install -y python3-crudini

7.3. OpenStack客户端相关软件

yum install -y python3-openstackclient
©龙芯开源社区 all right reserved,powered by Gitbook文档更新时间: 2025-01-15 10:59:56

results matching ""

    No results matching ""

    results matching ""

      No results matching ""