mirantis open stack deployment automation
TRANSCRIPT
![Page 1: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/1.jpg)
Mirantis OpenStackDeployment Automation
Jeremy Jeon
![Page 2: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/2.jpg)
INDEX
Puppet MCollective Fuel Provisioning and Deploying Flow
• Nailgun• Astute
Review Opinion Next (Provisioning Automation)
![Page 3: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/3.jpg)
Simple Fuel Architecture
![Page 4: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/4.jpg)
1. Puppet
![Page 5: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/5.jpg)
Puppet?
• Unix-like 및 Windows 기반 시스템상에서 System configura-tion 을 관리하고 자동화하기 위해 디자인된 Configuration Man-agement 도구• Puppet Labs 에서 개발을 주도하고 있으며 Ruby 로 작성
![Page 6: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/6.jpg)
The Puppet Advantage
• Manifest 를 한번만 작성하면 여러 장치에 중복 작업 없이 적용 가능• 모든 서버가 Manifest 를 기준으로 서로 동기화가 가능• Manifest 를 날짜 기준으로 신뢰성 있는 문서로 사용 가능• 다양한 운영체제 , 플랫폼 , 명령어 문법 등에 유연• Manifest 는 코드이기 때문에 버전 및 다른 코드 관리 방식이 적용
가능
![Page 7: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/7.jpg)
Puppet Language
• Manifest 는 System Configuration 을 표현하기 위해 Puppet 의 커스텀 언어로 작성• 이 언어는 Resource 라고 불리는 유닛을 정의하는데 , 이는 각
시스템의 사용자 , 파일 , 소프트웨어 패키지등을 기술함• Puppet 은 선언적인 프로그래밍 언어• Shell 이나 Perl 같은 다른 프로그래밍 언어들과 같이 수행 목록을
제공하지 않고 어떻게 작업이 되어야 하는지 (Should-be) 를 기술• Puppet 은 현재 서버의 상태를 Manifest 와 비교하고 불일치 되는
부분만 변경
![Page 8: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/8.jpg)
Puppet Code
RESOURCE { NAMEATTRIBUTE =>
VALUE}
Resource Defini-tion
![Page 9: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/9.jpg)
Resource Type
Custom Type
![Page 10: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/10.jpg)
Puppet Forge
![Page 11: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/11.jpg)
Resource Type Example
![Page 12: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/12.jpg)
2. MCollective
![Page 13: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/13.jpg)
MCollective?
서버 Orchestration 과 Parallel Job Execution 시스템을 위한 프레임워크
1. 작은 규모의 클러스터부터 큰 규모의 클러스터까지 Interaction2. 요청을 분산할 때 Broadcast 패러다임을 사용3. 리모트 에이전트를 콜하기 위한 심플한 CLI 환경을 제공4. Simple RPC Style 에이전트 , 클라이언트 지원5. 커뮤니티로부터 패키지 및 서비스 , 다른 공통 컴포넌트들을
관리할 수 있는 다양한 에이전트 지원
![Page 14: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/14.jpg)
Simple Components Diagram
![Page 15: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/15.jpg)
MCollective Server
• MCollective 를 통해 컨트롤 될 수 있는 노드를 의미• 바꿔말해 각각의 노드에 설치되는 MCollective 컴포넌트• mcollectived 라는 MCollective 데몬을 실행• 여러 에이전트 플러그인들이 설치 됨• mcollectived 데몬은 3 가지 플러그인을 사용
• A connector plugin: 미들웨어와의 연결 , 요청을 폴링 , 응답 전송• A security plugin: 요청들에 대한 검증 및 필터링 , 응답 인코딩• Several agent plugins: 요청에 대한 Action 실행
![Page 16: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/16.jpg)
MCollective Server
![Page 17: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/17.jpg)
MCollective Client
• 다른 노드들에게 요청을 전송하는 컴포넌트• Client 컴포넌트에서 사용하는 플러그인
• A connector plugin: 미들웨어와 연결하고 요청을 전송 , 응답 수신• A security plugin: 요청들을 인코딩• Several agent plugin DDL files: 유효한 요청들을 구성
• Client 가 Action 들을 요청할 때 Agent 들에서 어떤 Arguments들이 필요한지 알아야하는데 Client 는 DDL 파일을 이용해 유효한 요청을 구성
![Page 18: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/18.jpg)
MCollective Client
![Page 19: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/19.jpg)
Middleware
• Server 컴포넌트와 Client 컴포넌트는 직접 커뮤니케이션 하지 않음• Middleware 시스템은 MCollective 에서 지원하지 않음• 알맞은 Middleware 를 선정한 후 그에 맞는 Connector Plugin 를
구현• Default Middleware: ActiveMQ, RabbitMQ• Connector 와 Middleware 에서 처리하는 3 가지 주요 메세지
• Broadcast requests (client-to-server)• Directed requests (client-to-server)• Replies (server-to-client)
![Page 20: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/20.jpg)
Middleware
![Page 21: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/21.jpg)
MCollective CLI
![Page 22: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/22.jpg)
RPC Agent
DDL File
Ruby File
![Page 23: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/23.jpg)
3. Fuel Provisioning and Deploying Flow
![Page 24: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/24.jpg)
Fuel Master
• Service for network provisioning• Service for installing OS• Service for deploying OpenStack services
![Page 25: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/25.jpg)
Node Detecting Flow
![Page 26: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/26.jpg)
Node Detecting Flow
각 노드들이 PXE(Pre-boot eXecution Environment) 부팅을 하게 되면1. Fuel Master 노드에 있는 PXE 부트 서버의 Bootstrap
이미지로 부팅2. Bootstrap 이미지는 Nailgun agent 이라는 스크립트를 실행3. Nailgun-agent.rb 에이전트가 서버의 하드웨어 정보를 수집4. REST API 를 통해 Fuel Master 노드의 Nailgun 으로 전송5. Fuel UI 또는 CLI 를 이용해 Nailgun API 를 통해 확인 가능
![Page 27: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/27.jpg)
Nailgun
• Fuel 에서 가장 중요한 서비스 중 하나• 시스템의 모든 비즈니스 로직을 가지고 있는 RESTful
어플리케이션• Python 으로 작성• Environment 구성 , 설정 , Role, Node Detection, Node De-
ployment, 디스크 볼륨 설정 등 OpenStack 배포에 필요한 모든 데이터• 모든 설정 정보 및 노드 정보 , 상태 정보를 PostgreSQL 에 저장• Worker(Astute) 와는 AMQP 를 통해 커뮤니케이션• Fuel 웹 인터페이스와 CLI 툴을 통해 Nailgun API 와 연동
![Page 28: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/28.jpg)
Provisioning Flow (Next)
![Page 29: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/29.jpg)
Provisioning Flow (Next)
사용자가 Environment 설정을 하고 Deploy 버튼을 누르게 되면1. Nailgun 서비스에 의해 모든 Environment 설정정보가 담긴
JSON Data Structure 생성2. RabbitMQ 에 전송3. Astute worker 가 RabbitMQ 를 리스닝하고 있다가 메세지 수신4. Cobbler 와 MCollective 를 통해 각 노드에 OS 설치
![Page 30: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/30.jpg)
Astute
• Nailgun 의 Worker 역할을 하는 Fuel 컴포넌트• Provision 과 Deploy 를 하는 Orchestrator• Provision: Cobbler 를 이용해 각 노드들에 OS 를 설치• Deploy: MCollective 를 이용해 각 노드들에 OpenStack 을 배포
![Page 31: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/31.jpg)
Deployment Flow
![Page 32: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/32.jpg)
Deployment Flow
각 노드들에 OS 설치가 끝나면1. Astute 는 MCollective uploadfile 에이전트를 이용해서 각
노드들의 /etc/astute.yaml 에 배포에 필요한 데이터를 푸시2. Astute 는 MCollective puppetsync 에이전트를 이용해서
Puppet modules 과 manifests 를 동기화3. 이 에이전트는 마스터 노드의 rsyncd 서버와 연결하고 최신
버전의 Puppet modules 와 manifests 를 다운로드 하기 위해 rsync 프로세스를 실행
4. 동기화가 끝나면 Astute 는 puppetd 에이전트를 실행시켜 메인 manifests 의 site.pp 를 통해 실질적인 배포
![Page 33: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/33.jpg)
During Deploying
배포가 되는 동안• Astute 는 배포가 끝날 때 까지 배포가 종료되었는지의 상태와
Nailgun 으로 진행상태를 리포팅하기 위해 에이전트를 폴링• Puppet 포르세스가 성공이든 실패든 종료가 되면 Astute 는
노드로부터 Summary 를 생성하고 Nailgun 으로 결과를 리포팅• 이를 통해 사용자가 Fuel Web 인터페이스와 CLI 툴을 통해
진행상태와 결과를 모니터링 할 수 있게 되는 것
![Page 34: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/34.jpg)
4. Review
![Page 35: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/35.jpg)
5. Opinion
• MCollective 의 경우 추후 특정 기능을 추가한다던지 특정 정보를 추가를 가져와야할 경우 Agent / Client 개발이 빈번할 것으로 예상• Puppet 의 경우 Daou Cloud 만의 설정이 많아 질 것으로 예상되기
때문에 그에 따른 Custom Puppet 파일 (pp) 이 필요는 하겠지만 따로 추가적인 라이브러리 파일 (rb) 개발은 거의 없을 것으로 예상
![Page 36: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/36.jpg)
References
• Fuel Document (https://docs.fuel-infra.org/fuel-dev/index.html)• Fuel (https://wiki.openstack.org/wiki/Fuel)• Astute (https://github.com/openstack/fuel-astute)• MCollective (https://puppetlabs.com/mcollective)• Puppet 3 Beginner’s Guide
![Page 37: Mirantis open stack deployment automation](https://reader033.vdocuments.mx/reader033/viewer/2022042611/5878e2781a28abfa038b4cc3/html5/thumbnails/37.jpg)
감사합니다