SlideShare a Scribd company logo
1 of 44
Download to read offline
Sanallaştırmada yeni akım: Docker
TÜRKSAT
oguzy ~ turksat.com.tr
DevOps
https://about.me/oguzy
2
Önce siz
● Docker resmi “dersini” takip eden?
● Daha önce makinasına Docker kuran?
● Dockerfile yazmayı deneyen?
3
İçerik
● Ne söz veriyor?
● Nasıl çalışır?
● Docker kelime dağarcığı
● Geçmiş, şu an, gelecek
● Kullanıcı hikayeleri
● Özet
4
Üretim sürecinde
“Bende çalışıyor!”
5
Docker sözü
“Build once
run everywhere”
6
Nasıl çalışıyor?
Sanallaştırma aracı?
VM Yönetim Aracı?
Yapılandırma (Configuration)
Yönetim Aracı?
Cgroups?
LXC?
Libvirt?
7
Resmi tanım
Docker.com daki açıklamaya göre
Docker, geliştiriciler ve sysadminler için uygulamalarını derlemek,
çalıştırmak ve dağıtmak için açık bir platformdur.
Docker Engine
Taşınabilir, hafif, çalışma
zamanı ve paketleme aracı
Docker Hub
Uygulama paylaşmak ve iş
akışlarını otomatize etmek için
bir bulut servisi
8
Sunucu yapılandırma dünyasında
Daha az taşınabilir,
Daha az yük (overhead)
CM araçları
Elle yapılandırma
Daha taşınabilir,
Daha çok yük (overhead)
Geleneksel VMler
Docker
9
Geleneksel VM Yaklaşımı
VM
Kaynak: docker.io
10
Dockerdaki Durum
Containers
Kaynak: docker.io
11
Tipik bir Docker Mimarisi
Her bir süreç için bir “container”
Kaynak: quay.io
12
Docker Kelime Dağarcığı
Uygulamalarınız “container” lar içinde çalışır
docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
$ docker run busybox /bin/echo “hello world”
hello world
13
devam
> docker pull oguzy/statsd
Using default tag: latest
ba8afa23-debc-41d4-91f7-26bcdd49df54-n1: Pulling oguzy/statsd:latest... :
downloaded
> docker history oguzy/statsd
IMAGE CREATED CREATED BY SIZE COMMENT
3575ba401d18 10 months ago /bin/sh -c cd /usr/src && git clone https:// 3.741 MB
3334a6fda5e1 10 months ago /bin/sh -c apt-get install -y git debhelper d 222.5 MB
bb1cab823c31 10 months ago /bin/sh -c apt-get update && apt-get dist-upg 27.47 MB
ea4e0b39c9a4 10 months ago /bin/sh -c #(nop) MAINTAINER Oguz Yarimtepe 0 B
8eaa4ff06b53 10 months ago /bin/sh -c #(nop) CMD [/bin/bash] 0 B
f62feddc05dc 10 months ago /bin/sh -c sed -i 's/^#s*(deb.*universe)$/ 1.895 kB
607c5d1cca71 10 months ago /bin/sh -c echo '#!/bin/sh' > /usr/sbin/polic 194.5 kB
3b363fd9d7da 10 months ago /bin/sh -c #(nop) ADD file:c6927d782cab75b529 188.1 MB
511136ea3c5a 2 years ago 0 B Imported from -
14
Docker hub
15
Dockerfile
# Spin-docker example dockerfile for a Django project
# Use phusion/baseimage as base image
FROM phusion/baseimage:0.9.8
MAINTAINER Andrew T. Baker <andrew@andrewtorkbaker.com>
# Add the Django app and install its requirements
ADD sd_sample_project /var/www/django
RUN apt-get install -y python-pip
RUN pip install virtualenv
RUN virtualenv /var/www/venv
RUN /.../venv/bin/pip install -r /.../requirements.txt
...
16
Docker ve Git
Docker Git
Imaj Saklı bir durum Commit
Container Yerel çalıştırma Checkout
Depo (repository) “commit” lerin toplamı Depo (repository)
Docker Hub Sık kullanılan uzak sunucu Github
17
Açık kaynak başarı hikayesi
● PyCon 2013 te docCloud tarafından proje açıldı
● O zamandan sonra
– 1.000.000+ ın üzerinde indirildi
– 300+ projeye güç verdi
– 350+ docker katkıcısı
– 10.000+ Github yıldızı
● dotCloud adını değiştirdi: Docker
– 1.0 sürümü 2014 te duyuruldu
18
Docker Ecosistemi
19
İnsanlar Docker ile neler yapıyorlar
20
Örnek web uygulaması
web:
build: .
command: python app.py
ports:
- "5000:5000"
volumes:
- .:/code
links:
- redis
redis:
image: redis
$ fig up
Pulling image redis...
Building web...
Starting figtest_redis_1...
Starting figtest_web_1...
redis_1 | [8] 02 Jan 18:43:35.576 # Server started, Redis version 2.8.3
web_1 | * Running on http://0.0.0.0:5000/”
21
Fig (devam)
$ fig up -d
Starting figtest_redis_1...
Starting figtest_web_1...
$ fig ps
Name Command State Ports
-------------------------------------------------------------------
figtest_redis_1 /usr/local/bin/run Up
figtest_web_1 /bin/sh -c python app.py Up 5000->5000/tcp
22
PaaS
23
Deis video
● Deis.io
24
CI
25
CI
26
Araçlar daha iyiye gidiyor
27
Shipyard
28
Bulut ortamında
29
Dockerdaki sorun
30
Kubernetes
● Docker “kapları” için kümelenmiş
ortam
● Birden fazla Docker host
● Yük dengeleme, “auto-healing”,
ölçekleme
● Google
● Contributors = CoreOS, RedHat, HP,
IBM, Microsoft, ...
31
Kavramlar
● Pod: Bir grup “kap”
● Labels: Podları tanımlamak için
isimlendirme
● Kubelet: “kap” ajanı
● Proxy: Podlar için yük dengeleyici
● Scheduler: “Worker” nodlardaki
podları zamanlar
32
Kavramlar
● cAdvisor: Containe Advisor, kullanım
ve performans istatistiklerini sağlar
● Replication Controller: “Replication”
yönetimi
33
Kubernetes Mimarisi
34
Kubernetes Master
35
Kubernetes Minion
36
Bileşen Mimarisi
37
Diğer büyükler
● Amazon EC2 Container Service
● Google Container Service
● Rackspace
– Getcarina (Openstack + Magnum + Swarm)
38
Getcarina
39
Getcarina Dashboard
40
Getcarina CLI
41
Getcarina CLI
42
Çalıştır ve eriş
43
Port 8080
44
Sorular

More Related Content

What's hot

Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
Docker, Inc.
 
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Simplilearn
 

What's hot (20)

Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
 
Git and git flow
Git and git flowGit and git flow
Git and git flow
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT Campus
 
Docker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and ContainersDocker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and Containers
 
Gerrit Code Review
Gerrit Code ReviewGerrit Code Review
Gerrit Code Review
 
Docker (Compose) 활용 - 개발 환경 구성하기
Docker (Compose) 활용 - 개발 환경 구성하기Docker (Compose) 활용 - 개발 환경 구성하기
Docker (Compose) 활용 - 개발 환경 구성하기
 
Scalable Django Architecture
Scalable Django ArchitectureScalable Django Architecture
Scalable Django Architecture
 
Docker intro
Docker introDocker intro
Docker intro
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Speed up web API with Laravel and Swoole using Docker
Speed up web API with Laravel and Swoole using DockerSpeed up web API with Laravel and Swoole using Docker
Speed up web API with Laravel and Swoole using Docker
 
Introduction To Docker
Introduction To  DockerIntroduction To  Docker
Introduction To Docker
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
DCSF19 Dockerfile Best Practices
DCSF19 Dockerfile Best PracticesDCSF19 Dockerfile Best Practices
DCSF19 Dockerfile Best Practices
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Configuration management II - Terraform
Configuration management II - TerraformConfiguration management II - Terraform
Configuration management II - Terraform
 
Git and Github slides.pdf
Git and Github slides.pdfGit and Github slides.pdf
Git and Github slides.pdf
 
Unit Testing Using Mockito in Android (1).pdf
Unit Testing Using Mockito in Android (1).pdfUnit Testing Using Mockito in Android (1).pdf
Unit Testing Using Mockito in Android (1).pdf
 
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
 
Version Control & Git
Version Control & GitVersion Control & Git
Version Control & Git
 

Similar to Sanallaştırmada Yeni Akım - Docker

React Bootcamp Day 1 - Yunus Demirpolat
React Bootcamp Day 1 - Yunus DemirpolatReact Bootcamp Day 1 - Yunus Demirpolat
React Bootcamp Day 1 - Yunus Demirpolat
kloia
 

Similar to Sanallaştırmada Yeni Akım - Docker (20)

Sanallastirmada yeni akim: Docker
Sanallastirmada yeni akim: DockerSanallastirmada yeni akim: Docker
Sanallastirmada yeni akim: Docker
 
Abis Teknoloji şirket içi Docker sunumu
Abis Teknoloji şirket içi Docker sunumuAbis Teknoloji şirket içi Docker sunumu
Abis Teknoloji şirket içi Docker sunumu
 
Docker Nedir, Ne İşe Yarar, Nasıl Kullanılmalıdır?
Docker Nedir, Ne İşe Yarar, Nasıl Kullanılmalıdır? Docker Nedir, Ne İşe Yarar, Nasıl Kullanılmalıdır?
Docker Nedir, Ne İşe Yarar, Nasıl Kullanılmalıdır?
 
Docker - Ankara Cloud Meetup
Docker - Ankara Cloud Meetup Docker - Ankara Cloud Meetup
Docker - Ankara Cloud Meetup
 
Docker 101
Docker 101Docker 101
Docker 101
 
Docker node-nginx-redis ipnordic demo
Docker node-nginx-redis ipnordic demoDocker node-nginx-redis ipnordic demo
Docker node-nginx-redis ipnordic demo
 
vSphere Integrated Containers
vSphere Integrated ContainersvSphere Integrated Containers
vSphere Integrated Containers
 
PHPKonf'15 PHP Uygulamalarını Docker ile Çalıştırmak
PHPKonf'15 PHP Uygulamalarını Docker ile ÇalıştırmakPHPKonf'15 PHP Uygulamalarını Docker ile Çalıştırmak
PHPKonf'15 PHP Uygulamalarını Docker ile Çalıştırmak
 
Bmup_v1
Bmup_v1Bmup_v1
Bmup_v1
 
Docker Egitimi
Docker EgitimiDocker Egitimi
Docker Egitimi
 
Teknolojide Atılım - Docker İle Konforlu Geliştirme Ortamı
Teknolojide Atılım - Docker İle Konforlu Geliştirme OrtamıTeknolojide Atılım - Docker İle Konforlu Geliştirme Ortamı
Teknolojide Atılım - Docker İle Konforlu Geliştirme Ortamı
 
Docker İle Web Hosting
Docker İle Web HostingDocker İle Web Hosting
Docker İle Web Hosting
 
Docker ve kubernetes ile ilgili kısa bilgilendirmeler
Docker ve kubernetes ile ilgili kısa bilgilendirmeler Docker ve kubernetes ile ilgili kısa bilgilendirmeler
Docker ve kubernetes ile ilgili kısa bilgilendirmeler
 
React Bootcamp Day 1 - Yunus Demirpolat
React Bootcamp Day 1 - Yunus DemirpolatReact Bootcamp Day 1 - Yunus Demirpolat
React Bootcamp Day 1 - Yunus Demirpolat
 
12factor apps
12factor apps12factor apps
12factor apps
 
Symfony2 ve Doctrine ile PostgreSQL'i Kullanarak Performanslı Mimari Oluşturma
Symfony2 ve Doctrine ile PostgreSQL'i Kullanarak Performanslı Mimari OluşturmaSymfony2 ve Doctrine ile PostgreSQL'i Kullanarak Performanslı Mimari Oluşturma
Symfony2 ve Doctrine ile PostgreSQL'i Kullanarak Performanslı Mimari Oluşturma
 
Grunt.js, Bower ve Yeoman Gibi Araçlar ile Proje Otomatizasyonu
Grunt.js, Bower ve Yeoman Gibi Araçlar ile Proje OtomatizasyonuGrunt.js, Bower ve Yeoman Gibi Araçlar ile Proje Otomatizasyonu
Grunt.js, Bower ve Yeoman Gibi Araçlar ile Proje Otomatizasyonu
 
Openstack Magnum CaaS
Openstack Magnum CaaSOpenstack Magnum CaaS
Openstack Magnum CaaS
 
Docker Compose & Swarm @ Docker İzmir
Docker Compose & Swarm @ Docker İzmirDocker Compose & Swarm @ Docker İzmir
Docker Compose & Swarm @ Docker İzmir
 
WP REST API ve WordPress Ekosisteminin Geleceği
WP REST API ve WordPress Ekosisteminin GeleceğiWP REST API ve WordPress Ekosisteminin Geleceği
WP REST API ve WordPress Ekosisteminin Geleceği
 

Sanallaştırmada Yeni Akım - Docker