Upload
jaesuk-ahn
View
1.789
Download
4
Embed Size (px)
Citation preview
OpenStackat Korea Community Day
2011.12.03 / OpenStack 한국커뮤니티����������� ������������������ 안재석����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ [email protected]
11년 12월 5일 월요일
2011 Korea Community Day
지금까지는...
• OpenStack (교양과목)
• 역사• 주요 프로젝트 소개
• 구성모듈 개요
• 커뮤니티 소개
11년 12월 5일 월요일
2011 Korea Community Day
오늘은...
• 새로운 것을 해 볼 때가 된 듯 합니다.
11년 12월 5일 월요일
2011 Korea Community Day
하지만 역시 복습은 중요...
• OpenStack = {Cloud Operating System} ∩ {Open Source SW} ∩ {Community}
• OpenStack ∋ {Nova, Swift, Glance, Keystone, Dashboard}
• 추가 복습은 www.openstack.or.kr 에서 하세요
11년 12월 5일 월요일
2011 Korea Community Day
다시 오늘의 주제로...
• OpenStack Compute (필수전공)
• Nova라고 불림
• Public/Private Cloud Infra Service를 만들어 줄 수 있음
11년 12월 5일 월요일
2011 Korea Community Day
무엇을 만든다구요?
Compute Pool Network Pool Storage Pool Virtualized
Servers Virtualized Networks
Virtualized Storage
APPS
USERS ADMINS
Connects to apps via APIs Self-service Portals for users
CLOUD OPERATING SYSTEM
Control & Automates Pools of Resources
E!ciently allocate resources
11년 12월 5일 월요일
2011 Korea Community Day
앞으로 나올 내용들...
• OpenStack Compute 기능모듈
• OpenStack Compute Architecture
• OpenStack Compute Deployment
• OpenStack Compute 활용하기
11년 12월 5일 월요일
2011 Korea Community Day
앞으로 나올 내용들...
• OpenStack Nova 기능모듈
• OpenStack Nova Architecture
• OpenStack Nova Deployment
• OpenStack Nova 활용하기
11년 12월 5일 월요일
2011 Korea Community Day
OpenStack Nova 모듈Pluggable- simple (least-load)- chance (random)- distributed scheduler (zone-aware) * host-filter * least-cost function- resource (capability) aware scheduler
- WSGI middleware- EC2/OpenStack API- Keystone/standalone auth
- Local LVM volume groups- iSCSI- Sheepdog- HP/Lefthand SANs
- Sqlite- MySQL- Postgres
Pluggable- chance- zone-awarePluggable- chance- zone-aware
- Flat, FlatDHCP, Vlan- IPv4 / IPv6
- QEMU, KVM, UML, LXC- Xen and XenServer- Hyper-V- VMware vSphere
11년 12월 5일 월요일
2011 Korea Community Day
System Architecture
User(CLI, REST)
API서버
EC2 API
OpenStack API
QueueIdentity(keystone)middleware
Image Service(Glance)
Volume Worker
Network Worker
SchedulerCompute Worker
REST
local method
Web UI (Dashboard)
REST
Image Store(Local, Swift, AWS S3 etc)
REST
Volume Storage
(iSCSI ��
��������� �����������
11년 12월 5일 월요일
2011 Korea Community Day
OpenStack Glance (Image)
2. REST-based API 1. Store & retrieve VM images
3. Compatible with all common image formats
4. Storage agnostic: Store images locally, or use OpenStack Object Storage, HTTP, or S3
1. VM image를 저장/가져오기2. REST기반 API
3. 대다수의 이미지 포맷들과 호환가능
4. 다양한 스토리지 방식 지원 - 로칼 스토리지 - Http, AWS S3, OpenStack Swift
11년 12월 5일 월요일
2011 Korea Community Day
nova-api
가상서버 생성 과정Client
Client가 “생성” 메세지를 HTTP를 통해 /servers/create로 보냄
API가 create_instance()를 호출, parameter조회, DB entry등록 한 후에 scheduler에게 인계 scheduler
RETURN
nova-api
scheduler가 instance가 위치할 compute node을 선정한 후에, 해당 node의 queue에 생성작업을 하도록 메세지를 넣는다.(API가 요청한 data를 return함)
compute
response to client
queue message>> rpc.cast method “run_instance”
network
compute (volume)
hypervisor/libvertCompute
RETURN
compute node가 network node가 새로운 instance를 위해 필요한 네트워크 리소스를 준비 (allocate_fixed_ip) 하도록 queue에 message를 넣는다.
compute node가 instance data를 받아서 DB 업데이트하고, block device를 준비함
hypervisor API
hypervisor API를 통해 VM spawning; 최종적으로 VM을 부팅함.
compute node가 volume노드를 호출하여 volume 생성 및 attach 진행
iptables를 통한 network filtering (firewall), 그리고 image creation.
queue message >> rpc.call
queue message
11년 12월 5일 월요일
2011 Korea Community Day
Network 구조 (Overview)
• Flat Mode모든 instance가 하나의 bridge에 연결되어 고정 IP를 부여받음.
• Flat DHCP ModeFlat Mode와 동일. Ethernet device (‘eth0’)이 bridge가 되며 Instance는 ‘dhcpdiscover’로 ‘dnsmasq로부 IP를 할당 받음
• VLAN DHCP mode자신의 instance를 public영역에 노출 시키지 않고, VPN을 통해 접근 가능. 프로젝트별로 VLAN과 bridge를 생성 (프로젝트는 private ip대역을 얻음)Instance는 해당 프로젝트가 할당받은 private ip중 하나를 받음.
11년 12월 5일 월요일
2011 Korea Community Day
Network 구조 (VLAN)
11년 12월 5일 월요일
2011 Korea Community Day
어떻게 생겼는지 알았으면이제 써봐야죠!
• OpenStack Nova Deployment
• OpenStack Nova 활용하기
11년 12월 5일 월요일
2011 Korea Community Day
Nova Deployment 단계
시스템 설계 리소스 파악, Nova 구성요소 배치, 네트워크 구성
INSTALLATION Nova 구성요소, Glance
CONFIGURATIONS nova.conf 생성, Path 설정, 네트워크 설정
실행 서비스 동작 확인, 이미지 생성, 가상머신 생성, Volume
서버 추가 Nova 구성요소 추가
11년 12월 5일 월요일
2011 Korea Community Day
Nova 설치1 Package를 이용한 설치
2 Script를 이용한 설치
3 Source Code를 이용한 설치 & Manual Configuration
# add-apt-repository ppa:nova-core/trunk # apt-get install nova-common nova-api nova-network nova-scheduler nova-compute
http://devstack.org/
# git clone git://github.com/cloudbuilders/devstack.git # cd devstack # ./stack.sh
http://wiki.openstack.or.kr
OpenStack 개발자들이 만든 스크립트, Nova 뿐 아니라 Glance, Keystone등의 설치를 한 번에 진행
★ 설치 결과: 커맨드라인에서 Nova 실행파일들을 실행할 수 있는 상태
# git clone https://github.com/openstack/nova.git # ./nova/contrib/nova.sh
11년 12월 5일 월요일
2011 Korea Community Day
Nova deployment on Virtual Environment
• 자동화된 deployment 및 Configuration은 효과적인 대규모 deployment를 위한 필수조건. 이는 CI (Continuous Integration)과 Testing을 위해서도 반드시 필요.
• 하지만, 클라우드 시스템을 위한 deployment나 integration test는 많은 서버리소스를 필요로 하며, 많은 dependency들이 존재함. ➜ 실제 적용 전 가상화 환경에서 구축하고 테스트 하는 방법이 필요
11년 12월 5일 월요일
2011 Korea Community Day
어떤 툴들이 사용되는가?
• VirtualBox는 가상화 소프트웨어 (www.virtualbox.org)
• Vagrants는 가상화된 개발/테스트 환경을 자동으로 구축할 수 있게 해주는 툴 (vagrantup.com)
• Chef은 인프라 구축 및 Configuration을 자동화 해주는 오픈소스 system integration framework (www.opscode.com)
11년 12월 5일 월요일
2011 Korea Community Day
Chef (Infrastructure as a Code)
11년 12월 5일 월요일
2011 Korea Community Day
Chef 구성• Chef Client는 타겟서버에서 작동.
• Client가 Chef Server와 연동.
• 설정하고자 하는 시스템을 Node라 하며,
• 각 Node는 룰(역할) 설정이 가능 (webserver, database, monitoring, etc)
• Chef은 Node상에 리소스들을 관리
• Resources는 타입, 이름, 파라메터를 가지며 Action을 취할 수 있음.
• Recipes 는 리소스들의 리스트.
• Cookbook은 Recipes, Files, Templates, Attributes, Metadata를 조합한 패키지.- 배포의 기본 단위이며, - community.opscode.com에서 많이 얻을 수 있음.
11년 12월 5일 월요일
2011 Korea Community Day
무엇을 해야 하나요?
• Install VirtualBox & Grab the nova code
• Install RubyGems & Vagrant
• Get the Chef Recipes
• Get the chef-solo Vagrant file참고: vagrant를 provisioning하기위해서 chef-solo, chef-server, chef, 혹은 puppet 사용이 가능하다. 여기서는 가장 simple한 chef-solo를 사용한다.
# curl -‐OL http://download.virtualbox.org/virtualbox/4.1.0/VirtualBox-‐4.1.0-‐73009-‐OSX.dmg# open VirtualBox-‐4.1.0-‐73009-‐OSX.dmg# cd ~# mkdir bzr# cd bzr# bzr init-‐repo .# bzr branch lp:nova trunk
CloudBuilder Ver.
11년 12월 5일 월요일
2011 Korea Community Day
Install RubyGems & VagrantMac OSX
# sudo gem update -‐-‐system# sudo gem install vagrant
1) Simple & Easy Built-in Install
2) via MacPorts> Install MacPorts (you need XCode Installed) - www.macports.org# sudo port install ruby rb-‐rubygems# sudo gem update -‐-‐system
# sudo gem install vagrant
Ubuntu# sudo gem install vagrant# sudo ln-‐s /var/lib/gems/1.8/bin/vagrant /usr/local/bin/vagrant
11년 12월 5일 월요일
2011 Korea Community Day
Get the Chef Cookbook# export COOKBOOKS=~/openstack-‐cookbooks # git clone https://github.com/cloudbuilders/openstack-‐cookbooks.git $COOKBOOKS
Setup Directories$ mkdir aptcache$ mkdir -‐p vagrant/dev$ cd vagrant/dev
Get chef-solo Vagrant file$ curl -‐o Vagrantfile https://raw.github.com/gist/786945/source.rb참고: vagrant를 provisioning하기위해서 chef-solo, chef-server, chef, 혹은 puppet 사용 이 가능하다.
CloudBuilder Ver.
11년 12월 5일 월요일
2011 Korea Community Day
Running Nova within a Vagrant instance
$ vagrant up
$ . /vagrant/novarc$ euca-‐add-‐keypair test > test.pem$ chmod 600 test.pem$ euca-‐run-‐instance -‐t m1.tiny -‐k test ami-‐tty
$ vagrant ssh
3-10 분 정도 소요
boot 되기를 기다린 후에,
$ ssh -‐i test.pem [email protected]가 OpenStack Nova상에서 생성되었고, Nova자체는 VirtualBox의 VM상에서 돌아가는 형태로 구성.
11년 12월 5일 월요일
2011 Korea Community Day
System 지우기$ vagrant destroy$ rm *.pem novarc
• VirtualBox & Vagrant & Chef 조합을 사용하여, 원하는 구조와 셋팅으로 시스템을 손쉽게 구축하고 없애는 것이 가능함으로써, Continuous Integration이나 System Testing에 유용하게 활용이 가능.
(참고) 현재 essex milestone-1 이 나온 이후로, 오류가 발생하고 있습니다. vagrant와 chef에 관심있으신 분들은 커뮤니티로 오셔서 같이 해결해보시죠. :)
11년 12월 5일 월요일
2011 Korea Community Day
Nova 활용하기
• WebUI
• Dashboard
• 한국커뮤니티 공개개발프로젝트 - NIPA의 공개SW커뮤니티 지원사업으로 개발- www.openstack.or.kr을 통한 소스 공개 및 커뮤니티 프로젝트화
11년 12월 5일 월요일
2011 Korea Community Day
What’s more!
11년 12월 5일 월요일
2011 Korea Community Day
What’s more!
monitoring - physical node- virtual resources- applications
automation - automated deployment- configuration management- continuous integration
networking - LB, Switch, firewall, 등- L2/L3 architecture- Service Interfaces
storage (file system) - storage architecture- file system
echo system- PaaS- Various Services- Applications- tools
datacenter- datacenter- server
11년 12월 5일 월요일
2011 Korea Community Day
What’s more!
11년 12월 5일 월요일
2011 Korea Community Day
What’s more!
11년 12월 5일 월요일
2011 Korea Community Day
What’s more!
monitoring - physical node- virtual resources- applications
automation - automated deployment- configuration management- continuous integration
networking - LB, Switch, firewall, 등- L2/L3 architecture- Service Interfaces
storage (file system) - storage architecture- file system
echo system- PaaS- Various Services- Applications- tools
datacenter- datacenter- server
11년 12월 5일 월요일
2011 Korea Community Day
What’s more!
monitoring - zabbix- collectd- nagios ...
automation - opscode chef- puppet- crowbar (from Dell) ...
networking - openVPN- vSwitch, HAProxy, ...- Open Flow ...
storage (file system) - ZFS, GlusterFS, ...
echo system- Apache Whirr, jclouds- Cloud Foundry- 다양한 어플리케이션...
datacenter- open compute
11년 12월 5일 월요일
2011 Korea Community Day
감사합니다.
11년 12월 5일 월요일