1. 저자 직강 + 스터디 그룹 - 2주차
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일)
스터디 공유의 시간
- 스터디 개요 소개
- 스터디 그룹별 발표
- 스터디 참여 소감 공유
오프라인 미팅
3. Session Agenda
3
OpenStack Korea Community
What we’ll
discuss today
▸ 오픈스택에서 필요한 네트워크 종류 알아보기
▸ 다시 한번 네트워크 설계 확인하기
▸ 테스트베드 환경 확인하기
▸ Repo 서버 생성 및 구성
▸ Director 서버 생성 및 구성
▸ 다음시간 아젠다 소개
5. 네트워크 구성도
5
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Red Hat OpenStack 17
Internet
Director Controller 1
External NAT
172.168.16.0/24
Provision host-only
192.168.10.0.24
Provisioning
Internal api
Storage
External
Tenant
nic1 nic2 nic1 nic2
br-ctlplane br-ex
br-ctlplane
podman podman
172.168.16.0/24
H/W Information
Director
- CPU: 4 vcpu
- MEM: 8 GB
- DISK: 100 GB
Controller
- CPU: 4 vcpu
- MEM: 12 GB
- DISK: 100 GB
Compute
- CPU: 4 vcpu
- MEM: 12 GB
- DISK: 100 GB
InternalApi host-only
192.168.20.0.24
Storage host-only
192.168.40.0.24
Tenant host-only
192.168.30.0.24
nic3 nic4 nic5
br-tenant
Compute 1..2
nic1 nic2
br-ex
br-ctlplane
podman
nic3 nic4 nic5
br-tenant
nic3
192.168.30.0/24
192.168.40.0/24
192.168.20.0/24
6. 네트워크 구성도
6
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Red Hat OpenStack 17
Internet
Director Controller Compute
Default NAT
192.168.100.0/24
Provision host-only
192.168.10.0.24
provisioning
Internal api
Storage
StorageMgmt
External
Tenant
RHEL8 with KVM
Native
Native
Vlan 20
Vlan 30
Vlan 40
Vlan 50
enp1s0 enp7s0 enp1s0 enp2s0 enp1s0 enp2s0
br-ctlplane br-ctlplane
br-ex br-ctlplane
podman podman podman
192.168.10.0/24
172.16.2.0/24
172.16.4.0/24
172.16.3.0/24
172.16.0.0/24
192.168.100.0/24
H/W Information
Director
- CPU: 4 vcpu
- MEM: 8 GB
- DISK: 100 GB
Controller/Compute
- CPU: 4 vcpu
- MEM: 12 GB
- DISK: 80 GB
br-ex
7. 인프라 용어 알고 가기
7
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
오픈스택 엔지니어는 하드웨어도 알아야 합니다.
DELL EMC R640
IPMI Port
서버가 얇고 슬림해 보이죠? 이런 서버를 1 U 서버라고 합니다.
IPMI
Intelligent Platform Management
Interface 의 약자로 하드웨어를
원격으로 관리하는데 사용되는
인터페이스를 정의함.
1 Gigabit Network Interface Card
1G NIC
10G NIC
40G NIC
8. 인프라 용어 알고 가기
8
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
오픈스택 엔지니어는 하드웨어도 알아야 합니다.
Director (배포노드) 컨트롤러 노드
IPMI Port, Director 노드가 이 포트를
이용하여 컨트롤러 노드의 전원을 켬.
VM 간에는 VirtualBMC가 VM의 전원을 켜 줍니다.
그리고, VirtualBMC는 리눅스에 설치가 됩니다.
9. 인프라 용어 알고 가기
9
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
오픈스택 엔지니어는 하드웨어도 알아야 합니다.
Director (배포노드) 컨트롤러 노드
Provisioning NIC (배포용 네트워크)
Director 노드는 이 네트워크를 이용하여 컨트롤러 노드의
OS를 설치하고 오픈스택 서비스를 설치함.
10. 인프라 용어 알고 가기
10
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
오픈스택 엔지니어는 하드웨어도 알아야 합니다.
컨트롤러 노드 컴퓨트 노드
Internal API NIC (내부 통신용
네트워크)
컨트롤러 노드와 컴퓨트 노드의 커뮤니케이션은 REST
API를 이용하며, 모든 명령어를 주고 받음.
11. 인프라 용어 알고 가기
11
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
오픈스택 엔지니어는 하드웨어도 알아야 합니다.
컴퓨트 노드 스토리지 서버
Storage NIC (스토리지용 네트워크)
컴퓨트 노드에 생성된 VM이 사용하는 OS 부팅 볼륨 및
데이터 볼륨을 연결하기 위해 사용됨.
VM은 네트워크로 연결된
곳의 OS 부팅 볼륨을 사용함.
10G NIC
40G NIC
* 네트워크를 통해 볼륨을 사용하기 때문에
네트워크 속도가 매우 중요함. 따라서, 주로
10 G 이상의 네트워크를 사용함.
12. 인프라 용어 알고 가기
12
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
오픈스택 엔지니어는 하드웨어도 알아야 합니다.
컨트롤러 노드 컴퓨트 노드
External or Provider or Tenant 네트워크
External 네트워크 : 외부 사용자가 컨트롤러 노드의 대시보드에 접속하기 위해 사용하는 네트워크
Provider 네트워크 : 외부 사용자가 VM에 접속하기 위해 사용하는 네트워크
Tenant 네트워크 : VM과 VM간의 통신의 위해 사용하는 네트워크
13. 네트워크 구성도
13
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Red Hat OpenStack 17
Internet
Director Controller 1
External NAT
172.168.16.0/24
Provision host-only
192.168.10.0.24
Provisioning
Internal api
Storage
External
Tenant
nic1 nic2 nic1 nic2
br-ctlplane br-ex
br-ctlplane
podman podman
172.168.16.0/24
H/W Information
Director
- CPU: 4 vcpu
- MEM: 8 GB
- DISK: 100 GB
Controller
- CPU: 4 vcpu
- MEM: 12 GB
- DISK: 100 GB
Compute
- CPU: 4 vcpu
- MEM: 12 GB
- DISK: 100 GB
InternalApi host-only
192.168.20.0.24
Storage host-only
192.168.40.0.24
Tenant host-only
192.168.30.0.24
nic3 nic4 nic5
br-tenant
Compute 1..2
nic1 nic2
br-ex
br-ctlplane
podman
nic3 nic4 nic5
br-tenant
nic3
192.168.30.0/24
192.168.40.0/24
192.168.20.0/24
14. 네트워크 구성에 대한 질문
14
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Red Hat OpenStack 17
그럼, 왜 이렇게 네트워크를 여러개로
나누어서 분리된 네트워크 구조를
사용하나요?
15. 네트워크 구성에 대한 질문
15
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Red Hat OpenStack 17
그럼, 왜 이렇게 네트워크를 여러개로 나누어서 분리된
네트워크 구조를 사용하나요?
답은 바로 보안 때문입니다.
17. 네트워크 구성 및 설계
17
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Red Hat OpenStack 17
Internet
Director Controller 1
External NAT
172.168.16.0/24
Provision host-only
192.168.10.0.24
Provisioning
Internal api
Storage
External
Tenant
nic1 nic2 nic1 nic2
br-ctlplane br-ex
br-ctlplane
podman podman
172.168.16.0/24
H/W Information
Director
- CPU: 4 vcpu
- MEM: 8 GB
- DISK: 100 GB
Controller
- CPU: 4 vcpu
- MEM: 12 GB
- DISK: 100 GB
Compute
- CPU: 4 vcpu
- MEM: 12 GB
- DISK: 100 GB
InternalApi host-only
192.168.20.0.24
Storage host-only
192.168.40.0.24
Tenant host-only
192.168.30.0.24
nic3 nic4 nic5
br-tenant
Compute 1..2
nic1 nic2
br-ex
br-ctlplane
podman
nic3 nic4 nic5
br-tenant
nic3
192.168.30.0/24
192.168.40.0/24
192.168.20.0/24
18. 네트워크 구성 및 설계
18
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
노드별 자원 산정하기
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
19. 네트워크 구성 및 설계
19
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
노드별 네트워크 구성 및 설계하기
No Host Name Provision Internal API Storage Tenant External
1 repo.exp.com 192.168.10.11 192.168.20.11 - - 172.168.16.11
2 dir.exp.com 192.168.10.12 192.168.20.12 - - 172.168.16.12
3 director vips
192.168.10.13
192.168.10.14
- - - -
4 ctrl1.exp.com 192.168.10.21 192.168.20.21 192.168.40.21 192.168.30.21 172.168.16.21
5 ctrl vips 192.168.10.22 192.168.20.22 - - 172.168.16.22
6 cn01.exp.com 192.168.10.31 192.168.20.31 192.168.40.31 192.168.30.31 -
7 cn02.exp.com 192.168.10.32 192.168.20.32 192.168.40.32 192.168.30.32 -
21. 하이퍼 바이저 확인
21
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
우리는 테스트베드입니다.
22. VirtualBMC
22
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
우리는 테스트베드입니다.
[nalee@rhel8 ~]$ systemctl status vbmcd
● vbmcd.service - vbmc service
Loaded: loaded (/etc/systemd/system/vbmcd.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2023-04-06 23:50:05 KST; 16h ago
Main PID: 2190 (vbmcd)
Tasks: 9 (limit: 408644)
Memory: 61.0M
CPU: 1min 16.261s
CGroup: /vbmc.slice/vbmcd.service
├─2190 /usr/bin/python3.6 /usr/local/bin/vbmcd --foreground
├─2461 /usr/bin/python3.6 /usr/local/bin/vbmcd --foreground
├─2463 /usr/bin/python3.6 /usr/local/bin/vbmcd --foreground
└─2464 /usr/bin/python3.6 /usr/local/bin/vbmcd --foreground
Apr 06 23:50:05 rhel8 systemd[1]: Started vbmc service.
Apr 06 23:50:05 rhel8 vbmcd[2190]: /usr/local/lib/python3.6/site-packages/pyghmi/ipmi/private/session.py:29:
CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore,>
Apr 06 23:50:05 rhel8 vbmcd[2190]: from cryptography.hazmat.backends import default_backend
Apr 06 23:50:05 rhel8 vbmcd[2190]: 2023-04-06 23:50:05,731 2190 INFO VirtualBMC [-] Started vBMC instance for domain cn01
Apr 06 23:50:05 rhel8 vbmcd[2190]: 2023-04-06 23:50:05,733 2190 INFO VirtualBMC [-] Started vBMC instance for domain cn02
Apr 06 23:50:05 rhel8 vbmcd[2190]: 2023-04-06 23:50:05,735 2190 INFO VirtualBMC [-] Started vBMC instance for domain ctrl01
Apr 06 23:50:05 rhel8 vbmcd[2190]: 2023-04-06 23:50:05,737 2190 INFO VirtualBMC [-] Started vBMC server on port 50891
[nalee@rhel8 ~]$
Virtualbmc 실행 확인
23. VirtualBMC
23
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
우리는 테스트베드입니다.
[nalee@rhel8 ~]$ vbmc list
+-------------+---------+---------+------+
| Domain name | Status | Address | Port |
+-------------+---------+---------+------+
| cn01 | running | :: | 6451 |
| cn02 | running | :: | 6452 |
| ctrl01 | running | :: | 6450 |
+-------------+---------+---------+------+
[nalee@rhel8 ~]$
Virtualbmc 실행 확인
t.ly/fEUg
Rhel 8 에서 vbmcd 설치하기
CentOS 8 에서 vbmcd 설치하기 t.ly/k5LPR
Ubuntu 에서 vbmcd 설치하기 t.ly/d4HTG
Vmware vSphere 에서 vbmcd 설치하기 t.ly/NBVf
* 검색엔진을 이용하여 검색을 하면 다양한 환경에서
VirtualBMC 설치 방법 및 사용법을 검색할 수 있어요.
25. 가상 네트워크 생성하기
25
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
KVM에서 가상 네트워크 생성
* 외부 사용자의 접속을 원한다면, NAT 네트워크가 아닌
Bridge 네트워크를 생성하고, Bridge 네트워크를 사용해야 함.
26. 가상 네트워크 생성하기
26
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Virtualbox 에서 가상 네트워크 생성
27. 운영체제 설치하기
27
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Repo 서버에 운영체제 설치하기
28. 운영체제 설치하기
28
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Repo 서버에 운영체제 설치하기
29. 환경설정
29
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Repo 서버에 NTP 서버 설정
[root@redhat ~]# hostnamectl set-hostname --static repo.exp.com
# Provision
[root@repo ~]# nmcli c a type ethernet ifname enp1s0 con-name enp1s0 ipv4.method manual ipv6.method ignore ipv4.addresses 192.168.10.11/24
# InternalAPI
[root@repo ~]# nmcli c a type ethernet ifname enp2s0 con-name enp2s0 ipv4.method manual ipv6.method ignore ipv4.addresses 192.168.20.11/24
# External
[root@repo ~]# nmcli c a type ethernet ifname enp3s0 con-name enp3s0 ipv4.method manual ipv6.method ignore ipv4.addresses 172.168.16.11/24
ipv4.gateway 172.168.16.1
[root@repo ~]# mkdir /repo
[root@repo ~]# mv osp17-repo.tar.gz /repo
[root@repo ~]# cd /repo
[root@repo repo]# tar xvfz osp17-repo.tar.gz
호스트명 설정하기
네트워크 설정이 끝나면 다운로드 받은 osp17-repo.tar.gz와 image-serve.tar 파일을 repo 서버로 업로드한다.
[root@repo repo]# cp ./osp17/osp17.repo /etc/yum.repos.d
[root@repo repo]# dnf repolist
[root@repo repo]# dnf list
[root@repo repo]# dnf update -y && reboot
Package 파일 압축 해제
Repository 설정 및 시스템 업데이트
30. 환경설정
30
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Repo 서버 설정
[root@repo repo]# cd /etc/yum.repos.d
[root@repo yum.repos.d]# cp osp17.repo osp17.repo.bak
[root@repo yum.repos.d]# vi osp17.repo
[rhel-9-for-x86_64-baseos-eus-rpms]
name=rhel-9-for-x86_64-baseos-eus-rpms
baseurl= file:///repo/osp17/rhel-9-for-x86_64-baseos-eus-rpms
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
enabled=1
gpgcheck=1
[rhel-9-for-x86_64-appstream-eus-rpms]
name=rhel-9-for-x86_64-appstream-eus-rpms
baseurl= file:///repo/osp17/rhel-9-for-x86_64-appstream-eus-rpms
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
enabled=1
gpgcheck=1
[rhel-9-for-x86_64-highavailability-eus-rpms]
name=rhel-9-for-x86_64-highavailability-eus-rpms
baseurl= file:///repo/osp17/rhel-9-for-x86_64-highavailability-eus-rpms
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
enabled=1
gpgcheck=1
…
기존 repo 파일은 백업한 후
디렉터리에 저장된 package를 사용할
수 있도록 file 기반으로 변경함.
31. 환경설정
31
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Repo 서버에 NTP 서버 설정
[root@repo ~]# cat /etc/chrony.conf | grep -v '^#' | grep -v '^$'
pool 192.168.10.11
driftfile /var/lib/chrony/drift
makestep 1.0 3
rtcsync
allow 192.168.0.0/16
local stratum 10
keyfile /etc/chrony.keys
leapsectz right/UTC
logdir /var/log/chrony
[root@rhel8 ~]# systemctl restart chronyd
[root@repo ~]# chronyc sources
210 Number of sources = 3
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* rhel8 10 6 177 290 +16ns[+1082ns] +/- 1821ns
^? 10.5.26.10 0 8 0 - +0ns[ +0ns] +/- 0ns
^? 10.5.27.10 0 8 0 - +0ns[ +0ns] +/- 0ns
[root@repo ~]# firewall-cmd --add-service=ntp
success
[root@repo ~]# firewall-cmd --add-service=ntp --permanent
success
NTP 설정하기
NTP 설정 확인하기
Firewall 설정하기
32. 환경설정
32
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Container Repository 설정
[root@repo ~]# useradd stack
[root@repo ~]# echo stack:P@ss0rd |/usr/sbin/chpasswd
[root@repo ~]# echo "stack ALL=(root) NOPASSWD:ALL" | tee -a /etc/sudoers.d/stack
[root@repo ~]# chmod 0440 /etc/sudoers.d/stack
[stack@repo ~]$ mkdir ansible
[stack@repo ~]$ cd ansible
[stack@repo ansible]$ mkdir roles
[stack@repo ansible]$ cp -r /usr/share/ansible/roles/tripleo_image_serve roles
[stack@repo ansible]$ vi inventory
[local]
192.168.10.11
Stack 계정 생성
[root@repo ~]# su - stack
[stack@repo ~]$ sudo dnf install -y python3-tripleoclient Tripleoclient 설치
Container repository 설치를 위한
Ansible 설정
33. 환경설정
33
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Container Repository 설정
[stack@repo ansible]$ vi ansible.cfg
[defaults]
inventory = /home/stack/ansible/inventory
[inventory]
[privilege_escalation]
become=True
become_method=sudo
become_user=root
become_ask_pass=False
[paramiko_connection]
[ssh_connection]
[persistent_connection]
[accelerate]
[selinux]
[colors]
[diff]
Container repository 설치를 위한
Ansible 설정
[stack@repo ansible]$ ansible -m ping localhost
localhost | SUCCESS => {
"changed": false,
"ping": "pong"
}
Ansible 실행 확인
34. 환경설정
34
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Container Repository 설정
[stack@repo ansible]$ vi image-serve.yaml
---
- hosts: localhost
tasks:
- name: Install, Configure and Run Apache to serve container images
include_role:
name: roles/tripleo_image_serve
vars:
container_registry_host: "*"
[stack@repo ansible]$ ansible-playbook image-serve.yaml
Container repository 설치를 위한
Ansible 설정 및 실행
[stack@repo ~]$ sudo vi /etc/httpd/conf.d/repo.conf
Listen 80
<VirtualHost *:80>
DocumentRoot /repo
CustomLog "logs/http_repo.log" combined
<Directory "/repo">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
Alias /repo "/repo"
Package repository 설정을 위한
설정파일 작성
35. 환경설정
35
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Container Repository 설정
[stack@repo ~]$ sudo systemctl start httpd
[stack@repo ~]$ sudo systemctl enable httpd
[root@repo ~]# firewall-cmd --permanent --add-service=http
[root@repo ~]# firewall-cmd --permanent --add-port=8787/tcp
[root@repo ~]# firewall-cmd --reload
[root@repo ~]# firewall-cmd --list-all
Apache Web Server 시작
Firewall 설정
[root@repo ~]# chcon -R -h -t httpd_sys_content_t /repo/
[root@repo ~]# restorecon -R /var/lib/image-serve/ SELinux 설정
[root@repo ~]# cp image-serve.tar /var/lib
[root@repo ~]# cd /var/lib
[root@repo ~]# tar xvf image-serve.tar
Container image 복사 및 압축해제
[root@repo ~]# openstack tripleo container image list
[root@repo ~]# curl http://192.168.10.11:8787/v2/_catalog | jq . Container image 확인
36. 환경설정
36
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Repo 서버 설정
[root@repo ~]# cd /etc/yum.repos.d
[root@repo yum.repos.d]# mv osp17.repo.bak osp17.repo
[root@repo yum.repos.d]# cat osp17.repo
[rhel-9-for-x86_64-baseos-eus-rpms]
name=rhel-9-for-x86_64-baseos-eus-rpms
baseurl=http://192.168.10.11/repo/osp17/rhel-9-for-x86_64-baseos-eus-rpms
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
enabled=1
gpgcheck=1
[rhel-9-for-x86_64-appstream-eus-rpms]
name=rhel-9-for-x86_64-appstream-eus-rpms
baseurl=http://192.168.10.11/repo/osp17/rhel-9-for-x86_64-appstream-eus-rpms
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
enabled=1
gpgcheck=1
[rhel-9-for-x86_64-highavailability-eus-rpms]
name=rhel-9-for-x86_64-highavailability-eus-rpms
baseurl=http://192.168.10.11/repo/osp17/rhel-9-for-x86_64-highavailability-eus-rpms
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
enabled=1
gpgcheck=1
…
[root@repo yum.repos.d]# dnf list
Package 레파지토리 설정 수정 및
확인
38. Director 노드 환경설정
38
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
네트워크 설정 및 시스템 업데이트
[root@redhat ~]# hostnamectl set-hostname dir.exp.com
[root@redhat ~]# hostname
dir.exp.com
[root@dir ~]# nmcli con delete {enp1s0,enp2s0,enp3s0}
# Provision
[root@dir ~]# nmcli con add type ethernet ifname enp1s0 con-name enp1s0 ipv4.method manual ipv6.method ignore ipv4.address 192.168.10.12/24
# Internal API
[root@dir ~]# nmcli con add type ethernet ifname enp2s0 con-name enp2s0 ipv4.method manual ipv6.method ignore ipv4.address 192.168.20.12/24
# External
[root@dir ~]# nmcli con add type ethernet ifname enp3s0 con-name enp3s0 ipv4.method manual ipv6.method ignore ipv4.address 172.168.16.12/24
ipv4.gateway 172.168.16.1
[root@dir ~]# curl http://192.168.10.11/repo/osp17/osp17.repo > /etc/yum.repos.d/osp17.repo
[root@dir ~]# dnf update -y
[root@dir ~]# reboot
[root@dir ~]# useradd stack
[root@dir ~]# echo "P@ssw0rd" | passwd stack --stdin
[root@dir ~]# echo "stack ALL=(root) NOPASSWD:ALL" | tee -a /etc/sudoers.d/stack
[root@dir ~]# chmod 0440 /etc/sudoers.d/stack
호스트명 설정
repo 파일 가져오기
시스템 업데이트 및 재부팅
stack 계정 생성 및 패스워드 설정
stack 계정에 sudo 권한 설정
39. Director 노드 환경설정
39
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Undercloud 설치를 위한 패키지 설치
[root@dir ~]# su - stack
[stack@dir ~]$ mkdir ~/images
[stack@dir ~]$ mkdir ~/templates
[stack@dir ~]$ mkdir ~/output
[stack@dir ~]$ sudo dnf install -y python3-tripleoclient
[stack@dir ~]$ wget http://192.168.10.11/repo/osp17/containers-prepare-parameter.yaml
설치에 필요한 디렉토리 생성
tripleoclinet 패키지 설치
Container image 정보 가져오기
40. Director 노드 환경설정
40
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Undercloud.conf 파일 설정
[stack@dir ~]$ vi undercloud.conf
[DEFAULT]
enable_routed_networks = true
subnets = ctlplane-subnet # 오버클라우드 노드 배포시 사용할 네트워크 subnet명
local_subnet = ctlplane-subnet # 오버클라우드 노드 배포시 사용할 네트워크 subnet명
local_ip = 192.168.10.12/24 # 오버클라우드 노드 배포시 사용할 네트워크 IP
local_interface = enp1s0 # 오버클라우드 노드 배포시 사용할 네트워크 인터페이스명
inspection_interface = br-ctlplane
undercloud_public_host = 192.168.10.13 # 사용자가 접근할때 사용할 Undercloud 오픈스택 서비스 IP
undercloud_admin_host = 192.168.10.14 # 관리자가 접근할때 사용할 Undercloud 오픈스택 서비스 IP
undercloud_ntp_servers = 192.168.10.11 # NTP 서버 주소
undercloud_timezone = Asia/Seoul
overcloud_domain_name = exp.com # 주 도메인 네임 - 사전 설계 자료 참조
undercloud_hostname = dir.exp.com # Director 노드 도메인 네임 - 사전 설계 자료 참조
container_images_file = /home/stack/containers-prepare-parameter.yaml
container_insecure_registries = 192.168.10.11 # 컨테이너 이미지 레지스트리 IP
enabled_hardware_types = ipmi,redfish,ilo,idrac
output_dir = /home/stack/output
[ctlplane-subnet]
cidr = 192.168.10.0/24 # 배포시 사용할 IP CIDR
dhcp_start = 192.168.10.101 # 배포시 사용할 DHCP 시작 IP
dhcp_end = 192.168.10.104 # 배포시 사용할 DHCP 종료 IP
gateway = 192.168.10.1 # 배포 네트워크의 게이트웨이 IP
inspection_iprange = 192.168.10.90,192.168.10.100 # 인트로스팩션시 사용할 IP 범위 - 배포시 사용할 IP 범위를 사용함.
masquerade = true
Undercloud 설치를 위한 설정 파일
생성
41. Director 노드 환경설정
41
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
Undercloud 설치
[stack@dir ~]$ vi containers-prepare-parameter.yaml
# Generated with the following on 2020-10-03T16:31:56.242188
#
# openstack tripleo container image prepare default --local-push-destination --output-env-file containers-prepare-parameter.yaml
#
parameter_defaults:
SkipRhelEnforcement: true
ContainerImagePrepare:
- push_destination: false
…
[stack@dir ~]$ curl http://192.168.10.11:8787/v2/_catalog | jq .
[stack@dir ~]$ openstack undercloud install
[stack@dir ~]$ sudo podman ps
[stack@dir ~]$ sudo podman images
인터넷이 되지 않는 환경에서 설치하므로
RHEL 서브스크립션 등록을 하지 않음 설정
컨테이너 이미지 확인
언더클라우드 설치
언더클라우드에 설치된 오픈스택 서비스 확인
43. 다음시간 온라인 모임 아젠다 소개
43
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
미리 보고 오면 좋은 것
스터디 그룹 저자 직강 교재 다음시간까지준비할 것들~!!
★ Repo 서버 구성 완료하기
★ Director 서버 구성 완료하기
★ 교재 62 Page까지 미리 읽어보기
다음 시간에는?
★ 오버클라우드 노드 프로비저닝