cord development - open networking foundation€¦ · docker registry anytime the ......

Post on 11-Sep-2020

1 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

CORDDevelopment

HowtheNewPlatformWillMakeYourLifeBetter

December6,2018

Topics

-  Docker,Kubernetes,Helm-Let’sclearsomeconcepts

-  Developmentworkflow-  Findanissueinthecode-  Fixitandtestit-  DeployitonarunningPOD

2

Doyoureallyknow

whatDockeris?

3

Docker

...performsoperating-system-levelvirtualization,

alsoknownas"containerization"…

Applicationsarebundledincontainers,togetherwiththeirowntools,librariesand

configurationfiles.

Theycancommunicatewitheachotherthroughwell-definedchannels

4

DockerImagevsDockerContainer

5

Source Code

Image Container Container

Configuration

docker build ...

docker run ...

Development machine

DockerImages

66

Source Code

Image

Container docker build ...

Docker daemon Docker daemon

Production machine

docker run ... ?

DockerRegistry

AcatalogofDockerImages

-  public(availableovertheinternet)

-  private(runningonpremises)

7

DockerRegistry

8

Source Code

Image

Container

docker build ...

docker run ...

Docker daemon Docker daemon

Docker registry

{ docker tag … }

docker push … docker pull …

Dockerimagenames

{registry}/organization/image:{tag|latest}

9

Image

Docker daemon Docker Hub

Private registry

docker push opencord/xos-core:latest

docker tag … 10.90.0.101:30500/...

docker push 10.90.0.101:30500/... docker build -t opencord/xos-

core:latest . 10.90.0.101:30500

Imagestagging

10

Git Docker

master latest

branch eg: 1.6 by project

tag 1.6.0

semverisyourfriend!

Kubernetes

…automatingdeployment,scaling,andmanagementof

containerizedapplications...

11

Kubernetes

-  Runsincluster-  don’thavetoworryonwhereyourcontainersarerunning

-  Managesmountedfiles-  don’thavetoworryaboutdeploymentspecificconfigurations

-  Handlesthenetworking(L3andabove)-  don’thavetoworryaboutservicetoservicecommunication

12

Helm

Thepackagemanagerforkubernetes

13

Helm

-  Defineapplicationsascharts

-  Templatizedataandconfigurationfiles

-  Managecontainerlifecycle-  upgrades-  scale

14

HelmandKubernetes-ImagesandContainers

containers:

-name:onos

image:"{{.Values.images.onos.repository}}:{{tpl.Values.images.onos.tag.}}"

imagePullPolicy:{{.Values.images.onos.pullPolicy}}

15

images:

onos:

repository:'onosproject/onos'

tag:'latest'

pullPolicy:'Always'

ImagePullPolicy:Always

16

Container

Docker daemon

Docker registry -  helminstall...

-  helmupgrade...***

-  kubectldeletepod…

Anytimethecontainerrestarttheimageis

pulledfromtheregistry

ImagePullPolicy:Always

17

Cons:

-  theimagecanchangeif

theupstreamone

changes(eg:latest)

Pros:

-  youaresureitisalways

gettingthelatest

availableimage

ImagePullPolicy:IfNotPresent

18

Container

Docker daemon

Docker registry Anytimethecontainerrestartthe

daemonchecksiftheimagesispresent:

-  ifyesitusesit

-  ifnotitdownloadsit

Is the images already

present in the local

daemon?

ImagePullPolicy:IfNotPresent

19

Cons:

-  itwon’tpullanew

versionoftheimage(eg:

latest)

-  canendupwithdifferent

imagesindifferent

nodes**

Pros:

-  faster

-  doesn’tdownloadnewer

image

-  easiertoupdatean

imagefordev*

AlwaysVSIfNotPresent:Whentousewhat

20

Development Production / Trial

Single Node

Cluster

IfNotPresent Always

Always Always

Let’spractice

-  runningmulti-nodedevelopmentenvironment-  privatedockerregistry-  imagePullPolicy:Always

-  authenticateasubscriber-  findanerror-  fixtheerror-  updatetheenvironment

21

VOLTHA

ONOS

NNI

OLTONU

UNI

Compute

AGG

OSS 802.1XAuthentication

NetworkEdgeMediator(NEM)

BNG

1 Subscribers

2 EAPOL

4 Addsubscriber

RADIUS

RG

3 Authsucceeded

5 Programflows

802.1XAuthentication

BNG

VOLTHA

ONOS

NNI

OLTONU

UNI

Compute

AGG

NetworkEdgeMediator(NEM)

RG

Workflow Subscriber vOLT X-Connect RADIUS Kafka

1 AuthSucceeded

Thanks!

Anyquestion?

24

References

-  https://en.wikipedia.org/wiki/Docker_(software)

-  https://kubernetes.io

-  https://helm.sh

-  https://guide.opencord.org

25

top related