1. 저자 직강 + 스터디 그룹 - 4주차
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일)
스터디 공유의 시간
- 스터디 개요 소개
- 스터디 그룹별 발표
- 스터디 참여 소감 공유
오프라인 미팅
4. 오픈스택 설치 프로세스
4
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
지난 시간에는 오버클라우드 노드에 운영체제 설치를 하고 네트워크 구성을 진행했습니다.
5. 오픈스택 설치 프로세스
5
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
이번 시간에는 Director를 이용해 오버클라우드 노드의 오픈스택 서비스를 배포해 보겠습니다.
6. 스토리지 종류 알아보기
6
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
DELL EMC Unity
DELL EMC VMAX
HP 3Par
Fujitsu ETERNUS
Hitachi VSP
Huawei 18000
IBM DS8900F
Netapp
FC, ISCSI
Fiber Channel
ISCSI Protocol
7. 스토리지 Support Matrix
7
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
https://catalog.redhat.com/software/search?target_platforms=Red%20Hat%20OpenStack%20Platform&functionalCategories=Storage https://docs.openstack.org/cinder/latest/reference/support-matrix.html
11. 템플릿 파일 준비하기
11
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
[stack@dir ~]$ cd templates/
[stack@dir templates]$ ll
total 60
-rw-r--r--. 1 stack stack 959 Jan 21 00:03 custom-domain.yaml # 도메인명 정의 파일
-rw-r--r--. 1 stack stack 343 Jan 26 12:14 extra-config.yaml # CPU, Mem 가상화율 같은 추가 옵션 설정
-rw-r--r--. 1 stack stack 1371 Jan 20 11:44 network_data.yaml # 오버클라우드에서 사용할 네트워크 종류 설정
-rw-r--r--. 1 stack stack 1009 Jan 26 15:43 network-environment.yaml # neutron 관련 옵션 설정
drwxr-xr-x. 2 stack stack 45 Jan 20 19:34 nic-configs # 컨트롤러 노드와 컴퓨트 노드의 네트워크 인터페이스 정의
-rw-r--r--. 1 stack stack 3627 Mar 8 14:21 overcloud-baremetal-deployed.yaml # 오버클라우드 운영체제 설치 결과
-rw-r--r--. 1 stack stack 1776 Jan 20 19:35 overcloud-baremetal-deploy.yaml # 오버클라우드 운영체제 설치관련 정보
-rw-r--r--. 1 stack stack 2474 Jan 20 11:44 overcloud-networks-deployed.yaml # 오버클라우드 네트워크 생성 결과
-rw-r--r--. 1 stack stack 880 Jan 26 16:02 overcloud-vip-deployed.yaml # 오버클라우드 VIP 생성 결과
-rw-r--r--. 1 stack stack 92 Mar 24 17:14 post_deploy.yaml # 배포시 적용할 파일 설정
-rw-r--r--. 1 stack stack 902 Mar 24 17:09 post-repo.yaml # 배포시 적용할 내용 설정
-rw-r--r--. 1 stack stack 11233 Jan 20 14:08 roles_data.yaml # 오버클라우드 노드별 역할 및 서비스 정의
-rw-r--r--. 1 stack stack 1359 Jan 20 22:11 storage-environment.yaml # Cinder 관련 스토리지 정보 정의
-rw-r--r--. 1 stack stack 214 Jan 26 16:01 vip_data.yaml # 오버클라우드 VIP 정의
[stack@dir templates]$
템플릿 파일 종류
12. 템플릿 파일 준비하기
12
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
(undercloud) [stack@dir templates]$ cat roles_data.yaml
###############################################################################
# File generated by TripleO
###############################################################################
###############################################################################
# Role: Controller #
###############################################################################
- name: Controller
description: |
Controller role that has all the controler services loaded and handles
Database, Messaging and Network functions.
CountDefault: 1
tags:
- primary
- controller
# Create external Neutron bridge for SNAT (and floating IPs when using
# ML2/OVS without DVR)
- external_bridge
(뒷장에 계속)
roles_data.yaml
13. 템플릿 파일 준비하기
13
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
networks:
External:
subnet: external_subnet
InternalApi:
subnet: internal_api_subnet
Storage:
subnet: storage_subnet
StorageMgmt:
subnet: storage_mgmt_subnet
Tenant:
subnet: tenant_subnet
# For systems with both IPv4 and IPv6, you may specify a gateway network for
# each, such as ['ControlPlane', 'External']
default_route_networks: ['External']
HostnameFormatDefault: '%stackname%-controller-%index%'
RoleParametersDefault:
OVNCMSOptions: "enable-chassis-as-gw"
(뒷장에 계속)
roles_data.yaml
14. 템플릿 파일 준비하기
14
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
# Deprecated & backward-compatible values (FIXME: Make parameters consistent)
# Set uses_deprecated_params to True if any deprecated params are used.
uses_deprecated_params: True
deprecated_param_extraconfig: 'controllerExtraConfig'
deprecated_param_flavor: 'OvercloudControlFlavor'
deprecated_param_image: 'controllerImage'
deprecated_nic_config_name: 'controller.yaml'
update_serial: 1
ServicesDefault:
- OS::TripleO::Services::Aide
- OS::TripleO::Services::AodhApi
- OS::TripleO::Services::AodhEvaluator
- OS::TripleO::Services::AodhListener
- OS::TripleO::Services::AodhNotifier
- OS::TripleO::Services::AuditD
- OS::TripleO::Services::BarbicanApi
- OS::TripleO::Services::BarbicanBackendSimpleCrypto
- OS::TripleO::Services::BarbicanBackendDogtag
- OS::TripleO::Services::BarbicanBackendKmip
…
roles_data.yaml
15. 템플릿 파일 준비하기
15
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
###############################################################################
# Role: Compute #
###############################################################################
- name: Compute
description: |
Basic Compute Node role
CountDefault: 1
# Create external Neutron bridge (unset if using ML2/OVS without DVR)
tags:
- compute
- external_bridge
networks:
InternalApi:
subnet: internal_api_subnet
Tenant:
subnet: tenant_subnet
Storage:
subnet: storage_subnet
(뒷장에 계속)
roles_data.yaml
16. 템플릿 파일 준비하기
16
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
HostnameFormatDefault: '%stackname%-novacompute-%index%'
RoleParametersDefault:
FsAioMaxNumber: 1048576
TunedProfileName: "virtual-host"
# Deprecated & backward-compatible values (FIXME: Make parameters consistent)
# Set uses_deprecated_params to True if any deprecated params are used.
# These deprecated_params only need to be used for existing roles and not for
# composable roles.
uses_deprecated_params: True
deprecated_param_image: 'NovaImage'
deprecated_param_extraconfig: 'NovaComputeExtraConfig'
deprecated_param_metadata: 'NovaComputeServerMetadata'
deprecated_param_scheduler_hints: 'NovaComputeSchedulerHints'
deprecated_param_ips: 'NovaComputeIPs'
deprecated_server_resource_name: 'NovaCompute'
deprecated_nic_config_name: 'compute.yaml'
update_serial: 25
ServicesDefault:
- OS::TripleO::Services::Aide
- OS::TripleO::Services::AuditD
…
roles_data.yaml
29. 템플릿 파일 준비하기
29
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
[stack@dir templates]$ vi custom-domain.yaml
parameter_defaults:
# The DNS domain used for the hosts. This must match the overcloud_domain_name configured on the undercloud.
# Type: string
CloudDomain: exp.com
# The DNS name of this cloud. E.g. ci-overcloud.tripleo.org
# Type: string
CloudName: overcloud.exp.com
# The DNS name of this cloud's provisioning network endpoint. E.g. 'ci-overcloud.ctlplane.tripleo.org'.
# Type: string
CloudNameCtlplane: overcloud.ctlplane.exp.com
# The DNS name of this cloud's internal_api endpoint. E.g. 'ci-overcloud.internalapi.tripleo.org'.
# Type: string
CloudNameInternal: overcloud.internalapi.exp.com
# The DNS name of this cloud's storage endpoint. E.g. 'ci-overcloud.storage.tripleo.org'.
# Type: string
CloudNameStorage: overcloud.storage.exp.com
# The DNS name of this cloud's storage_mgmt endpoint. E.g. 'ci-overcloud.storagemgmt.tripleo.org'.
# Type: string
CloudNameStorageManagement: overcloud.storagemgmt.exp.com
custom-domain.yaml
30. 템플릿 파일 준비하기
30
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
[stack@dir templates]$ cat post_deploy.yaml
resource_registry:
OS::TripleO::NodeExtraConfigPost: /home/stack/templates/post-repo.yaml
[stack@dir templates]$ cat post-repo.yaml
heat_template_version: wallaby
description: >
Extra hostname configuration
resources:
CustomExtraConfig:
type: OS::Heat::SoftwareConfig
properties:
group: script
config:
str_replace:
template: |
#!/bin/sh
echo 'redhat' | passwd --stdin root
(뒷장에 계속)
post_deploy.yaml
31. 템플릿 파일 준비하기
31
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
# ------------- Yum Repository ------------- #
sudo curl http://192.168.10.11/repo/osp17/osp17.repo > /etc/yum.repos.d/osp17.repo
sudo dnf clean all
sudo dnf repolist
sudo dnf install -y vim tmux bash-completion net-tools sysstat nmap
CustomExtraDeployments:
type: OS::Heat::SoftwareDeploymentGroup
properties:
servers: {get_param: servers}
config: {get_resource: CustomExtraConfig}
actions: ['CREATE','UPDATE']
input_values:
deploy_identifier: {get_param: DeployIdentifier}
[stack@dir templates]$
post-deploy.yaml
32. 템플릿 파일 준비하기
32
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
[stack@dir templates]$ vi storage-environment.yaml
parameter_defaults:
#### BACKEND SELECTION ####
## Whether to enable iscsi backend for Cinder.
CinderEnableIscsiBackend: false
## Whether to enable rbd (Ceph) backend for Cinder.
CinderEnableRbdBackend: false
## Cinder Backup backend can be either 'ceph', 'swift' or 'nfs'.
## Whether to enable rbd (Ceph) backend for Nova ephemeral storage.
NovaEnableRbdBackend: false
## Glance backend can be either 'rbd' (Ceph), 'swift' or 'file'.
GlanceBackend: file
## Gnocchi backend can be either 'rbd' (Ceph), 'swift' or 'file'.
## Uncomment below if enabling legacy telemetry
# GnocchiBackend: file
(뒷장에 계속)
storage-environment.yaml
33. 템플릿 파일 준비하기
33
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
#### CINDER NFS SETTINGS ####
CinderEnableNfsBackend: true
## NFS mount options
CinderNfsMountOptions: 'rw,sync'
## NFS mount point, e.g. '192.168.122.1:/export/cinder'
CinderNfsServers: '192.168.40.1:/osp/cinder'
#### GLANCE NFS SETTINGS ####
## Make sure to set `GlanceBackend: file` when enabling NFS
##
## Whether to make Glance 'file' backend a NFS mount
GlanceNfsEnabled: true
## NFS share for image storage, e.g. '192.168.122.1:/export/glance'
## (If using IPv6, use both double- and single-quotes,
## e.g. "'[fdd0::1]:/export/glance'")
GlanceNfsShare: '192.168.40.1:/osp/glance'
## Mount options for the NFS image storage mount point
GlanceNfsOptions: 'intr,context=system_u:object_r:nfs_t:s0'
storage-environment.yaml
34. 템플릿 파일 준비하기
34
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
[stack@dir templates]$ vi extra-config.yaml
parameter_defaults:
ControllerExtraConfig:
nova::api::allow_resize_to_same_host: 'true'
ComputeParameters:
NovaReservedHostMemory: 4096
NovaComputeExtraConfig:
nova::compute::allow_resize_to_same_host: True
nova::cpu_allocation_ratio: 3.0
nova::ram_allocation_ratio: 1.0
nova::disk_allocation_ratio: 1.0
extra-config.yaml
37. 오버클라우드 배포
37
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
[stack@dir ~]$ sh deploy.sh
…
Overcloud configuration completed for stack: overcloud
2023-01-21 00:22:41.379 598476 INFO tripleoclient.v1.overcloud_deploy.DeployOvercloud [-] Overcloud configuration
completed for stack: overcloud
2023-01-21 00:22:41.397 598476 WARNING tripleoclient.utils.safe_write [-] The output file
/home/stack/overcloud-deploy/overcloud/overcloud-deployment_status.yaml will be overriden
Host 172.168.16.22 not found in /home/stack/.ssh/known_hosts
Overcloud Endpoint: http://172.168.16.22:5000
Overcloud Horizon Dashboard URL: http://172.168.16.22:80/dashboard
Overcloud rc file: /home/stack/overcloud-deploy/overcloud/overcloudrc and /home/stack/overcloudrc
Overcloud Deployed successfully
2023-01-21 00:22:41.554 598476 INFO tripleoclient.v1.overcloud_deploy.DeployOvercloud [-] Stopping ephemeral heat.
2023-01-21 00:22:41.595 598476 INFO tripleoclient.heat_launcher [-] Pod does not exist: ephemeral-heat
2023-01-21 00:22:42.453 598476 INFO osc_lib.shell [-] END return value: None
real 18m42.951s
user 3m25.501s
sys 1m15.892s
(undercloud) [stack@dir ~]$
deploy.sh
40. 다음시간 온라인 모임 아젠다 소개
40
Red Hat OpenStack 17 저자 직강 + 스터디그룹
OpenStack Korea Community
미리 보고 오면 좋은 것
스터디 그룹 저자 직강 교재 다음시간까지준비할 것들~!!
★ 오버클라우드 배포 완료하기
★ 교재 147 Page까지 미리 읽어보기
다음 시간에는?
★ 기능 테스트 및 스터디 과제 진행