containers and the future generations of clouds · docker bangkok meetup...

49
Containers and the Future Generations of Clouds ชาญวิทย แกวกสิ หองปฏิบัติการไอยราคลัสเตอร

Upload: others

Post on 02-Jun-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

Containersand

the Future Generations of Cloudsชาญวิทย แกวกสิ

หองปฏิบัติการไอยราคลัสเตอร

Page 2: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

หองปฏิบัติการวิจัยไอยราคลัสเตอร● วิจัยและพัฒนาระบบคลัสเตอรประหยัดพลังงาน● คิดคนสถาปตยกรรมคลาวด เรียกวา

Cross-platform Hybrid Cloud(คลาวดเชิงผสมขามแพลตฟอรม)ARM + x86 และทําการ scale ระบบบน layer ของ Container

2

Page 3: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

หองปฏิบัติการวิจัยไอยราคลัสเตอร● วิจัยและพัฒนาระบบคลัสเตอรประหยัดพลังงาน● รวมมือพัฒนาระบบจัดการคลัสเตอรสําหรับ Docker

ชื่อ Docker Swarm● Docker Swarm ถูกดาวนโหลดไปแลวกวา 20 ลานครั้ง● ใชสําหรับสรางคลัสเตอรโดยนักพัฒนาและบริษัททั่วโลก

3

Docker Swarm20+ Millions Installation

Page 4: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

หองปฏิบัติการวิจัยไอยราคลัสเตอร● เลือกใชฮารดแวรประหยัดพลังงานมาทําคลัสเตอร● ขอจํากัดสูง ทําใหตอง optimize software หลายจุด● ARM CPU คือแนวโนมของ

○ Server-class Data Centre○ Internet of Things

4

Page 5: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

คอนเทนเนอร ในตลาดนัด?

5

Page 6: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

6

Page 7: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

7

Software Container ?

Page 8: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

8

Software Container ?● Solaris Zones● LXC - Linux Containers

● Docker ทําให Container ใชงายขึ้น (Commodity)

Page 9: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

Container และ Docker

9

Page 10: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

10

Page 11: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

11

Tool that makes Container Commodity● ดีอยางไร?● Build - การสราง / ทําลาย Container ทําไดงายขึ้นมาก● Ship - การยาย Container ทําไดงาย เพราะใช Union File System เขามาชวย

○ AUFS○ DeviceMapper Thin Provision○ BTRFS○ Overlay File System

● Run - การสั่งรัน Container สะดวก○ $ docker run nginx

Page 12: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

Containers เทียบกับ Virtual Machines

12

Page 13: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

libcontainer - Overhead ตํ่า

13

Page 14: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

libnetwork - vxlan - SDN

14

Page 15: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

รูปแบบการ Deployment ระบบป 2000 เทียบป 2016

ป 2000 ป 2016

Deploy ไมบอย1 เดือนครั้ง, 3 เดือนครั้ง

Deploy วันละ 2 ครั้ง

Monolithic(ภาษาเดียว เฟรมเวิรคเดียว)

Microservices(หลายภาษา หลายเฟรมเวิรค,

เกาะกันหลวม ๆ)

Scaled Up(เครื่องใหญ เครื่องเดียว)

Scaled Out(หลายเครื่อง ขามคลาวด เชา/ผสม)

15

Page 16: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

DevOps

16

Page 17: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

DevOps

17

Page 18: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

“ก็โปรแกรมมันเวิรคแลวในเครื่องผม”

18

Page 19: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

Never change anything on the Server● ไม install package● ไม upgrade● ไม remove หรือ downgrade

○ พยายามที่จะไม patch แมแต security bug

● ไมแกไฟล config ● ไมแก code ของ app

○ แมแตการแก bug

19

Page 20: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

Container Isolation - เริ่มที่ Dev

20

Page 21: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

Container “ใน Cloud” หรือ “บน Cloud”

21

Page 22: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

โปรแกรมใน Container ควรจะขามคลาวดได

22

Provision เครื่องดวย Docker Machine

Page 23: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

ความสามารถในการยายโปรแกรม ขามคลาวด

23

Page 24: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

ความสามารถในการยายโปรแกรม ขามคลาวด / รันไทมProvider Portability

Runtime Portability

24

Page 25: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

Open Container Initiative● โครงการใน Linux Foundation● “File Format” คือสิ่งที่เจงที่สุดของ Docker● เทียบเปน .PDF หรือ .MP3

25

Page 26: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

Cloud Native Computing Foundation

26

Page 27: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

แลวฝง Microsoft หละ?

27

Page 28: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

28

Page 29: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

Microsoft และ Containers

29

Page 30: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

30

Page 31: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

31

Page 32: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

32

Page 33: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

Image Pull 1.2 พันลานครั้งในปที่ผานมา Docker ทําใหการปรับใช เทคโนโลยี Container โตขึ้นอยางตอเนื่อง จนกระทั่งจํานวนการ pull image ตอนนี้ทะลุ 1.2 พันลานครั้งไปแลว

33

Page 34: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

แนวโนมการปรับใช Container ในเมืองไทย● 2 ใน 4 ของบริษัท Telecom กําลังปรับใช Docker

○ คาดวาจะขึ้น Production ภายใน 6-9 เดือน● บริษัท Content Provider, E-Commerce ใช Docker กันแพรหลายแลว

○ สวนใหญเปน stand-alone○ กําลังเตรียมขยายเปน cluster

34

Page 35: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

แนวโนมการปรับใช Container ในเมืองไทย● มีบริษัทที่กําลังเตรียม Hybrid Cloud ดวย Docker แบบมี Software-Defined Network

ใชจริงภายใน 3 เดือนนี้● มีบริษัทในไทยที่พัฒนาระบบ auto-scale สําหรับ Docker Cluster แลว

● Docker Bangkok Meetup ครั้งแรกของป 2016มีนักพัฒนาเขาฟงกวา 250 คน

35

Page 36: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

Dev (Developers) - เตรียม container และวิธี deploy

36

Page 37: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

Ops (Operations) - เตรียม pool ที่ใหญพอ

37

Page 38: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

Ops (Operations) - เตรียม pool ที่ใหญพอ

38

Page 39: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

คอนเทนเนอร ทําให คลาวดเปลี่ยนแปลงอยางไร?

39

Page 40: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

คอนเทนเนอร ทําให คลาวดเปลี่ยนแปลงอยางไร?● Portability

○ Cloud Portibility / Runtime Portiability

● Multi-Thousand Node Cluster○ คลัสเตอรขนาดใหญแบบ multi-tenant คือความทาทาย

● Container ในโลกของ Internet of Things○ ทรัพยากรจํากัด○ อัพเดตซอฟตแวรงายขึ้น

● นิยามใหมของ Package: Unit of Deployment○ Cloud Provision + Application Composition

○ เมื่อ Network เร็วพอ + ม ีLocal Data Center แลวการ Deploy แบบใหมจะ Commodity

● Software Defined Network ○ ลงไปอยูระดับ Application / ระดับการ Deploy

40

Page 41: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

คอนเทนเนอร ทําให คลาวดเปลี่ยนแปลงอยางไร?● Software Defined Network

ลงไปอยูระดับ Application / ระดับการ Deploy

41

Page 42: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

Docker Multi-Host SDN

42

Page 43: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

คอนเทนเนอร ทําให คลาวดเปลี่ยนแปลงอยางไร?● นิยามใหมของ Package: Unit of Deployment

○ Cloud Provision + Application Composition○ เมื่อ Network เร็วพอ + ม ีLocal Data Center แลวการ Deploy แบบใหมจะ Commodity

43

Page 44: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

Package Managementอะไรจะเปน Package ในโลกของ Container และ Cloud Native?

44

Page 45: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

apt-get / rpm จัดการ Package บนเครื่อง

45

Page 46: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

ถามอง Data Center เปน “เครื่อง”

46

Page 47: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

มอง Data Center เปน “เครื่อง”● Project Atomic App: Redhat● HelmPack: Dies / EngineYard● และ dpm - The Package Manager for Docker: SUT / Docker

47

Page 48: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

48

Page 49: Containers and the Future Generations of Clouds · Docker Bangkok Meetup ครั้งแรกของป 2016 มีนักพัฒนาเข าฟ งกว า 250 คน

ขอบคุณครับ

49