本节以在H3C CAS虚拟化平台(以下简称CAS)上为CloudOS裸金属特性进行独立计算节点配置为例。
CloudOS仅支持部署运行一个裸金属独立计算节点。 |
安装过程包括:安装准备、安装CloudOS计算节点、配置计算节点数据库权限、手动配置计算节点。
在Web浏览器上登录CAS云计算管理平台,创建虚拟机作为裸金属计算节点,负责提供裸金属计算能力。
· 关于CAS相关详细配置,可以参考CAS相关文档 · 虚拟机规格参数可参照H3C-CloudOS-PLAT运行环境要求,详见《H3C CloudOS 5.0 云操作系统部署指导》运行环境章节。 |
· 主节点为登录GoMatrix用的节点,关于主节点及部署过程的详细介绍请参见《H3C CloudOS 5.0云操作系统 部署指导》。 · 务必先进行步骤b,再进行步骤c,否则NTP无法配置成功。 |
在CAS上创建虚拟机后,加载H3C-CloudOS-PLAT镜像安装CloudOS计算节点:
选择软件包类型为“H3C CloudOS Node”。
配置计算节点主机名、IP地址。
配置计算节点NTP服务指向CloudOS主节点。
图-1 安装裸金属计算节点
此步骤用于给裸金属计算节点赋予访问、修改CloudOS数据库的权限。
登录CloudOS平台,在顶部导航栏中单击[系统]菜单项,进入系统首页。
在左侧导航树中单击[系统配置/安全设置/数据库白名单]菜单项,进入数据库白名单管理页面。
图-2 数据库白名单管理页面
单击<添加>按钮,弹出添加数据库白名单窗口。
图-3 添加白名单
选择“IP”添加方式,输入裸金属计算节点IP,即安装CloudOS计算节点步骤中指定的IP地址。
单击<确定>按钮完成操作。
· 填写的所有标点符号都必须是半角英文符号。 · 裸金属计算节点版本须与控制节点版本保持一致。 · 已执行的脚本内容会被下发到相关配置文件中,若要修改不易实现,且重新执行脚本可能会引发问题,因此如需修改脚本内容建议重新安装。裸金属独立计算节点如果是安装在CAS上的虚拟机,可以在安装脚本前为其创建快照。安装脚本出错时,在CAS上恢复快照后重新安装脚本即可。 · Flat模式下裸金属场景网络VxLAN范围支持1-4094。建议裸金属方案在非层次化场景使用。 |
安装完成后使用SSH工具登录CloudOS控制节点。
进入/opt/openstack路径,将openstack-compute-standalone.tar.gz文件传输到计算节点/root目录下,使用以下命令:
[root@node-0cbcd0 ~]# cd /opt/openstack
[root@node-0cbcd0 openstack]# ls
manila-share openstack-compute openstack-compute-standalone.tar.gz
[root@node-0cbcd0 openstack]# scp openstack-compute-standalone.tar.gz root@172.25.50.150:/root [注:172.25.50.150为裸金属计算节点ip]
使用SSH工具登录裸金属计算节点。
进入/root路径,并找到openstack-compute-standalone.tar.gz压缩包,使用以下命令:
[root@ironic-c ~]# pwd
/root
[root@ironic-c ~]# ls
openstack-compute-standalone.tar.gz
解压openstack-compute-standalone.tar.gz,使用以下命令:
[root@ironic-c ~]# tar -zxvf openstack-compute-standalone.tar.gz
在解压路径下进入openstack-compute-standalone目录,找到安装脚本install-compute-pike.sh,使用以下命令:
[root@ironic-c ~]# cd openstack-compute-standalone
[root@ironic-c openstack-compute-standalone]# ls
compute images install-compute-pike.sh others packages readme.txt tools upgrade upgrade-ironic-mitaka2pike.sh yum.repos.d
上传平台安装包(以CloudOS-PLAT-E5102H01-V500R001B01D030SP02-RC4.iso为例)到解压路径下的openstack-compute-standalone/目录中,使用以下命令:
[root@ironic-c openstack-compute-standalone]# ls
CloudOS-PLAT-E5102H01-V500R001B01D030SP02-RC4.iso images others readme.txt upgrade yum.repos.d
compute install-compute-pike.sh packages tools upgrade-ironic-mitaka2pike.sh
执行安装脚本install-compute-pike.sh,使用以下命令:
[root@ironic-c openstack-compute-standalone]# sh install-compute-pike.sh
执行脚本后根据提示填写相应配置内容,效果如下所示。
Please enter the number of hypervisor type (0 qemu, 1 VMWare, 2 cas, 3 KVM, 4 novadocker, 5 ironic): 5
Your choice of VMTTYPE is : [ 5 ] continue...
Please enter Manage Network IP address of the compute node(172.25.50.150): 172.25.50.150
Input IP address is: 172.25.50.150 Verifying Connection....
IP connection is OK
Please enter Inspection Network IP address of the compute node(172.25.50.150): 172.25.50.150
Input IP address is: 172.25.50.150 Verifying Connection....
IP connection is OK
Please enter Provision Network IP address of the compute node(172.25.50.150): 172.25.50.150
Input IP address is: 172.25.50.150 Verifying Connection....
IP connection is OK
Please enter the Mode of Network(1 flat , 2 mutitenant):1
Please enter the Manage Network IP address of the controller node (or vitrual IP if it's cluster): 172.25.17.53
Input IP address is: 172.25.17.53 Verifying Connection....
IP connection is OK
Please enter the Public Network IP address of the controller node (or vitrual IP if it's cluster): 172.25.17.53
Input IP address is: 172.25.17.53 Verifying Connection....
IP connection is OK
Is the controller node a cluster environment?(1 yes, 2 no): 1
You have already confirmed the controller node you will connect is a Cluster mode! continue....
Please enter the IP address of the Matrix, for the configuration of ntpd server: 172.25.17.50
Input IP address is: 172.25.17.50 Verifying Connection....
IP connection is OK
Please enter the dhcp range (eg: 172.25.50.100,172.25.50.200): 172.25.50.151,172.25.50.160
Please enter the dhcp netmask (eg: 255.255.255.0): 255.255.240.0
Please enter the multi-export config bridge_mappings according to the usage(eg: physnet2:vswitch2,physnet3:vswitch3): vxlan:ironic
脚本中的部分项目可参考脚本中的示例进行填写,具体填写说明如下:
number of hypervisor type:填写Hypervisor类型,此处应填写5,即Ironic(裸金属)类型。
Manage Network IP address of the compute node:裸金属计算节点的IP,即计算节点用于与CloudOS、服务器交互的IP地址。
Inspection Network IP address of the compute node:发现裸金属节点过程中用于与服务器交互的IP,若网络没有做特殊隔离,该IP地址与上一项相同。
Provision Network IP address of the compute node:本计算节点的部署网络IP,用于裸金属节点部署过程。
Mode of Network(1 flat , 2 mutitenant):1为常用的flat网络,2为多租户组网(暂不支持)。
Manage Network IP address of the controller node:管理节点的管理IP,根据实际情况填写。
Public Network IP address of the controller node:管理节点的公共IP,根据实际情况填写。
cluster environment:集群环境。若CloudOS部署模式为集群模式写1,否则写2。
IP address of the Matrix:Matrix节点IP地址。
dhcp range:配置dhcp Server分配的IP地址范围,要求与H3C CloudOS及裸金属计算节点网络互通。该dhcp Server分配的IP地址用于裸金属节点部署阶段RAMdisk与Ironic-conductor之间的通信,部署完成后IP地址会被回收。
dhcp netmask:配置dhcp Server分配的IP地址掩码。
multi-export config bridge_mappings according to the usage:配置计算节点的网络出口,填写格式为出口名称:出口设备。若需要配置多出口,填写格式为出口名称:出口设备,出口名称:出口设备。可参照示例填写。
填写完毕后自动执行,出现如下提示代表执行成功。
图-4 执行成功
如需进行裸金属服务器PXE网口与裸金属计算节点网卡跨网段配置,请在此步骤之后参考裸金属服务器PXE网口与裸金属计算节点网卡跨网段配置。 |