您的位置:首页 > 运维架构 > Linux

centos7 OpenStack 一键自动部署

2018-01-09 14:17 453 查看
1、[root@localhost ~]# systemctl stop NetworkManager
[root@localhost ~]# systemctl enable NetworkManager
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl enable firewalld
[root@localhost ~]#vim /etc/selinux/config
将SELINUX=enforcing改为SELINUX=disabled
getenforce
setenforce 0 (临时关闭)
2、[root@localhost ~]#yum install https://rdoproject.org/repos/rdo-release.rpm
[root@localhost ~]#yum repolist
[root@localhost ~]#yum -y install openstack-packstack
3、重启服务器 #reboot (shutdown -r now)
4、[root@localhost ~]#yum install ntp
[root@localhost ~]# systemctl start ntpd
[root@localhost ~]# chkconfig ntpd on
[root@localhost ~]# vim /etc/ntp.conf
增加:server 202.120.2.101
[root@localhost ~]# ntpdate 202.120.2.101 (上海交通大学时间服务器)
5、[root@localhost ~]#packstack --gen-answer-file /root/answers.txt
[root@localhost ~]#vim /root/answers.txt
修改参数:
CONFIG_PROVISION_DEMO=n
CONFIG_CINDER_VOLUMES_CREATE=n
CONFIG_KEYSTONE_ADMIN_PW=redhat (修改登录密码)
CONFIG_HORIZON_SSL=y (图像化管理界面的安装)
6、 [root@localhost ~]#packstack --allinone
或者:#packstack --answer-file /root/answers.txt



7、[root@localhost ~]# openstack-status
在浏览器中输入服务器的IP地址及可访问。



8、镜像文件路径:
[root@localhost ~]# ll /var/lib//glance/images/
total 6709760
-rw-r----- 1 glance glance 3100639232 Jun 24 06:21 0b0de83b-d817-496e-8aec-f874d8963624
-rw-r----- 1 glance glance 3770155008 Jun 24 05:26 cf1d6df4-bfa1-4835-b96c-cf829bd2ee5e
[root@localhost ~]#

9、脚本:
#vim /tmp/customized.sh
echo "Time to eat!" >> /etc/motd
chmod a+x /tmp/customized.sh

10、镜像地址:
http://download.cirros-cloud.net/0.3.4/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息