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

相关实践学习
基于阿里云DeepGPU实例,用AI画唯美国风少女
本实验基于阿里云DeepGPU实例,使用aiacctorch加速stable-diffusion-webui,用AI画唯美国风少女,可提升性能至高至原性能的2.6倍。
目录
相关文章
|
2月前
|
消息中间件 分布式计算 Hadoop
kafaka单节点部署多节点部署
kafaka单节点部署多节点部署
168 2
|
7月前
|
缓存 Kubernetes Linux
安装kubernetes集群-灵活安装k8s各个版本高可用集群(上)
安装kubernetes集群-灵活安装k8s各个版本高可用集群
|
7月前
|
Kubernetes 前端开发 Docker
安装kubernetes集群-灵活安装k8s各个版本高可用集群(下)
安装kubernetes集群-灵活安装k8s各个版本高可用集群
|
12月前
|
Kubernetes 负载均衡 API
「容器云架构」设置高可用性Kubernetes Master
「容器云架构」设置高可用性Kubernetes Master
|
Cloud Native Linux 网络安全
【云原生实战】KubeSphere平台安装之Linux单节点和多节点部署
【云原生实战】KubeSphere平台安装之Linux单节点和多节点部署
334 0
【云原生实战】KubeSphere平台安装之Linux单节点和多节点部署
|
网络安全 数据安全/隐私保护 流计算
325.【openstack】kolla 搭建 openstack 单机版云环境
325.【openstack】kolla 搭建 openstack 单机版云环境
767 1
325.【openstack】kolla 搭建 openstack 单机版云环境
|
存储 运维 持续交付
快速部署Ceph分布式高可用集群
Ceph是一个PB,EB级别的分布式存储系统,可以提供文件存储,对象存储、和块存储,它可靠性高,易扩展,管理简便,其中对象存储和块存储可以和其他云平台集成。一个Ceph集群中有Monitor节点、MDS节点(用于文件存储)、OSD守护进程。
359 0
|
域名解析 Kubernetes Ubuntu
基于K3S构建高可用Rancher集群
基于K3S构建高可用Rancher集群
基于K3S构建高可用Rancher集群
|
安全 Linux 网络安全
如何快速部署Ceph分布式高可用集群(上)
如何快速部署Ceph分布式高可用集群(上)
724 0
如何快速部署Ceph分布式高可用集群(上)
如何快速部署Ceph分布式高可用集群(下)
如何快速部署Ceph分布式高可用集群(下)
348 0
如何快速部署Ceph分布式高可用集群(下)