1. 저자 직강 + 스터디 그룹 - 3주차
Red Hat OpenStack 17
Nalee Jang,
Senior Consultant of Red Hat Korea
1
2. The Curriculum
Red
Hat
OpenStack
17
저자
직강
+
스터디
그룹
2
언제 커리큘럼 모임유형
1주차 (4월 6일)
오리엔테이션
- 진행방향 소개
- 그룹 만들기
- 세션 : 기본 구성환경 및 네트워크 설계
오프라인 미팅
2주차 (4월 13일) Repo 서버 및 언더클라우드 구성 온라인 미팅
3주차 (4월 20일) 오버클라우드 노드 준비 및 운영체제 설치 온라인 미팅
4주차 (4월 27일) 오버클라우드 배포 및 트러블슈팅 온라인 미팅
5주차 (5월 4일) 기능 테스트 및 스터디 과제 진행 온라인 미팅
6주차 (5월 11일) 그룹별 스터디 과제 진행상황 확인 및 공유 그룹별 미팅
7주차 (5월 18일)
스터디 공유의 시간
- 스터디 개요 소개
- 스터디 그룹별 발표
- 스터디 참여 소감 공유
오프라인 미팅
3. Session Agenda
3
OpenStack Korea Community
What we’ll
discuss today
▸ 오버클라우드 노드 생성
▸ Vbmc에 오버클라우드 노드 등록
▸ 오버클라우드 이미지 설치
▸ 오버클라우드 네트워크 생성
▸ Director 서버에 오버클라우드 노드 등록
▸ 오버클라우드 노드 운영체제 설치
▸ 다음시간 아젠다 소개
4. 오픈스택 설치 프로세스
4
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Provisioning NIC (배포용 네트워크)
Director 노드는 이 네트워크를 이용하여 컨트롤러 노드의
OS를 설치하고 오픈스택 서비스를 설치함.
Director (배포노드)
Repo 서버 컨트롤러 노드
192.168.10.0/24
192.168.10.11 192.168.10.12
빈 깡통 노드
5. 오픈스택 설치 프로세스
5
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Provisioning NIC (배포용 네트워크)
Director 노드는 사전에 정의한 네트워크 Yaml 파일을 이용하여
컨트롤러 노드의 OS를 설치하고 네트워크 구성을 함.
Director (배포노드)
Repo 서버 컨트롤러 노드
192.168.10.0/24
192.168.10.11 192.168.10.12 192.168.10.21
6. 오픈스택 설치 프로세스
6
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Provisioning NIC (배포용 네트워크)
오버클라우드 노드의 운영체제 설치 및 네트워크 구성이 끝나면
사전에 정의한 YAML 템플릿 파일을 이용하여 오버클라우드 노드에
Repo 서버의 컨테이너 이미지를 이용하여 오픈스택 서비스를
설치함.
Director (배포노드)
Repo 서버 컨트롤러 노드
192.168.10.0/24
192.168.10.11 192.168.10.12 192.168.10.21
7. 오픈스택 설치 프로세스
7
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
컨트롤러 노드 컴퓨트 노드
Provision
Internal API
External
Tenant
Storage
192.168.10.21, 192.168.10.22
192.168.20.21, 192.168.20.22
172.168.16.21, 172.168.16.22
192.168.30.21
192.168.40.21
192.168.10.31
192.168.20.31
192.168.30.31
192.168.40.31
Director 노드는 오버클라우드 노드에
OS를 설치하고 네트워크 구성을 함.
이런 네트워크 구성정보를 Yaml 파일로 사전에 작성해야 함.
9. 오버클라우드 노드 생성
9
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
KVM 하이퍼바이저에 오버클라우드용 VM 생성
Host 노드의 CPU 가상화 기능을 사용하기위해
컴퓨트 노드용 VM에는 host-passthrough 설정
10. 오버클라우드 노드 생성
10
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
KVM 하이퍼바이저에 오버클라우드용 VM 생성
No VM Name Description CPU Memory Disk Network
1 repo 리포지토리 서버 2 4 200
Provision
Internal API
External
2 director17 Director 서버 4 8 100
Provision
Internal API
External
3 ctrl01 컨트롤러 4 12 100
Provision
Internal API
External
Tenant
Storage
4 cn01 컴퓨트 1 4 12 100
Provision
Internal API
External
Tenant
Storage
5 cn02 컴퓨트2 4 12 100
Provision
Internal API
External
Tenant
Storage
11. VirtualBMC에 오버클라우드 노드 등록
11
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
[root@rhel8 ~]# vbmc add ctrl01 --port 6450 --username admin --password P@ssw0rd
[root@rhel8 ~]# vbmc add cn01 --port 6451 --username admin --password P@ssw0rd
[root@rhel8 ~]# vbmc add cn02 --port 6452 --username admin --password P@ssw0rd
[root@rhel8 ~]# vbmc list
+-------------+---------+---------+------+
| Domain name | Status | Address | Port |
+-------------+---------+---------+------+
| cn01 | down | :: | 6451 |
| cn02 | down | :: | 6452 |
| ctrl01 | down | :: | 6450 |
+-------------+---------+---------+------+
[root@rhel8 ~]#
[root@rhel8 ~]# vbmc start ctrl01
[root@rhel8 ~]# vbmc start cn01
[root@rhel8 ~]# vbmc start cn02
[root@rhel8 ~]# vbmc list
+-------------+---------+---------+------+
| Domain name | Status | Address | Port |
+-------------+---------+---------+------+
| cn01 | running | :: | 6451 |
| cn02 | running | :: | 6452 |
| ctrl01 | running | :: | 6450 |
+-------------+---------+---------+------+
[root@rhel8 ~]#
VirtualBMC에 오버클라우드 노드 추가 및 시작 - 호스트 노드에서 실행
12. VirtualBMC에 오버클라우드 노드 등록
12
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
[root@rhel8 ~]# firewall-cmd --add-port=6450/udp --zone=libvirt --permanent
success
[root@rhel8 ~]# firewall-cmd --add-port=6451/udp --zone=libvirt --permanent
success
[root@rhel8 ~]# firewall-cmd --add-port=6452/udp --zone=libvirt --permanent
success
[root@rhel8 ~]# firewall-cmd --reload
success
[root@rhel8 ~]# firewall-cmd --list-all --zone=libvirt
libvirt (active)
target: ACCEPT
icmp-block-inversion: no
interfaces: virbr0 virbr1
sources:
services: dhcp dhcpv6 dns http ntp ssh tftp
ports: 6450/udp 6451/udp 6452/udp
protocols: icmp ipv6-icmp
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
rule priority="32767" reject
[root@rhel8 ~]#
Firewall에 추가한 오버클라우드 노드 포트 등록 - 호스트 노드에서 실행
13. VirtualBMC에 오버클라우드 노드 등록
13
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
(undercloud) [stack@dir ~]$ sudo dnf install ipmitool
(undercloud) [stack@dir ~]$ ipmitool -H 192.168.10.1 -p 6450 -I lanplus -U admin -P redhat power status
Chassis Power is off
(undercloud) [stack@dir ~]$ ipmitool -H 192.168.10.1 -p 6451 -I lanplus -U admin -P redhat power status
Chassis Power is off
(undercloud) [stack@dir ~]$ ipmitool -H 192.168.10.1 -p 6452 -I lanplus -U admin -P redhat power status
Chassis Power is off
(undercloud) [stack@dir ~]$
디렉터 노드에서 VBMC에 등록한 오버클라우드 노드 전원 상태 확인
테스트
15. 오픈스택 설치 프로세스
15
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Provisioning NIC (배포용 네트워크)
Director 노드에서 rpm 파일의 오버클라우드 이미지를 설치함.
Director (배포노드)
Repo 서버 컨트롤러 노드
192.168.10.0/24
192.168.10.11 192.168.10.12
빈 깡통 노드
16. 오픈스택 설치 프로세스
16
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Provisioning NIC (배포용 네트워크)
Director 노드에서 rpm 파일의 오버클라우드 이미지를 설치함.
Director (배포노드)
Repo 서버 컨트롤러 노드
192.168.10.0/24
192.168.10.11 192.168.10.12
빈 깡통 노드
17. 오버클라우드 이미지 설치
17
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
[stack@dir ~]$ sudo dnf install rhosp-director-images-x86_64 rhosp-director-images-ipa-x86_64
[stack@dir ~]$ cd images
[stack@dir images]$ for i in /usr/share/rhosp-director-images/ironic-python-agent-latest.tar
/usr/share/rhosp-director-images/overcloud-full-latest.tar; do tar -xvf $i; done
[stack@dir images]$ cd
[stack@dir ~]$ source stackrc
(undercloud) [stack@dir ~]$ openstack overcloud image upload --image-path /home/stack/images/
(undercloud) [stack@dir ~]$ ls -l /var/lib/ironic/images/
(undercloud) [stack@dir ~]$ ls -l /var/lib/ironic/httpboot
오버클라우드 이미지 설치
설치한 오버클라우드 이미지 압축 해제
압축해제한 오버클라우드 이미지를 디렉터 노드에 등록
디렉터 노드에 등록한 이미지 확인
19. 오픈스택 설치 프로세스
19
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
컨트롤러 노드 컴퓨트 노드
Provision
Internal API
External
Tenant
Storage
192.168.10.21, 192.168.10.22
192.168.20.21, 192.168.20.22
172.168.16.21, 172.168.16.22
192.168.30.21
192.168.40.21
192.168.10.31
192.168.20.31
192.168.30.31
192.168.40.31
이런 네트워크 구성정보를 Yaml 파일로 사전에 작성해야 함.
20. 오버클라우드 네트워크 생성
20
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
[root@dir ~]# su - stack
[stack@dir ~]$ mkdir stack-temp
[stack@dir ~]$ mv stack-20230127.tar stack-temp
[stack@dir ~]$ cd stack-temp
[stack@dir stack-temp]$ tar xvf stack-20230127.tar
[stack@dir stack-temp]$ ll
-rw-r--r-- stack/stack 5391 2023-01-27 11:40 check-mycloud.sh
-rw-r--r-- stack/stack 49 2023-01-27 11:32 chk-log.sh
-rw-r--r-- stack/stack 1223 2023-01-20 11:26
containers-prepare-parameter.yaml
-rw-r--r-- stack/stack 980 2023-01-26 12:15 deploy.sh
-rw-r--r-- stack/stack 833 2023-01-20 11:47 nodes.yaml
drwxr-xr-x stack/stack 0 2023-01-26 16:02 templates/
-rw-r--r-- stack/stack 782 2023-01-20 11:29 undercloud.conf
https://naleejang.tistory.com/261
21. 오버클라우드 네트워크 생성
21
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
(undercloud) [stack@dir ~]$ cp stack-temp/templates/network_data.yaml ./templates
(undercloud) [stack@dir ~]$ vi templates/network_data.yaml
#------------------------------------------------------------#
- name: InternalApi
name_lower: internal_api
vip: true
mtu: 1500
subnets:
internal_api_subnet:
ip_subnet: 192.168.20.0/24
allocation_pools:
- start: 192.168.20.10
end: 192.168.20.250
vlan: 20
#------------------------------------------------------------#
(뒷장에 계속)
오버클라우드 네트워크 정의
22. 오버클라우드 네트워크 생성
22
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
- name: Storage
name_lower: storage
vip: false
mtu: 1500
subnets:
storage_subnet:
ip_subnet: 192.168.40.0/24
allocation_pools:
- start: 192.168.40.10
end: 192.168.40.250
vlan: 40
#------------------------------------------------------#
오버클라우드 네트워크 정의
- name: External
name_lower: external
vip: true
mtu: 1500
subnets:
external_subnet:
ip_subnet: 172.168.16.0/24
allocation_pools:
- start: 172.168.16.10
end: 172.168.16.250
gateway_ip: 172.168.16.1
vlan: 16
#------------------------------------------------------------
#
- name: Tenant
vip: false # Tenant network does not use VIPs
mtu: 1500
name_lower: tenant
subnets:
tenant_subnet:
ip_subnet: 192.168.30.0/24
allocation_pools:
- start: 192.168.30.10
end: 192.168.30.250
vlan: 30
#------------------------------------------------------------
#
23. 오버클라우드 네트워크 생성
23
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
오버클라우드 네트워크 생성 및 확인
(undercloud) [stack@dir ~]$ openstack overcloud network provision
--templates /usr/share/openstack-tripleo-heat-templates/
--output /home/stack/templates/overcloud-networks-deployed.yaml
/home/stack/templates/network_data.yaml
(undercloud) [stack@dir ~]$ openstack network list
(undercloud) [stack@dir ~]$ openstack subnet list
(undercloud) [stack@dir ~]$ openstack network show external
(undercloud) [stack@dir ~]$ openstack subnet show external_subnet
24. 오버클라우드 네트워크 생성
24
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
오버클라우드 VIP 생성 및 확인
(undercloud) [stack@dir ~]$ cp stack-temp/templates/vip_data.yaml ./templates
(undercloud) [stack@dir ~]$ cd templates
(undercloud) [stack@dir templates]$ vi vip_data.yaml
- network: external
dns_name: overcloud
ip_address: 172.168.16.22
- network: internal_api
dns_name: overcloud
ip_address: 192.168.20.22
- network: ctlplane
dns_name: overcloud
ip_address: 192.168.10.22
(undercloud) [stack@dir ~]$ openstack overcloud network vip provision
--templates /usr/share/openstack-tripleo-heat-templates
--stack overcloud
--output /home/stack/templates/overcloud-vip-deployed.yaml
/home/stack/templates/vip_data.yaml
(undercloud) [stack@dir ~]$ openstack port list
30. 오픈스택 설치 프로세스
30
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
컨트롤러 노드 컴퓨트 노드
Provision
Internal API
External
Tenant
Storage
192.168.10.21, 192.168.10.22
192.168.20.21, 192.168.20.22
172.168.16.21, 172.168.16.22
192.168.30.21
192.168.40.21
192.168.10.31
192.168.20.31
192.168.30.31
192.168.40.31
이런 네트워크 구성정보를 Yaml 파일로 사전에 작성해야 함.
41. 다음시간 온라인 모임 아젠다 소개
41
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
미리 보고 오면 좋은 것
스터디 그룹 저자 직강 교재 다음시간까지준비할 것들~!!
★ 오버클라우드 노드 프로비전까지 완료하기
★ 교재 81 Page까지 미리 읽어보기
다음 시간에는?
★ 오버클라우드 배포