一.配置基础环境
- 1.基础环境:我们首先要准备两个虚拟机一个为controller节点(控制节点),一个为compute节点(计算节点),控制节点为两个镜像一个centos一个iaas,硬盘要准备两个,一个100GB,一个50GB,加上两个网络,一个为仅主机(vm1),一个为NAT(vm2)。计算节点如上但少一个iaas镜像和50GB硬盘。以上所有环境在VM虚拟机基础设置配置。
- controller进入虚拟机配置:进入命令界面我们需要做修改他的主机名和配置基础网络
controller节点配置基础
[root@localhost /]>hostnamectl set-hostname controller ;bash
[root@controller /]>nmtui 更改IP地址,第一张网卡(仅主机)为192.168.10.10/24的网络不用加入网关,第二张网卡(NAT)为192.168.20.10/24的网络添加网关
[root@controller /]>mkdir /opt/centos
[root@controller /]>mkdir /opt/iaas
[root@controller /]>mount /dev/sr1 /opt/centos
[root@controller /]>mount /dev/sr0 /opt/iaas
[root@controller /]>rm -rf /etc/yum.repos.d/Centos-*
compute节点配置基础
[root@localhost /]>hostnamectl set-hostname compute ;bash
[root@compute/]>nmtui 更改IP地址,第一张网卡(仅主机)为192.168.10.20/24的网络不用加入网关,第二张网卡(NAT)为192.168.20.20/24的网络添加网关
免密连接
[root@controller /]>ssh-keygen
[root@controller /]>ssh-copy-id 192.168.10.20
配置hosts
[root@controller /]>vi /etc/hosts
192.168.10.10 controller
192.168.10.20 compute
[root@controller /]>scp /etc/hosts co