前言:建议参考官方文档https://docs.openstack.org/pike/install/
参看文章:https://www.cnblogs.com/blacklonging/p/7881048.html
本文架构设置参考上文,基本可以完整设置。有部分问题,参考官方文档可解决。
环境准备:VMware® Workstation 14
1、虚拟机配置
内存,cpu 略有不同,自己配置即可
Controller节点:
系统:CentOS7.6 64位(最小化安装)
处理器:4核
内存:4G
硬盘:100G
网卡:3块
Compute节点:
系统:CentOS7.6 64位(最小化安装)
处理器:4核
内存:4G
硬盘:100G
网卡:3块
Cinder节点:
系统:CentOS7.6 64位(最小化安装)
处理器:4核
内存:1G
硬盘:100G+50G
网卡:3块
前期准备:安装源,修改网络地址,安装必备环境包(在修改任何系统环境配置文件前,请备份)
修改源请自己百度,参看其他文章
1. 备份本地yum源
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak
2.获取阿里yum源配置文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3.更新cache
yum makecache
4.查看
yum -y update
yum -u upgrade
1、关闭防火墙
2、
最后环境中文件如下:
CentOS-Base.repo
# CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # # [base] name=CentOS-$releasever - Base - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/ http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 #released updates [updates] name=CentOS-$releasever - Updates - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/ http://mirrors.aliyuncs.com/centos/$releasever/updates/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/ http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/ http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 #contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/$releasever/contrib/$basearch/ http://mirrors.aliyuncs.com/centos/$releasever/contrib/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/$releasever/contrib/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
epel源:
[epel] name=Extra Packages for Enterprise Linux 7 - $basearch baseurl=http://mirrors.aliyun.com/epel/7/$basearch http://mirrors.aliyuncs.com/epel/7/$basearch #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch failovermethod=priority enabled=1 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 [epel-debuginfo] name=Extra Packages for Enterprise Linux 7 - $basearch - Debug baseurl=http://mirrors.aliyun.com/epel/7/$basearch/debug http://mirrors.aliyuncs.com/epel/7/$basearch/debug #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch failovermethod=priority enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 gpgcheck=0 [epel-source] name=Extra Packages for Enterprise Linux 7 - $basearch - Source baseurl=http://mirrors.aliyun.com/epel/7/SRPMS http://mirrors.aliyuncs.com/epel/7/SRPMS #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch failovermethod=priority enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 gpgcheck=0
mariadb源:
[mariadb] name=mariadb baseurl=https://mirrors.ustc.edu.cn/mariadb/yum/10.1/centos7-amd64/ gpgcheck=0 enabled=1
Openstack源:
[openstack] name=pike baseurl=https://mirrors.aliyun.com/centos/7/cloud/x86_64/openstack-pike/ gpgcheck=0 enabled=1
四、清除当前yum缓存并重新建立新的缓存
yum clean all yum makecache
如果以上步骤不报错,则说明源配置的没问题。
五、安装必须的工具
yum install net-tools wget vim ntpdate ntp bash-completion -y
六、更改主机名
编辑/etc/hostname,将默认主机名改为你想要的主机名,本次实验的主机名如下:
Controller节点:controller
Compute节点:compute
Cinder节点:cinder
七、添加各节点的hosts信息
编译/etc/hosts,增加各节点IP及主机名的对应关系,这里IP地址使用VMnet1网段的IP,以下是Controller节点的hosts文件,其余节点同样添加:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 10.1.1.10 controller 10.1.1.101 compute 10.1.1.102 cinder /etc/hosts
建议现修改网卡信息,是网络能用。
主要问题;记录:
问题:The request you have made requires authentication. (HTTP 401) (Request-ID: rxxxxx
身份认证问题
vi /etc/keystone/keystone.conf 找到这一行: #admin_token = <None> 将注释取消 root用户下不需要加su 刷库 # /bin/sh -c "keystone-manage db_sync"
问题:
ERROR oslo_service.service AccessRefused: (0, 0): (403) ACCESS_REFUSED - Login was refused using authentication mechanism AMQPLAIN. For details see the broker logfile.
创建过程中出现一次 Rabbitmq未创建成功openstack用户问题。openstack丢了,DHCP起不来。重建用户即可
问题:
http://192.168.17.140/dashboard/ 500
http://contrller/dashboard/ 500 错误
解决办法:
在/etc/httpd/conf.d/openstack-dashboard.conf 加入 WSGIApplicationGroup %{GLOBAL}
问题已解决,
或者 原因是/etc/openstack-dashboard/local.settings 权限是root权限,执行chown root:apache /etc/openstack-dashboard/完美解决问题( 亲测是要给local.setting文件权限才行)
chown root:apache /etc/openstack-dashboard/local_settings

问题(安装compute出现):
需要:qemu-kvm-rhev >= 2.9.0
解决:先参考其他文档解决,如不行,执行安装
yum install centos-release-openstack-pike
2019-06-25
浙公网安备 33010602011771号