首页 > 其他分享 >openstack-新增nova节点

openstack-新增nova节点

时间:2024-04-15 17:47:26浏览次数:31  
标签:name centos CentOS nova etc gpgcheck openstack 节点

1.改IP

vi /etc/sysconfig/network-scripts/ifcfg-ens3
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
NAME=ens3
DEVICE=ens3
ONBOOT=yes
IPADDR=172.17.10.53
NETMASK=255.255.255.128
GATEWAY=172.17.10.1
DNS1=202.96.128.86
DNS2=114.114.114.114

2.设置主机名

hostnamectl set-hostname computer01

3.修改hosts

echo '172.17.10.52 controller' >> /etc/hosts
echo '172.17.10.53 computer01' >> /etc/hosts
echo '172.17.10.54 computer02' >> /etc/hosts

4.修改yum仓库

点击查看代码 cd /etc/yum.repos.d mkdir backup mv * backup # cat /etc/yum.repos.d/cloudcs.repo [highavailability] name=CentOS Stream 8 - HighAvailability baseurl=https://mirrors.aliyun.com/centos/8-stream/HighAvailability/x86_64/os/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck=1 repo_gpgcheck=0 metadata_expire=6h countme=1 enabled=1

[nfv]
name=CentOS Stream 8 - NFV
baseurl=https://mirrors.aliyun.com/centos/8-stream/NFV/x86_64/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1

[rt]
name=CentOS Stream 8 - RT
baseurl=https://mirrors.aliyun.com/centos/8-stream/RT/x86_64/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1

[resilientstorage]
name=CentOS Stream 8 - ResilientStorage
baseurl=https://mirrors.aliyun.com/centos/8-stream/ResilientStorage/x86_64/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1

[extras-common]
name=CentOS Stream 8 - Extras packages
baseurl=https://mirrors.aliyun.com/centos/8-stream/extras/x86_64/extras-common/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1

[extras]
name=CentOS Stream - Extras
mirrorlist=http://mirrorlist.centos.org/?release=&arch=&repo=extras&infra=

baseurl=http://mirror.centos.org///extras//os/

baseurl=https://mirrors.aliyun.com/centos/8-stream/extras/x86_64/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

[centos-ceph-pacific]
name=CentOS - Ceph Pacific
baseurl=https://mirrors.aliyun.com/centos/8-stream/storage/x86_64/ceph-pacific/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Storage

[centos-rabbitmq-38]
name=CentOS-8 - RabbitMQ 38
baseurl=https://mirrors.aliyun.com/centos/8-stream/messaging/x86_64/rabbitmq-38/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Messaging

[centos-nfv-openvswitch]
name=CentOS Stream 8 - NFV OpenvSwitch
baseurl=https://mirrors.aliyun.com/centos/8-stream/nfv/x86_64/openvswitch-2/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-NFV
module_hotfixes=1

[baseos]
name=CentOS Stream 8 - BaseOS
baseurl=https://mirrors.aliyun.com/centos/8-stream/BaseOS/x86_64/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1

[appstream]
name=CentOS Stream 8 - AppStream
baseurl=https://mirrors.aliyun.com/centos/8-stream/AppStream/x86_64/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1

[centos-openstack-victoria]
name=CentOS 8 - OpenStack victoria
baseurl=https://mirrors.aliyun.com/centos/8-stream/cloud/x86_64/openstack-victoria/

baseurl=https://repo.huaweicloud.com/centos/8-stream/cloud/x86_64/openstack-yoga/

gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud
module_hotfixes=1

[powertools]
name=CentOS Stream 8 - PowerTools

mirrorlist=http://mirrorlist.centos.org/?release=&arch=&repo=PowerTools&infra=

baseurl=https://mirrors.aliyun.com/centos/8-stream/PowerTools/x86_64/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial


5.更新Yum仓库

yum clean all
yum repolist all

6.安装常用软件

yum install network-scripts.x86_64 -y
yum install -y vim net-tools bash-completion 
yum install lrzszyum install nmap -y
yum install bridge-utils.x86_64  -y

7.关闭NetworkManager,开启network

systemctl stop NetworkManager
systemctl disable NetworkManager
systemctl start network
systemctl enable network

8.关闭防火墙,selinux

systemctl stop firewalld
systemctl disable firewalld
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
vi /etc/chrony.conf

9.优化

echo '*               -       nofile          65535 ' >>/etc/security/limits.conf 
tail -1 /etc/security/limits.conf
ulimit -SHn   65535 
ulimit -n

10.开启br_netfilter模块

modprobe br_netfilter
echo br_netfilter \> /etc/modules-load.d/br_netfilter.conf
sysctl -a | grep bridge

11.开启时间同步

yum install -y  chrony.x86_64
vim /etc/chrony.conf
server controller iburst
systemctl enable chronyd.service
systemctl start chronyd.service

12.配置openstack包

yum install centos-release-openstack-ussuri
yum config-manager --set-enabled powertools
yum upgrade
yum install python3-openstackclient

13.安装nova

yum install openstack-nova-compute

**Edit the /etc/nova/nova.conf **

nova.conf
[root@localhost yum.repos.d]# cat /etc/nova/nova.conf |grep -vE '^$|^#'
[DEFAULT]
enabled_apis = osapi_compute,metadata
transport_url = rabbit://openstack:radhat@controller:5672/
my_ip = 172.17.10.54
[api]
auth_strategy = keystone
[api_database]
connection = mysql+pymysql://nova:radhat@controller/nova_api
[barbican]
[cache]
[cinder]
[compute]
[conductor]
[console]
[consoleauth]
[cors]
[cyborg]
[database]
[devices]
[ephemeral_storage_encryption]
[filter_scheduler]
[glance]
api_servers = http://controller:9292
[guestfs]
[healthcheck]
[hyperv]
[image_cache]
[ironic]
[key_manager]
[keystone]
[keystone_authtoken]
www_authenticate_uri = http://controller:5000/
auth_url = http://controller:5000/
memcached_servers = controller:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = nova
password = radhat
[libvirt]
virt_type = qemu
[metrics]
[mks]
[neutron]
auth_url = http://controller:5000
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = radhat
[notifications]
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
[oslo_messaging_amqp]
[oslo_messaging_kafka]
[oslo_messaging_notifications]
[oslo_messaging_rabbit]
[oslo_middleware]
[oslo_policy]
[pci]
[placement]
region_name = RegionOne
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://controller:5000/v3
username = placement
password = radhat
[powervm]
[privsep]
[profiler]
[quota]
[rdp]
[remote_debug]
[scheduler]
[serial_console]
[service_user]
[spice]
[upgrade_levels]
[vault]
[vendordata_dynamic_auth]
[vmware]
[vnc]
enabled = true
server_listen = 0.0.0.0
server_proxyclient_address = $my_ip
novncproxy_base_url = http://controller:6080/vnc_auto.html
[workarounds]
[wsgi]
[zvm]
启动服务
systemctl enable libvirtd.service openstack-nova-compute.service
systemctl start libvirtd.service openstack-nova-compute.service

Add the compute node to the cell database

. admin-openrc
openstack compute service list --service nova-compute
su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova

15.安装neutron

yum install openstack-neutron-linuxbridge ebtables ipset

Edit the /etc/neutron/neutron.conf

/etc/neutron/neutron.conf
[root@computer02 ~]# cat /etc/neutron/neutron.conf |grep -vE "^$|^#"
[DEFAULT]
transport_url = rabbit://openstack:radhat@controller
auth_strategy = keystone
[cors]
[database]
[keystone_authtoken]
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = radhat
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp
[oslo_messaging_amqp]
[oslo_messaging_kafka]
[oslo_messaging_notifications]
[oslo_messaging_rabbit]
[oslo_middleware]
[oslo_policy]
[privsep]
[ssl]

Edit the /etc/neutron/plugins/ml2/linuxbridge_agent.ini

linuxbridge_agent.ini
[root@computer02 ~]# cat  /etc/neutron/plugins/ml2/linuxbridge_agent.ini |grep -vE "^$|^#"
[DEFAULT]
physical_interface_mappings = provider:ens3
[vxlan]
enable_vxlan = true
local_ip = 172.17.10.54
l2_population = true
[securitygroup]
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

启动服务

systemctl restart openstack-nova-compute.service
systemctl enable neutron-linuxbridge-agent.service
systemctl start neutron-linuxbridge-agent.service

标签:name,centos,CentOS,nova,etc,gpgcheck,openstack,节点
From: https://www.cnblogs.com/uutow/p/18136561

相关文章

  • JZ76 删除链表中重复的节点
    1、相似题classSolution{public:ListNode*deleteDuplicates(ListNode*head){//判空if(head==NULL)returnnullptr;ListNode*p1=head;ListNode*p2=p1->next;while(p2){......
  • JZ18删除表的节点
    /***structListNode{* intval;* structListNode*next;* ListNode(intx):val(x),next(nullptr){}*};*/classSolution{public:/***代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可***@param......
  • 2-77. 修正 CropGenerator 和 AStar 地图节点生成
    修复Bug可以看到房子的上面生成了一棵树修改CropGenerator修改AStar我不太理解,反正照着改就算了吧项目相关代码代码仓库:https://gitee.com/nbda1121440/farm-tutorial.git标签:20240413_1246......
  • JZ22 链表中倒数最后k个节点
    /***structListNode{* intval;* structListNode*next;* ListNode(intx):val(x),next(nullptr){}*};*/classSolution{public:/***代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可***@param......
  • JZ52 两个链表的第一个公共节点
    /*structListNode{ intval; structListNode*next; ListNode(intx): val(x),next(NULL){ }};*/#include<endian.h>classSolution{public: //返回类型为节点指针类型,传入的是两个链表的头节点ListNode*FindFirstCommonNode(ListNode*pHead1,......
  • 2-70. 核心功能评估周围节点得到最短路径
    修改AStar项目相关代码代码仓库:https://gitee.com/nbda1121440/farm-tutorial.git标签:20240412_1338......
  • 2-69. 根据每个地图信息生成节点信息
    创建AStar脚本修改GridMapManager修改AStar脚本再写BuildPath方法再写FindShortestPath方法项目相关代码代码仓库:https://gitee.com/nbda1121440/farm-tutorial.git标签:20240412_1305......
  • Flink源码学习(4) TaskManager从节点启动分析
    taskManager是flink的worker节点,负责slot的资源管理和task执行一个taskManager就是一台服务器的抽象TaskManager基本资源单位是slot,一个作业的task会部署在一个TM的slot上运行,TM会负责维护本地的slot资源列表,并与Master和JobManager进行通信启动主类:TaskManagerRunnerTaskMan......
  • 树上交换节点(OPPO23届秋招-后端真题)
    题面核心思想这道题跟树没有任何关系。。。样例的2143直接在数组交换为1234就可以了。那么只要当前下标i与nums[i]不相等我们就交换比如512341!=5交换为->412351!=4交换为->312451!=3交换为->213451!=2交换为->12......
  • 使用 Prometheus 在 KubeSphere 上监控 KubeEdge 边缘节点(Jetson) CPU、GPU 状态
    作者:朱亚光,之江实验室工程师,云原生/开源爱好者。KubeSphere边缘节点的可观测性在边缘计算场景下,KubeSphere基于KubeEdge实现应用与工作负载在云端与边缘节点的统一分发与管理,解决在海量边、端设备上完成应用交付、运维、管控的需求。根据KubeSphere的支持矩阵,只有1.23......