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
  • 修改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.cn
    mirrors.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
  • 安装成功后,会显示如下内容
shell 复制代码
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: redhat

Services are running under systemd unit files.
For more information see: 
https://docs.openstack.org/devstack/latest/systemd.html

DevStack Version: 2024.1
Change: 29e73a215557b2d20d0d9611e0d5317e08cf9538 Enable performance collection on Debian 2023-10-24 06:18:22 +0200
OS Version: Ubuntu 22.04 jammy

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

相关推荐
未济5 天前
linux 配置环境变量
linux
傲世仙尊5 天前
目录即文件-Ext文件系统收尾篇
linux·c语言
_艾伦 耶格尔.5 天前
进程间通信
linux
Liuqy-055 天前
Linux IO编程——静态库、动态库
linux
彧azz5 天前
Linux 环境下 Redis 学习总结:数据类型、持久化、锁、事务、主从与缓存问题
linux·redis·笔记·学习·面试
-梅5 天前
linux(8) 软硬链接
linux·运维·服务器
AIgorithmGEEK5 天前
[Linux]线程三部曲(上):一个执行流的诞生——从操作系统一路拆到 pthread_create
linux·线程·pid
琥珀色糖5 天前
SimlpeHttp
linux·服务器
qeen875 天前
【Linux】操作系统之进程介绍(二)
linux·笔记·学习·进程
Zenova EdgeOS5 天前
Linux ss 工业边缘网络分析实战
linux·python·边缘计算·工业网关