OpenStack架构
学习openstack的部署和运维之前,应当熟悉其架构和运行机制 openStack作为开源、可扩展、富有弹性的云操作系统;某设计基本原则如下: 按照不同的功能和通用性划分不同项目,拆分子系统 按照逻辑计划、规范子系统之间的通信 通过分层设计整个系统架构 不同的功能子系统间提供统一的API接口
OpenStack组件通信关系
基于AMQF协议的通信
用于每个项目内部各个组件之间的通信。
基于sQL的通信
用于各个项目内部的通信,
OpenStack环境部署
环境需求
控制节点ct:8g内存,300G硬盘,双网卡192.168.235.121,192.168.100.169,centos7最小化安装 控制节点c1:8g内存,300G硬盘,双网卡192.168.235.122,192.168.100.170,centos7最小化安装 控制节点c2:8g内存,300G硬盘,双网卡192.168.235.123,192.168.100.171,centos7最小化安装
安装
[root@localhost ~]
[root@localhost ~]
配置host
[root@ct ~]
192.168.100.169 ct
192.168.100.170 c1
192.168.100.171 c2
三台设备免交互
[root@ct ~]
[root@ct ~]
[root@ct ~]
[root@ct ~]
设置时间同步
[root@ct ~]
[root@ct ~]
server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst
server ntp6.aliyun.com iburst
[root@ct ~]
[root@ct ~]
[root@ct ~]
[root@ct ~]
*/2 * * * * /usr/bin/chronyc sources >>/var/log/chronyc.log
[root@ct ~]
*/2 * * * * /usr/bin/chronyc sources >> /var/log/chronyc.log
配置控制节点
安装mariadb
yum -y install mariadb mariadb-server python2-PyMySQL
yum -y install libibverbs
[root@ct ~]
[mysqld]
bind-address = 192.168.100.169
default-storage-engine = innodb
innodb_file_per_table = on
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8
[root@ct my.cnf.d]
[root@ct my.cnf.d]
执行mariadb的配置脚本
[root@ct my.cnf.d]
安装rabbitmq:控制端发送rabiitmq,node节点监听rabbitmq
[root@ct ~]
[root@ct ~]
[root@ct ~]
创建消息队列用户,用于controler和计算节点连接rabbitmq
rabbitmqctl add_user openstack RABBIT_PASS
Creating user “openstack”
配置OpenStack用户操作权限
[root@ct ~]
[root@ct my.cnf.d]
Creating user "openstack"
[root@ct my.cnf.d]
Setting permissions for user "openstack" in vhost "/"
[root@ct my.cnf.d]
查看端口
[root@ct ~]
可访问192.168.235.156:15672 默认账号密码均为guest
安装memcached
[root@ct ~]
修改Memcached配置文件
[root@ct ~]
[root@ct my.cnf.d]
[root@ct my.cnf.d]
Created symlink from /etc/systemd/system/multi-user.target.wants/memcached.service to /usr/lib/systemd/system/memcached.service.
[root@ct my.cnf.d]
[root@ct my.cnf.d]
tcp 0 0 192.168.100.60:11211 0.0.0.0:* LISTEN 31875/memcached
tcp 0 0 127.0.0.1:11211 0.0.0.0:* LISTEN 31875/memcached
tcp6 0 0 ::1:11211 :::* LISTEN 31875/memcached
安装etcd
[root@ct ~]
[root@ct ~]
[root@ct etcd]
ETCD_DATA_DIR="/var/lib/etcd/default.etcd"
ETCD_LISTEN_PEER_URLS="http://192.168.100.169:2380"
ETCD_LISTEN_CLIENT_URLS="http://192.168.100.169:2379"
ETCD_NAME="ct"
ETCD_INITIAL_ADVERTISE_PEER_URLS="http://192.168.100.169:2380"
ETCD_ADVERTISE_CLIENT_URLS="http://192.168.100.169:2379"
ETCD_INITIAL_CLUSTER="ct=http://192.168.100.11:2380"
ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster-01"
ETCD_INITIAL_CLUSTER_STATE="new"
[root@ct ~]
[root@ct ~]
[root@ct ~]
[root@ct ~]
|