使用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
相关推荐
Sokach10151 小时前
Linux Shell 脚本从零到能用:一个新手的一天学习总结
linux
SelectDB16 小时前
Litefuse 开源并推出单进程轻量模式,25 秒就能跑起来的 Agent 可观测与评估平台
运维·后端·自动化运维
AlfredZhao17 小时前
Docker 容器时区不对,`timedatectl` 不存在怎么办?
linux·timezone
zzzzzz3102 天前
9K Star 炸裂开源!这个 C 语言写的代码知识图谱,把 Linux 内核索引压缩到了 3 分钟
linux·服务器·sql
XIAOHEZIcode2 天前
Linux系统鼠标偏移常见原因以及修复方案
linux·运维·游戏
用户0328472220703 天前
如何搭建本地yum源(上)
运维
A小辣椒4 天前
TShark:Wireshark CLI 功能
linux
宋均浩4 天前
# GitHub Actions 实战:从零搭建 CI/CD 流水线的 5 个核心配置
ci/cd
A小辣椒4 天前
TShark:基础知识
linux
AlfredZhao4 天前
OCI 明明分配了 200G 系统盘,为什么 df 只看到 30G?
linux·oci