openstack 部署单节点

简介: 在CentOS 7系统上,配置了一台拥有4核CPU、8GB内存和300GB磁盘的服务器,安装了OpenStack Trian版本。安装完成后,获取了OpenStack管理控制台的登录凭证(admin用户和密码),可访问IP地址192.168.200.249/dashboard进行登录。如果遇到问题,可能需要重新安装以确保纯净环境。

环境:
centos 7

cpu 4核

运行内存 8GB

磁盘容量 300GB

openstack版本 Trian版

ip 192.168.200.249

实验步骤:
关闭防火墙、selinux、NetworkManager服务

[root@amin ~]# systemctl  stop firewalld.service 
[root@amin ~]# 
[root@amin ~]# systemctl  disable firewalld.service 
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@amin ~]# 
[root@amin ~]# 
[root@amin ~]# vim /etc/selinux/config 
[root@amin ~]# setenforce  0
[root@amin ~]# systemctl  stop NetworkManager && systemctl  disable NetworkManager
[root@amin ~]# vim /etc/selinux/config 

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled  //永久关闭
# SELINUXTYPE= can take one of three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

删除原有的源,并备份一份、重新下载阿里云的YUM源

[root@amin ~]# tar -cvf /yum.bak /etc/yum.repos.d/*
tar: 从成员名中删除开头的“/”
/etc/yum.repos.d/CentOS-Base.repo
/etc/yum.repos.d/CentOS-CR.repo
/etc/yum.repos.d/CentOS-Debuginfo.repo
/etc/yum.repos.d/CentOS-fasttrack.repo
/etc/yum.repos.d/CentOS-Media.repo
/etc/yum.repos.d/CentOS-Sources.repo
/etc/yum.repos.d/CentOS-Vault.repo
/etc/yum.repos.d/CentOS-x86_64-kernel.repo
[root@amin ~]# 
[root@amin ~]# tar -cvf /yum.bak /etc/yum.repos.d/*^C
[root@amin ~]# rm -rf /etc/yum.repos.d/*
[root@amin ~]# curl -o /etc/yum.repos.d//CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2523  100  2523    0     0  23898      0 --:--:-- --:--:-- --:--:-- 24028
[root@amin ~]# yum clean all && yum makecache

更新库

[root@amin ~]# yum -y update
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 NetworkManager.x86_64.1.1.18.8-1.el7 将被 升级
---> 软件包 NetworkManager.x86_64.1.1.18.8-2.el7_9 将被 更新
---> 软件包 NetworkManager-adsl.x86_64.1.1.18.8-1.el7 将被 升级
---> 软件包 NetworkManager-adsl.x86_64.1.1.18.8-2.el7_9 将被 更新
省略 。。。。。。

安装ntp时间同步服务 同时将每两分钟执行一次时间同步

[root@amin ~]# yum -y install  ntpdate
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
软件包 ntpdate-4.2.6p5-29.el7.centos.2.x86_64 已安装并且是最新版本
无须任何处理
[root@amin ~]# ntpdate ntp.aliyun.com

14 Mar 10:12:31 ntpdate[83978]: adjust time server 203.107.6.88 offset -0.022774 sec
[root@amin ~]# vim /etc/selinux/config 
[root@amin ~]# 
[root@amin ~]#  crontab -e
crontab: no changes made to crontab
[root@amin ~]#  crontab -l
*/2 * * * * /usr/sbin/ntpdate ntp.aliyun.com >> /var/log/ntpdate.log

安装软件包

[root@amin ~]# yum -y install centos-release-openstack-train
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 centos-release-openstack-train.noarch.0.1-1.el7.centos 将被 安装
省略。。。
[root@amin ~]# yum -y install openstack-packstack
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * centos-ceph-nautilus: mirrors.ustc.edu.cn
 * centos-nfs-ganesha28: mirrors.huaweicloud.com
 * centos-openstack-train: mirrors.ustc.edu.cn
 * centos-qemu-ev: mirrors.ustc.edu.cn
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
省略。。。。

执行packstack --allinone命令安装

命令查看用户名、密码cat keystonerc_admin
unset OS_SERVICE_TOKEN
export OS_USERNAME=admin
export OS_PASSWORD='4678285980174bd0'

[root@amin ~]# packstack --allinone
Welcome to the Packstack setup utility

The installation log file is available at: /var/tmp/packstack/20240314-101457-vFmW8o/openstack-setup.log
Packstack changed given value  to required value /root/.ssh/id_rsa.pub

Installing:
Clean Up                                             [ DONE ]
Discovering ip protocol version                      [ DONE ]
Setting up ssh keys                                  [ DONE ]
Preparing servers                                    [ DONE ]
Pre installing Puppet and discovering hosts' details [ DONE ]
Preparing pre-install entries                        [ DONE ]
Setting up CACERT                                    [ DONE ]
Preparing AMQP entries                               [ DONE ]
Preparing MariaDB entries                            [ DONE ]
Fixing Keystone LDAP config parameters to be undef if empty[ DONE ]
Preparing Keystone entries                           [ DONE ]
Preparing Glance entries                             [ DONE ]
Checking if the Cinder server has a cinder-volumes vg[ DONE ]
Preparing Cinder entries                             [ DONE ]
Preparing Nova API entries                           [ DONE ]
Creating ssh keys for Nova migration                 [ DONE ]
Gathering ssh host keys for Nova migration           [ DONE ]
Preparing Nova Compute entries                       [ DONE ]
Preparing Nova Scheduler entries                     [ DONE ]
Preparing Nova VNC Proxy entries                     [ DONE ]
Preparing OpenStack Network-related Nova entries     [ DONE ]
Preparing Nova Common entries                        [ DONE ]
Preparing Neutron API entries                        [ DONE ]
Preparing Neutron L3 entries                         [ DONE ]
Preparing Neutron L2 Agent entries                   [ DONE ]
Preparing Neutron DHCP Agent entries                 [ DONE ]
Preparing Neutron Metering Agent entries             [ DONE ]
Checking if NetworkManager is enabled and running    [ DONE ]
Preparing OpenStack Client entries                   [ DONE ]
Preparing Horizon entries                            [ DONE ]
Preparing Swift builder entries                      [ DONE ]
Preparing Swift proxy entries                        [ DONE ]
Preparing Swift storage entries                      [ DONE ]
Preparing Gnocchi entries                            [ DONE ]
Preparing Redis entries                              [ DONE ]
Preparing Ceilometer entries                         [ DONE ]
Preparing Aodh entries                               [ DONE ]
Preparing Puppet manifests                           [ DONE ]
Copying Puppet modules and manifests                 [ DONE ]
Applying 192.168.200.249_controller.pp
192.168.200.249_controller.pp:                       [ DONE ]            
Applying 192.168.200.249_network.pp
192.168.200.249_network.pp:                          [ DONE ]         
Applying 192.168.200.249_compute.pp
192.168.200.249_compute.pp:                          [ DONE ]         
Applying Puppet manifests                            [ DONE ]
Finalizing                                           [ DONE ]
 **** 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-20240314-101457.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.200.249. To use the command line tools you need to source the file.
 * To access the OpenStack Dashboard browse to http://192.168.200.249/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
 * Because of the kernel update the host 192.168.200.249 requires reboot.
 * The installation log file is available at: /var/tmp/packstack/20240314-101457-vFmW8o/openstack-setup.log
 * The generated manifests are available at: /var/tmp/packstack/20240314-101457-vFmW8o/manifests
您在 /var/spool/mail/root 中有新邮件
[root@amin ~]# cat keystonerc_admin
unset OS_SERVICE_TOKEN
    export OS_USERNAME=admin
    export OS_PASSWORD='4678285980174bd0'
    export OS_REGION_NAME=RegionOne
    export OS_AUTH_URL=http://192.168.200.249: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

如上述安装报错请重新安装纯洁环境搭建、可能原因数据库对不上。

ip/dashboard 登录即完成
image.png

相关实践学习
部署Stable Diffusion玩转AI绘画(GPU云服务器)
本实验通过在ECS上从零开始部署Stable Diffusion来进行AI绘画创作,开启AIGC盲盒。
目录
相关文章
|
网络协议 Linux 网络安全
openstack 云平台一体化部署(超详细)
openstack 云平台一体化部署(超详细)
1296 0
openstack 云平台一体化部署(超详细)
|
消息中间件 Kubernetes 关系型数据库
教程get | K8S部署OpenStack容器云(下)
如何借助OpenStack Kolla-K8S项目,通过K8S对OpenStack进行容器化部署?并最终部署一套All-In-One类型的OpenStack容器云?让我们继续部署: 部署kolla-kubernetes ■  覆盖默认的RBAC设置 通过kubectl replace命令进行默.
4678 0
|
4月前
|
消息中间件 缓存 Shell
跟我一起来学OpenStack部署
跟我一起来学OpenStack部署
312 0
|
5月前
|
存储 数据安全/隐私保护 Docker
Kolla-ansible部署openStack
Kolla-ansible部署openStack
429 11
|
存储 弹性计算 资源调度
openstack组件部署 3
openstack组件部署
149 0
|
7月前
|
存储 Ubuntu KVM
Ubuntu部署OpenStack踩坑指南:还要看系统版本?
Ubuntu部署OpenStack踩坑指南:还要看系统版本?
Ubuntu部署OpenStack踩坑指南:还要看系统版本?
|
7月前
|
存储 安全 Linux
云计算|OpenStack|社区版OpenStack安装部署文档(一 --- 前期硬件准备和部署规划)
云计算|OpenStack|社区版OpenStack安装部署文档(一 --- 前期硬件准备和部署规划)
1314 0
|
负载均衡 安全 网络安全
openstack组件部署 4
openstack组件部署
|
存储 数据管理 数据安全/隐私保护
openstack组件部署 2
openstack组件部署
|
存储 消息中间件 关系型数据库
openstack组件部署 1
openstack组件部署
163 0