1、环境信息
1台虚拟机
8C16G
CentOS 7.2
2、准备工作
#!/bin/bash set -x #配置aliyun的centos和epel mirror mkdir /etc/yum.repos.d.backup mv /etc/yum.repos.d/* /etc/yum.repos.d.backup curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo #我测时候aliyuncs这个url不通,所以去掉 sed -i ‘/ http/d‘ /etc/yum.repos.d/CentOS-Base.repo yum clean all yum makecache #配置ali的pypi mkdir ~/.pip && touch pip.conf cat > ~/.pip/pip.conf << EOF [global] index-url = https://mirrors.aliyun.com/pypi/simple/ [install] trusted-host=mirrors.aliyun.com EOF #创建部署目录 mkdir /opt/stack cd /opt/stack #clone devstack代码 yum install git -y git clone https://github.com/openstack-dev/devstack.git cd devstack #创建部署用户 bash tools/create-stack-user.sh #准备local.conf文件,文件内容是部署变量的配置,默认即可 #stackrc中定义的变量可以在此文件中赋值 cp ./samples/local.conf . #使用国内的trystack下载OpenStack源码,提升速度 cat >> local.conf << EOF # Use trystack git mirror GIT_BASE=http://git.trystack.cn NOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.git SPICE_REPO=http://git.trystack.cn/git/spice/spice-html5.git EOF
3、部署
./stack.sh
4、访问dashboard
访问 http://ip
admin用户密码在local.conf中指定
参考:
https://docs.openstack.org/devstack/latest/
https://mp.weixin.qq.com/s/A9ZJtBRpBGFh_LuZEemOGg
http://blog.51cto.com/wzlinux/1969781
原文地址:https://www.cnblogs.com/nineep/p/9529545.html
时间: 2024-11-10 15:19:11