您好,登錄后才能下訂單哦!
? 192.168.205.7: as Chrony, DNS and YUM Source server(為了安裝更快,自建yum源)
? 192.168.205.147: as DataBase, install MariaDB, RabbitMQ, Memcached
? 192.168.205.167: as controller, install keystone, placement, nova, neutron, dashboard
? 192.168.205.187: as compute node, install neutron agent and nova agent
注:所有操作系統默認停用firewalld,iptable為空,關閉selinux
? OS: centos 7 1810 with mini install for controller and SQL server
? OS: CentOS 7 1511 with mini install for compute node
? Openstack Minimal deployment for Stein
? mariadb-10.3.10
注:其它未注明均為yum 安裝
? 最小化安裝openstack stein最新版本
? 安裝完成后各組件正常運行
? 測試成功建立實列并運行
? 通過運行實列測試基本的網絡功能
1. 安裝前的環境準備
2. 安裝keystone
3. 安裝glance鏡像服務
4. 安裝placement
5. 安裝Nova on controller
6. 安裝Nova on compute node
7. 安裝Neutron on controller node
8. 安裝Neutron on compute node
9. 安裝dashboard
10. 驗證測試
安裝的準備工作很重要,因為openstack服務非常多,服務之間的依賴關系緊密,合理的規劃不會導至安裝出現問題,否則會出現各種的問題。
#yum install chrony
#systemctl start chronyd
#cat /etc/chrony.conf
server 192.168.205.7 iburst
#systemctl status chronyd
#chronyc sources -v #檢查chrony時間是否同步,看到^*為同步,否則沒有同步
#cat /etc/hosts
192.168.205.167 controller1
192.168.205.147 master
192.168.205.187 node1
域名:flex.net
name server 192.168.205.7
A stack.flex.net 192.168.205.167 controller1
A dbs.flex.net 192.168.205.147 database, memcached, rabbitMQ
同進DNS也做為轉發服務器為yum提像安裝軟件
eth0為管理和API的網絡
#cat ifcfg-eth0
NAME="eth0"
DEVICE="eth0"
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.205.x
NETMASK=255.255.255.0
TYPE=Ethernet
eth2為租戶tenant網絡使用,不配IP,設置成none
#cat ifcfg-eth2
NAME="eth2"
DEVICE="eth2"
ONBOOT=yes
BOOTPROTO=none
eth3為外網安裝yum源使用,使用nat方式,同時將dns設置為內網的dns: 192.168.205.7
#cat ifcfg-eth3
NAME="eth3"
DEVICE="eth3"
ONBOOT=yes
BOOTPROTO=static
IPADDR=172.18.18.x
NETMASK=255.255.255.0
GATEWAY=172.18.18.2
DNS1=192.168.205.7
注:不要修改HWADDR和UUID
安裝源,首先啟用extras packges,我使用原cenos安裝時自帶的源, 也可以啟用aliyun或tinghua的extras源
#ls
backup CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
backup1 CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo
#yum list Centos-release-OpenStack*
…
Available Packages
centos-release-openstack-stein.noarch 1-1.el7.centos extras
centos-release-openstack-ocata.noarch 1-2.el7 extras
centos-release-openstack-pike.x86_64 1-1.el7 extras
centos-release-openstack-queens.noarch 1-2.el7.centos extras
注:安裝時我們要禁用epel源
#yum install centos-release-openstack-stein
安裝完成后我們看到目錄中多了一些源
#ls
backup CentOS-Debuginfo.repo CentOS-QEMU-EV.repo
backup1 CentOS-fasttrack.repo CentOS-Sources.repo
CentOS-Base.repo CentOS-Media.repo CentOS-Storage-common.repo
CentOS-Ceph-Nautilus.repo CentOS-NFS-Ganesha-28.repo CentOS-Vault.repo
#cat CentOS-OpenStack-stein.repo
CentOS-OpenStack-stein.repo
…
# yum upgrade
# yum install python-openstackclient
# yum install mariadb mariadb-server python2-PyMySQL
# vi /etc/my.cnf.d/openstack.cnf
[mysqld]
bind-address = 192.168.205.147
default-storage-engine = innodb
innodb_file_per_table = on
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8
# systemctl enable mariadb.service
# systemctl start mariadb.service
# mysql_secure_installation
Openstack的服務之間使用消息隊列協調操作和狀態信息,消息隊列通常地運行在controller上, openstack支持幾種消息隊列如:rabbitMQ, Qpid, ZeroMQ. 大多的發行版都支持這些特定的消息隊列,本實驗我們用RabbitMQ因為大多發行版都支持它,本列中,我們的消息隊列運行在dababase中
# yum install rabbitmq-server
# systemctl enable rabbitmq-server.service
# systemctl start rabbitmq-server.service
# rabbitmqctl add_user openstack openstack123
# rabbitmqctl set_permissions openstack ".*" ".*" ".*"
注:在vhost "/" ...中給用戶 "openstack" 授權
身份識別服務驗證機制使用Memcached緩存令牌,Memcached通常運行在controller上,對于生產部署,我們建議啟用防火墻、身份驗證和加密的組合來保護它。
# yum install memcached python-memcached
#vi /etc/sysconfi/memcached
OPTIONS="-l 127.0.0.1,::1,master" #如果你裝在數據庫服務器上,那么就改數據庫服務器的名字, 因為hosts中已經做解析
# systemctl enable memcached.service
# systemctl start memcached.service
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。