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

25
CORD Development How the New Platform Will Make Your Life Better December 6, 2018

Upload: others

Post on 11-Sep-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

CORDDevelopment

HowtheNewPlatformWillMakeYourLifeBetter

December6,2018

Page 2: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

Topics

-  Docker,Kubernetes,Helm-Let’sclearsomeconcepts

-  Developmentworkflow-  Findanissueinthecode-  Fixitandtestit-  DeployitonarunningPOD

2

Page 3: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

Doyoureallyknow

whatDockeris?

3

Page 4: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

Docker

...performsoperating-system-levelvirtualization,

alsoknownas"containerization"…

Applicationsarebundledincontainers,togetherwiththeirowntools,librariesand

configurationfiles.

Theycancommunicatewitheachotherthroughwell-definedchannels

4

Page 5: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

DockerImagevsDockerContainer

5

Source Code

Image Container Container

Configuration

docker build ...

docker run ...

Page 6: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

Development machine

DockerImages

66

Source Code

Image

Container docker build ...

Docker daemon Docker daemon

Production machine

docker run ... ?

Page 7: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

DockerRegistry

AcatalogofDockerImages

-  public(availableovertheinternet)

-  private(runningonpremises)

7

Page 8: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

DockerRegistry

8

Source Code

Image

Container

docker build ...

docker run ...

Docker daemon Docker daemon

Docker registry

{ docker tag … }

docker push … docker pull …

Page 9: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

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

Page 10: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

Imagestagging

10

Git Docker

master latest

branch eg: 1.6 by project

tag 1.6.0

semverisyourfriend!

Page 11: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

Kubernetes

…automatingdeployment,scaling,andmanagementof

containerizedapplications...

11

Page 12: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

Kubernetes

-  Runsincluster-  don’thavetoworryonwhereyourcontainersarerunning

-  Managesmountedfiles-  don’thavetoworryaboutdeploymentspecificconfigurations

-  Handlesthenetworking(L3andabove)-  don’thavetoworryaboutservicetoservicecommunication

12

Page 13: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

Helm

Thepackagemanagerforkubernetes

13

Page 14: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

Helm

-  Defineapplicationsascharts

-  Templatizedataandconfigurationfiles

-  Managecontainerlifecycle-  upgrades-  scale

14

Page 15: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

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'

Page 16: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

ImagePullPolicy:Always

16

Container

Docker daemon

Docker registry -  helminstall...

-  helmupgrade...***

-  kubectldeletepod…

Anytimethecontainerrestarttheimageis

pulledfromtheregistry

Page 17: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

ImagePullPolicy:Always

17

Cons:

-  theimagecanchangeif

theupstreamone

changes(eg:latest)

Pros:

-  youaresureitisalways

gettingthelatest

availableimage

Page 18: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

ImagePullPolicy:IfNotPresent

18

Container

Docker daemon

Docker registry Anytimethecontainerrestartthe

daemonchecksiftheimagesispresent:

-  ifyesitusesit

-  ifnotitdownloadsit

Is the images already

present in the local

daemon?

Page 19: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

ImagePullPolicy:IfNotPresent

19

Cons:

-  itwon’tpullanew

versionoftheimage(eg:

latest)

-  canendupwithdifferent

imagesindifferent

nodes**

Pros:

-  faster

-  doesn’tdownloadnewer

image

-  easiertoupdatean

imagefordev*

Page 20: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

AlwaysVSIfNotPresent:Whentousewhat

20

Development Production / Trial

Single Node

Cluster

IfNotPresent Always

Always Always

Page 21: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

Let’spractice

-  runningmulti-nodedevelopmentenvironment-  privatedockerregistry-  imagePullPolicy:Always

-  authenticateasubscriber-  findanerror-  fixtheerror-  updatetheenvironment

21

Page 22: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

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

Page 23: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

802.1XAuthentication

BNG

VOLTHA

ONOS

NNI

OLTONU

UNI

Compute

AGG

NetworkEdgeMediator(NEM)

RG

Workflow Subscriber vOLT X-Connect RADIUS Kafka

1 AuthSucceeded

Page 24: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

Thanks!

Anyquestion?

24

Page 25: CORD Development - Open Networking Foundation€¦ · Docker registry Anytime the ... ImagePullPolicy: IfNotPresent 19 Cons:- it won’t pull a new version of the image (eg: latest)

References

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

-  https://kubernetes.io

-  https://helm.sh

-  https://guide.opencord.org

25