在OpenStack架构中,Controller节点的配置(基础)

虚拟机的安装

新建虚拟机,选择自定义

默认选择即可

操作系统的镜像稍后选择

客户及操作系统选择Linux,注意选择centos 7 64位

给虚拟机命名

处理器的配置建议1:2

内存大小选择建议为:4GB

网络连接选择为:NAT

默认即可

默认即可

新建虚拟机,默认即可

磁盘大小建议为:40GB

默认即可

进行自定义硬件设置

注意开启:虚拟化引擎

新增一块网络适配器:

网络适配器2:选择NAT模式

网络适配器:仅主机模式

点击完成

因为我们的镜像文件没有问题,所以直接使用上下键选择第一个,然后回车

安装过程中进行分区:

/boot:8GB

swap:200MB

剩下的内存为/目录下

更改时区为:上海


控制节点网卡和selinux设置

复制代码
root@controller~]#cd/etc/sysconfig/network-scripts
[root@controller network-scripts]#cd
[root@controller~]#cd/etc/s
复制代码
[rootecontroller ~]#cd /etc/sysc
[rootecontroller~]#cd /etc/sysconfig/net
[rootecontroller~]#cd /etc/sysconf ig/network-scripts/
[rootecontroller network-scripts]# ls
[rootecontroller network-scripts]# vi ifcfg-ens33

改动如下:

PROXY_METHOD=none

BROWSER_ONLY=nO

BOOTPROTO=static

DEFROUTE=yes

IPU4_FAILURE_FATAL=no

IPU6INIT=yes

IPU6_AUT0CONF=yes

IPU6_DEFROUTE=yes

IPU6_FAILURE_FATAL=nO

IPU6_ADDR_GEN_MODE=stable-privacy

NAME=ens33

UU1D=bbf106ff-8a76-4e07-bf00-ccca531e99f9

DEUICE=ens33

ONBOOT=yes

IPADDR=192.168.100.10

#NETMASK=255.255.255.0

PREFIX=24

GATEWAY=192.168.100.1

复制代码
[rootecontroller network-scripts]# systemctl restart  network
[rootecontroller network-scripts]# ip a

root@controllernetwork-scripts\]#cd \[root@controller\]#vi/etc/hosts ![](https://file.jishuzhan.net/article/1768668437510361090/3ea48704f691abefe2020100b040ae9a.webp) 增加内容如下: > 192.168.100.10 controller > > 192.168.100.20 compute ![](https://file.jishuzhan.net/article/1768668437510361090/7031ffb1f6cef4373a6dc68e29181845.webp) [root@controller]#ping controller ![](https://file.jishuzhan.net/article/1768668437510361090/0caade693601ca7fbeaef371ed5d0596.webp) [root@controller~]#getenforce [root@controller~]#setenforce 0 [root@controller~]#getenforce [root@controller~]#vi /etc/selinux/config ![](https://file.jishuzhan.net/article/1768668437510361090/24a97dbb41a13ccfa9d6d31a43900da3.webp) 修改为:disabled ![](https://file.jishuzhan.net/article/1768668437510361090/4ebaf1a87605375e169de3d22924707d.webp) 重启 [root@controller~]#reboot *** ** * ** *** ## **控制节点仓库配置过程** [root@controller~]# ip a ![](https://file.jishuzhan.net/article/1768668437510361090/6b37ae7b12c58adabcfdb7669cb61422.webp) [root@controller ~]#ls /opt ![](https://file.jishuzhan.net/article/1768668437510361090/431eb2672cce49e3fa59b6595b898c01.webp) [root@controller ~]# mkdir /opt/centos [root@controller ~]#mkdir /opt/iaas [root@controller~]#ls /opt ![](https://file.jishuzhan.net/article/1768668437510361090/8b12b8851ead7c403175ca5f884d2eb9.webp) root@controller~]#mount -o loop/opt/Cent0s-7-x86_64-DvD-1810.iso/opt/centos ![](https://file.jishuzhan.net/article/1768668437510361090/de44f9c4a82697b0b9e469f9b83550b2.webp) [root@controller]#mount -o loop/opt/openstack-Install-v1.0.iso/opt/iaas ![](https://file.jishuzhan.net/article/1768668437510361090/6156e1f7411688ae02d771880b87913e.webp) [root@controller~]# cd /etc/yum.repos.d [root@controller yum.repos.d]# ls [root@controller yum.repos.d]# mkdir repo [root@controller yum.repos.d]# mv c* repo [root@controller yum.repos.d]#ls ![](https://file.jishuzhan.net/article/1768668437510361090/ace4ac0a5ae0fb7ee940311528cb1a9c.webp) [root@controller yum.repos.d]# vi local.repo 添加如下内容: > \[centos

name=centos

baseurl=file:///opt/centos

enabled=1

gpgcheck=0

iaas

name=1aas

baseurl=file:///opt/iaas/iaas-repo

enabled=1

gpgcheck=0

复制代码
[[email protected]]#yum repolist

控制节点ftp和消息队列服务安装

复制代码
[root@controller~]#yum  install   -y  vsftpd
复制代码
[root@controller~]#vi /etc/vsftpd/vsftpd.conf

添加:

anon_root=/opt

复制代码
[root@controller~ ]#systemctl restart vsftpd
[root@controller~ ]#systemctl enable vsftpd
[root@controller~]# systemctl stop firwalld
[root@controller~]#_systemctl stop firwalld
[root@controller~]# systemctl disable firewalld
root@controller~j# yum install -y rabbitmq-server
复制代码
[root@controller~]#systemctl  startr abbitmq-server.service
[root@controller~]#systemctl   enable rabbitmq-server.service
复制代码
[root@controller~]#rabbitmqctl  add_user openstack 000000

[root@controller ~]# rabbitmqctl set_permissions openstack "." "." ".*"

Memcached服务的安装。

在controller节点,安装Memcached服务,命令如下。

复制代码
[root@controller ~]# yum -y install memcached python-memcached

安装完成后,将配置文件里面OPTIONS 字段后加上控制节点的主机名即controller。

复制代码
[root@controller ~]# cat /etc/sysconfig/memcached
复制代码
[root@controller ~]# sed -i '/OPTIONS/d' /etc/sysconfig/memcached

[root@controller~]#cat /etc/sysconfig/memcached
复制代码
[root@controller ~]# echo OPTIONS="-1 127.0.0.1,::1,controller\">>/etc/sysconfig/memcached

[root@controller~]# cat /etc/sysconfig/memcached
复制代码
[root@controller ~]# systemctl start memcached.service

[root@controller~]# systemctl enable memcached.service

[root@controller~]#yum install -y chrony
复制代码
[root@controller ~]# vi /etc/chrony.conf

修改内容如下:

#use pubTic servers from the pool.ntp.orgproject.

#please_consider joining the pool (pool.ntp.org: Join the NTP Pool!

#server 0.centos.pool.ntp.org iburst

#server 1.centos.pool.ntp.org iburst

#server 2.centos.pool.ntp.org iburst

#server 3.centos.pool.ntp.org iburst

server 127.127.1.0 iburst

local stratum 10

allow 127/8

allow 192.168.100.0/24

复制代码
[root@controller~]#systemctl restart chronyd

[root@controller~]# systemctl enbale chronyd

[root@controller~]#systemctl enable chronyd

[root@controller~]# yum -y install openstack-utils openstack-selinux python-openstackclient crudini
相关推荐
编程就是如此2 个月前
OpenStack-Train版-Allinone自动化部署脚本
运维·自动化·openstack
huhy~2 个月前
基于Ceph14对接openstack的Nova、Glance、Cinder服务为后端存储
服务器·网络·openstack
2401_840192272 个月前
OpenStack基础架构
运维·服务器·openstack
昵称难产中3 个月前
浅谈云计算18 | OpenStack架构概述
架构·云计算·openstack
昵称难产中3 个月前
浅谈云计算20 | OpenStack管理模块(下)
云计算·openstack
昵称难产中3 个月前
浅谈云计算19 | OpenStack管理模块 (上)
计算机网络·云原生·架构·云计算·openstack
来自于狂人3 个月前
Openstack持久存储之Swift
云计算·openstack·swift
huhy~3 个月前
OpenStack-Neutron组件
网络·openstack
是垚不是土3 个月前
openEuler22.03系统使用Kolla-ansible搭建OpenStack
linux·ansible·openstack
来自于狂人3 个月前
解析OVN架构及其在OpenStack中的集成
架构·openstack