基於openstack構建企業私有雲,能夠幫助大家快速的部署兩個節點的openstack集群。
一.基礎軟體包安裝 1.安裝epel倉庫
# rpm -ivh [url]
安裝openstack倉庫
# yum install -y centos-release-openstack-queens2.
3.安裝openstack客戶端
# yum install -y python-openstackclient
二.mysql資料庫部署4.安裝openstack selinux管理包
# yum install -y openstack-selinux
1.mysql安裝
[root@linux-node1 ~]# yum install -y mariadb mariadb-server python2-pymysql
2.修改mysql配置檔案
[root@linux-node1 ~]# vim /etc/my.cnf.d/openstack.cnf
[mysqld]
bind-address = 10.0.0.20 #設定監聽的ip位址
default-storage-engine = innodb #設定預設的儲存引擎
innodb_file_per_table = on#使用獨享表空間
collation-server = utf8_general_ci #伺服器的預設校對規則
character-set-server = utf8 #伺服器安裝時指定的預設字符集設定
max_connections = 4096 #設定mysql的最大連線數,生產請根據實際情況設定。
3.啟動mysql server並設定開機啟動
[root@linux-node1 ~]# systemctl enable mariadb.service
[root@linux-node1 ~]# systemctl start mariadb.service
4.進行資料庫安全設定
[root@linux-node1 ~]# mysql_secure_installation
三:訊息**rabbitmq5.資料庫建立
[root@linux-node1 ~]# mysql -u root -p
ketstone資料庫並授權:
create database keystone;
grant all privileges on keystone.* to 'keystone'@'localhost' identified by 'keystone';
grant all privileges on keystone.* to 'keystone'@'%' identified by 'keystone';
glance資料庫並授權:
create database glance;
grant all privileges on glance.* to 'glance'@'localhost' identified by 'glance';
grant all privileges on glance.* to 'glance'@'%' identified by 'glance';
nova資料庫並授權:
create database nova;
grant all privileges on nova.* to 'nova'@'localhost' identified by 'nova';
grant all privileges on nova.* to 'nova'@'%' identified by 'nova';
create database nova_api;
grant all privileges on nova_api.* to 'nova'@'localhost' identified by 'nova';
grant all privileges on nova_api.* to 'nova'@'%' identified by 'nova';
create database nova_cell0;
grant all privileges on nova_cell0.* to 'nova'@'localhost' identified by 'nova';
grant all privileges on nova_cell0.* to 'nova'@'%' identified by 'nova';
neutron 資料庫並授權:
create database neutron;
grant all privileges on neutron.* to 'neutron'@'localhost' identified by 'neutron';
grant all privileges on neutron.* to 'neutron'@'%' identified by 'neutron';
cinder資料庫並授權:
create database cinder;
grant all privileges on cinder.* to 'cinder'@'localhost' identified by 'cinder';
grant all privileges on cinder.* to 'cinder'@'%' identified by 'cinder';
1.安裝rabbitmq
[root@linux-node1 ~]# yum install -y rabbitmq-server
2.設定開啟啟動,並啟動rabbitmq
[root@linux-node1 ~]# systemctl enable rabbitmq-server.service
[root@linux-node1 ~]# systemctl start rabbitmq-server.service
3.新增openstack使用者。
[root@linux-node1 ~]# rabbitmqctl add_user openstack openstack
creating user "openstack" ...
4.給剛才建立的openstack使用者,建立許可權。
[root@linux-node1 ~]# rabbitmqctl set_permissions openstack ".*" ".*" ".*"
setting permissions for user "openstack" in vhost "/" ...
5.啟用web監控外掛程式
[root@linux-node1 ~]# rabbitmq-plugins list
[root@linux-node1 ~]# rabbitmq-plugins enable rabbitmq_management
docker實驗 實現私有雲
建立帶有sshd的映象 無論在windows centos還是ubuntu下docker的命令是不會變的 本次演示是在ubuntu18.10 docker version 18.06.1 ce 下完成的,注意在linux下的許可權問題 非root使用者需加sudo授權 sudo docker pul...
OpenStack建設企業私有雲要解決五大問題
openstack已經成為一種趨勢,但發行版openstack尚不完美,企業要建成私有雲必須預先充分了解發行版openstack的缺點,並尋求專業openstack提供商的幫助與合作,才能揚長避短,真正發揮openstack的優勢,建成最大化企業競爭優勢的私有雲。openstack在企業裡如何用好?...
OpenStack建設企業私有雲要解決五大問題
openstack已經成為一種趨勢,但發行版openstack尚不完美,企業要建成私有雲必須預先充分了解發行版openstack的缺點,並尋求專業openstack提供商的幫助與合作,才能揚長避短,真正發揮openstack的優勢,建成最大化企業競爭優勢的私有雲。openstack在企業裡如何用好?...