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                                    |
+-------------------+---------------------------------------------------------+
로그인하면 댓글을 남길 수 있습니다.
  • openstack_overcloud.1588916214.txt.gz
  • 마지막으로 수정됨: 2020/05/08 05:36
  • 저자 zzung