一键安装Openstack
什么是OpenStack?
OpenStack 是一系列开源工具(或开源项目)的组合,主要使用池化虚拟资源来构建和管理私有云及公共云。其中的六个项目主要负责处理核心云计算服务,包括计算、网络、存储、身份和镜像服务。还有另外十多个可选项目,用户可把它们捆绑打包,用来创建独特、可部署的云架构。
环境:
centos7 IP 192.168.59.3
4核 8G
配置静态IP
[root@192 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens33
BOOTPROTO=static"
DEVICE="ens33"
ONBOOT="yes"
IPADDR=192.168.59.3
NETWORK=255.255.255.0
GATEWAY=192.168.59.2
DNS=192.168.1.1
DNS1=192.168.0.1
且能够连接外网
[root@192 ~]# ping www.baidu.com
PING www.baidu.com (180.101.49.12) 56(84) bytes of data.
64 bytes from 180.101.49.12 (180.101.49.12): icmp_seq=1 ttl=128 time=55.8 ms
64 bytes from 180.101.49.12 (180.101.49.12): icmp_seq=2 ttl=128 time=49.9 ms
时间同步
[root@localhost ~]# yum -y install ntpdate
[root@localhost ~]# ntpdate ntp.aliyun.com >>/var/log/ntpdate.log
[root@localhost ~]# ntpdate ntp.aliyun.com 产生日志文件
设置周期计划任务
[root@localhost ~]# crontab -e
*/30 * * * * /usr/sbin/ntpdate ntp.aliyun.com >>/var/log/ntpdate.log
[root@localhost ~]# systemctl restart crond
[root@localhost ~]# systemctl enable crond
一、关闭防火墙并且安装RDO软件
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# setenforce 0
vi /etc/sysconfig/selinux
SELINUX=disabled
[root@localhost ~]# yum -y install http://rdo.fedorapeople.org/rdo-release.rpm
二、安装packstark的部署包
[root@localhost ~]# yum -y install openstack-packstack
三、通过脚本一键自动安装 (这一步通常要用1小时左右)
[root@localhost ~]# packstack --allinone
Welcome to the Packstack setup utility
The installation log file is available at: /var/tmp/packstack/20200629-193853-4vIHOw/openstack-setup.log
Packstack changed given value to required value /root/.ssh/id_rsa.pub
Installing:
Clean Up [ DONE ]
Discovering ip protocol version [ DONE ]
Setting up ssh keys [ DONE ]
看到**** Installation completed successfully *****这句话就说明安装成功了
四、查看密码文件
[root@192 ~]# ls
anaconda-ks.cfg keystonerc_demo tmp-packstack-answers-20200629-212107.txt
keystonerc_admin packstack-answers-20200629-212108.txt
[root@192 ~]# cat keystonerc_admin
unset OS_SERVICE_TOKEN
export OS_USERNAME=admin
export OS_PASSWORD='5cbdcdd2fe434ebb'
export OS_REGION_NAME=RegionOne
export OS_AUTH_URL=http://192.168.59.3:5000/v3
export PS1='[\u@\h \W(keystone_admin)]\$ '
export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_DOMAIN_NAME=Default
export OS_IDENTITY_API_VERSION=3
然后通过浏览器就可以访问
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-YFCRqK2s-1593442119705)(C:\Users\21917\AppData\Roaming\Typora\typora-user-images\1593441341765.png)]
t
export OS_IDENTITY_API_VERSION=3
然后通过浏览器就可以访问
![在这里插入图片描述](https://img-blog.csdnimg.cn/20200629225110365.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2ZjZGZm,size_16,color_FFFFFF,t_70#pic_center)