当前位置:   article > 正文

Ubuntu虚拟机部署OpenStack_ubuntu虚拟机安装openstack

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.cn
    mirrors.aliyun.com
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 下载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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 安装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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

image.png

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/很楠不爱3/article/detail/217307?site
推荐阅读
相关标签
  

闽ICP备14008679号