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
- 安装成功后,会显示如下内容
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
- 访问网址http://192.168.10.128/dashboard,登录OpenStack,用户名admin,密码redhat