openstack_overcloud

  • OerCloud Image Upload
(undercloud) [stack@osp-director ~]$ mkdir ~/images
(undercloud) [stack@osp-director ~]$ sudo yum install rhosp-director-images rhosp-director-images-ipa -y
(undercloud) [stack@osp-director ~]$ cd ~/images
  • 생성한 images 폴더로 이동하여 아래 명령어 수행
# for i in /usr/share/rhosp-director-images/overcloud-full-latest-13.0.tar /usr/share/rhosp-director-images/ironic-python-agent-latest-13.0.tar; do tar -xvf $i; done
overcloud-full.qcow2
overcloud-full.initrd
overcloud-full.vmlinuz
overcloud-full-rpm.manifest
overcloud-full-signature.manifest
ironic-python-agent.initramfs
ironic-python-agent.kernel
  • qcow 이미지 수정을 위해 libguestfs-tools-c 패키지 설치
## overcloud-full.qcow2 의 root 패스워드를 변경하기 위해 아래 명령어 수행 
(undercloud) [stack@osp-director images]$ virt-customize -a ~/images/overcloud-full.qcow2 --root-password password:redhat
[   0.0] Examining the guest ...
[  17.9] Setting a random seed
[  17.9] Setting the machine ID in /etc/machine-id
[  17.9] Setting passwords
[  19.6] Finishing off
  • OverCloud Image 업로드
(undercloud) [stack@osp-director images]$ openstack overcloud image upload --image-path /home/stack/images/
Image "overcloud-full-vmlinuz" was uploaded.
+--------------------------------------+------------------------+-------------+---------+--------+
|                  ID                  |          Name          | Disk Format |   Size  | Status |
+--------------------------------------+------------------------+-------------+---------+--------+
| d8a6d69b-acc6-49a9-a50c-52da04df8109 | overcloud-full-vmlinuz |     aki     | 6734128 | active |
+--------------------------------------+------------------------+-------------+---------+--------+
Image "overcloud-full-initrd" was uploaded.
+--------------------------------------+-----------------------+-------------+----------+--------+
|                  ID                  |          Name         | Disk Format |   Size   | Status |
+--------------------------------------+-----------------------+-------------+----------+--------+
| 440a8ca0-5c66-4a3d-9d4d-ac43f99ee05b | overcloud-full-initrd |     ari     | 66976521 | active |
+--------------------------------------+-----------------------+-------------+----------+--------+
Image "overcloud-full" was uploaded.
+--------------------------------------+----------------+-------------+------------+--------+
|                  ID                  |      Name      | Disk Format |    Size    | Status |
+--------------------------------------+----------------+-------------+------------+--------+
| 60a5279e-fabf-4bdc-b76a-cb8236cb4776 | overcloud-full |    qcow2    | 1508179968 | active |
+--------------------------------------+----------------+-------------+------------+--------+
Image "bm-deploy-kernel" was uploaded.
+--------------------------------------+------------------+-------------+---------+--------+
|                  ID                  |       Name       | Disk Format |   Size  | Status |
+--------------------------------------+------------------+-------------+---------+--------+
| 2a5d6a15-425f-4413-a737-d7483f513cf5 | bm-deploy-kernel |     aki     | 6734128 | active |
+--------------------------------------+------------------+-------------+---------+--------+
Image "bm-deploy-ramdisk" was uploaded.
+--------------------------------------+-------------------+-------------+-----------+--------+
|                  ID                  |        Name       | Disk Format |    Size   | Status |
+--------------------------------------+-------------------+-------------+-----------+--------+
| ef1348d5-f250-498d-a430-2acb37a9e617 | bm-deploy-ramdisk |     ari     | 466121877 | active |
+--------------------------------------+-------------------+-------------+-----------+--------+
  • upload 한 이미지 확인
(undercloud) [stack@osp-director images]$ ls
ironic-python-agent.initramfs  overcloud-full.initrd  overcloud-full-rpm.manifest        overcloud-full.vmlinuz
ironic-python-agent.kernel     overcloud-full.qcow2   overcloud-full-signature.manifest

(undercloud) [stack@osp-director images]$ openstack image list
+--------------------------------------+------------------------+--------+
| ID                                   | Name                   | Status |
+--------------------------------------+------------------------+--------+
| 2a5d6a15-425f-4413-a737-d7483f513cf5 | bm-deploy-kernel       | active |
| ef1348d5-f250-498d-a430-2acb37a9e617 | bm-deploy-ramdisk      | active |
| 60a5279e-fabf-4bdc-b76a-cb8236cb4776 | overcloud-full         | active |
| 440a8ca0-5c66-4a3d-9d4d-ac43f99ee05b | overcloud-full-initrd  | active |
| d8a6d69b-acc6-49a9-a50c-52da04df8109 | overcloud-full-vmlinuz | active |
+--------------------------------------+------------------------+--------+

(undercloud) [stack@osp-director images]$ ls -l /httpboot
total 461788
-rwxr-xr-x. 1 root             root               6734128 Dec  6 16:15 agent.kernel
-rw-r--r--. 1 root             root             466121877 Dec  6 16:15 agent.ramdisk
-rw-r--r--. 1 ironic           ironic                 758 Dec  6 15:53 boot.ipxe
-rw-r--r--. 1 ironic-inspector ironic-inspector       467 Dec  6 15:49 inspector.ipxe
  • 이미지를 로컬 레포지토리로 설정 하기
(undercloud) [stack@jy-director ~]$ mkdir templates

openstack overcloud container image prepare \
  --namespace=registry.access.redhat.com/rhosp13 \
  --push-destination=10.10.10.10:8787 \
  --prefix=openstack- \
  --tag-from-label {version}-{release} \
  --output-env-file=/home/stack/templates/overcloud_images.yaml \
  --output-images-file /home/stack/local_registry_images.yaml

  sudo openstack overcloud container image upload \
  --config-file  /home/stack/local_registry_images.yaml \
  --verbose

  • 레포지토리에 이미지 확인
(undercloud) [stack@osp-director ~]$ curl  http://10.10.10.10:8787/v2/_catalog | jq .repositories[]
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1502  100  1502    0     0   178k      0 --:--:-- --:--:-- --:--:--  209k
"rhosp13/openstack-aodh-api"
"rhosp13/openstack-aodh-evaluator"
"rhosp13/openstack-aodh-listener"
"rhosp13/openstack-aodh-notifier"
"rhosp13/openstack-ceilometer-central"
"rhosp13/openstack-ceilometer-compute"
...
  • DNS sub-net 등록하기
(undercloud) [stack@osp-director images]$ openstack subnet set --dns-nameserver 8.8.8.8 ctlplane-subnet
(undercloud) [stack@osp-director images]$ openstack subnet show ctlplane-subnet
+-------------------+---------------------------------------------------------+
| Field             | Value                                                   |
+-------------------+---------------------------------------------------------+
| allocation_pools  | 10.10.10.5-10.10.10.25                                  |
| cidr              | 10.10.10.0/24                                           |
| created_at        | 2019-12-03T05:37:04Z                                    |
| description       |                                                         |
| dns_nameservers   | 8.8.8.8                                                 |
| enable_dhcp       | True                                                    |
| gateway_ip        | 10.10.10.1                                              |
| host_routes       | destination='169.254.169.254/32', gateway='10.10.10.10' |
| id                | b6e9c70b-791a-493f-a99d-721571fb345f                    |
| ip_version        | 4                                                       |
| ipv6_address_mode | None                                                    |
| ipv6_ra_mode      | None                                                    |
| name              | ctlplane-subnet                                         |
| network_id        | f31f42c8-e2f9-43ef-9810-b562918b5569                    |
| prefix_length     | None                                                    |
| project_id        | 29533fc9937e471eba1834f50cd3ccbd                        |
| revision_number   | 1                                                       |
| segment_id        | None                                                    |
| service_types     |                                                         |
| subnetpool_id     | None                                                    |
| tags              |                                                         |
| updated_at        | 2019-12-03T06:35:36Z                                    |
+-------------------+---------------------------------------------------------+
  • overcloud node 등록을 위한 instackenv.json 파일 생성
(undercloud) [stack@osp-director ~]$ vim instackenv.json
  • instackenv.json 작성
  • node의 기본적인 정보를 작성한다. mac주소, ipmi(PXE) 타입 정보, ipmi 계정정보 등
{
    "nodes":[
        {
            "mac":[
                "52:54:00:3a:f9:af"           
            ],
            "name":"jy-osp0-compute",
            "pm_type":"pxe_ipmitool",
            "pm_user":"admin",
            "pm_password":"password",
            "pm_addr":"10.10.10.1",
            "pm_port":"7005"
        },        
        {
            "mac":[
                "52:54:00:61:6f:56"
            ],
            "name":"jy-osp0-controller",
            "pm_type":"pxe_ipmitool",
            "pm_user":"admin",
            "pm_password":"password",
            "pm_addr":"10.10.10.1",
            "pm_port":"7006"
        }
    ]
}
  • 노드 등록
(undercloud) [stack@osp-director ~]$ openstack overcloud node import ~/instackenv.json
  • 등록한 노드 검사 및 인트로스펙션 실행
(undercloud) [stack@osp-director ~]$ openstack baremetal node list
+--------------------------------------+-----------------+---------------+-------------+--------------------+-------------+
| UUID                                 | Name            | Instance UUID | Power State | Provisioning State | Maintenance |
+--------------------------------------+-----------------+---------------+-------------+--------------------+-------------+
| 0159eddb-4a85-40aa-9e91-51be5f1eae6a | jy-compute-0    | None          | power off   | manageable         | False       |
| 840b93aa-15e4-4e37-9d80-645e6e096b5f | jy-compute-1    | None          | power off   | manageable         | False       |
| ee16b229-8acb-4bfc-8bf7-e5fc922d68d7 | jy-compute-2    | None          | power off   | manageable         | False       |
| e7ce5dbf-80aa-45c2-90cc-9ae43a29c121 | jy-controller-0 | None          | power off   | manageable         | False       |
| 2a3d995e-fde0-4205-b09e-befe37786511 | jy-controller-1 | None          | power off   | manageable         | False       |
| 62bedfd2-a945-452c-a072-c440f34aa2de | jy-controller-2 | None          | power off   | manageable         | False       |
+--------------------------------------+-----------------+---------------+-------------+--------------------+-------------+
(undercloud) [stack@osp-director ~]$ openstack overcloud node introspect --all-manageable --provide
Introspection of node 0159eddb-4a85-40aa-9e91-51be5f1eae6a completed. Status:SUCCESS. Errors:None
Introspection of node 840b93aa-15e4-4e37-9d80-645e6e096b5f completed. Status:SUCCESS. Errors:None
Introspection of node ee16b229-8acb-4bfc-8bf7-e5fc922d68d7 completed. Status:SUCCESS. Errors:None
Introspection of node e7ce5dbf-80aa-45c2-90cc-9ae43a29c121 completed. Status:SUCCESS. Errors:None
Introspection of node 2a3d995e-fde0-4205-b09e-befe37786511 completed. Status:SUCCESS. Errors:None
Introspection of node 62bedfd2-a945-452c-a072-c440f34aa2de completed. Status:SUCCESS. Errors:None
Successfully introspected 6 node(s).


Introspection completed.
Started Mistral Workflow tripleo.baremetal.v1.provide_manageable_nodes. Execution ID: 266f947f-dea5-4d4c-a89e-2af0ee15d510
Waiting for messages on queue 'tripleo' with no timeout.
6 node(s) successfully moved to the "available" state.


(undercloud) [stack@osp-director ~]$ openstack baremetal node list
+--------------------------------------+-----------------+---------------+-------------+--------------------+-------------+
| UUID                                 | Name            | Instance UUID | Power State | Provisioning State | Maintenance |
+--------------------------------------+-----------------+---------------+-------------+--------------------+-------------+
| 0159eddb-4a85-40aa-9e91-51be5f1eae6a | jy-compute-0    | None          | power off   | available          | False       |
| 840b93aa-15e4-4e37-9d80-645e6e096b5f | jy-compute-1    | None          | power off   | available          | False       |
| ee16b229-8acb-4bfc-8bf7-e5fc922d68d7 | jy-compute-2    | None          | power off   | available          | False       |
| e7ce5dbf-80aa-45c2-90cc-9ae43a29c121 | jy-controller-0 | None          | power off   | available          | False       |
| 2a3d995e-fde0-4205-b09e-befe37786511 | jy-controller-1 | None          | power off   | available          | False       |
| 62bedfd2-a945-452c-a072-c440f34aa2de | jy-controller-2 | None          | power off   | available          | False       |
+--------------------------------------+-----------------+---------------+-------------+--------------------+-------------+

Provisioning state 를 manage 모드로 전체 바꾸고 싶으면 아래 커맨드를 통해 진행
for node in $(openstack baremetal node list --fields uuid -f value) ; do openstack baremetal node manage $node ; done
  • 노드 프로필 등록
    • 하드웨어 등록 및 검사 후에 노드에 맞는 역활 프로필을 등록합니다.
(undercloud) [stack@osp-director ~]$ openstack baremetal node set --property capabilities='profile:compute,boot_option:local,node:compute-0' 2a3d995e-fde0-4205-b09e-befe37786511
(undercloud) [stack@osp-director ~]$ openstack baremetal node set --property capabilities='profile:control,boot_option:local,node:controller-0' 62bedfd2-a945-452c-a072-c440f34aa2de
  • flavor 프로필에 태그를 설정합니다.
(undercloud) [stack@osp-director ~]$ openstack flavor set --property "capabilities:boot_option"="local" --property "capabilities:profile"="control" control
(undercloud) [stack@osp-director ~]$ openstack flavor set --property "capabilities:boot_option"="local" --property "capabilities:profile"="compute" compute
(undercloud) [stack@osp-director ~]$ openstack overcloud profiles list
+--------------------------------------+-----------------+-----------------+-----------------+-------------------+
| Node UUID                            | Node Name       | Provision State | Current Profile | Possible Profiles |
+--------------------------------------+-----------------+-----------------+-----------------+-------------------+
| 0159eddb-4a85-40aa-9e91-51be5f1eae6a | jy-compute-0    | available       | compute         |                   |
| 840b93aa-15e4-4e37-9d80-645e6e096b5f | jy-compute-1    | available       | compute         |                   |
| ee16b229-8acb-4bfc-8bf7-e5fc922d68d7 | jy-compute-2    | available       | compute         |                   |
| e7ce5dbf-80aa-45c2-90cc-9ae43a29c121 | jy-controller-0 | available       | control         |                   |
| 2a3d995e-fde0-4205-b09e-befe37786511 | jy-controller-1 | available       | control         |                   |
| 62bedfd2-a945-452c-a072-c440f34aa2de | jy-controller-2 | available       | control         |                   |
+--------------------------------------+-----------------+-----------------+-----------------+-------------------+

해당 작업까지 끝났으면, 기본적인 overcloud 기본 설정 작업은 끝났습니다.
이후 작업은 openstack heat-template 파일을 수정하여, 본격적인 overcloud 배포작업이 진행됩니다.
heat-template 작업의 양도 많아서 따로 문서로 작성 Openstack Heat-Template

로그인하면 댓글을 남길 수 있습니다.
  • openstack_overcloud.txt
  • 마지막으로 수정됨: 2020/05/08 16:31
  • 저자 zzung