使用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)

  • 关闭防火墙

systemctl stop firewalld
systemctl disable firewalld
  • 关闭内核安全机制

sed -i "s/.*SELINUX=.*/SELINUX=disabled/g" /etc/selinux/config
  • 修改IP为静态IP,若已经是静态IP可以跳过

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
  • 修改主机名

# 注意这里修改的主机名不能有下划线
hostnamectl set-hostname openstack
  • 关闭NetworkManager

systemctl stop NetworkManager
systemctl disable NetworkManager
  • 添加hosts

echo "192.168.207.155 openstack" >> /etc/hosts
  • 重启服务器

reboot

安装packstack

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

安装OpenStack

# 该过程耗时较长,约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

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

packstack --answer-file=[应答文件]

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

[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相关服务

yum -y install openstack-utils
openstack-service --help
openstack-service list
openstack-service restart openstack-swift-proxy

相关推荐

  1. 使用packstack快速部署OpenStack

    2024-06-06 12:08:05       8 阅读
  2. 使用packstack部署多节点openstack

    2024-06-06 12:08:05       10 阅读
  3. 部署Openstack HA

    2024-06-06 12:08:05       33 阅读
  4. 一键在线部署Openstack

    2024-06-06 12:08:05       39 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-06-06 12:08:05       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-06-06 12:08:05       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-06-06 12:08:05       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-06-06 12:08:05       20 阅读

热门阅读

  1. 动态规划:打家劫舍 II

    2024-06-06 12:08:05       9 阅读
  2. 前端 、Python 扁平化嵌套数组和应用场景

    2024-06-06 12:08:05       9 阅读
  3. 如何搭建开发一款看广告赚钱软件?

    2024-06-06 12:08:05       9 阅读
  4. spring整合kafka

    2024-06-06 12:08:05       6 阅读
  5. go语言接口之接口类型

    2024-06-06 12:08:05       8 阅读
  6. 爬山算法的详细介绍

    2024-06-06 12:08:05       9 阅读
  7. spring 事务失效的几种场景

    2024-06-06 12:08:05       8 阅读
  8. C#的线程锁

    2024-06-06 12:08:05       8 阅读
  9. django连接达梦数据库

    2024-06-06 12:08:05       9 阅读
  10. Lua使用方式介绍

    2024-06-06 12:08:05       11 阅读