云是一种模式,通过网络来使用,可以根据需求付费。
云有3种模式,公有云 私有云 混合云。
云安装部署前期安装软件
生产环境要注意:时间一定要同步,另外主机名要提前定好,防火墙要关闭
https://docs.openstack.org/newton/zh_CN/install-guide-rdo/environment-packages.html 官方网站中文
在两个节点都安装:
yum install https://repos.fedorapeople.org/repos/openstack/openstack-newton/rdo-release-newton-5.noarch.rpm 下载和安装RDO仓库RPM来启用OpenStack仓库。
1.安装仓库:
yum install centos-release-openstack-newton -y
2.安装 OpenStack 客户端:
# yum install python-openstackclient -y
# yum install openstack-selinux -y
在linux-node1上安装:
3.安装数据库: # yum install mariadb mariadb-server python2-PyMySQL -y
vim /etc/my.cnf.d/openstack.cnf
[mysqld]
bind-address = 192.168.1.102
default-storage-engine = innodb
innodb_file_per_table
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8
启动数据库服务,并将其配置为开机自启
# systemctl enable mariadb.service
# systemctl start mariadb.service
为了保证数据库服务的安全性,运行``mysql_secure_installation``脚本。特别需要说明的是,为数据库的root用户设置一个适当的密码。
# mysql_secure_installation
4.安装消息队列: # yum install rabbitmq-server.
启动消息队列服务并将其配置为随系统启动:
# systemctl enable rabbitmq-server.service
# systemctl start rabbitmq-server.service
添加 openstack
用户:
rabbitmqctl add_user openstack openstack
给``openstack``用户配置写和读权限:
rabbitmqctl set_permissions openstack ".*" ".*" ".*"
开启rabbitmq的web界面
rabbitmq-plugins enable rabbitmq_management
lsof -i:15672检查是否开启
192.168.1.102:15672
登录默认账号密码guest guest
5.其它服务提前安装: # yum install openstack-keystone httpd mod_wsgi
# yum install openstack-glance
# yum install openstack-nova-api openstack-nova-conductor \ openstack-nova-console openstack-nova-novncproxy \ openstack-nova-scheduler
# yum install openstack-neutron openstack-neutron-ml2 \ openstack-neutron-linuxbridge ebtables
6.创建数据库并授权
create database glance; create database glance; create database nova; create database nove_api; create database neutron; create database cinder; grant all on keystone.* to 'keystone'@'localhost' identified by 'keystone'; grant all on keystone.* to 'keystone'@'%' identified by 'keystoone'; grant all on glance.* to 'glance'@'localhost' identified by 'glance'; grant all on glance.* to 'glance'@'%' identified by 'glance'; grant all on nova.* to 'nova'@'localhost' identified by 'nova'; grant all on nova.* to 'nova'@'%' identified by 'nova'; grant all on nova_api.* to 'nova'@'localhost' identified by 'nova'ova'; grant all on nova_api.* to 'nova'@'%' identified by 'nova'; grant all on neutron.* to 'neutron'@'localhost' identified by 'neutron'; grant all on neutron.* to 'neutron'@'%' identified by 'neutron''; grant all on cinder.* to 'cinder'@'localhost' identified by 'cinder'; grant all on cinder.* to 'cinder'@'%' identified by 'cinder';
7.安装认证并配置
yum install openstack-keystone httpd mpd_wsgi vim /etc/keystone/keystone.conf 在640行改成数据库机子 connection = mysql+pymysql://keystone:keystone@192.168.1.102/keystone