RDO一体化部署
RDOopenstack
1. 磁盘------100G 处理器 2-2 内存10g —net
2. 时间配置成 ----亚洲-上海
----默认最小化安装
----磁盘选择自动
----网络选择开启,,并修改主机名 ---------------如rdoopenstack
3. 配置root密码 123456
4. 安装vim---- yum install -y vim* ------------安装vim编辑器
5. 网络配置
1)开启网络
vim /etc/sysconfig/network
# Created by anaconda
NETWORKING=yes
2)配置静态IP
vi /etc/sysconfig/network-scripts/ifcfg-ens33
BOOTPROTO=“static” -----------修改为static
BROADCAST=“192.168.186.255”
IPADDR=“192.168.186.132”
NETMASK=“255.255.255.0”
NETWORK=“192.168.186.0”
GATEWAY=“192.168.186.2”
DNS1=“192.168.186.2”
3)域名服务器
vi /etc/resolv.conf ---------一般来说默认不动
4)IP域名映射
vi /etc/hosts
192.168.186.132 rdoopenstack rdoopenstack.localdomain -------------设置 192.168.186.xxx ipname ipname.domain
5)重启网络
systemctl restart network
ping 172.16.35.51
ping 192.168.186.133
6. 禁用安全
1)防火墙
systemctl disable firewalld
systemctl stop firewalld
2)SELINUX 重启机器
vim /etc/selinux/config
#SELINUX=enforcing
SELINUX=disabled
reboot
7. 切换网络管理器
systemctl disable NetworkManager
systemctl stop NetworkManager
systemctl enable network
systemctl start network
8. 安装Openstack软件包
yum install -y centos-release-openstack-queens
yum update -y
9. 启用Open Stack Queens资源库
yum install -y yum-utils
yum-config-manager --enable centos-openstack-queens
10. 安装yum-plugin-priorities插件
yum install -y yum-plugin-priorities
11. 安装KVM依赖的软件包
cd /etc/yum.repos.d/
curl -O https://trunk.rdoproject.org/centos7/delorean-deps.repo
curl -O https://trunk.rdoproject.org/centos7/current-passed-ci/delorean.repo
vi delorean.repo---- priority=1 --------------默认为1
12. 更新系统和软件包
yum update -y
reboot
13. 安装OpenStack的部署工具
yum install -y openstack-packstack
14. 使用PackStack以All in one方式部署OpenStack packstack --allinone
15.成功后—ls --cat-admin 查看密码----登陆网页,在管理-角色—编辑角色—修改密码--------密码为admin
Openstack基础配置
配置两个节点:openstackController openstackComputer 1–8是公共配置
1. 磁盘------
openstackController: 磁盘------60G 处理器 1-2 内存2g –net
openstackComputer:磁盘------60G 处理器 2-2 内存4g –net
2. 时间配置成 ----亚洲-上海
----默认最小化安装
----磁盘选择自动
----网络选择开启,,并修改主机名
3. 配置root密码 123456
4. 安装vim---- yum install -y vim*
5. 网络配置
1)开启网络
vim /etc/sysconfig/network
# Created by anaconda
NETWORKING=yes
2)配置静态IP
vi /etc/sysconfig/network-scripts/ifcfg-ens33
BOOTPROTO=“static”
BROADCAST=“192.168.186.255”
openstackController: IPADDR=“192.168.186.133”
openstackComputer:IPADDR=“192.168.186.137”
NETMASK=“255.255.255.0”
NETWORK=“192.168.186.0”
GATEWAY=“192.168.186.2”
DNS1=“192.168.186.2”
3)域名服务器
vi /etc/resolv.conf---------一般来说默认不动
4)IP域名映射
vi /etc/hosts
192.168.186.133 openstackcontroller openstackcontroller.localdomain
192.168.186.137 openstackcomputer openstackcomputer.localdomain
5)重启网络
systemctl restart network
ping 172.16.35.51------------------ping主机ip,检验网络是否连通
ping openstackcomputer ----------------ping主机名,检验网络是否连通
6.禁用安全
1)防火墙
systemctl disable firewalld
systemctl stop firewalld
2)SELINUX 重启机器
vim /etc/selinux/config--------下面两步注释一行,添加一行
#SELINUX=enforcing
SELINUX=disabled
3) 重启机器
reboot
7.切换网络管理器
systemctl disable NetworkManager
systemctl stop NetworkManager
systemctl enable network
systemctl start network
8.配置时间同步
1)安装时间同步工具
yum install -y chrony
2)修改配置文件
vi /etc/chrony.conf------注释以前的server*
openstackController–注册原有的server,添加如下内容
①配置aliyun时间服务器
server time1.aliyun.com iburst
server time2.aliyun.com iburst
server time3.aliyun.com iburst
server time4.aliyun.com iburst
server time5.aliyun.com iburst
server time6.aliyun.com iburst
server time7.aliyun.com iburst
②添加允许网段
openstackController :
allow 192.168.186.0/24
openstackComputer :
server 92.168.186.133 iburst --------将controller作为时间同步服务器
3)重启时间服务,并验证是否成功
systemctl enable chronyd
systemctl start chronyd
chrony sourcestats
openstackController---------配置
9. 数据库服务
1) SQL数据库-----MariaDB
①查看RDOopenstack对应版本,并删除旧版本
RDOopenstack: rpm -qa|grep mariadb -----------查看RDOopenstack mariadb的版本
openstackController: rpm -qa|grep mariadb -----查看openstackController mariadb的版本
yum -y remove maria* ----------删除openstackController旧版本
②重新编写一个mariadb源
vim /etc/yum.repos.d/MariaDB.repo----------编辑一个源,并复制一下代码,其中mariadb修改 为10.3*
# MariaDB 10.3 CentOS repository list - created 2019-01-18 13:10 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
#baseurl = http://yum.mariadb.org/10.3/centos7-amd64
baseurl =https://mirrors.ustc.edu.cn/mariadb/yum/10.3/centos7-amd64
#gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgkey=https://mirrors.ustc.edu.cn/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1
③下载安装,并重启服务,并再次查看mariadb的状态与版本
yum install -y mariadb mariadb-server python2-PyMySQL ----yum源安装下载mariadb mariadb-server python2-PyMySQL
systemctl enable mariadb -----------开机启动mariadb
systemctl start mariadb --------------开启mariadb
systemctl status mariadb -----------查看mariadb状态
rpm -qa|grep Maria* ----------查看mariadb版本是否与RDOopenstack相同
④进入mysql,并设置密码和授权
mysql -u root -p ----直接回车,没有密码
set password for ‘root’@‘localhost’=password(‘123456’); --------本主机密码设为123456</