35.director安裝

    • 紅帽基於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

 

    • 更新subnetDNS 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登錄:

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章