Neutron DVR and Ceph Integration
염 진 영(jyy@osci.kr)
2015.08.24
주식회사 오픈소스 컨설팅
Tel : 02-516-0711
e-mail : jyy@osci.kr
2
About Neutron DVR and CEPH
Neutron
DVR
3
구축 환경
물리 서버 : 6대(HP DL380 외)
OpenStack : Kilo
CEPH : Hammer
4
목차
1. Neutron
2. Neutron DVR
4. OpenStack with CEPH
3. CEPH
5
SDN (Software Defined Network)
출처 : http://2.bp.blogspot.com/-8uKSOcP-FDQ/T5ZhZpef-wI/AAAAAAAAAOE/lw-Pw0aMed4/s1600/FatTree.png
• 복잡, 유연한 네트워크 구축 한계
• 변경의 어려움
• 트래픽 증가 대처 어려움
• 새로운 서비스 적용 어려움
• 지속적인 유지보수비
• 클라우드 환경에 부적함
현재 Network architecture의 문제점
6
SDN (Software Defined Network)
<Software Defined Networks (SDN) Architecture>
SDN:
전통적인 통신장비의 하드웨어와 소프트웨어를
분리(decoupling)하여 소프트웨어로 구현된 네
트워크 기능을 범용의 클라우드 인프라 환경에
서 필요에 따라 동적으로 구성하고 운용함으로
써 소프트웨어 중심의 네트워크 인프라 실현
예) OpenFlow, OpenVSwitch
Control Plane : packet을 어떻게 컨트롤 할지에
대한 정보를 관리, Data Plane으로 전달
Data Plane : packet을 받아 control plane에 정
의된 rule에 따라 forwarding, drop
7
Neutron
OpenStack에서 복잡한 cloud 네트워크 환경을 구현하는 컴포넌트
SDN 기반으로 구현
OpenVSwitch, Linux Bridge, Linux Network Namespace, VxLAN, VLAN, GRE 등
기술 활용
멀티 테넌트 네트워크 지원
Load Balance, Firewall, VPN 기능 등 제공
다양한 plugin 제공
8
목차
1. Neutron
2. Neutron DVR
4. OpenStack with CEPH
3. CEPH
9
Legacy Neutron
Network node provides :
IP forwarding
– Inter-subnet (east-west) : VM간 통신
– Floating IP (north-south) : 외부 네트워크와 VM간 통신
– Default SNAT (north-south) : VM에서 외부 네트워크로의 통신
Metadata Agent
–Nova metadata service 접근
이슈 :
성능 저하
제한적인 확장성
SPOF(Single Point of Failure)
참고자료: http://www.slideshare.net/vivekkonnect/openstack-kilosummitdvrarchitecture20140506mastergroup?qid=74211292-5ccb-4c08-881b-
f76b7f06a8d3&v=default&b=&from_search=1
10
Neutron with DVR
Compute Node :
IP forwarding
– Inter-subnet (east-west) : VM간 통신
– Floating IP (north-south) : 외부 네트워크와 VM간 통신
Metadata Agent
–Nova metadata service 접근
장점 :
Floating IP 통신과 VM간의 east-west traffic 통신이 각 compute
node에서 직접 이루어지는 구조
네트워크 성능 향상
Fail 시, 대상 노드의 서비스만 영향
단점:
Default SNAT : 아직까지 네트워크 노드를 경유해야 하는
구조(SPOF)
Public IP를 Compute Node에 할당 필요
Packet control을 위한 Compute Node의 자원 이용
11
DVR Installation
[DEFAULT]
router_distributed=True
[DEFAULT]
agent_mode=dvr_snat
[agent]
enable_distributed_routing = True
[DEFAULT]
agent_mode=dvr
Legacy에 L3 agent와 Metadata agent를 compute node에 추가
DVR 적용을 위한 추가 설정
12
DVR Installation
# vi /etc/neutron/neutron.conf
router_distributed=True
# vi /etc/neutron/l3_agent.ini
agent_mode=dvr_snat
router_delete_namespaces=True
# vi /etc/neutron/plugin.ini
[ml2]
mechanism_drivers = openvswitch,l2population
[agent]
enable_distributed_routing = True
tunnel_types = vxlan
l2_population = True
Neutron Server
Network Node
# vi /etc/neutron/l3_agent.ini
agent_mode=dvr
router_delete_namespaces=True
# vi /etc/neutron/plugin.ini
[ml2]
mechanism_drivers = openvswitch,l2population
[agent]
enable_distributed_routing = True
tunnel_types = vxlan
l2_population = True
Compute Node
13
Packet Flow
14
용어 정리
참고자료출처 – OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
15
기본 네트워크 흐름
Network Node의 dhcp-agent에서 IP 할당
vm에서 나오는 모든 packet은 DVR namespace에 생성된 DVR default gateway port로 흐름
참고자료 – OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
16
기본 네트워크 흐름
Subnet : 88.0.10.0/24
Network Node의 dhcp-agent에서 IP 할당
vm에서 나오는 모든 packet은 DVR namespace에 생성된 DVR default gateway port로 흐름
참고자료출처 – OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
17
기본 네트워크 흐름
Subnet : 88.0.10.0/24
Network Node의 dhcp-agent에서 IP 할당
vm에서 나오는 모든 packet은 DVR namespace에 생성된 DVR default gateway port로 흐름
참고자료출처 – OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
18
기본 네트워크 흐름
Subnet : 88.0.10.0/24
Network Node의 dhcp-agent에서 IP 할당
vm에서 나오는 모든 packet은 DVR namespace에 생성된 DVR default gateway port로 흐름
[root@compute01 ~]# ip netns exec qrouter-2ba64fb9-9440-4f39-8e40-
649aed249055 ip a
qr-d3497e03-39: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
noqueue state UNKNOWN
link/ether fa:16:3e:9a:37:3b brd ff:ff:ff:ff:ff:ff
inet 88.0.10.1/24 brd 88.0.10.255 scope global qr-d3497e03-39
DVR default gateway port
참고자료출처 – OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
19
기본 네트워크 흐름
Subnet : 88.0.10.0/24
Network Node의 dhcp-agent에서 IP 할당
vm에서 나오는 모든 packet은 DVR namespace에 생성된 DVR default gateway port로 흐름
[root@compute01 ~]# ip netns exec qrouter-2ba64fb9-9440-4f39-8e40-
649aed249055 ip a
qr-d3497e03-39: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
noqueue state UNKNOWN
link/ether fa:16:3e:9a:37:3b brd ff:ff:ff:ff:ff:ff
inet 88.0.10.1/24 brd 88.0.10.255 scope global qr-d3497e03-39
DVR default gateway port
참고자료출처 – OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
20
기본 네트워크 흐름
Subnet : 88.0.10.0/24
Network Node의 dhcp-agent에서 IP 할당
vm에서 나오는 모든 packet은 DVR namespace에 생성된 DVR default gateway port로 흐름
[root@compute01 ~]# ip netns exec qrouter-2ba64fb9-9440-4f39-8e40-
649aed249055 ip a
qr-d3497e03-39: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
noqueue state UNKNOWN
link/ether fa:16:3e:9a:37:3b brd ff:ff:ff:ff:ff:ff
inet 88.0.10.1/24 brd 88.0.10.255 scope global qr-d3497e03-39
DVR default gateway port
DHCP IP : 88.0.10.4
참고자료출처 – OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
21
기본 네트워크 흐름
Subnet : 88.0.10.0/24
Network Node의 dhcp-agent에서 IP 할당
vm에서 나오는 모든 packet은 DVR namespace에 생성된 DVR default gateway port로 흐름
[root@compute01 ~]# ip netns exec qrouter-2ba64fb9-9440-4f39-8e40-
649aed249055 ip a
qr-d3497e03-39: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
noqueue state UNKNOWN
link/ether fa:16:3e:9a:37:3b brd ff:ff:ff:ff:ff:ff
inet 88.0.10.1/24 brd 88.0.10.255 scope global qr-d3497e03-39
DVR default gateway port
DHCP IP : 88.0.10.4
참고자료출처 – OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
22
SNAT : Compute node
[root@compute01 ~]# ip netns exec qrouter-cda7f413-2981-4eda-95fc-
79ee21964b64 ip a
24: qr-836e6efc-9e: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
qdisc noqueue state UNKNOWN
link/ether fa:16:3e:00:b0:5a brd ff:ff:ff:ff:ff:ff
inet 192.168.100.1/24 brd 192.168.100.255 scope global qr-836e6efc-9e
IP : 88.0.10.4
[root@compute01 ~]# ip netns exec qrouter-2ba64fb9-9440-4f39-8e40-
649aed249055 ip a
qr-d3497e03-39: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
noqueue state UNKNOWN
link/ether fa:16:3e:9a:37:3b brd ff:ff:ff:ff:ff:ff
inet 88.0.10.1/24 brd 88.0.10.255 scope global qr-d3497e03-39
DVR default gateway port
88.0.10.0/24 : Private Subnet
snat는 network node를 경유
VM에서 외부 네트워크가 목적지인 packet이 발생하면, DVR default gateway port로 전달
참고자료 출처– OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
23
SNAT : Compute node
[root@compute01 ~]# ip netns exec qrouter-cda7f413-2981-4eda-95fc-
79ee21964b64 ip a
24: qr-836e6efc-9e: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
qdisc noqueue state UNKNOWN
link/ether fa:16:3e:00:b0:5a brd ff:ff:ff:ff:ff:ff
inet 192.168.100.1/24 brd 192.168.100.255 scope global qr-836e6efc-9e
[root@compute01 ~]# ip netns exec qrouter-2ba64fb9-9440-4f39-8e40-649aed249055 ip rule ls
0: from all lookup local
32766: from all lookup main
32767: from all lookup default
1476397569: from 88.0.10.1/24 lookup 1476397569
[root@compute01 ~]# ip netns exec qrouter-2ba64fb9-9440-4f39-8e40-649aed249055 ip route show
table 1476397569
default via 88.0.10.12 dev qr-6c64a24e-19
88.0.10.0/24 : Private Subnet
Network node에 설정된 default public
gateway port
qrouter namespace에서 목적지 주소가 88.0.10.0/24 대역이 아니면, routing rule에 의해 Network Node에 있는 DVR default
gateway port(88.0.10.12)로 packet 전달
참고자료 출처– OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
24
SNAT : Network node
snat namespace의 DVR gateway port가 packet을 전달 받은 후, 목적지 주소가 외부이면 default public gateway port로
packet 전달
참고자료 출처– OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
25
SNAT : Network node
[root@network ~]# ip netns exec snat-2ba64fb9-9440-4f39-8e40-
649aed249055 ip a
26: sg-ff949255-82: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu
1500 qdisc noqueue state UNKNOWN
link/ether fa:16:3e:7b:a8:8c brd ff:ff:ff:ff:ff:ff
inet 88.0.10.12/24 brd 88.0.10.255 scope global sg-ff949255-82
27: qg-86abfb37-dd: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu
1500 qdisc noqueue state UNKNOWN
link/ether fa:16:3e:a8:e1:76 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.91/24 brd 192.168.0.255 scope global qg-86abfb37-dd
88.0.10.0/24 : Private Subnet
192.168.0.0/24 : Public Subnet
[root@network ~]# ip netns exec snat-2ba64fb9-9440-4f39-8e40-649aed249055 iptables -t nat –nL
target prot opt source destination
SNAT all -- 0.0.0.0/0 0.0.0.0/0 to:192.168.0.91
Network Node에 생성된 snat namespace의 DVR default gateway port(88.0.10.12)로 전달된 packet은 iptables SNAT rule에
의해 외부로 전달
[root@network ~]# ip netns exec snat-2ba64fb9-9440-4f39-8e40-649aed249055 ip route show default
default via 192.168.0.1 dev qg-86abfb37-dd
88.0.10.0/24 dev sg-ff949255-82 proto kernel scope link src 88.0.10.12
192.168.0.0/24 dev qg-86abfb37-dd proto kernel scope link src 192.168.0.91
참고자료 출처– OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
26
Floating IP
compute node에 DVR router namespace가 복제되어 생성되며, 이를 통해 network node를 거치지 않고 floating IP가 할당된
VM은 바로 외부 네트워크로 통신
IP : 88.0.10.4
DVR default gateway port
88.0.10.1/24
88.0.10.0/24 : Private Subnet
192.168.0.0/24 : Public Subnet
Floating IP : 192.168.0.92
DNAT : 88.0.10.4 -> 192.168.0.92
참고자료출처 – OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
27
Floating IP
[root@compute01 ~]# ip netns exec fip-6bfe731c-436f-4003-8052-
2144fd52cd49 ip a
2: fpr-2ba64fb9-9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
qdisc pfifo_fast state UP qlen 1000
link/ether b6:47:cc:09:4f:15 brd ff:ff:ff:ff:ff:ff
inet 169.254.31.29/31 scope global fpr-2ba64fb9-9
21: fg-c6ef4b33-29: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
qdisc noqueue state UNKNOWN
link/ether fa:16:3e:f3:f8:c0 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.93/24 brd 192.168.0.255 scope global fg-c6ef4b33-29
[root@compute01 ~]# ip netns exec qrouter-2ba64fb9-9440-4f39-8e40-
649aed249055 ip a
3: rfp-2ba64fb9-9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
pfifo_fast state UP qlen 1000
link/ether 8a:d4:74:fd:19:23 brd ff:ff:ff:ff:ff:ff
inet 169.254.31.28/31 scope global rfp-2ba64fb9-9
valid_lft forever preferred_lft forever
inet 192.168.0.92/32 brd 192.168.0.92 scope global rfp-2ba64fb9-9
19: qr-6c64a24e-19: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
noqueue state UNKNOWN
link/ether fa:16:3e:3c:f1:ce brd ff:ff:ff:ff:ff:ff
inet 88.0.10.1/24 brd 88.0.10.255 scope global qr-6c64a24e-19
[root@compute01 ~]# ip netns exec qrouter-2ba64fb9-9440-4f39-8e40-649aed249055 iptables -t nat -nL
Chain neutron-l3-agent-OUTPUT (1 references)
DNAT all -- 0.0.0.0/0 192.168.0.92 to:88.0.10.4
Chain neutron-l3-agent-PREROUTING (1 references)
DNAT all -- 0.0.0.0/0 192.168.0.92 to:88.0.10.4
88.0.10.0/24 : Private Subnet
192.168.0.0/24 : Public Subnet
VM의 packet이 DVR router로 전달되면, pair로 생성된 rfp로 전달, fip namespace의 fpr이 받아 fg를 통해 외부로 통신
compute node의 fip namespace의 fg port는 floating IP 중 하나를 fip namespace의 gateway port에 할당
28
Floating IP
[root@compute01 ~]# ip netns exec fip-6bfe731c-436f-4003-8052-
2144fd52cd49 ip a
2: fpr-2ba64fb9-9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
qdisc pfifo_fast state UP qlen 1000
link/ether b6:47:cc:09:4f:15 brd ff:ff:ff:ff:ff:ff
inet 169.254.31.29/31 scope global fpr-2ba64fb9-9
21: fg-c6ef4b33-29: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
qdisc noqueue state UNKNOWN
link/ether fa:16:3e:f3:f8:c0 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.93/24 brd 192.168.0.255 scope global fg-c6ef4b33-29
Proxy ARP : 192.168.0.92(VM floating IP)
[root@compute01 ~]# ip netns exec qrouter-2ba64fb9-9440-4f39-8e40-649aed249055 iptables -t nat -nL
Chain neutron-l3-agent-OUTPUT (1 references)
DNAT all -- 0.0.0.0/0 192.168.0.92 to:88.0.10.4
Chain neutron-l3-agent-PREROUTING (1 references)
DNAT all -- 0.0.0.0/0 192.168.0.92 to:88.0.10.4
88.0.10.0/24 : Private Subnet
192.168.0.0/24 : Public Subnet
반대의 경우 통신은 fg 가상 인터페이스가 VM에 mapping 된 공인 IP에 대한 arp 질의가 올 경우, Proxy ARP 기능을 이용하여
자신이 대상 packet을 받아 vm에 전달을 하게 됨.
DST : 192.168.0.92
참고자료출처 – OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
29
East west traffic
vm001(compute01 host) 와 vm003(compute02)은 dvr-router로 연결
compute01
compute01
compute02
30
East west traffic(Node 내의 통신)
Subnet이 서로 다르지만 Host가 같은 VM간의 통신
77.0.10.1/24 88.0.10.1/24
88.0.10.4/24 77.0.10.12/24
참고자료 출처– OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
31
East west traffic(Node 간의 통신)
Subnet이 서로 다르고 Host도 다른 VM간의 통신
compute01 -> compute02로 packet 전달
참고자료 출처– OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
32
East west traffic
99.0.10.1/24
DVR router는 pre-populated arp table 적용, vm003을 dst mac으로 설정
Compute node 간의 통신은 global DVR MAC address를 사용하여 통신
“neutron.conf”
dvr_base_mac = fa:16:3f:00:00:00
[neutrondb]> select * from dvr_host_macs;
+-----------+-------------------+
| host | mac_address |
+-----------+-------------------+
| network | fa:16:3f:89:8a:a1 |
| compute01 | fa:16:3f:c2:22:07 |
| compute02 | fa:16:3f:da:93:11 |
+-----------+-------------------+
77.0.10.1/24
77.0.10.12/24
77.0.10.1/2499.0.10.1/24
99.0.10.3/24
[root@compute01 ~]# ip netns exec qrouter-d70b623f-9287-40cf-80d2-7b0a9f1e46ad ip neighbor
99.0.10.3 dev qr-d3497e03-39 lladdr fa:16:3e:d5:77:f1 PERMANENT
77.0.10.12 dev qr-50565694-ea lladdr fa:16:3e:33:63:22 PERMANENT
참고자료 출처– OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
33
목차
1. Neutron
2. Neutron DVR
4. OpenStack with CEPH
3. CEPH
34
SDS (Software Defined Storage)
현재 Storage architecture의 문제점
변경의 어려움 / 데이터 증가 대처 어려움 / scale-up 형태의 한계 / 확장 / 지속적인 유지보수비
Software defined storage architecture
이미지: http://www.vmware.com/
SDS(Software Defined Storage) :
• 데이터의 양이 폭발적으로 증가를 하드웨어 기반 스
토리지를 압도
• 이에 대응하기 위해 스토리지 제공과 관리를 소프트
웨어를 이용하여 구현
• 예) GlusterFS, HDFS, CEPH
기대효과 :
• Scale-out 형태
• 민첩하고 유연하게 서비스를 제공
• 특정 스토리지 장비 제조사에 대한 종속(lock-in) 탈피
• 고가의 장비에 대한 투자비용 X
• 운용비용 절감
35
About CEPH
RADOS & CRUSH 참고 :
http://ceph.com/papers/weil-rados-pdsw07.pdf
object, block, file storage를 제공하는 신뢰성과 확장성을 가진 고성능 분산 스토리지 시스템
• 2007년 논문으로 시작,
2012년 ceph 서비스를 위해 Inktank라는 회사를
설립하였고, Red Hat이 2014년 4월 인수
• Ceph는 상용 하드웨어(commodity HW)를 가지고
확장 가능하며, 빠른 복구성과 replication이 기본
구성
• Ceph는 RADOS (Reliable Autonomic Distributed
Object Store)라는 Storage Clusters를
기반으로 구성
• CRUSH (Controlled Replication Under Scalable
Hashing) 알고리즘을 통해 RADOS 내에서 file
저장
36
About CEPH
• Monitor :
cluster map 관리
OSD 관리
data read & write 기능은 하지 않음
quorum을 위해 홀수 구성, 최소 3대 이상
• OSD Daemon
client에 data read & write 제공
data replication, recovery, re-balancing
자신과 다른 OSD의 health check
data를 Object 단위로 저장
• Data read & write :
Monitor에서 최신의 cluster map을 수신
CRUSH(cluster map + pool ID + file name) 를 이용하여 어떤
OSD에 read & write 할지 client에서 연산
37
목차
1. SDN의 필요성
2. Neutron DVR
4. OpenStack with CEPH
3. CEPH
38
CEPH 사례 : CERN(유럽 입자 물리 연구소)
2013년 1월, 시작(250TB - OpenStack Block, AFS/NFS)
3 petabyte
약 100TB의 ZFS를 기반으로 한 가상 NFS 운영
OpenStack Cinder 와 Glance 운영
약 3000 블록 디바이스, 1200 볼륨, 1800 이미지
2회 이슈 발생 – 모두 복구
Ceph를 이용하여 NetApp 등 대체
Software Tuning
SSD 사용
OSD journals(5~10배 IOPS 성능 향상)
Mon LevelDB - backfilling
39
Openstack and Ceph
Ceph BLOCK DEVICE(RBD)를 이용한 Cinder & Glance 연동
40
Ceph installation
KVM KVM
Openstack과 ceph 는 10.0.0.0/24로 분리
Cinder & Glance 와 Ceph 연동
41
Calamari on CentOS 7
42
Glance with Ceph
[root@compute01 ~]# rbd -m 10.0.0.108:6789,10.0.0.109:6789 --user glance --pool images ls
7aad1189-4276-4061-a4d3-504ad1717185
8083b202-b175-4a27-964e-c2cd48c367f6
Ceph의 images pool에 생성된 glance image 파일
43
Cinder with Ceph
[root@compute01 ~]# rbd -m 10.0.0.108:6789,10.0.0.109:6789 --user cinder --pool volumes ls
volume-4f0df88b-d955-4dfa-9575-cd834004835d
volume-54aa9734-a220-493b-a815-6f8ea5896dba
volume-940ce08f-3304-4794-9356-f0def9936617
volume-96d21ae5-35bc-4a7b-a665-8c9786177dae
Ceph의 volumes pool에 생성된 cinder volume 파일
44
Nova with CEPH
[root@compute01 ~]# virsh dumpxml instance-00000040
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<auth username='cinder'>
<secret type='ceph' uuid='f6768a42-c7b3-4060-99d2-9ae0eab43e87'/>
</auth>
<source protocol='rbd' name='volumes/volume-96d21ae5-35bc-4a7b-a665-8c9786177dae'>
<host name='10.0.0.108' port='6789'/>
<host name='10.0.0.109' port='6789'/>
</source>
<backingStore/>
<target dev='vda' bus='virtio'/>
<serial>96d21ae5-35bc-4a7b-a665-8c9786177dae</serial>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</disk>
[root@compute01 ~]# netstat -alpt | grep 'qemu-kvm'
tcp 0 0 compute01:51250 10.0.0.109:acnet ESTABLISHED 9726/qemu-kvm
tcp 0 0 compute01:41708 10.0.0.108:smc-https ESTABLISHED 10839/qemu-kvm
tcp 0 0 compute01:33084 10.0.0.108:6807 ESTABLISHED 9726/qemu-kvm
tcp 0 0 compute01:41694 10.0.0.108:smc-https ESTABLISHED 9726/qemu-kvm
tcp 0 0 compute01:41206 10.0.0.108:acnet ESTABLISHED 10839/qemu-kvm
tcp 0 0 compute01:41209 10.0.0.108:acnet ESTABLISHED 9726/qemu-kvm
tcp 0 0 compute01:43613 10.0.0.109:6805 ESTABLISHED 10839/qemu-kvm
tcp 0 0 compute01:51251 10.0.0.109:acnet ESTABLISHED 10839/qemu-kvm
tcp 0 0 compute01:43598 10.0.0.109:6805 ESTABLISHED 9726/qemu-kvm
tcp 0 0 compute01:33083 10.0.0.108:6807 ESTABLISHED 10839/qemu-kvm
KVM -> ceph block device
45
Openstack Integration with Ceph
작업 전 필요한 내용
# qemu-img | grep "Supported formats"
Supported formats: vvfat vpc vmdk vhdx vdi sheepdog rbd raw host_cdrom host_floppy host_device file qed qcow2 qcow parallels nbd iscsi
gluster dmg cloop bochs blkverify blkdebug
Cinder와 Glance에서 사용할 Ceph 계정과 pool 생성 및 ceph.conf에 keyring 추가
# ceph osd pool create volumes 64
# ceph osd pool create images 64
# ceph-authtool --create-keyring /etc/ceph/ceph.client.glance.keyring
# ceph-authtool --create-keyring /etc/ceph/ceph.client.cinder.keyring
# ceph-authtool -C /etc/ceph/ceph.client.glance.keyring -n client.glance --cap osd 'allow rwx pool=images’ --cap mon 'allow rwx' --cap
mds 'allow' --gen-key
# ceph-authtool -C /etc/ceph/ceph.client.cinder.keyring -n client.cinder --cap osd 'allow rwx pool=volumes' --cap mon 'allow rwx' --cap mds
'allow' --gen-key
# ceph auth add client.glance -i /etc/ceph/ceph.client.glance.keyring
# ceph auth add client.cinder -i /etc/ceph/ceph.client.cinder.keyring
# vi /etc/ceph/ceph.conf
--------------------------------------------------------
[client.glance]
keyring=/etc/ceph/ceph.client.glance.keyring
[client.cinder]
keyring = /etc/ceph/ceph.client.cinder.keyring
--------------------------------------------------------
Compute Node 가 CEPH Mon과 Osd node와 통신이 가능해야 함.
설치된 qemu-img가 “rbd”를 지원하는지 확인
46
Openstack Integration with Ceph
# uuidgen
f6768a42-c7b3-4060-99d2-9ae0eab43e87
# vi secret.xml
<secret ephemeral='no' private='no'>
<uuid>f6768a42-c7b3-4060-99d2-9ae0eab43e87</uuid>
<usage type='ceph'>
<name>client.cinder secret</name>
</usage>
</secret>
# virsh secret-define --file secret.xml
# virsh secret-list
[on ceph server]
# ceph auth get-key client.cinder | ssh ceph-mgmt tee /etc/ceph/cinder.keyring
# virsh secret-set-value --secret f6768a42-c7b3-4060-99d2-9ae0eab43e87 --base64 $(cat ~/cinder.keyring)
Libvirt에서 CEPH RBD 접근을 위한 설정
# scp ceph-mgmt:/etc/ceph/ceph.conf /etc/ceph/ # controller, compute node
# scp ceph-mgmt:/etc/ceph/ceph.client.cinder.keyring /etc/ceph/ # controller, compute node
# scp ceph-mgmt:/etc/ceph/ceph.client.glance.keyring /etc/ceph/ # controller node
# yum install python-rbd ceph-common librados2 librbd1
rbd사용을 위한 package 설치
Ceph conf 및 keyring 파일 복사
47
Openstack Integration with Ceph
# vi /etc/nova/nova.conf
[libvirt]
vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver
images_type=rbd
images_rbd_pool=volumes
images_rbd_ceph_conf=/etc/ceph/ceph.conf
use_virtio_for_bridges=true
rbd_user=cinder
rbd_secret_uuid=f6768a42-c7b3-4060-99d2-9ae0eab43e87
nova.conf 수정
# vi /etc/cinder/cinder.conf
rbd_pool=volumes
rbd_user=cinder
rbd_ceph_conf=/etc/ceph/ceph.conf
rbd_secret_uuid=f6768a42-c7b3-4060-99d2-9ae0eab43e87
volume_driver=cinder.volume.drivers.rbd.RBDDriver
cinder.conf 수정
# vi /etc/glance/glance-api.conf
[glance_store]
stores=glance.store.rbd.Store
default_store=rbd
rbd_store_ceph_conf=/etc/ceph/ceph.conf
rbd_store_user=glance
rbd_store_pool=images
glance.conf 수정
48
OPEN
SHARE
CONTRIBUTE
ADOPT
REUSE
49
용어정리
br-int(ovs integration bridge) : - Openvswitch 가상스위치
- VM, 가상라우터, br-tun을 연결
- 트래픽을 정의된 flow table에 따라 컨트롤
br-tun(ovs tunnel bridge) : - Openvswitch 가상스위치
- node와 node를 VxLAN을 이용하여 tunnel 연결
- 트래픽을 정의된 flow table에 따라 컨트롤
br-ex(ovs external bridge) : - Openvswitch 가상스위치
- 외부 네트워크와 연결
patch-port : ovs에 정의된 bridge들(br-int, br-tun, br-ex)을 서로 연결
Linux network namespace : 다른 network stack과 격리된 network stack 제공하기 위해 사용, routing table, iptables, arp
table로 트래픽 컨트롤
DVR namespace : virtual router가 생성되는 격리된 network 공간
snat namespace : snat를 위해 Public IP와 SANT rule이 생성되는 격리된 network 공간
fip namespace : Floating IP 통신을 위해 Public IP와 DNAT rule이 생성되는 격리된 network 공간
dhcp namespace : dhcp 데몬으로 IP 할당
qrouter-xxx : DVR namespace 안에 정의되는 virtual port로, Subnet gateway 역할
veth-pair : virtual patch-cable, 한 쌍을 이루는 가상 네트워크 인터페이스, namespace, linux bridge를 연결할 때 사용
pre-populated ARP : 각 namespace는 다양한 가상 네트워크에 대한 mac address를 미리 가지고 있음.
50
참고 URL
Slide 9 page: http://www.slideshare.net/vivekkonnect/openstack-
kilosummitdvrarchitecture20140506mastergroup?qid=74211292-5ccb-4c08-881b-
f76b7f06a8d3&v=default&b=&from_search=1
SDN Image: http://2.bp.blogspot.com/-8uKSOcP-FDQ/T5ZhZpef-wI/AAAAAAAAAOE/lw-Pw0aMed4/s1600/FatTree.png
http://aitpowersurge.co.uk
OpenStack Networking – Juno – DVR & L3 HA(심장훈님) : http://www.slideshare.net/janghoonsim/open-stack-networking-
juno-l3-ha-dvr
CERN: http://www.slideshare.net/noggin143/20140509-cern-openstacklinuxtagv3?qid=99472383-7ae8-42ec-86c7-
73d97338c8c7&v=qf1&b=&from_search=9

More Related Content

PDF
Scouter와 influx db – grafana 연동 가이드
PDF
[오픈소스컨설팅]레드햇계열리눅스7 운영자가이드 - 기초편
PDF
[오픈소스컨설팅] Red Hat ReaR (relax and-recover) Quick Guide
PDF
[오픈소스컨설팅]Docker on Cloud(Digital Ocean)
PDF
resource on openstack
PDF
[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0
PDF
Linux Performan tuning Part I
PDF
[오픈소스컨설팅]Nginx 1.2.7 설치가이드__v1
Scouter와 influx db – grafana 연동 가이드
[오픈소스컨설팅]레드햇계열리눅스7 운영자가이드 - 기초편
[오픈소스컨설팅] Red Hat ReaR (relax and-recover) Quick Guide
[오픈소스컨설팅]Docker on Cloud(Digital Ocean)
resource on openstack
[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0
Linux Performan tuning Part I
[오픈소스컨설팅]Nginx 1.2.7 설치가이드__v1

What's hot (20)

PDF
[오픈소스컨설팅]Docker on Kubernetes v1
PDF
[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3
PDF
[오픈소스컨설팅]파일럿진행예제 on AWS
PDF
Zinst 패키지 기반의-리눅스_중앙관리시스템_20140415
PDF
김성윤 - 우분투로 슈퍼컴 만들기 (2011Y03M26D)
PDF
[오픈소스컨설팅]유닉스의 리눅스 마이그레이션 전략_v3
PDF
[오픈소스컨설팅]Scouter 설치 및 사용가이드(JBoss)
PDF
Hyperledger fabric practice(pdf)
PDF
[234]멀티테넌트 하둡 클러스터 운영 경험기
PDF
[오픈소스컨설팅]Zabbix Installation and Configuration Guide
PDF
Glusterfs 소개 v1.0_난공불락세미나
PDF
[오픈소스컨설팅]초간단 Cubrid HA구성
PDF
Apache Tomcat ( 아파치 톰캣 ) 설치 가이드
PDF
오픈소스컨설팅 클러스터제안 V1.0
PDF
Lkda facebook seminar_140419
PDF
[오픈소스컨설팅]systemd on RHEL7
PPTX
Mininet
PDF
Kafka slideshare
PDF
Solaris messages v0.2
PDF
Osc4.x installation v1-upload
[오픈소스컨설팅]Docker on Kubernetes v1
[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3
[오픈소스컨설팅]파일럿진행예제 on AWS
Zinst 패키지 기반의-리눅스_중앙관리시스템_20140415
김성윤 - 우분투로 슈퍼컴 만들기 (2011Y03M26D)
[오픈소스컨설팅]유닉스의 리눅스 마이그레이션 전략_v3
[오픈소스컨설팅]Scouter 설치 및 사용가이드(JBoss)
Hyperledger fabric practice(pdf)
[234]멀티테넌트 하둡 클러스터 운영 경험기
[오픈소스컨설팅]Zabbix Installation and Configuration Guide
Glusterfs 소개 v1.0_난공불락세미나
[오픈소스컨설팅]초간단 Cubrid HA구성
Apache Tomcat ( 아파치 톰캣 ) 설치 가이드
오픈소스컨설팅 클러스터제안 V1.0
Lkda facebook seminar_140419
[오픈소스컨설팅]systemd on RHEL7
Mininet
Kafka slideshare
Solaris messages v0.2
Osc4.x installation v1-upload
Ad

Similar to [오픈소스컨설팅] Open stack kilo with DVR_CEPH_v1.1 (20)

PDF
150416 OpenStack Networking with Neutron Jieun, Kim
PDF
[242]open stack neutron dataplane 구현
PDF
20150818 jun lee_openstack juno release 내용 분석
PDF
20150511 jun lee_openstack neutron 분석 (최종)
PDF
오픈스택 멀티노드 설치 후기
PDF
Dragon flow and tricircle
PPTX
OpenStack Networking
PDF
Build the OpenStack Cloud with Neutron Networing, IceHouse
PDF
[2018] 오픈스택 5년 운영의 경험
PDF
Cloud-Barista 제5차 오픈 컨퍼런스 : 멀티클라우드 가상 네트워크 (CB-Larva)
PDF
20150818 jun lee_openstack kilo release 내용 분석
PDF
Amazon Virtual Private Cloud 겉핥기
PDF
오픈스택: 구석구석 파헤쳐보기
PDF
Private cloud network architecture (2018)
PDF
[OpenStack Days Korea 2016] Track2 - How to speed up OpenStack network with P...
PDF
[OpenStack Days Korea 2016] Track3 - VDI on OpenStack with LeoStream Connecti...
PPTX
클라우드 환경을 위한 네트워크 가상화와 NSX(기초편)
PDF
OpenStack 인스턴스 간략 사용자_매뉴얼(liberty)_v1
PDF
오픈 소스 클라우드 플랫폼 분석
PDF
Red Hat OpenStack 17 저자직강+스터디그룹_2주차
150416 OpenStack Networking with Neutron Jieun, Kim
[242]open stack neutron dataplane 구현
20150818 jun lee_openstack juno release 내용 분석
20150511 jun lee_openstack neutron 분석 (최종)
오픈스택 멀티노드 설치 후기
Dragon flow and tricircle
OpenStack Networking
Build the OpenStack Cloud with Neutron Networing, IceHouse
[2018] 오픈스택 5년 운영의 경험
Cloud-Barista 제5차 오픈 컨퍼런스 : 멀티클라우드 가상 네트워크 (CB-Larva)
20150818 jun lee_openstack kilo release 내용 분석
Amazon Virtual Private Cloud 겉핥기
오픈스택: 구석구석 파헤쳐보기
Private cloud network architecture (2018)
[OpenStack Days Korea 2016] Track2 - How to speed up OpenStack network with P...
[OpenStack Days Korea 2016] Track3 - VDI on OpenStack with LeoStream Connecti...
클라우드 환경을 위한 네트워크 가상화와 NSX(기초편)
OpenStack 인스턴스 간략 사용자_매뉴얼(liberty)_v1
오픈 소스 클라우드 플랫폼 분석
Red Hat OpenStack 17 저자직강+스터디그룹_2주차
Ad

More from Ji-Woong Choi (20)

PDF
[오픈소스컨설팅] 오픈소스 기반 솔루션 방향성 잡기
PDF
[오픈소스컨설팅] 스카우터 사용자 가이드 2020
PDF
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
PDF
[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기
PDF
[오픈소스컨설팅] Ansible을 활용한 운영 자동화 교육
PDF
[오픈소스컨설팅] 2019년 클라우드 생존전략
PDF
[오픈소스컨설팅] AWS re:Invent 2018 기계학습(ML)부분 후기
PDF
[오픈소스컨설팅]Docker기초 실습 교육 20181113_v3
PDF
[오픈소스컨설팅]ELK기반 장애예방시스템_구성_2016.12
PDF
[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트
PDF
[오픈소스컨설팅]클라우드기반U2L마이그레이션 전략 및 고려사항
PDF
OpenStack Summit 2017 참석후기
PDF
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
PDF
Docker Setting for Static IP allocation
PDF
[오픈소스컨설팅]Atlassian JIRA Quick Guide
PDF
클라우드 컴퓨팅 기반 기술과 오픈스택(Kvm) 기반 Provisioning
PDF
[오픈소스컨설팅 뉴스레터] 2016년 1분기
PDF
[오픈소스컨설팅] RPM 만들기
PDF
[오픈소스컨설팅]Atlassian JIRA Deep Dive
PDF
[오픈소스컨설팅]오픈스택에 대하여
[오픈소스컨설팅] 오픈소스 기반 솔루션 방향성 잡기
[오픈소스컨설팅] 스카우터 사용자 가이드 2020
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기
[오픈소스컨설팅] Ansible을 활용한 운영 자동화 교육
[오픈소스컨설팅] 2019년 클라우드 생존전략
[오픈소스컨설팅] AWS re:Invent 2018 기계학습(ML)부분 후기
[오픈소스컨설팅]Docker기초 실습 교육 20181113_v3
[오픈소스컨설팅]ELK기반 장애예방시스템_구성_2016.12
[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트
[오픈소스컨설팅]클라우드기반U2L마이그레이션 전략 및 고려사항
OpenStack Summit 2017 참석후기
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
Docker Setting for Static IP allocation
[오픈소스컨설팅]Atlassian JIRA Quick Guide
클라우드 컴퓨팅 기반 기술과 오픈스택(Kvm) 기반 Provisioning
[오픈소스컨설팅 뉴스레터] 2016년 1분기
[오픈소스컨설팅] RPM 만들기
[오픈소스컨설팅]Atlassian JIRA Deep Dive
[오픈소스컨설팅]오픈스택에 대하여

[오픈소스컨설팅] Open stack kilo with DVR_CEPH_v1.1

  • 1. Neutron DVR and Ceph Integration 염 진 영([email protected]) 2015.08.24 주식회사 오픈소스 컨설팅 Tel : 02-516-0711 e-mail : [email protected]
  • 2. 2 About Neutron DVR and CEPH Neutron DVR
  • 3. 3 구축 환경 물리 서버 : 6대(HP DL380 외) OpenStack : Kilo CEPH : Hammer
  • 4. 4 목차 1. Neutron 2. Neutron DVR 4. OpenStack with CEPH 3. CEPH
  • 5. 5 SDN (Software Defined Network) 출처 : http://2.bp.blogspot.com/-8uKSOcP-FDQ/T5ZhZpef-wI/AAAAAAAAAOE/lw-Pw0aMed4/s1600/FatTree.png • 복잡, 유연한 네트워크 구축 한계 • 변경의 어려움 • 트래픽 증가 대처 어려움 • 새로운 서비스 적용 어려움 • 지속적인 유지보수비 • 클라우드 환경에 부적함 현재 Network architecture의 문제점
  • 6. 6 SDN (Software Defined Network) <Software Defined Networks (SDN) Architecture> SDN: 전통적인 통신장비의 하드웨어와 소프트웨어를 분리(decoupling)하여 소프트웨어로 구현된 네 트워크 기능을 범용의 클라우드 인프라 환경에 서 필요에 따라 동적으로 구성하고 운용함으로 써 소프트웨어 중심의 네트워크 인프라 실현 예) OpenFlow, OpenVSwitch Control Plane : packet을 어떻게 컨트롤 할지에 대한 정보를 관리, Data Plane으로 전달 Data Plane : packet을 받아 control plane에 정 의된 rule에 따라 forwarding, drop
  • 7. 7 Neutron OpenStack에서 복잡한 cloud 네트워크 환경을 구현하는 컴포넌트 SDN 기반으로 구현 OpenVSwitch, Linux Bridge, Linux Network Namespace, VxLAN, VLAN, GRE 등 기술 활용 멀티 테넌트 네트워크 지원 Load Balance, Firewall, VPN 기능 등 제공 다양한 plugin 제공
  • 8. 8 목차 1. Neutron 2. Neutron DVR 4. OpenStack with CEPH 3. CEPH
  • 9. 9 Legacy Neutron Network node provides : IP forwarding – Inter-subnet (east-west) : VM간 통신 – Floating IP (north-south) : 외부 네트워크와 VM간 통신 – Default SNAT (north-south) : VM에서 외부 네트워크로의 통신 Metadata Agent –Nova metadata service 접근 이슈 : 성능 저하 제한적인 확장성 SPOF(Single Point of Failure) 참고자료: http://www.slideshare.net/vivekkonnect/openstack-kilosummitdvrarchitecture20140506mastergroup?qid=74211292-5ccb-4c08-881b- f76b7f06a8d3&v=default&b=&from_search=1
  • 10. 10 Neutron with DVR Compute Node : IP forwarding – Inter-subnet (east-west) : VM간 통신 – Floating IP (north-south) : 외부 네트워크와 VM간 통신 Metadata Agent –Nova metadata service 접근 장점 : Floating IP 통신과 VM간의 east-west traffic 통신이 각 compute node에서 직접 이루어지는 구조 네트워크 성능 향상 Fail 시, 대상 노드의 서비스만 영향 단점: Default SNAT : 아직까지 네트워크 노드를 경유해야 하는 구조(SPOF) Public IP를 Compute Node에 할당 필요 Packet control을 위한 Compute Node의 자원 이용
  • 11. 11 DVR Installation [DEFAULT] router_distributed=True [DEFAULT] agent_mode=dvr_snat [agent] enable_distributed_routing = True [DEFAULT] agent_mode=dvr Legacy에 L3 agent와 Metadata agent를 compute node에 추가 DVR 적용을 위한 추가 설정
  • 12. 12 DVR Installation # vi /etc/neutron/neutron.conf router_distributed=True # vi /etc/neutron/l3_agent.ini agent_mode=dvr_snat router_delete_namespaces=True # vi /etc/neutron/plugin.ini [ml2] mechanism_drivers = openvswitch,l2population [agent] enable_distributed_routing = True tunnel_types = vxlan l2_population = True Neutron Server Network Node # vi /etc/neutron/l3_agent.ini agent_mode=dvr router_delete_namespaces=True # vi /etc/neutron/plugin.ini [ml2] mechanism_drivers = openvswitch,l2population [agent] enable_distributed_routing = True tunnel_types = vxlan l2_population = True Compute Node
  • 14. 14 용어 정리 참고자료출처 – OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
  • 15. 15 기본 네트워크 흐름 Network Node의 dhcp-agent에서 IP 할당 vm에서 나오는 모든 packet은 DVR namespace에 생성된 DVR default gateway port로 흐름 참고자료 – OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
  • 16. 16 기본 네트워크 흐름 Subnet : 88.0.10.0/24 Network Node의 dhcp-agent에서 IP 할당 vm에서 나오는 모든 packet은 DVR namespace에 생성된 DVR default gateway port로 흐름 참고자료출처 – OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
  • 17. 17 기본 네트워크 흐름 Subnet : 88.0.10.0/24 Network Node의 dhcp-agent에서 IP 할당 vm에서 나오는 모든 packet은 DVR namespace에 생성된 DVR default gateway port로 흐름 참고자료출처 – OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
  • 18. 18 기본 네트워크 흐름 Subnet : 88.0.10.0/24 Network Node의 dhcp-agent에서 IP 할당 vm에서 나오는 모든 packet은 DVR namespace에 생성된 DVR default gateway port로 흐름 [root@compute01 ~]# ip netns exec qrouter-2ba64fb9-9440-4f39-8e40- 649aed249055 ip a qr-d3497e03-39: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN link/ether fa:16:3e:9a:37:3b brd ff:ff:ff:ff:ff:ff inet 88.0.10.1/24 brd 88.0.10.255 scope global qr-d3497e03-39 DVR default gateway port 참고자료출처 – OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
  • 19. 19 기본 네트워크 흐름 Subnet : 88.0.10.0/24 Network Node의 dhcp-agent에서 IP 할당 vm에서 나오는 모든 packet은 DVR namespace에 생성된 DVR default gateway port로 흐름 [root@compute01 ~]# ip netns exec qrouter-2ba64fb9-9440-4f39-8e40- 649aed249055 ip a qr-d3497e03-39: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN link/ether fa:16:3e:9a:37:3b brd ff:ff:ff:ff:ff:ff inet 88.0.10.1/24 brd 88.0.10.255 scope global qr-d3497e03-39 DVR default gateway port 참고자료출처 – OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
  • 20. 20 기본 네트워크 흐름 Subnet : 88.0.10.0/24 Network Node의 dhcp-agent에서 IP 할당 vm에서 나오는 모든 packet은 DVR namespace에 생성된 DVR default gateway port로 흐름 [root@compute01 ~]# ip netns exec qrouter-2ba64fb9-9440-4f39-8e40- 649aed249055 ip a qr-d3497e03-39: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN link/ether fa:16:3e:9a:37:3b brd ff:ff:ff:ff:ff:ff inet 88.0.10.1/24 brd 88.0.10.255 scope global qr-d3497e03-39 DVR default gateway port DHCP IP : 88.0.10.4 참고자료출처 – OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
  • 21. 21 기본 네트워크 흐름 Subnet : 88.0.10.0/24 Network Node의 dhcp-agent에서 IP 할당 vm에서 나오는 모든 packet은 DVR namespace에 생성된 DVR default gateway port로 흐름 [root@compute01 ~]# ip netns exec qrouter-2ba64fb9-9440-4f39-8e40- 649aed249055 ip a qr-d3497e03-39: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN link/ether fa:16:3e:9a:37:3b brd ff:ff:ff:ff:ff:ff inet 88.0.10.1/24 brd 88.0.10.255 scope global qr-d3497e03-39 DVR default gateway port DHCP IP : 88.0.10.4 참고자료출처 – OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
  • 22. 22 SNAT : Compute node [root@compute01 ~]# ip netns exec qrouter-cda7f413-2981-4eda-95fc- 79ee21964b64 ip a 24: qr-836e6efc-9e: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN link/ether fa:16:3e:00:b0:5a brd ff:ff:ff:ff:ff:ff inet 192.168.100.1/24 brd 192.168.100.255 scope global qr-836e6efc-9e IP : 88.0.10.4 [root@compute01 ~]# ip netns exec qrouter-2ba64fb9-9440-4f39-8e40- 649aed249055 ip a qr-d3497e03-39: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN link/ether fa:16:3e:9a:37:3b brd ff:ff:ff:ff:ff:ff inet 88.0.10.1/24 brd 88.0.10.255 scope global qr-d3497e03-39 DVR default gateway port 88.0.10.0/24 : Private Subnet snat는 network node를 경유 VM에서 외부 네트워크가 목적지인 packet이 발생하면, DVR default gateway port로 전달 참고자료 출처– OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
  • 23. 23 SNAT : Compute node [root@compute01 ~]# ip netns exec qrouter-cda7f413-2981-4eda-95fc- 79ee21964b64 ip a 24: qr-836e6efc-9e: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN link/ether fa:16:3e:00:b0:5a brd ff:ff:ff:ff:ff:ff inet 192.168.100.1/24 brd 192.168.100.255 scope global qr-836e6efc-9e [root@compute01 ~]# ip netns exec qrouter-2ba64fb9-9440-4f39-8e40-649aed249055 ip rule ls 0: from all lookup local 32766: from all lookup main 32767: from all lookup default 1476397569: from 88.0.10.1/24 lookup 1476397569 [root@compute01 ~]# ip netns exec qrouter-2ba64fb9-9440-4f39-8e40-649aed249055 ip route show table 1476397569 default via 88.0.10.12 dev qr-6c64a24e-19 88.0.10.0/24 : Private Subnet Network node에 설정된 default public gateway port qrouter namespace에서 목적지 주소가 88.0.10.0/24 대역이 아니면, routing rule에 의해 Network Node에 있는 DVR default gateway port(88.0.10.12)로 packet 전달 참고자료 출처– OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
  • 24. 24 SNAT : Network node snat namespace의 DVR gateway port가 packet을 전달 받은 후, 목적지 주소가 외부이면 default public gateway port로 packet 전달 참고자료 출처– OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
  • 25. 25 SNAT : Network node [root@network ~]# ip netns exec snat-2ba64fb9-9440-4f39-8e40- 649aed249055 ip a 26: sg-ff949255-82: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN link/ether fa:16:3e:7b:a8:8c brd ff:ff:ff:ff:ff:ff inet 88.0.10.12/24 brd 88.0.10.255 scope global sg-ff949255-82 27: qg-86abfb37-dd: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN link/ether fa:16:3e:a8:e1:76 brd ff:ff:ff:ff:ff:ff inet 192.168.0.91/24 brd 192.168.0.255 scope global qg-86abfb37-dd 88.0.10.0/24 : Private Subnet 192.168.0.0/24 : Public Subnet [root@network ~]# ip netns exec snat-2ba64fb9-9440-4f39-8e40-649aed249055 iptables -t nat –nL target prot opt source destination SNAT all -- 0.0.0.0/0 0.0.0.0/0 to:192.168.0.91 Network Node에 생성된 snat namespace의 DVR default gateway port(88.0.10.12)로 전달된 packet은 iptables SNAT rule에 의해 외부로 전달 [root@network ~]# ip netns exec snat-2ba64fb9-9440-4f39-8e40-649aed249055 ip route show default default via 192.168.0.1 dev qg-86abfb37-dd 88.0.10.0/24 dev sg-ff949255-82 proto kernel scope link src 88.0.10.12 192.168.0.0/24 dev qg-86abfb37-dd proto kernel scope link src 192.168.0.91 참고자료 출처– OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
  • 26. 26 Floating IP compute node에 DVR router namespace가 복제되어 생성되며, 이를 통해 network node를 거치지 않고 floating IP가 할당된 VM은 바로 외부 네트워크로 통신 IP : 88.0.10.4 DVR default gateway port 88.0.10.1/24 88.0.10.0/24 : Private Subnet 192.168.0.0/24 : Public Subnet Floating IP : 192.168.0.92 DNAT : 88.0.10.4 -> 192.168.0.92 참고자료출처 – OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
  • 27. 27 Floating IP [root@compute01 ~]# ip netns exec fip-6bfe731c-436f-4003-8052- 2144fd52cd49 ip a 2: fpr-2ba64fb9-9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether b6:47:cc:09:4f:15 brd ff:ff:ff:ff:ff:ff inet 169.254.31.29/31 scope global fpr-2ba64fb9-9 21: fg-c6ef4b33-29: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN link/ether fa:16:3e:f3:f8:c0 brd ff:ff:ff:ff:ff:ff inet 192.168.0.93/24 brd 192.168.0.255 scope global fg-c6ef4b33-29 [root@compute01 ~]# ip netns exec qrouter-2ba64fb9-9440-4f39-8e40- 649aed249055 ip a 3: rfp-2ba64fb9-9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 8a:d4:74:fd:19:23 brd ff:ff:ff:ff:ff:ff inet 169.254.31.28/31 scope global rfp-2ba64fb9-9 valid_lft forever preferred_lft forever inet 192.168.0.92/32 brd 192.168.0.92 scope global rfp-2ba64fb9-9 19: qr-6c64a24e-19: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN link/ether fa:16:3e:3c:f1:ce brd ff:ff:ff:ff:ff:ff inet 88.0.10.1/24 brd 88.0.10.255 scope global qr-6c64a24e-19 [root@compute01 ~]# ip netns exec qrouter-2ba64fb9-9440-4f39-8e40-649aed249055 iptables -t nat -nL Chain neutron-l3-agent-OUTPUT (1 references) DNAT all -- 0.0.0.0/0 192.168.0.92 to:88.0.10.4 Chain neutron-l3-agent-PREROUTING (1 references) DNAT all -- 0.0.0.0/0 192.168.0.92 to:88.0.10.4 88.0.10.0/24 : Private Subnet 192.168.0.0/24 : Public Subnet VM의 packet이 DVR router로 전달되면, pair로 생성된 rfp로 전달, fip namespace의 fpr이 받아 fg를 통해 외부로 통신 compute node의 fip namespace의 fg port는 floating IP 중 하나를 fip namespace의 gateway port에 할당
  • 28. 28 Floating IP [root@compute01 ~]# ip netns exec fip-6bfe731c-436f-4003-8052- 2144fd52cd49 ip a 2: fpr-2ba64fb9-9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether b6:47:cc:09:4f:15 brd ff:ff:ff:ff:ff:ff inet 169.254.31.29/31 scope global fpr-2ba64fb9-9 21: fg-c6ef4b33-29: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN link/ether fa:16:3e:f3:f8:c0 brd ff:ff:ff:ff:ff:ff inet 192.168.0.93/24 brd 192.168.0.255 scope global fg-c6ef4b33-29 Proxy ARP : 192.168.0.92(VM floating IP) [root@compute01 ~]# ip netns exec qrouter-2ba64fb9-9440-4f39-8e40-649aed249055 iptables -t nat -nL Chain neutron-l3-agent-OUTPUT (1 references) DNAT all -- 0.0.0.0/0 192.168.0.92 to:88.0.10.4 Chain neutron-l3-agent-PREROUTING (1 references) DNAT all -- 0.0.0.0/0 192.168.0.92 to:88.0.10.4 88.0.10.0/24 : Private Subnet 192.168.0.0/24 : Public Subnet 반대의 경우 통신은 fg 가상 인터페이스가 VM에 mapping 된 공인 IP에 대한 arp 질의가 올 경우, Proxy ARP 기능을 이용하여 자신이 대상 packet을 받아 vm에 전달을 하게 됨. DST : 192.168.0.92 참고자료출처 – OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
  • 29. 29 East west traffic vm001(compute01 host) 와 vm003(compute02)은 dvr-router로 연결 compute01 compute01 compute02
  • 30. 30 East west traffic(Node 내의 통신) Subnet이 서로 다르지만 Host가 같은 VM간의 통신 77.0.10.1/24 88.0.10.1/24 88.0.10.4/24 77.0.10.12/24 참고자료 출처– OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
  • 31. 31 East west traffic(Node 간의 통신) Subnet이 서로 다르고 Host도 다른 VM간의 통신 compute01 -> compute02로 packet 전달 참고자료 출처– OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
  • 32. 32 East west traffic 99.0.10.1/24 DVR router는 pre-populated arp table 적용, vm003을 dst mac으로 설정 Compute node 간의 통신은 global DVR MAC address를 사용하여 통신 “neutron.conf” dvr_base_mac = fa:16:3f:00:00:00 [neutrondb]> select * from dvr_host_macs; +-----------+-------------------+ | host | mac_address | +-----------+-------------------+ | network | fa:16:3f:89:8a:a1 | | compute01 | fa:16:3f:c2:22:07 | | compute02 | fa:16:3f:da:93:11 | +-----------+-------------------+ 77.0.10.1/24 77.0.10.12/24 77.0.10.1/2499.0.10.1/24 99.0.10.3/24 [root@compute01 ~]# ip netns exec qrouter-d70b623f-9287-40cf-80d2-7b0a9f1e46ad ip neighbor 99.0.10.3 dev qr-d3497e03-39 lladdr fa:16:3e:d5:77:f1 PERMANENT 77.0.10.12 dev qr-50565694-ea lladdr fa:16:3e:33:63:22 PERMANENT 참고자료 출처– OpenStack Networking – Juno – DVR & L3 HA: http://www.slideshare.net/janghoonsim/open-stack-networking-juno-l3-ha-dvr
  • 33. 33 목차 1. Neutron 2. Neutron DVR 4. OpenStack with CEPH 3. CEPH
  • 34. 34 SDS (Software Defined Storage) 현재 Storage architecture의 문제점 변경의 어려움 / 데이터 증가 대처 어려움 / scale-up 형태의 한계 / 확장 / 지속적인 유지보수비 Software defined storage architecture 이미지: http://www.vmware.com/ SDS(Software Defined Storage) : • 데이터의 양이 폭발적으로 증가를 하드웨어 기반 스 토리지를 압도 • 이에 대응하기 위해 스토리지 제공과 관리를 소프트 웨어를 이용하여 구현 • 예) GlusterFS, HDFS, CEPH 기대효과 : • Scale-out 형태 • 민첩하고 유연하게 서비스를 제공 • 특정 스토리지 장비 제조사에 대한 종속(lock-in) 탈피 • 고가의 장비에 대한 투자비용 X • 운용비용 절감
  • 35. 35 About CEPH RADOS & CRUSH 참고 : http://ceph.com/papers/weil-rados-pdsw07.pdf object, block, file storage를 제공하는 신뢰성과 확장성을 가진 고성능 분산 스토리지 시스템 • 2007년 논문으로 시작, 2012년 ceph 서비스를 위해 Inktank라는 회사를 설립하였고, Red Hat이 2014년 4월 인수 • Ceph는 상용 하드웨어(commodity HW)를 가지고 확장 가능하며, 빠른 복구성과 replication이 기본 구성 • Ceph는 RADOS (Reliable Autonomic Distributed Object Store)라는 Storage Clusters를 기반으로 구성 • CRUSH (Controlled Replication Under Scalable Hashing) 알고리즘을 통해 RADOS 내에서 file 저장
  • 36. 36 About CEPH • Monitor : cluster map 관리 OSD 관리 data read & write 기능은 하지 않음 quorum을 위해 홀수 구성, 최소 3대 이상 • OSD Daemon client에 data read & write 제공 data replication, recovery, re-balancing 자신과 다른 OSD의 health check data를 Object 단위로 저장 • Data read & write : Monitor에서 최신의 cluster map을 수신 CRUSH(cluster map + pool ID + file name) 를 이용하여 어떤 OSD에 read & write 할지 client에서 연산
  • 37. 37 목차 1. SDN의 필요성 2. Neutron DVR 4. OpenStack with CEPH 3. CEPH
  • 38. 38 CEPH 사례 : CERN(유럽 입자 물리 연구소) 2013년 1월, 시작(250TB - OpenStack Block, AFS/NFS) 3 petabyte 약 100TB의 ZFS를 기반으로 한 가상 NFS 운영 OpenStack Cinder 와 Glance 운영 약 3000 블록 디바이스, 1200 볼륨, 1800 이미지 2회 이슈 발생 – 모두 복구 Ceph를 이용하여 NetApp 등 대체 Software Tuning SSD 사용 OSD journals(5~10배 IOPS 성능 향상) Mon LevelDB - backfilling
  • 39. 39 Openstack and Ceph Ceph BLOCK DEVICE(RBD)를 이용한 Cinder & Glance 연동
  • 40. 40 Ceph installation KVM KVM Openstack과 ceph 는 10.0.0.0/24로 분리 Cinder & Glance 와 Ceph 연동
  • 42. 42 Glance with Ceph [root@compute01 ~]# rbd -m 10.0.0.108:6789,10.0.0.109:6789 --user glance --pool images ls 7aad1189-4276-4061-a4d3-504ad1717185 8083b202-b175-4a27-964e-c2cd48c367f6 Ceph의 images pool에 생성된 glance image 파일
  • 43. 43 Cinder with Ceph [root@compute01 ~]# rbd -m 10.0.0.108:6789,10.0.0.109:6789 --user cinder --pool volumes ls volume-4f0df88b-d955-4dfa-9575-cd834004835d volume-54aa9734-a220-493b-a815-6f8ea5896dba volume-940ce08f-3304-4794-9356-f0def9936617 volume-96d21ae5-35bc-4a7b-a665-8c9786177dae Ceph의 volumes pool에 생성된 cinder volume 파일
  • 44. 44 Nova with CEPH [root@compute01 ~]# virsh dumpxml instance-00000040 <disk type='network' device='disk'> <driver name='qemu' type='raw' cache='none'/> <auth username='cinder'> <secret type='ceph' uuid='f6768a42-c7b3-4060-99d2-9ae0eab43e87'/> </auth> <source protocol='rbd' name='volumes/volume-96d21ae5-35bc-4a7b-a665-8c9786177dae'> <host name='10.0.0.108' port='6789'/> <host name='10.0.0.109' port='6789'/> </source> <backingStore/> <target dev='vda' bus='virtio'/> <serial>96d21ae5-35bc-4a7b-a665-8c9786177dae</serial> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </disk> [root@compute01 ~]# netstat -alpt | grep 'qemu-kvm' tcp 0 0 compute01:51250 10.0.0.109:acnet ESTABLISHED 9726/qemu-kvm tcp 0 0 compute01:41708 10.0.0.108:smc-https ESTABLISHED 10839/qemu-kvm tcp 0 0 compute01:33084 10.0.0.108:6807 ESTABLISHED 9726/qemu-kvm tcp 0 0 compute01:41694 10.0.0.108:smc-https ESTABLISHED 9726/qemu-kvm tcp 0 0 compute01:41206 10.0.0.108:acnet ESTABLISHED 10839/qemu-kvm tcp 0 0 compute01:41209 10.0.0.108:acnet ESTABLISHED 9726/qemu-kvm tcp 0 0 compute01:43613 10.0.0.109:6805 ESTABLISHED 10839/qemu-kvm tcp 0 0 compute01:51251 10.0.0.109:acnet ESTABLISHED 10839/qemu-kvm tcp 0 0 compute01:43598 10.0.0.109:6805 ESTABLISHED 9726/qemu-kvm tcp 0 0 compute01:33083 10.0.0.108:6807 ESTABLISHED 10839/qemu-kvm KVM -> ceph block device
  • 45. 45 Openstack Integration with Ceph 작업 전 필요한 내용 # qemu-img | grep "Supported formats" Supported formats: vvfat vpc vmdk vhdx vdi sheepdog rbd raw host_cdrom host_floppy host_device file qed qcow2 qcow parallels nbd iscsi gluster dmg cloop bochs blkverify blkdebug Cinder와 Glance에서 사용할 Ceph 계정과 pool 생성 및 ceph.conf에 keyring 추가 # ceph osd pool create volumes 64 # ceph osd pool create images 64 # ceph-authtool --create-keyring /etc/ceph/ceph.client.glance.keyring # ceph-authtool --create-keyring /etc/ceph/ceph.client.cinder.keyring # ceph-authtool -C /etc/ceph/ceph.client.glance.keyring -n client.glance --cap osd 'allow rwx pool=images’ --cap mon 'allow rwx' --cap mds 'allow' --gen-key # ceph-authtool -C /etc/ceph/ceph.client.cinder.keyring -n client.cinder --cap osd 'allow rwx pool=volumes' --cap mon 'allow rwx' --cap mds 'allow' --gen-key # ceph auth add client.glance -i /etc/ceph/ceph.client.glance.keyring # ceph auth add client.cinder -i /etc/ceph/ceph.client.cinder.keyring # vi /etc/ceph/ceph.conf -------------------------------------------------------- [client.glance] keyring=/etc/ceph/ceph.client.glance.keyring [client.cinder] keyring = /etc/ceph/ceph.client.cinder.keyring -------------------------------------------------------- Compute Node 가 CEPH Mon과 Osd node와 통신이 가능해야 함. 설치된 qemu-img가 “rbd”를 지원하는지 확인
  • 46. 46 Openstack Integration with Ceph # uuidgen f6768a42-c7b3-4060-99d2-9ae0eab43e87 # vi secret.xml <secret ephemeral='no' private='no'> <uuid>f6768a42-c7b3-4060-99d2-9ae0eab43e87</uuid> <usage type='ceph'> <name>client.cinder secret</name> </usage> </secret> # virsh secret-define --file secret.xml # virsh secret-list [on ceph server] # ceph auth get-key client.cinder | ssh ceph-mgmt tee /etc/ceph/cinder.keyring # virsh secret-set-value --secret f6768a42-c7b3-4060-99d2-9ae0eab43e87 --base64 $(cat ~/cinder.keyring) Libvirt에서 CEPH RBD 접근을 위한 설정 # scp ceph-mgmt:/etc/ceph/ceph.conf /etc/ceph/ # controller, compute node # scp ceph-mgmt:/etc/ceph/ceph.client.cinder.keyring /etc/ceph/ # controller, compute node # scp ceph-mgmt:/etc/ceph/ceph.client.glance.keyring /etc/ceph/ # controller node # yum install python-rbd ceph-common librados2 librbd1 rbd사용을 위한 package 설치 Ceph conf 및 keyring 파일 복사
  • 47. 47 Openstack Integration with Ceph # vi /etc/nova/nova.conf [libvirt] vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver images_type=rbd images_rbd_pool=volumes images_rbd_ceph_conf=/etc/ceph/ceph.conf use_virtio_for_bridges=true rbd_user=cinder rbd_secret_uuid=f6768a42-c7b3-4060-99d2-9ae0eab43e87 nova.conf 수정 # vi /etc/cinder/cinder.conf rbd_pool=volumes rbd_user=cinder rbd_ceph_conf=/etc/ceph/ceph.conf rbd_secret_uuid=f6768a42-c7b3-4060-99d2-9ae0eab43e87 volume_driver=cinder.volume.drivers.rbd.RBDDriver cinder.conf 수정 # vi /etc/glance/glance-api.conf [glance_store] stores=glance.store.rbd.Store default_store=rbd rbd_store_ceph_conf=/etc/ceph/ceph.conf rbd_store_user=glance rbd_store_pool=images glance.conf 수정
  • 49. 49 용어정리 br-int(ovs integration bridge) : - Openvswitch 가상스위치 - VM, 가상라우터, br-tun을 연결 - 트래픽을 정의된 flow table에 따라 컨트롤 br-tun(ovs tunnel bridge) : - Openvswitch 가상스위치 - node와 node를 VxLAN을 이용하여 tunnel 연결 - 트래픽을 정의된 flow table에 따라 컨트롤 br-ex(ovs external bridge) : - Openvswitch 가상스위치 - 외부 네트워크와 연결 patch-port : ovs에 정의된 bridge들(br-int, br-tun, br-ex)을 서로 연결 Linux network namespace : 다른 network stack과 격리된 network stack 제공하기 위해 사용, routing table, iptables, arp table로 트래픽 컨트롤 DVR namespace : virtual router가 생성되는 격리된 network 공간 snat namespace : snat를 위해 Public IP와 SANT rule이 생성되는 격리된 network 공간 fip namespace : Floating IP 통신을 위해 Public IP와 DNAT rule이 생성되는 격리된 network 공간 dhcp namespace : dhcp 데몬으로 IP 할당 qrouter-xxx : DVR namespace 안에 정의되는 virtual port로, Subnet gateway 역할 veth-pair : virtual patch-cable, 한 쌍을 이루는 가상 네트워크 인터페이스, namespace, linux bridge를 연결할 때 사용 pre-populated ARP : 각 namespace는 다양한 가상 네트워크에 대한 mac address를 미리 가지고 있음.
  • 50. 50 참고 URL Slide 9 page: http://www.slideshare.net/vivekkonnect/openstack- kilosummitdvrarchitecture20140506mastergroup?qid=74211292-5ccb-4c08-881b- f76b7f06a8d3&v=default&b=&from_search=1 SDN Image: http://2.bp.blogspot.com/-8uKSOcP-FDQ/T5ZhZpef-wI/AAAAAAAAAOE/lw-Pw0aMed4/s1600/FatTree.png http://aitpowersurge.co.uk OpenStack Networking – Juno – DVR & L3 HA(심장훈님) : http://www.slideshare.net/janghoonsim/open-stack-networking- juno-l3-ha-dvr CERN: http://www.slideshare.net/noggin143/20140509-cern-openstacklinuxtagv3?qid=99472383-7ae8-42ec-86c7- 73d97338c8c7&v=qf1&b=&from_search=9