Cloud native applications are composed of containers, serverless functions and managed cloud services.
What is the best set of tools on your desktop to provide a rapid, iterative development experience and package applications using these three components?
This hand-on talk will explain how you can complement Docker Desktop, with it’s local Docker engine and Kubernetes cluster, with open source tools such as the Virtual Kubelet, Open Service Broker, the Gloo hybrid app gateway, Draft, and others, to build the most productive development inner-loop for these type of applications.
It will also cover how you can use the Cloud Native Application Bundle (CNAB) format and it’s implementation in the Docker app experimental tool to package your application and manage it with container supply chain tooling such as Docker Hub.
6. Microsoft’s mission
“Our mission is to empower
every person and every
organization on the planet
to achieve more.”
https://www.microsoft.com/en-us/about
7. 3 Abstractions to build cloud apps
• Containers
• Functions, triggered by Events
• Managed Cloud Services
9. Docker Enterprise 3.0
Securely build, share and run any application, anywhere
ANY APPLICATION
EVERY STAGE
ANYWHERE
Hybrid Cloud VM Bare Metal Edge
RunBuild
Share
11. Deploy your
applications quickly
and predictably
Scale your
applications on
the fly
Roll out
new features
seamlessly
Limit hardware
usage to required
resources only
Portable
Public, private, hybrid,
multi-cloud
Extensible
Modular, pluggable,
hookable, composable
Self-healing
Auto-placement, auto-restart,
auto-replication, auto-scaling
Kubernetes
13. Containers in Azure
Choice of developer tools and clients
Azure Container Registry Docker Hub
App Service
Deploy web apps or
APIs using
containers in a PaaS
environment
Service Fabric
Modernize .NET
applications to
microservices using
Windows Server
containers
Kubernetes Service Container Instance
Scale and orchestrate
Linux containers using
Kubernetes
Ecosystem
Bring your Partner
solutions that run
great on Azure
Elastically burst from
your Azure Kubernetes
Service (AKS) cluster
17. *Supporting services, like storage and networking, may be charged separately.
Pay-per-use
Only pay for what you use: billing is typically calculated on
the number of function calls,
code execution time, and memory used.*
Instant, event-driven scalability
Application components react to events and triggers in
near real-time with virtually unlimited scalability;
compute resources are used as needed.
Full abstraction of servers
Developers can just focus on their code—there are
no distractions around server management, capacity
planning, or availability.
What is serverless?
18. FaaS is at the center of serverless
Functions-as-a-Service programming model use functions to achieve true serverless compute
Single responsibility
Functions are single-
purposed, reusable pieces of
code that process an input
and return a result
Short lived
Functions don’t stick around
when finished executing,
freeing up resources for further
executions
Event driven & scalable
Functions respond to
predefined events, and are
instantly replicated as many
times as needed
Stateless
Functions don’t hold any
persistent state and don’t
rely on the state of any other
processes
19. What is Azure Functions?
Anevent-based,serverlesscomputeexperiencethatacceleratesappdevelopment
Azure Functions = FaaS++
Integrated programming model
Use built-in triggers and bindings to define when
a function is invoked and to what data it connects
Enhanced development experience
Code, test and debug locally using your preferred editor or the
easy-to-use web based interface including monitoring
Hosting options flexibility
Choose the deployment model that better fits your business
needs without compromising development experience
20. Boost development efficiency
Integrate with Azure Application Insights
Get near real-time details about function apps
See metrics around failures, executions, etc.Monitoring
Save time with built-in DevOps
Deploy functions using App Service for CI
Leverage Microsoft, partner services for CDCI/CD
Use triggers to define how functions are invoked
Avoid hardcoding with preconfigured JSON files
Build serverless APIs using HTTP triggersTriggers
Connect to data with input and output bindings
Bind to Azure solutions and third-party services
Use HTTP bindings in tandem with HTTP triggersBindings
Define one API surface for multiple function apps
Create endpoints as reverse proxies to other APIs
Condition proxies to use variablesProxies
Debug C# and JavaScript functions locally
Use debugging tools in Azure portal, VS, and VS Code
Local
debugging
21. Gain flexibility and develop your way
Write code in C#, JavaScript, F#, and Java
Continuous investment in new, experimental languagesMultiple
languages
Simplify coding for new users with native Azure portal
Select from popular editors, like VS, VS Code, CLI, Maven*Dev options
Choose from six consumption plans to run Functions
Run your first million function executions for freeHosting
options
*VS and VS Code only support C#; Maven only supports Java
Write stateful functions in a serverless environment
Simplify complex, stateful coordination problems
Add the extension to enable advanced scenarios
Durable
Functions
22. Azure Functions is an open-source project
Functionsruntimeandallextensionsarefullyopensource
https://github.com/Azure/Azure-Functions
27. Use Azure Managed Data Platform Services
AZURE SEARCH
AZURE
DATA CATALOG
AZURE STORAGE
BLOBS
AZURE DATA LAKE
STORE
AZURE SQL DATA
WAREHOUSE AZURE SQL DB AZURE COSMOS DB
AZURE
ANALYSIS SERVICES
POWER BI
AZURE DATA LAKE
ANALYTICS
AZURE
HDINSIGHT
AZURE
DATABRICKS
AZURE
STREAM ANALYTICS
AZURE ML ML SERVER
AZURE MySQL DB AZURE PostgreSQL
DB
REDIS CACHE
28. Open Service Broker for Azure (OSBA)
Open Service
Broker for Azure
(OSBA)
SQL
Database
Event
Hubs
Redis
Cache
MySQL
Database
Cosmos
DB
PosgreSQL
Database
Service
Bus
Azure
Storage
Cloud
Foundry Kubernetes
Service
FabricOpenShift
Easily access to SLA-backed Azure Services such as Azure Database for MySQL
30. Microsoft drives community-led innovations for Kubernetes
Microsoft also maintains…
Cloud Native
Application Bundles
(CNAB)
Virtual
KubeletHelm BrigadeDraft
68% of Kubernetes users* prefer Helm as their package manager
Visual Studio Code Kubernetes Extensions has 11K monthly active users
*August 2018 bi-annual CNCF survey
31.
32. Find, share, and use software built for k8s
Manage complexity Easy updates
Simple sharing Rollbacks
33. Simple app development and deployment – into any Kubernetes cluster
Simplified development
Using two simple commands,
developers can now begin working on
container-based applications without
requiring Docker or even installing
Kubernetes themselves
Language support
Draft detects which language your app is
written in, and then uses packs to
generate a Dockerfile and Helm Chart
with the best practices for that language
40. Enterprise management
& security, developer
productivity, local
Kubernetes runtime
Native local Docker and certified
Kubernetes runtimes for container-first
application development for Windows 10
and Mac
Automated, template-driven generation
of IT-approved Dockerfiles, Docker
Compose files, and CI pipelines boosts
developer productivity
Match desktop and server environments
to avoid “works on my machine” friction
Centrally manage and secure DDE
deployment, upgrades, and
configurations
Commercial enterprise support
Docker Desktop Enterprise
41. Accelerate “Time-to-
Docker” for Developers
While Lowering App
Pipeline Friction
Fastest & easiest way to onboard
developers to new Docker projects
Supports developer choice of
programming languages and application
frameworks
Accelerates developer productivity with
Docker while delivering secure and
compliant applications
Provides options between CLI and GUI
to meet the needs of developers with
varying Docker expertise
Docker Application
Templates
43. Capabilities
1. Use Azure Dev Spaces to iteratively
develop, test, and debug microservices
targeted for AKS clusters.
2. Azure DevOps has native integration with
Helm and helps simplifying continuous
integration/continuous delivery (CI/CD)
3. Virtual node—a Virtual Kubelet
implementation—allows fast scaling of
services for unpredictable traffic.
4. Azure Monitor provides a single pane of
glass for monitoring over app telemetry,
cluster-to-container level health analytics.
https://github.com/Microsoft/SmartHotel360-AKS-DevSpaces-Demo
Source
code control
Inner loop
Azure
Container
Registry
Azure Pipeline/
DevOps Project
Auto-build
Azure
Monitor
CI/CD
Test
Debug
Azure
DevSpaces
AKS dev
cluster
AKS production cluster
Pods
Container instances
Pods
1
2
3
4
Integrated end-to-end Kubernetes experience
51. VS Code Live Share
• You just need VS Code locally
• Code and all setup on your collaborator’s machine
• Code together without setting anything up
• Access services on remote machine from localhost
• Works with Azure Dev Spaces on machine sharing
the session: double jump to AKS
52. VS Code Live Share with Luca Snoey
Github: @tess1254
Twitter: @Snowy_Turtle
Medium: https://medium.com/@Snowy_Turtle
LinkedIn: https://www.linkedin.com/in/luca-snoey-41911417a/
MS Learn: https://techprofile.microsoft.com/en-us/lucasandbox
54. SOLO GLOO, THE NEXT GENERATION API GATEWAY
www.solo.io/glooe
55. THE PROBLEM: DISPARATE ECOSYSTEMS, HARD TRANSITION
Monolithic Apps Microservices Serverless
Ansible Kubernetes Azure Functions
APM
Splunk
SOA
Prometheus
OpenTracing
microservices
Azure Monitor
App Insight
Event-driven
Enterprise faces 4 main problems in adopting
innovative architectures:
1. Insolation between brown and green
field
2. Transition is lengthy and diverts essential
personnel from core mission
3. Duplicate redundant tools
4. Requires silo teams
67. Spec for packaging distributed apps
CNAB: package distributed apps
CNABs facilitate the bundling,
installing and managing of
container-native apps — and their
coupled services
Cloud Native Application Bundle
68. Install and manage distributed app bundles
Duffle: install & manage
distributed app bundles
Simple CLI to interact with CNAB,
for use with your clouds and
services of choice
Duffle
69. A friendlier cloud installer
Install your app and its baggage
Bundle up not just the app, but
everything it needs to run in the
cloud
Build bundles smarter, not harder
Use mixins for common tools and
clouds, and depend on existing
bundles.
Surprise! It does package
management too
Package and version your bundle,
then distribute it for others to use.
70. Simplify Application
Delivery
“Container of containers” defines an
application that can be comprised of
multiple services
Removes the need to manage
“mountains of YAML” and eliminates
configuration overhead
Supports Docker Compose, Kubernetes
YAML, Helm Charts, others
Implements the new open standard,
CNAB, announced by Docker and
Microsoft
Parameterized fields allow for flexible
deployment across different
environments, delivering on “code once,
deploy anywhere”
my-app.yml
Docker App
APP DESCRIPTION
name-version-maintainer
APP COMPONENTS
ENVIRONMENT
VARIABLES
default-settings.yml
Build, share and run
multi-service apps in a
single package
deployable to any
infrastructure
Docker Applications
71. Docker app
• Docker app available today in CLI beta with CLI
plugin
• Implements CNAB spec: install, upgrade, uninstall -
bundle to create invocation image & bundle.json
• Sharing compose based app definitions in Docker
Hub
72. ● Developing Cloud Native Applications with Docker
Desktop and Cloud Services
○ Black belt: 30 April, 4:40 pm, Room 3016
○ Patrick Chanezon
● Porter: an Opinionated CNAB Authoring Experience
○ Open source: 1 May, 4:40 pm, Room 2002
○ Jeremy Rickard
● CNAB panel
○ OSS summit: 2 May, 1:30 pm, Room 2006
○ Michelle Noorali, Darren Pulsipher, Simon Ferquel
CNAB at DockerCon
73. ● Developing New Applications with Docker App
Package
○ Workshop
● Compose and Docker App
○ OSS summit: 2 May, 10:00 am, Room 2006
Docker App at DockerCon
74. Rate & Share
Rate this session in the DockerCon
App
Follow me @chanezon
Tweet #DockerCon
Building on top of the FaaS programming model, Azure Functions keep all the mentioned features and extend your possibilities with additional capabilities that help to reduce your development time and boost productivity, while using best in class tools.
Additional information
Triggers and bindings – https://docs.microsoft.com/en-us/azure/azure-functions/functions-triggers-bindings
Monitoring—https://azure.microsoft.com/en-us/services/application-insights/
Local debugging—https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local#run-functions-locally
CI/CD—https://docs.microsoft.com/en-us/azure/azure-functions/functions-continuous-deployment
Run locally—https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local
Proxies—https://docs.microsoft.com/en-us/azure/azure-functions/functions-proxies
Additional information
Languages—https://docs.microsoft.com/en-us/azure/azure-functions/supported-languages
Dev options—
Azure Functions portal—https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-azure-function
Visual Studio—https://docs.microsoft.com/en-us/azure/azure-functions/functions-develop-vs
Visual Studio Code—https://code.visualstudio.com/docs
CLI—https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-azure-function-azure-cli
Java/Maven—https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-java-maven
Hosting options—https://azure.microsoft.com/en-us/pricing/details/functions/
Durable Functions—https://docs.microsoft.com/en-us/azure/azure-functions/durable-functions-overview
Azure Functions spans in about 10 separate projects on GitHub
About 60 contributors from the community across hundreds of commits
All issues and sprints are triaged and tracked fully in the open, anyone can see exactly what code is running in the cloud and what is being worked on next
More info in - https://github.com/Azure/Azure-Functions
And that’s not all! Sure, Terraform plus AKS is a winning combo, but Team Azure is also involved in lots of super-cool k8s ecosystem open source. Take Helm, for example! Which is now a CNCF incubating project - we donated the IP. At this point I always feel like I need to have a content warning for YAML - if YAML upsets you, there will be so much YAML. And we need to manage all that YAML between all our environments and versions!
We use helm in AKS, azure dev spaces, azure pipelines, azure devops - this isn’t a “drink our own champagne” story - these tools support us too!
Helm manages complexity, has easy updates, allows you to easily version and share, and allows for easy release rollback. So let’s go into more detail on each!
Draft is simple app development and deployment into any kubernetes cluster. Two simple commands is all it takes for developers to start working on container-based applications. Draft also detects the language your applications are written in and uses packs to generate a Dockerfile and Helm Chart based on that programming language.
Docker Desktop Enterprise
Enterprise management & security, developer productivity, local Kubernetes runtime
If / when customers ask, “What’s new in Docker Enterprise 3.0?” … this, Docker Desktop Enterprise (DDE), is the biggest ‘new’ thing.
Significant value for customers in having a complete, end-to-end platform, from desktop to production, because it enforces app runtime environment consistency from beginning to end.
Significant differentiation: Neither Pivotal nor Red Hat yet have a commercially-supported desktop developer environment.
The three major feature categories:
Enterprise management & security
Enterprise IT requires that they, not the developers, control developer’s desktops so as to try and minimize security risks.
Docker Desktop Community does not provide for any control by centralized IT.
Docker Desktop Enterprise is delivered in standard formats (PKG, MSI) that can be managed by centralized IT tools to roll-out, install, configure, upgrade, and secure DDE on developer desktops.
Developer productivity
While each customer typically has a small group of Docker experts, automation tools in DDE are designed to enable the non-Docker experts so that all developers at the customer can be productive and successful with Docker.
Specifically, DDE automation tools (see list below), automatically generate all the Docker “scaffolding” developers need to containerize their apps, ie, Dockerfiles, Docker Compose files, CI pipeline configurations, and Docker images.
Customer business value: Non-Docker expert developers can stay focused on building their applications while still realizing the benefits of the Docker Enterprise platform.
The Docker Enterprise platform’s ability to enable developer productivity while not constraining developers to specific app frameworks (as the PaaS vendors, Pivotal PCF and RH OpenShift, do), a significant differentiator.
Local Kubernetes runtime
Standard, certified Kubernetes - not a fork (in contrast to Red Hat OpenShift …)
Local instance of Kubernetes (and Docker) enables developers to rapidly iterate their “write code - compile code - test app” cycle (aka “inner loop”)
DDE enables developers to match their local Kubernetes (and Docker) environment with the UCP production ops environment for Kubernetes (and Docker). Keeping dev and ops environments consistent reduces friction between developers and ops, enabling faster delivery of applications into production.
The five text blocks on the side speak to specific elements of the above ...
Native local …
The foundation of DDE
“Automated, template-driven” means the following tools ...
Docker Application Designer
Docker Application Templates
Docker Pipeline
Docker Assemble
Match desktop and server environments …
See “keeping dev and ops environments consistent” point above
Centrally manage deployment, upgrades, and configuration
… via Windows MSI and Mac PKG packages, popular formats for enterprise desktop management tools
Commercial enterprise support
… Business Day only
Heads-up
Some enterprise customers, for security reasons, do not allow their developers to run Docker (or Kubernetes) locally on their desktops (as diagrammed in the DTR slide). In these situations, the “inner loop” of the developers “write code - compile code - test app” happens in a “development cluster” that the developer logs in to, not on their desktop. Don’t panic ;-). The Docker Enterprise platform is still relevant in this case (and would enable a “development cluster”), but the customer’s interest in DDE could be less than those customers who allow their developers to execute “inner loop” locally on their desktops.
Small function – move gradually
Decouple – different team (langue agnostic, version …)
Centralize place to control your api security and so on…
Okay, so the new, exciting shiny! Check out cnab.io if you want to jump right in.
CNAB: A spec for packaging distributed apps.
CNABs facilitate the bundling, installing and managing of container-native apps — and their coupled services.
Cloud Agnostic: A CNAB can be composed to utilize whatever infra or services you require - there’s no vendor lock in.
Deliverable Apps
CNABs can be used to easily deliver apps across teams, organizations and marketplaces - even shared offline.
Signed & Secure
A CNAB can be cryptographically signed, attested, and verified to ensure a trustworthy source.
[building all this on brigade]
Duffle is a simple command line tool that interacts with Cloud-Native Application Bundles (CNABs) - helping you package and unpackage distributed apps for deployment on whatever cloud platforms and services you use. - duffle-bag is a GUI, too.
Okay, so that’s a lot. Porter makes using CNAB easier - it’s a declarative bundle builder. When we deploy to the cloud, most of us aren’t dealing with just a single cloud provider or toolchain. The simplest of applications today need nginx, Let’s Encrypt, persistent file storage, DNS, and somewhere in there is your application. One app is installed with Helm, another with the cloud provider’s cli and it’s all glued together with magic bash scripts. That is a lot to figure out! 😅 Porter is a cloud installer that helps you manage everything together in a single bundle, focusing on what you know best: your application. Mixins: classes with methods for use by other classes (while not relying on inheritance). We can describe actions using mixins.