centos8 搭建openstack ussuri版本

以下步骤1-8需要在控制节点和计算节点上运行
最后一步部署openstack只需要在控制节点上运行
硬件环境最低需求
控制节点:16G内存
计算节点:16G内存
至少需要16G内存,否则配置完后创建实例会超时。

1.修改动态ip为静态ip

修改动态分配ip改为静态ip,在网络设置界面中将动态分配改为手动分配,添加ip地址、子网掩码、网关和DNS。

2.系统主机名称配置

为控制节点和计算节点设定hostname,用户可以自行命名,任何名称均可,建议用容易记、容易识别、相对有意义的名称,本手册中控制节点的主机名称设为Controller,计算节点主机名称设为Computer1,如果是多个节点可以继续:Computer2……
修改主机名主要涉及到/etc/hostname和/etc/hosts两个配置文件,具体配置如下:
控制节点:
/etc/hostname
Controller
/etc/hosts
#Controller
192.168.1.159 Controller
#Compute1
192.168.1.104 Compute1
计算节点:
/etc/hostname设为:
Compute1
相对应的/etc/hosts为增加如下内容:
/etc/hosts
#Controller
192.168.1.159 Controller
#Compute1
192.168.1.104 Compute1
注:所有节点的/etc/hosts内容一致。

3.关闭防火墙

systemctl stop firewalld
systemctl disable firewalld

4.关闭selinux

设置SELinux为Disable模式
执行命令setenforce 0,同时修改/etc/selinux/config 文件SELINUX=disabled

5.检查系统语言环境

整个环境部署,建议在英文系统环境中进行搭建,若当前系统环境是英文界面则无需切换,如果是中文环境,可以在“设置”中设置一下系统语言,或者直接修改 /etc/environment文件,加入如下内容:
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
重启系统或重启图形界面即可。

6.同步系统时钟(时间正确的话可以不设置)

执行yum install chrony安装chrony工具,编辑/etc/chrony.conf
server 0.centos.pool.ntp.org iburst(可用的NTP服务器)
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst
server Controller iburst (新增的作为其他计算节点的NTP服务器)
systemctl restart chronyd.service
systemctl enable chronyd.service
验证,执行chronyc sources,只有一个控制节点是“^”这样一个可用的服务器,如下:
[root@Compute1 ~]# chronyc sources
210 Number of sources = 1
MS Name/IP address Stratum Poll Reach LastRx Last sample
^
Controller 3 6 377 2 -405us[ -91us] +/- 53ms

7.检查系统时区

使用timedatectl | grep“Time zone”,返回结果如果时区不是“Asia/Shanghai”进行时区设置 timedatectl set-timezone Asia/Shanghai

8.更新系统并安装openstack源和packstack

sudo dnf update -y
sudo dnf config-manager --enable PowerTools
sudo dnf install -y centos-release-openstack-ussuri
sudo dnf install -y openstack-packstack

9.配置部署openstack

使用–install-hosts参数来运行packstack,该参数值是由一个逗号隔开的IP地址列表。
packstack --install-hosts=CONTROLLER_ADDRESS,NODE_ADDRESSES
如packstack --install-hosts=192.168.1.159,192.168.1.104

安装成功会显示
**** Installation completed successfully ******

Additional information:

  • Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
  • Warning: NetworkManager is active on 192.168.1.159 OpenStack networking currently does not work on systems that have the Network Manager service enabled.
  • File /root/keystonerc_admin has been created on OpenStack client host 192.168.1.159 To use the command line tools you need to source the file.
  • To access the OpenStack Dashboard browse to http://192.168.1.159/dashboard .
    Please, find your login credentials stored in the keystonerc_admin in your home directory.
  • The installation log file is available at: /var/tmp/packstack/20201215-181342-52yr5b45/openstack-setup.log
  • The generated manifests are available at: /var/tmp/packstack/20201215-181342-52yr5b45/manifests

puppet报错在compute.pp的话,然后查看对应的节点rpm -qa |grep openstack,查看是否安装了openstack的各种服务,如果查找结果只有4个服务,可能就是没有安装过来。还有注意的是hostname是否正确,hosts文件是否正确,系统是否是英文环境。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值