圖文講解OpenStack手動(dòng)分布式部署環(huán)境準(zhǔn)備(Queens版)
OpenStack簡(jiǎn)介
OpenStack是由美國(guó)國(guó)家航空航天局NASA)與Rackspace公司合作研發(fā)并發(fā)起的,以Apache許可證授權(quán)的自由軟件和開(kāi)放源代碼的云計(jì)算技術(shù)解決方案,其是一個(gè)項(xiàng)目也是一個(gè)軟件,主要用于實(shí)現(xiàn)云項(xiàng)目,以云項(xiàng)目操作系統(tǒng)而存在。作用: 用于部署公有云、私有云,并實(shí)現(xiàn)對(duì)云項(xiàng)目管理。開(kāi)發(fā)語(yǔ)言: Python
1、基礎(chǔ)環(huán)境準(zhǔn)備(所有節(jié)點(diǎn)執(zhí)行)
1.1關(guān)閉防火墻
systemctl stop firewalld && systemctl disable firewalld
1.2關(guān)閉selinux
setenforce 0 && sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
1.3修改主機(jī)名
#注意改成每個(gè)節(jié)點(diǎn)的名字 hostnamectl set-hostname 節(jié)點(diǎn)名字
1.4安裝ntp時(shí)間服務(wù)器
【在控制節(jié)點(diǎn)】
yum install chrony
vi /etc/chrony.conf
systemctl enable chronyd.service && systemctl start chronyd.service
【在其他節(jié)點(diǎn)】
yum install chrony
server controller iburst
systemctl enable chronyd.service && systemctl start chronyd.service
1.5修改域名解析
vi /etc/hosts
172.16.21.37 controller 172.16.21.38 compute 172.16.21.39 cinder
1.6添加yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum install centos-release-openstack-queens -y
1.7更新軟件包
yum upgrade
1.8安裝openstack client端
yum install python-openstackclient -y
1.9安裝openstack-selinux
yum install openstack-selinux -y
2、數(shù)據(jù)庫(kù)安裝配置(controller節(jié)點(diǎn)執(zhí)行)
2.1安裝數(shù)據(jù)庫(kù)
yum install mariadb mariadb-server python2-PyMySQL -y
2.2修改數(shù)據(jù)庫(kù)
[mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock log-error=/var/log/mariadb/mariadb.log pid-file=/var/run/mariadb/mariadb.pid bind-address = 172.16.21.37 default-storage-engine = innodb innodb_file_per_table = on max_connections = 4096 collation-server = utf8_general_ci character-set-server = utf8
2.3重啟數(shù)據(jù)庫(kù)
systemctl enable mariadb.service;systemctl start mariadb.service
2.4初始化數(shù)據(jù)庫(kù)
[root@controller ~]# mysql_secure_installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation. Set root password? [Y/n] y New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success! By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] y ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] n ... skipping. By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] y ... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB installation should now be secure. Thanks for using MariaDB!
3、安裝RabbitMq并配置(controller節(jié)點(diǎn)執(zhí)行)
- RabbitMq是一種應(yīng)用程序?qū)?yīng)用程序的通信方法。應(yīng)用程序通過(guò)讀寫(xiě)出入隊(duì)列的消息(針對(duì)應(yīng)用程序的數(shù)據(jù))來(lái)通信,而無(wú)需專(zhuān)用連接來(lái)鏈接它們。
- 消息傳遞指的是程序之間通過(guò)在消息中發(fā)送數(shù)據(jù)進(jìn)行通信,而不是通過(guò)直接調(diào)用彼此來(lái)通信,直接調(diào)用通常是用于諸如遠(yuǎn)程過(guò)程調(diào)用的技術(shù)。
- 排隊(duì)指的是應(yīng)用程序通過(guò)隊(duì)列來(lái)通信。隊(duì)列的使用除去了接收和發(fā)送應(yīng)用程序同時(shí)執(zhí)行的要求。
3.1安裝RabbitMq
yum install -y rabbitmq-server
3.2啟動(dòng)并配置開(kāi)機(jī)啟動(dòng)
systemctl enable rabbitmq-server.service;systemctl start rabbitmq-server.service
查看是否啟動(dòng)成功
systemctl status rabbitmq-server.service
3.3添加 openstack 用戶(hù)
rabbitmqctl add_user openstack 000000
3.4給openstack用戶(hù)開(kāi)放權(quán)限
rabbitmqctl set_user_tags openstack administrator rabbitmqctl set_permissions openstack ".*" ".*" ".*"
查看一下
[root@controller ~]# rabbitmqctl list_users Listing users openstack [administrator] guest [administrator]
打開(kāi)RabbitMq圖像界面(這一步可以不做)
rabbitmq-plugins enable rabbitmq_management
- web界面登陸測(cè)試:
- http://172.16.14.224:15672 使用openstack/000000登陸即可
4、安裝memcached(controller節(jié)點(diǎn)執(zhí)行)
- memcached是一個(gè)開(kāi)源的、高性能的分布式內(nèi)存對(duì)象緩存系統(tǒng)。
- 通過(guò)在內(nèi)存中緩存數(shù)據(jù)和對(duì)象來(lái)減少讀取數(shù)據(jù)庫(kù)的次數(shù),從而提高網(wǎng)站訪(fǎng)問(wèn)速度,減輕數(shù)據(jù)庫(kù)負(fù)載。
- memcached是一種內(nèi)存緩存,把經(jīng)常需要存儲(chǔ)的對(duì)象或數(shù)據(jù)存在內(nèi)存中。
- 在內(nèi)存中數(shù)據(jù)通過(guò)API的方式被存取,數(shù)據(jù)經(jīng)過(guò)利用HASH之后被存放到位于內(nèi)存上的HASH表內(nèi),HASH表中的數(shù)據(jù)已key-value的形式存放,由于Memcached滅有實(shí)現(xiàn)訪(fǎng)問(wèn)認(rèn)證及安全管理控制,因此在面向Internet的系統(tǒng)架構(gòu)中,Memcached服務(wù)器通常位于用戶(hù)的安全區(qū)域。
yum install memcached python-memcached -y
修改配置
[root@controller ~]# vi /etc/sysconfig/memcached PORT="11211" USER="memcached" MAXCONN="1024" CACHESIZE="64" OPTIONS="-l controller"
systemctl enable memcached.service;systemctl start memcached.service
查看是否啟動(dòng)成功
systemctl status memcached.service
檢查一下memcache端口:
5、Etcd服務(wù)安裝(controller節(jié)點(diǎn)執(zhí)行)
5.1安裝服務(wù)
yum install etcd -y
5.2編輯/etc/etcd/etcd.conf文件
vi /etc/etcd/etcd.conf ETCD_INITIAL_CLUSTER ETCD_INITIAL_ADVERTISE_PEER_URLS ETCD_ADVERTISE_CLIENT_URLS ETCD_LISTEN_CLIENT_URLS #[Member] ETCD_DATA_DIR="/var/lib/etcd/default.etcd" ETCD_LISTEN_PEER_URLS="http://172.16.14.224:2380" ETCD_LISTEN_CLIENT_URLS="http://172.16.14.224:2379" ETCD_NAME="controller" #[Clustering] ETCD_INITIAL_ADVERTISE_PEER_URLS="http://172.16.14.224:2380" ETCD_ADVERTISE_CLIENT_URLS="http://172.16.14.224:2379" ETCD_INITIAL_CLUSTER="controller=http://172.16.14.224:2380" ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster-01" ETCD_INITIAL_CLUSTER_STATE="new"
5.3設(shè)置服務(wù)開(kāi)機(jī)啟動(dòng)
systemctl enable etcd; systemctl start etcd
到這里部署環(huán)境準(zhǔn)備完成
到此這篇關(guān)于圖文講解OpenStack手動(dòng)分布式部署環(huán)境準(zhǔn)備(Queens版)的文章就介紹到這了,更多相關(guān)OpenStack部署環(huán)境準(zhǔn)備內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
openstack云計(jì)算keystone組件工作流程及服務(wù)關(guān)系
這篇文章主要介紹了openstack云計(jì)算keystone組件工作流程及服務(wù)關(guān)系,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪2022-04-04詳解OpenStack云平臺(tái)的網(wǎng)絡(luò)模式及其工作機(jī)制
這篇文章主要介紹了詳解OpenStack云平臺(tái)的網(wǎng)絡(luò)模式及其工作機(jī)制,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下。2016-12-12什么是OpenStack 開(kāi)源的云計(jì)算管理平臺(tái)項(xiàng)目
OpenStack是一個(gè)開(kāi)源的云計(jì)算管理平臺(tái)項(xiàng)目,由幾個(gè)主要的組件組合起來(lái)完成具體工作。OpenStack支持幾乎所有類(lèi)型的云環(huán)境,項(xiàng)目目標(biāo)是提供實(shí)施簡(jiǎn)單、可大規(guī)模擴(kuò)展、豐富、標(biāo)準(zhǔn)統(tǒng)一的云計(jì)算管理平臺(tái)2016-11-11云計(jì)算openstack框架分類(lèi)及發(fā)展階段概述
這篇文章主要為大家介紹了云計(jì)算openstack框架分類(lèi)及發(fā)展階段概述,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步早日升職加薪2022-04-04OpenStack云平臺(tái)Train版搭建與基礎(chǔ)環(huán)境準(zhǔn)備
這篇文章主要介紹了OpenStack云平臺(tái)Train版搭建與基礎(chǔ)環(huán)境準(zhǔn)備,OpenStack用于部署公有云、私有云,并實(shí)現(xiàn)對(duì)云項(xiàng)目管理,需要的朋友可以參考下2023-03-03CentOS系統(tǒng)中一鍵安裝Openstack圖文教程
最近在學(xué)習(xí)Openstack,一直想試試安裝一下,可是參考了很多資料,并不如人意。由于一直用的Linux版本為CentOS,大部分Openstack安裝都要求在Ubuntu上進(jìn)行。本文介紹的是在CentOS系統(tǒng)中一鍵安裝Openstack的方法,有需要的朋友們可以參考學(xué)習(xí),下面來(lái)一起看看吧。2016-10-10openstack云計(jì)算keystone架構(gòu)源碼分析
這篇文章主要為大家介紹了openstack云計(jì)算keystone架構(gòu)源碼分析,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪2022-04-04centos下最簡(jiǎn)安裝openstack——使用packstack詳解
本篇文章主要介紹了centos下最簡(jiǎn)安裝openstack——使用packstack,具有一定的參考價(jià)值,有興趣的可以了解一下。2017-01-01OpenStack Keystone的基本概念詳細(xì)介紹
這篇文章主要介紹了OpenStack Keystone的基本概念詳細(xì)介紹的相關(guān)資料,需要的朋友可以參考下2016-11-11