2.1 VMWare网络配置
添加三个虚拟网络;
分别用于模拟管理网络,实例网络,以及外部网络;
管理网络使用NAT模式,方便软件部署;其余使用Host Only模式;
2.2 服务器配置
2.2.1 域名解析
配置hosts或者DNS
# 追加到所有节点
cat <<EOF >> /etc/hosts
192.168.136.11 controller.alec.com controller
192.168.136.12 neutorn.alec.com neutron
192.168.136.13 compute.alec.com compute
192.168.136.14 block.alec.com block
EOF
2.2.2 yum源配置
# CentOS 源
wget -O /etc/yum.repos.d/Centos-7.repo http://mirrors.aliyun.com/repo/Centos-7.repo
# epel 源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
# openstack源
cat <<EOF >> /etc/yum.repos.d/OpenStack-Rocky.repo
[OpenStack]
name=Rocky
baseurl=https://mirrors.aliyun.com/centos/7/cloud/x86_64/openstack-rocky/
enabled=1
gpgcheck=0
EOF
2.2.3 NTP时间同步
没有外网的情况,可以把controller配置为本地时间服务器
yum install -y ntp
# 替换server配置
vim +21 /etc/ntp.conf
server ntp1.aliyun.com iburst
server ntp2.aliyun.com iburst
server ntp3.aliyun.com iburst
server ntp4.aliyun.com iburst
server ntp5.aliyun.com iburst
systemctl start ntpd
systemctl enable ntpd
2.2.4 防火墙
systemctl stop firewalld
systemctl disable firewalld
setenforce 0
sed -i '/^SELINUX=/ s/enforcing/disabled/i' /etc/selinux/config
2.2.5 安装OpenStack预备包
# 安装 yum-plugin-priorities 包,防止高优先级软件被低优先级软件覆盖
yum install -y yum-plugin-priorities
# 更新操作系统
yum upgrade -y
# 安装 openstack-selinux 自动管理selinux
yum install -y openstack-selinux
2.2.6 安装Memcached
yum install memcached python-memcached
systemctl start memcached.service
systemctl enable memcached.service
2.2.7 安装MariaDB
yum install -y mariadb-server MySQL-python
vim /etc/my.cnf.d/mariadb-server.cnf
[mysqld]
......
bind-address = 192.168.136.11
default-storage-engine = innodb
innodb_file_per_table = 1
character_set_server=utf8
collation-server = utf8_general_ci
systemctl start mariadb
systemctl enable mariadb
# 设置密码
MariaDB [(none)]> set password = password('admin');
2.2.8 安装RabbitMQ
- 功能:协调操作和状态信息服务
- 常用软件:
- RabbitMQ
- Opid
- ZeroMQ
- 安装rabbitmq-server
yum install -y rabbitmq-server
systemctl start rabbitmq-server
systemctl enable rabbitmq-server
# 添加rabbitmq用户,默认的guest用户只能通过127.0.0.1访问;
# 第一个alec是账号,第二个alec是密码
rabbitmqctl add_user alec alec
# 给alec账号赋予最高权限
rabbitmqctl set_user_tags alec administrator
# 查看rabbitmq账户
rabbitmqctl list_users
# 添加权限
rabbitmqctl set_permissions -p '/' alec '.*' '.*' '.*'
网友评论