使用packstack快速部署OpenStack

目录

资源列表

基础环境

安装packstack

安装OpenStack


本文记录了基于CentOS操作系统使用packstack快速部署openstack。

资源列表

操作系统 配置 磁盘 IP 数量
CentOS7.9 4C8G 50G 192.168.207.155 1

基础环境

  • 服务器开启虚拟化,我这里使用的是VMware虚拟机,所以勾选 虚拟化Intel VT-x/EPT或AMD-V/RVI(V)

  • 关闭防火墙

bash 复制代码
systemctl stop firewalld
systemctl disable firewalld
  • 关闭内核安全机制
bash 复制代码
sed -i "s/.*SELINUX=.*/SELINUX=disabled/g" /etc/selinux/config
  • 修改IP为静态IP,若已经是静态IP可以跳过
bash 复制代码
nmcli con mod ens33 ipv4.method static ipv4.address 192.168.207.155/24 ipv4.gateway 192.168.207.2 ipv4.dns 192.168.207.2
  • 修改主机名
bash 复制代码
# 注意这里修改的主机名不能有下划线
hostnamectl set-hostname openstack
  • 关闭NetworkManager
bash 复制代码
systemctl stop NetworkManager
systemctl disable NetworkManager
  • 添加hosts
bash 复制代码
echo "192.168.207.155 openstack" >> /etc/hosts
  • 重启服务器
bash 复制代码
reboot

安装packstack

bash 复制代码
# 更新软件包
yum -y update
# 安装train版本包
yum -y install centos-release-openstack-train
# 安装packstack
yum -y install openstack-packstack

安装OpenStack

bash 复制代码
# 该过程耗时较长,约30分钟左右
packstack --allinone
​
​
# 出现以下信息表示成功
 **** Installation completed successfully ******
​
Additional information:
​
- Parameter CONFIG_NEUTRON_L2_AGENT: You have chosen OVN Neutron backend. Note that this backend does not support the VPNaaS or FWaaS services. Geneve will be used as the encapsulation method for tenant networks
- A new answerfile was created in: /root/packstack-answers-20200221-143136.txt
- Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
- File /root/keystonerc_admin has been created on OpenStack client host 192.168.207.131. To use the command line tools you need to source the file.
- To access the OpenStack Dashboard browse to http://192.168.207.131/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/20200221-143136-tbr4ug/openstack-setup.log
- The generated manifests are available at: /var/tmp/packstack/20200221-143136-tbr4ug/manifests
​
# 查看keystonerc_admin文件获取账号密码(通常在用户的家目录)
# 以此为例用户就是admin,密码则是4dc0395edf0a4fe7
[root@openstack ~]# cat /root/keystonerc_admin 
unset OS_SERVICE_TOKEN
    export OS_USERNAME=admin
    export OS_PASSWORD='4dc0395edf0a4fe7'
    export OS_REGION_NAME=RegionOne
    export OS_AUTH_URL=http://192.168.247.3:5000/v3
    export PS1='[\u@\h \W(keystone_admin)]\$ '
    
export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_DOMAIN_NAME=Default
export OS_IDENTITY_API_VERSION=3

如果有问题的可以使用该命令指定应答文件再次执行

bash 复制代码
packstack --answer-file=[应答文件]

在安装完openstack以后会有一个br-ex网卡这个是临时的需要写个配置文件

bash 复制代码
[root@openstack ]# ifconfig br-ex
br-ex: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.24.4.1  netmask 255.255.255.0  broadcast 0.0.0.0
        inet6 fe80::5cde:dcff:fe75:fb43  prefixlen 64  scopeid 0x20<link>
        ether 5e:de:dc:75:fb:43  txqueuelen 1000  (Ethernet)
        RX packets 15  bytes 420 (420.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 8  bytes 648 (648.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        
[root@openstack network-scripts]# cat ifcfg-br-ex 
TYPE=Ethernet
BOOTPROTO=none
NAME=br-ex
DEVICE=br-ex
ONBOOT=yes
IPADDR=172.24.4.1
PREFIX=24

查看openstack相关服务

bash 复制代码
yum -y install openstack-utils
openstack-service --help
openstack-service list
openstack-service restart openstack-swift-proxy
相关推荐
dsywws1 分钟前
Linux学习笔记之时间日期和查找和解压缩指令
linux·笔记·学习
yeyuningzi9 分钟前
Debian 12环境里部署nginx步骤记录
linux·运维·服务器
上辈子杀猪这辈子学IT27 分钟前
【Zookeeper集群搭建】安装zookeeper、zookeeper集群配置、zookeeper启动与关闭、zookeeper的shell命令操作
linux·hadoop·zookeeper·centos·debian
minihuabei33 分钟前
linux centos 安装redis
linux·redis·centos
EasyCVR1 小时前
萤石设备视频接入平台EasyCVR多品牌摄像机视频平台海康ehome平台(ISUP)接入EasyCVR不在线如何排查?
运维·服务器·网络·人工智能·ffmpeg·音视频
lldhsds2 小时前
书生大模型实战营第四期-入门岛-1. Linux前置基础
linux
wowocpp2 小时前
ubuntu 22.04 硬件配置 查看 显卡
linux·运维·ubuntu
山河君2 小时前
ubuntu使用DeepSpeech进行语音识别(包含交叉编译)
linux·ubuntu·语音识别
鹏大师运维2 小时前
【功能介绍】信创终端系统上各WPS版本的授权差异
linux·wps·授权·麒麟·国产操作系统·1024程序员节·统信uos
筱源源2 小时前
Elasticsearch-linux环境部署
linux·elasticsearch