© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Wstęp do programowania w
chmurze przy użyciu
Kubernetesa
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
R&D, Innowacje
Top ecommerce,
marketing, billing
Najlepszy Pracodawca
2017 w rankingu AON
Jedno z 20 centrów
SAP’s Labs Network
> 350 pracowników
Development: Go, Java,
Cloud Native solutions
DevOps, SysOps
Support, Consulting
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
?
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
niewielkie koszty
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
ograniczone zarządzanie infrastrukturą
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
nieograniczone zasoby*
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
dostępność
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
U mnie działa…
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Piotr Mścichowski, SAP
Wstęp do Kubernetesa
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Kto słyszał już o
Kubernetesie?
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Czym jest Kubernetes ?
• Platformą do zarządzania aplikacjami uruchomionymi w kontenerach
• Otwartym projektem utworzonym przez Google
• Projektem rozwijanym w Go
• K8s
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Główne komponenty K8s
apiserver
Wystawia API K8s
cloud-controller-
manager
Kontroller komunikujący
się bezpośrednio z
dostawcją infrastruktury
etcd
“baza” klucz-wartość
scheduler
przypisuje pody do węzłów
kube-controller-
manager
 szef wszystkich szefów
czyt. kontrollerów
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Komponenty węzła
kubelet
Dba o uruchomione
kontenery
kube-proxy
Przekierowuje połączenia
container-runtime
Runtime dla kontenerów
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Dodatki
• DNS
• Dashboard
• Logowanie
• Monitorowanie (metryki)
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Komunikacja z Kubernetesem
• Restowe API
• Kubectl
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Wdrażanie aplikacji
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Przygotować skrypt instalacyjny ?
 Nope
Utworzyć Deployment ?
 Yup
Jak uruchomić aplikację w Kubernetesie ?
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
“Deployment is responsible for
creating and updating
instances of your application”
https://kubernetes.io
Deployment?
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
• Przygotuj obraz konteneru Twojej aplikacji
• Określ ile chcesz instancji(kopii) aplikacji
• Zapisz porty na których Twoja aplikacja nasłuchuje
• Całość włóż do pliku z roszerzeniem yaml lub json
• Posyp komendą kubectl create/apply
• Gotowe!
Przepis na Deployment
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
kubectl apply –f httpbin.yaml
kubectl get deployment
Deployment cd.
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Pod
• Gospodarz kontenerów z aplikacjami
• Udostępnia aplikacjom :
• wspólną przestrzeń na dane
• sieć (unikalne adresy IP)
• Posiada informacje o tym jak każdy kontener
uruchomić
Node
• Nadzorca Podów
• Fizyczny lub wirtualny
• Pojedynczy węzeł może mieć wiele
podów
Ale czy to wszystko?
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Pod
Node
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
kubectl get pod POD_NAME –o yaml
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
kubectl get node NODE_NAME –o yaml
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
• Usługi (Services)
• Adres IP w podzie jest unikalny
w klastrze ale nie jest widoczny
na zewnątrz
• Usługa powiązana jest z Podami
za pomocą etykiet -
“selectorów” *
• 4 typy usług (ClusterIP,
NodePort, LoadBalancer,
ExternalName)
Huston, can you hear me ?
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
• Ingress
• Odszyfrowanie ruchu (SSL
termination)
• Dystrybuowanie ruchu (Load
Balancing)
• Hostowanie (Virtual name
hosting)
• Ingress controller
Komunikacja z zewnątrz do
klastra
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Co dalej ?
https://kubernetes.io/docs
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Demo
Piotr Miśkiewicz, SAP
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
meme quote
Przeglądarka
HTTP GET
HTTP GET
quote
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Kubernetes
meme service quote service
meme
pod
quote
podHTTP GET: http://quote/quote
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Mateusz Szostok, SAP
Dalsze życie naszej
aplikacji
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Efekt Slashdota
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Efekt Slashdota
 Digg efekt
 Reddit efekt
 Twitter efekt
 Wykop efekt
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Efekt Slashdota
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Skalowanie
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Typy skalowania
Wertykalne
Horyzontalne
vs.
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Czas na demo
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
funkcjonalności
funkcjonalności
funkcjonalności
funkcjonalności
funkcjonalności funkcjonalności
funkcjonalności
funkcjonalności
funkcjonalnościfunkcjonalności
funkcjonalności
funkcjonalności
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Typy skalowania
spec:
replicas: 4
strategy:
type: Recreate
spec:
replicas: 4
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 2
maxUnavailable: 50%
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Kogo szukamy?
• Nowoczesne technologie
• Zgrany zespół
• Elastyczność
• Agile
• Shadowing
• Szkolenia
• Cloud Software Engineer
(Cloud Native Solutions, Go, NodeJS)
• Technical Account Support
• iOS Developer
• Junior Demo Solutions Developer
• Education Sales Support
Specialist
https://goo.gl/sN3Jyf
Aplikuj tutaj
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
Nadchodzące wydarzenia
• Wstęp do programowania w chmurze przy użyciu
Kubernetes'a
Wykłady - AEiI
(14:00 – 15:30, s.428)
Warszaty – SAP Hybris
(17:00 – 18:30, s. Death Valley)
10.04
19.04 • Tworzenie testowalnej aplikacji, czyli TDD w praktyce
25.04• Bots everywhere
10.05 • Angular – stań się kanciastym
23.0
5
30.0
5
10.05
• Troubleshooting przy pomocy Spring AOP
• Ghost in the shell
• DevOps - czyli jak przestałem klikać i pokochałem
automatyzację
https://fb.com/Hack.your.Career Zarejestruj się na wydarzenie
© 2016 SAP SE or an SAP affiliate company. All rights reserved.© 2016 SAP SE or an SAP affiliate company. All rights reserved.
THANK YOU

Wstęp do programowania w chmurze przy użyciu Kubernetesa

  • 1.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Wstęp do programowania w chmurze przy użyciu Kubernetesa
  • 2.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. R&D, Innowacje Top ecommerce, marketing, billing Najlepszy Pracodawca 2017 w rankingu AON Jedno z 20 centrów SAP’s Labs Network > 350 pracowników Development: Go, Java, Cloud Native solutions DevOps, SysOps Support, Consulting
  • 3.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved.
  • 4.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. ?
  • 5.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved.
  • 6.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. niewielkie koszty
  • 7.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. ograniczone zarządzanie infrastrukturą
  • 8.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. nieograniczone zasoby*
  • 9.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. dostępność
  • 10.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved.
  • 11.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved.
  • 12.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved.
  • 13.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved.
  • 14.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved.
  • 15.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved.
  • 16.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. U mnie działa…
  • 17.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved.
  • 18.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Piotr Mścichowski, SAP Wstęp do Kubernetesa
  • 19.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Kto słyszał już o Kubernetesie?
  • 20.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Czym jest Kubernetes ? • Platformą do zarządzania aplikacjami uruchomionymi w kontenerach • Otwartym projektem utworzonym przez Google • Projektem rozwijanym w Go • K8s
  • 21.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Główne komponenty K8s apiserver Wystawia API K8s cloud-controller- manager Kontroller komunikujący się bezpośrednio z dostawcją infrastruktury etcd “baza” klucz-wartość scheduler przypisuje pody do węzłów kube-controller- manager  szef wszystkich szefów czyt. kontrollerów
  • 22.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Komponenty węzła kubelet Dba o uruchomione kontenery kube-proxy Przekierowuje połączenia container-runtime Runtime dla kontenerów
  • 23.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Dodatki • DNS • Dashboard • Logowanie • Monitorowanie (metryki)
  • 24.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Komunikacja z Kubernetesem • Restowe API • Kubectl
  • 25.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Wdrażanie aplikacji
  • 26.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Przygotować skrypt instalacyjny ?  Nope Utworzyć Deployment ?  Yup Jak uruchomić aplikację w Kubernetesie ?
  • 27.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. “Deployment is responsible for creating and updating instances of your application” https://kubernetes.io Deployment?
  • 28.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. • Przygotuj obraz konteneru Twojej aplikacji • Określ ile chcesz instancji(kopii) aplikacji • Zapisz porty na których Twoja aplikacja nasłuchuje • Całość włóż do pliku z roszerzeniem yaml lub json • Posyp komendą kubectl create/apply • Gotowe! Przepis na Deployment
  • 29.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. kubectl apply –f httpbin.yaml kubectl get deployment Deployment cd.
  • 30.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Pod • Gospodarz kontenerów z aplikacjami • Udostępnia aplikacjom : • wspólną przestrzeń na dane • sieć (unikalne adresy IP) • Posiada informacje o tym jak każdy kontener uruchomić Node • Nadzorca Podów • Fizyczny lub wirtualny • Pojedynczy węzeł może mieć wiele podów Ale czy to wszystko?
  • 31.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Pod Node
  • 32.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. kubectl get pod POD_NAME –o yaml
  • 33.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. kubectl get node NODE_NAME –o yaml
  • 34.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved.
  • 35.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. • Usługi (Services) • Adres IP w podzie jest unikalny w klastrze ale nie jest widoczny na zewnątrz • Usługa powiązana jest z Podami za pomocą etykiet - “selectorów” * • 4 typy usług (ClusterIP, NodePort, LoadBalancer, ExternalName) Huston, can you hear me ?
  • 36.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. • Ingress • Odszyfrowanie ruchu (SSL termination) • Dystrybuowanie ruchu (Load Balancing) • Hostowanie (Virtual name hosting) • Ingress controller Komunikacja z zewnątrz do klastra
  • 37.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Co dalej ? https://kubernetes.io/docs
  • 38.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Demo Piotr Miśkiewicz, SAP
  • 39.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. meme quote Przeglądarka HTTP GET HTTP GET quote
  • 40.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Kubernetes meme service quote service meme pod quote podHTTP GET: http://quote/quote
  • 41.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Mateusz Szostok, SAP Dalsze życie naszej aplikacji
  • 42.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Efekt Slashdota
  • 43.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Efekt Slashdota  Digg efekt  Reddit efekt  Twitter efekt  Wykop efekt
  • 44.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Efekt Slashdota
  • 45.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Skalowanie
  • 46.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Typy skalowania Wertykalne Horyzontalne vs.
  • 47.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Czas na demo
  • 48.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. funkcjonalności funkcjonalności funkcjonalności funkcjonalności funkcjonalności funkcjonalności funkcjonalności funkcjonalności funkcjonalnościfunkcjonalności funkcjonalności funkcjonalności
  • 49.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Typy skalowania spec: replicas: 4 strategy: type: Recreate spec: replicas: 4 strategy: type: RollingUpdate rollingUpdate: maxSurge: 2 maxUnavailable: 50%
  • 50.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved.
  • 52.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Kogo szukamy? • Nowoczesne technologie • Zgrany zespół • Elastyczność • Agile • Shadowing • Szkolenia • Cloud Software Engineer (Cloud Native Solutions, Go, NodeJS) • Technical Account Support • iOS Developer • Junior Demo Solutions Developer • Education Sales Support Specialist https://goo.gl/sN3Jyf Aplikuj tutaj
  • 53.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved. Nadchodzące wydarzenia • Wstęp do programowania w chmurze przy użyciu Kubernetes'a Wykłady - AEiI (14:00 – 15:30, s.428) Warszaty – SAP Hybris (17:00 – 18:30, s. Death Valley) 10.04 19.04 • Tworzenie testowalnej aplikacji, czyli TDD w praktyce 25.04• Bots everywhere 10.05 • Angular – stań się kanciastym 23.0 5 30.0 5 10.05 • Troubleshooting przy pomocy Spring AOP • Ghost in the shell • DevOps - czyli jak przestałem klikać i pokochałem automatyzację https://fb.com/Hack.your.Career Zarejestruj się na wydarzenie
  • 54.
    © 2016 SAPSE or an SAP affiliate company. All rights reserved.© 2016 SAP SE or an SAP affiliate company. All rights reserved. THANK YOU

Editor's Notes

  • #53  Płatny Staż – lipiec - wrzesień: D-shop RaspberryPi Arduino Espruino Drukarka 3D Platformy jezdne do RaspberryPI Sprzęt: lutownica, oscyloskop