-
- 红帽基于tripleO---openstack on openstack开发了openstack director
- RHOSP版本不同,安装过程会有所不同,请参照红帽官方文档
-
- undercloud环境配置截图:
两个网卡
分区:
yum源配置:
hostname设置:
hosts文件配置:
网卡显示: 【部署成功后的截图】
-
- 部署undercloud:
部署undercloud的时候,不能使用root用户来操作,需要使用普通用户stack
[root@undercloud ~]# useradd stack
[root@undercloud ~]# echo redhat | passwd --stdin stack
Changing password for user stack.
passwd: all authentication tokens updated successfully.
[root@undercloud ~]# su - stack
[stack@undercloud ~]$ mkdir images----之后要用
[root@undercloud ~]$ yum install python-tripleoclient.noarch -y
-
- 根据undercloud的配置文件进行部署undercloud
[stack@undercloud ~]$ cp /usr/share/instack-undercloud/undercloud.conf.sample undercloud.conf
-
- [stack@undercloud ~]$ openstack undercloud install
--------------------- END PROFILING ---------------------
[2018-02-09 18:24:53,314] (os-refresh-config) [INFO] Completed phase post-configure
os-refresh-config completed successfully
Generated new ssh key in ~/.ssh/id_rsa
Created flavor "baremetal" with profile "None"
Created flavor "control" with profile "control"
Created flavor "compute" with profile "compute"
Created flavor "ceph-storage" with profile "ceph-storage"
Created flavor "block-storage" with profile "block-storage"
Created flavor "swift-storage" with profile "swift-storage"
#############################################################################
Undercloud install complete.
The file containing this installation's passwords is at
/home/stack/undercloud-passwords.conf.
There is also a stackrc file at /home/stack/stackrc.
These files are needed to interact with the OpenStack services, and should be
secured.
#############################################################################
-
- 部署overcloud
安装好了undercloud之后,会通过PXE boot启动overcloud的两台裸机来部署openstack
【overcloud里涉及的两台机器是裸机】
裸机的配置:
-
- 准备部署overcloud的环境
[root@undercloud ~]# yum list rhosp-director*
[root@undercloud ~]# yum install rhosp-director* -y
export NOVA_VERSION=1.1
export OS_PASSWORD=$(sudo hiera admin_password)
export OS_AUTH_URL=http://192.0.2.1:5000/v2.0
export OS_USERNAME=admin
export OS_TENANT_NAME=admin
export COMPUTE_API_VERSION=1.1
export OS_NO_CACHE=True
export OS_CLOUDNAME=undercloud
export OS_IMAGE_API_VERSION=1
-
- 解压镜像文件:
-
- 开始导入镜像:
[stack@undercloud images]$ openstack overcloud image upload --image-path ~/images
-
- 更新subnet的DNS server:
[stack@undercloud images]$ neutron subnet-list
[stack@undercloud images]$ neutron subnet-show 7afd290f-76da-4970-87fc-79e5b97fbdf7
[stack@undercloud images]$ neutron subnet-update 7afd290f-76da-4970-87fc-79e5b97fbdf7 --dns_nameservers
-
- 通过PXE boot启动overcloud的两台裸机来部署openstack, pxe boot所需要的文件放在/httpboot下,用来引导系统的:
-
- 如果想要undercloud远程PXE boot管理两台裸机,必须保证其支持IPMI-智能平台管理界面,因此需要在undercloud上做些配置。
由于vmware 是不支持IPMI的, 因此单独作别的设置来满足条件,红帽官方文档给提供了一个fake_pxe的方式启动。
-
- 修改配置文件提供对fake_pxe启动的支持:
vim /etc/ironic/ironic.conf
添加fake_pxe到enabled_drivers 来启动这个驱动
-
- 重启ironic服务:
# systemctl restart openstack-ironic-api.service openstack-ironic-conductor.service openstack-ironic-inspector-dnsmasq.service openstack-ironic-inspector.service
-
- 采用导入json文件让undercloud识别两台裸机:
[stack@undercloud ~]$ vim instackenv-twonodes.json
{ "nodes": [ { "arch": "x86_64", "name": "controller", "pm_type": "fake_pxe", "mac": [ "00:50:56:20:8F:97" ], "cpu": "4", "memory": "4096", "disk": "200" }, { "arch": "x86_64", "name": "compute1", "pm_type": "fake_pxe", "mac": [ "00:50:56:25:60:6D" ], "cpu": "4", "memory": "4096", "disk": "200" } ] } |
-
- undercloud 目前不知道要配置的node list,节点属性
$ ironic node-list
-
- 导入json文件:
[stack@undercloud ~]$ openstack baremetal import --json instackenv-twonodes.json
再次查看ironic node:
-
- 为overcloud里的节点分配内核:
# openstack baremetal configure boot
-
- 检查所有节点的硬件属性
# openstack baremetal introspection bulk start
通过ironic node-list查看节点状态,当要求开机power on的时候,手动开机即可。
当需要关机power off,手动关机即可:
-
- 指定节点哪台是控制节点,哪台是计算节点,设置标签命令:
# ironic node-update e36186b9-f504-48e6-91c6-8a7fd8b0c5f4 add properties/capabilities='profile:control,boot_option:local'
# ironic node-update 475b7dd3-2fa9-42a1-a57e-f6354dd615a1 add properties/capabilities='profile:compute,boot_option:local'
-
- 查看node profile:
# openstack overcloud profiles list
-
- 裸机introspection 完成:
-
- 部署overcloud node命令:
# openstack overcloud deploy --templates -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml
--netron-network-type vxlan --neutron-tunnel-types vxlan
-
- 在进行overcloud部署时候,使用ironic node-list 命令检查节点状态,当节点状态由deploying变成deploy wait-callback后,手动启动这个节点
-
- active之后,手动重启两台裸机节点
-
- 最后登录两台nodes: 使用用户heat-admin登录: