Upload
mark-heckler
View
312
Download
0
Embed Size (px)
Citation preview
Clouds & Containers Hit the High Points and Give it to Me Straight, What’s the Difference & Why Should I Care?
Mark Heckler
Principal Technologist/Developer Advocate
Pivotal Software, Inc.
www.thehecklers.org
@MkHeck
@MkHeck #cloud #containers
@MkHeck #cloud #containers
Who am I?
• Author
• Speaker
• Software Architect/Developer
• Java Champion
@MkHeck #cloud #containers
The high points• What is this container stuff of which you speak?
• How can I use containers to develop better software?
• What are orchestration tools? Do I need to consider/use them?
• How do cloud/PaaS options compare? What are the tradeoffs?
• What is the difference?
• Why should I care? (Or should I?)
@MkHeck #cloud #containers
The high points• What is this container stuff of which you speak?
• How can I use containers to develop better software?
• What are orchestration tools? Do I need to consider/use them?
• How do cloud/PaaS options compare? What are the tradeoffs?
• What is the difference?
• Why should I care? (Or should I?)From a
Develo
per’s P
erspec
tive
@MkHeck #cloud #containers
Dockerfile#Pullbaseimage#---------------FROMopenjdk:latest
#Author#----------MAINTAINERMarkHeckler<[email protected],@MkHeck>
#Buildthecontainer#-------------------RUNmkdir/jarCOPYjar/quotesvc-0.0.1-SNAPSHOT.jar/jar#RUNls/jarENTRYPOINT["java","-jar","/jar/quotesvc-0.0.1-SNAPSHOT.jar"]EXPOSE8088
@MkHeck #cloud #containers
docker history <imagename>IMAGECREATEDCREATEDBYSIZEab735b049e762weeksago/bin/sh-c#(nop)EXPOSE8088/tcp0B<missing>2weeksago/bin/sh-c#(nop)ENTRYPOINT["java""-jar"0B<missing>2weeksago/bin/sh-c#(nop)COPYfile:8e09773c89fbe67fd30.1MB<missing>2weeksago/bin/sh-cmkdir/jar0B<missing>11weeksago/bin/sh-c#(nop)MAINTAINERMarkHeckler<m0B<missing>3monthsago/bin/sh-c/var/lib/dpkg/info/ca-certificates418.2kB<missing>3monthsago/bin/sh-cset-x&&apt-getupdate&&apt-349.3MB<missing>3monthsago/bin/sh-c#(nop)ENVCA_CERTIFICATES_JAVA_V0B<missing>3monthsago/bin/sh-c#(nop)ENVJAVA_DEBIAN_VERSION=8u0B<missing>3monthsago/bin/sh-c#(nop)ENVJAVA_VERSION=8u1020B<missing>3monthsago/bin/sh-c#(nop)ENVJAVA_HOME=/usr/lib/jvm0B<missing>3monthsago/bin/sh-c{echo'#!/bin/sh';echo'set87B<missing>3monthsago/bin/sh-c#(nop)ENVLANG=C.UTF-80B<missing>3monthsago/bin/sh-cecho'debhttp://httpredir.debian.61B<missing>3monthsago/bin/sh-capt-getupdate&&apt-getinstall1.285MB<missing>3monthsago/bin/sh-capt-getupdate&&apt-getinstall122.6MB<missing>3monthsago/bin/sh-capt-getupdate&&apt-getinstall44.3MB<missing>3monthsago/bin/sh-c#(nop)CMD["/bin/bash"]0B<missing>3monthsago/bin/sh-c#(nop)ADDfile:c6c23585ab140b0b32123MB
@MkHeck #cloud #containers
How does this make software better?• Portable
• Immutable
• Faster to build
• Lighter to distribute & run
• Availability of building blocks, e.g. prebuilt images
• Consistent across platforms, stages…everywhere
–Frederic Lardinois, TechCrunch
“Container orchestration remains a major pain point for developers, even as multiple frameworks like Kubernetes and
Mesos now vie for this market.”
– http://kubernetes.io/
“Production-Grade Container Orchestration”
– http://kubernetes.io/docs/whatisk8s/
“Additionally, Kubernetes is not a mere ‘orchestration system’; it eliminates the need for orchestration.”
Term soup
– http://kubernetes.io/
“Production-Grade Container Orchestration”
– http://kubernetes.io/docs/whatisk8s/
“Additionally, Kubernetes is not a mere ‘orchestration system’; it eliminates the need for orchestration.”
Term soup
– http://kubernetes.io/
“Production-Grade Container Orchestration”
– http://kubernetes.io/docs/whatisk8s/
“Additionally, Kubernetes is not a mere ‘orchestration system’; it eliminates the need for orchestration.”
Term soup
@MkHeck #cloud #containers
What IS orchestration?
“Back to basics” definition
Orchestration is a construct/toolset that:
• handles deployments
• allows for the management of multiple containers as one unit
• maintains targeted instance counts, e.g. scaling
@MkHeck #cloud #containers
“Or”chestrationSome of the ORs…
• Routing
• Load balancing
• Service registry
• Application configuration
• etc.
@MkHeck #cloud #containers
Orchestration “breakdown”
• Docker == container level control
• docker-compose
• coordinates multiple containers
• creates private network
• single instance “focused” (Swarm vs. swarm mode)
@MkHeck #cloud #containers
Orchestration breakdown
• Docker swarm mode
• Kubernetes (K8s)
• Mesos/Marathon: Docker+Marathon, Docker Swarm, or Docker+Kubernetes
• Rancher: Cattle, Docker Swarm, or Docker+Kubernetes
• Triton: Docker+Zones
@MkHeck #cloud #containers
How do cloud/PaaS options compare?
• Orchestration capabilities (& usually much more) baked in (PaaS)
• Amazon Web Services, Microsoft Azure, Google Cloud Platform
• Each supports containers (in different ways)
• Unique approaches/solutions/configuration
@MkHeck #cloud #containers
Vendor-specific clouds
• Solid platforms
• Solid vendors
• Control?
• “Switching costs” (for devs)
• Public vs. on-premises decided for you (effectively public cloud only)
@MkHeck #cloud #containers
Cloud Foundry• Foundation holds all IP (63 members)
• Open source
• Numerous providers: CenturyLink, GE, HP, Huawei, IBM, Pivotal, SAP, …
• Support for containers
• You choose/control underlying IaaS
• Public and on-premises options, one consistent API
@MkHeck #cloud #containers
Images vs. Buildpacks• Some cloud providers (CF, Heroku, et al) offer conceptual alternative
• Distinction is deployable unit
• Intermediate objectives are the same
• End goal is the same
• Mechanics are different
• As humans, WE WANT IT ALL!
@MkHeck #cloud #containers
Images vs. BuildpacksBuildpacks
• More flexible & mature capabilities within all CF variants
• Container OS can be patched by admin w/o rebuilding app
• App libs can be "freshened" with a simple app restage
• Can define env vars in manifest and do a one-step deploy
Docker images
• Can use Docker images from public repository
• Can control when container OS is patched (flip side: devs have responsibility for it)
• Don't expose Dockerfile-defined env vars to app exposed as ENTRYPOINT
@MkHeck #cloud #containers
Cloud & Containers TL;DR
• Lines increasingly blurred
• “Docker brand” containers specifically? Images vs. Engine?
• Differences for developers
• Differences for operations
@MkHeck #cloud #containers
Why should I care? Or should I?• Consistency
• Portability
• Build integration with CI/CD pipelines
• Community
• Transferability of skills
• What do you think?
https://github.com/mkheck/CloudsAndContainers
@MkHeck