1. 程式人生 > >centos7 OpenStack 一鍵自動部署

centos7 OpenStack 一鍵自動部署

var one tar img tmp ima dmi kconfig ntp

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/



centos7 OpenStack 一鍵自動部署