Centos7.7安装Openstack Rocky版本

 

虽然目前容器越来越火,用K8S的也越来越多,但是Iaas平台依然是云计算的基础设施中的基础,而Iaas平台中Openstack依然是开源首选项目。

Openstack平台经过这么多年的发展,已经发展到T版本,而18年发布的R版Rocky已经经过一年多的时间的考验,趋于稳定。本文给大家介绍Centos7如何通过互联网安装Openstack Rocky版。

安装前说明:下面没有特别说明,全部节点都要做相关配置。

1.环境信息

软件 版本
centos 7.7-1908
controller 10.23.155.100
nova01 10.23.155.101
nova02 10.23.155.102

2.配置hosts

配置hosts
cat >> /etc/hosts <<EOF
10.23.155.100 controller
10.23.155.101 nova01
10.23.155.102 nova02
EOF

3.关闭防火墙和SeLinux

关闭防火墙
systemctl stop firewalld
systemctl disable firewalld.service
关闭SELINUX
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

4.ntp同步所有节点时间

 yum -y install ntp
 systemctl enable ntpd
 systemctl start ntpd
 ntpdate -u cn.pool.ntp.org

5.设置controller节点对所有计算节点ssh免密登陆。controller节点执行

ssh-keygen -t rsa
分发到各个节点,包括controller节点
ssh-copy-id 10.23.155.100/101/102

6.创建openstack rocky版本的国内repo源,使用的是阿里云源

cat <<EOF >  /etc/yum.repos.d/openstack.repo
[openstack-rocky]
name=openstack-rocky
baseurl=https://mirrors.aliyun.com/centos/7/cloud/x86_64/openstack-rocky/
enabled=1
gpgcheck=0
[qume-kvm]
name=qemu-kvm
baseurl= https://mirrors.aliyun.com/centos/7/virt/x86_64/kvm-common/
enabled=1
gpgcheck=0
EOF

7.安装centos-release-openstack-rocky

yum install centos-release-openstack-rocky
yum upgrade

8.安装openstack客户端和selinux服务

 yum install -y python-openstackclient openstack-selinux

9.安装数据库mariadb 只在controller节点执行

yum install -y mariadb mariadb-server python2-PyMySQL
数据库配置
cat <<EOF >  /etc/my.cnf.d/openstack.cnf
[mysqld]
bind-address = 10.23.155.100
default-storage-engine = innodb
innodb_file_per_table = on
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8
EOF

启动数据库
systemctl enable mariadb.service
systemctl start mariadb.service
设置数据库密码
运行mysql_secure_installation命令
[root@controller ~]# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): 
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] n
 ... skipping.

By default, Maria
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值