当前位置: 首页 > news >正文

Ubuntu虚拟机部署OpenStack

1、部署环境
  • 系统:ubuntu-22.04.3-desktop-amd64
  • DevStack版本:2024.1
  • VMware Workstation:8G内存、4核处理器、100G硬盘/1、网络NAT模式/1
2、Ubuntu环境设置
  • 点击show applications,选择Software&Updates

在这里插入图片描述

  • 跟换Ubuntu的镜像源,点击Download from中的Other,选择China中的aliyun

image.png

  • 修改root密码,安装vim、openssh

sudo passwd root
su - root
apt install -y vim openssh-server

  • 开启root远程登录

vim /etc/ssh/sshd_config

修改#PermitRootLogin prohibit-password为PermitRootLogin yes

  • 重启ssh服务

systemctl restart sshd

3、安装OpenStack
  • 创建stack用户

sudo useradd -s /bin/bash -d /opt/stack -m stack

  • 修改/opt/stack权限

sudo chmod +x /opt/stack

  • 增加stack用户权限

echo “stack ALL=(ALL) NOPASSWD: ALL” | sudo tee /etc/sudoers.d/stack
sudo -u stack -i

  • 修改pip安装源

cd ~
mkdir .pip
cd .pip
vim pip.conf

pip.conf中的内容

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
index-index-url = https://mirrors.aliyun.com/pypi/simple/ 
[install]
trusted-host =pypi.tuna.tsinghua.edu.cnmirrors.aliyun.com
  • 下载Devstack

git clone https://opendev.org/openstack/devstack
cd devstack

  • 在devstack中创建local.conf文件,设置OpenStack用户密码
[[local|localrc]]
ADMIN_PASSWORD=secret
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
  • 安装OpenStack

./stack.sh

4、安装过程中出现的问题
  • etcd、novnc、cirros下载问题解决办法:

将下载好的etcd、novnc、cirros安装包放到对应位置,重新执行安装脚本./stack.sh

chown -R stack:stack cirros-0.6.2-x86_64-disk.img etcd-v3.4.27-linux-amd64.tar.gz novnc/
mv etcd-v3.4.27-linux-amd64.tar.gz /opt/stack/devstack/files/
mv novnc/ /opt/stack/
mv cirros-0.6.2-x86_64-disk.img /opt/stack/devstack/files/

5、安装成功后登录OpenStack
  • 安装成功后,会显示如下内容
This is your host IP address: 192.168.10.128
This is your host IPv6 address: ::1
Horizon is now available at http://192.168.10.128/dashboard
Keystone is serving at http://192.168.10.128/identity/
The default users are: admin and demo
The password: redhatServices are running under systemd unit files.
For more information see: 
https://docs.openstack.org/devstack/latest/systemd.htmlDevStack Version: 2024.1
Change: 29e73a215557b2d20d0d9611e0d5317e08cf9538 Enable performance collection on Debian 2023-10-24 06:18:22 +0200
OS Version: Ubuntu 22.04 jammy
  • 访问网址http://192.168.10.128/dashboard,登录OpenStack,用户名admin,密码redhatimage.png

image.png
参考资料:DevStack官方文档、安装包链接

http://www.lryc.cn/news/205565.html

相关文章:

  • ES在企业项目中的实战总结,彻底掌握ES的使用
  • QT的Qporcess功能的使用
  • 【图灵诸葛】jvm笔记
  • 数据安全小课堂开讲啦!看这里!
  • 单片机矩阵键盘
  • 横坐标日期等间隔绘图 python示例代码
  • photoshop2024免费插件Portraiture3
  • NewStarCTF2023week4-More Fast(GC回收)
  • 和鲸赞助丨第16届中国R会议暨2023 X-AGI大会通知
  • Python第三方库 - Flask(python web框架)
  • c# sqlite 修改字段类型
  • [Pytorch] 保存模型与加载模型
  • AES解密报错,Input length must be multiple of 16 when decrypting with padded cipher
  • 电子学会C/C++编程等级考试2023年05月(三级)真题解析
  • 【2023_10_21_计算机热点知识分享】:机器学习中的神经网络
  • app开发者提升第四季度广告收入的方法
  • #电子电器架构 —— 车载网关初入门
  • 系统工程利用计算机作为工具
  • MathType7.4绿色和谐版数学公式编辑器
  • JAVA代码审计-纵向越权漏洞分析
  • 【PG】PostgreSQL逻辑备份(pg_dump)
  • JVM、JRE、JDK
  • Latex 插入矢量图
  • git:删除上一次 commit 中的某个文件,并重新提交
  • proxy解决跨域问题
  • Ubuntu源码编译samba
  • conda虚拟环境配置
  • 如何制作自己的数字人
  • JAVA毕业设计103—基于Java+Springboot+vue的药店管理系统(源码+数据库)
  • LeetCode66——加一