Rapid Application Development in the Cloud and On-Premises with Docker

54
Rapid Application Development in the Cloud and On-Premises with Docker Niklas Heidlo, IBM Bluemix Developer Advocate @nheidloheidlo.net

Transcript of Rapid Application Development in the Cloud and On-Premises with Docker

Page 1: Rapid Application Development in the Cloud and On-Premises with Docker

Rapid Application Development!in the Cloud and On-Premises!

with Docker !

Niklas Heidloff, IBMBluemix Developer [email protected]

Page 2: Rapid Application Development in the Cloud and On-Premises with Docker

Rapid Application Development!§  Need for speed

§  Deliver new apps in days rather than months§  Innovate via functional prototypes rather than UI sketches

§  Need for simplicity§  Enable different types of developers including line of business

developers to build valuable apps

Page 3: Rapid Application Development in the Cloud and On-Premises with Docker

New Methodologies and new Technologies!§  New methodologies

§  Agile§  Design Thinking / Minimal Viable Product

§  New technologies§  Open Source§  StackOverflow§  Tools, platforms, languages

Page 4: Rapid Application Development in the Cloud and On-Premises with Docker

Rapid Deployment ?!§  Coding is often rapid, but deployment is (mostly) not§  Issue: Different target platforms with different configurations

§  Expanded role of developers: Not only responsible to write code but responsible for full life cycle up to the testing in production environments§  Old developer excuse “it works on my machine” doesn’t count any

longer

Page 5: Rapid Application Development in the Cloud and On-Premises with Docker

DevOps!§  DevOps supports developers to automate testing and

deployments through delivery pipelines

§  But deployments can still be challenging§  Different types of applications§  Different target environments

Page 6: Rapid Application Development in the Cloud and On-Premises with Docker

Containers to the Rescue!

Page 7: Rapid Application Development in the Cloud and On-Premises with Docker

Containers vs. VMs!§  Lighter weight than VMs (virtual machines)

graphics from docker.com

Page 8: Rapid Application Development in the Cloud and On-Premises with Docker

Enter Docker!§  Standardizes the packaging of applications and container

runtimes§  Write once run everywhere§  Package once deploy everywhere

Page 9: Rapid Application Development in the Cloud and On-Premises with Docker

Introduction to Docker!§  Enabling application development efficiency, �

making deployment more efficient, �eliminating vendor ‘lock-in’ with true portability

§  Open§  Software§  Contribution§  Design§  Governance

Page 10: Rapid Application Development in the Cloud and On-Premises with Docker

Docker Terminology!

§  Image

§  Container

§  Registry

§  Engine

Cloud On Prem

Page 11: Rapid Application Development in the Cloud and On-Premises with Docker

Demo!§  Simple Java web application on Liberty Profile§  Create image locally§  Run container locally

Page 12: Rapid Application Development in the Cloud and On-Premises with Docker

Sample Servlet!

Page 13: Rapid Application Development in the Cloud and On-Premises with Docker

Dockerfile!

Page 14: Rapid Application Development in the Cloud and On-Premises with Docker

Build Image!

Page 15: Rapid Application Development in the Cloud and On-Premises with Docker

Run Container!

Page 16: Rapid Application Development in the Cloud and On-Premises with Docker

Sample Application!

Page 17: Rapid Application Development in the Cloud and On-Premises with Docker

Same Sample on Tomcat!

Page 18: Rapid Application Development in the Cloud and On-Premises with Docker

Spring Boot Sample!

Page 19: Rapid Application Development in the Cloud and On-Premises with Docker

Docker Maven Plugin!§  rhuss/docker-maven-plugin to build images and run

containers

§  mvn docker:build§  mvn docker:start§  mvn docker:stop§  mvn �

-Ddocker.removeAll �docker:remove

Page 20: Rapid Application Development in the Cloud and On-Premises with Docker

Registries to share Images!§  Docker Hub

§  Public§  Private�

§  Docker Trusted Registry

Page 21: Rapid Application Development in the Cloud and On-Premises with Docker

Docker on IBM Bluemix!§  Bluemix is IBM’s application platform in the cloud based on

Cloud Foundry§  IBM extends and connects Docker containers to

production-ready enterprise environments§  IBM hosted private registry§  Run containers in local datacenters or in the cloud§  External IP addresses§  Integrated monitoring and logging§  Security readiness guidance via Vulnerability Advisor

Page 22: Rapid Application Development in the Cloud and On-Premises with Docker

Demo!§  Push image to Bluemix§  Create container on Bluemix§  Monitor container

Page 23: Rapid Application Development in the Cloud and On-Premises with Docker

Tag Image!

Page 24: Rapid Application Development in the Cloud and On-Premises with Docker

Push Image!

Page 25: Rapid Application Development in the Cloud and On-Premises with Docker

Push Image (cont.)!

Page 26: Rapid Application Development in the Cloud and On-Premises with Docker

Image Registry!

Page 27: Rapid Application Development in the Cloud and On-Premises with Docker

Run Container!

Page 28: Rapid Application Development in the Cloud and On-Premises with Docker

Running Container – Overview !

Page 29: Rapid Application Development in the Cloud and On-Premises with Docker

Sample Application!

Page 30: Rapid Application Development in the Cloud and On-Premises with Docker

Running Container – Instances !

Page 31: Rapid Application Development in the Cloud and On-Premises with Docker

Running Container – Monitoring !

Page 32: Rapid Application Development in the Cloud and On-Premises with Docker

Running Container – Logs !

Page 33: Rapid Application Development in the Cloud and On-Premises with Docker

Running Container – Advanced Logs !

Page 34: Rapid Application Development in the Cloud and On-Premises with Docker

Vulnerability Advisor!

Page 35: Rapid Application Development in the Cloud and On-Premises with Docker

Vulnerability Advisor (cont.)!

Page 36: Rapid Application Development in the Cloud and On-Premises with Docker

Automation via Delivery Pipelines!§  To simplify the process to build images and run containers,

delivery pipelines can be used §  Different deployment strategies can be used to deploy to

different target environments without downtimes

Page 37: Rapid Application Development in the Cloud and On-Premises with Docker

Demo!§  Automate deployments via delivery pipelines

Page 38: Rapid Application Development in the Cloud and On-Premises with Docker

Java Code Modification!

Page 39: Rapid Application Development in the Cloud and On-Premises with Docker

Push Change!

Page 40: Rapid Application Development in the Cloud and On-Premises with Docker

Automatic Maven Build!

Page 41: Rapid Application Development in the Cloud and On-Premises with Docker

Automatic Docker Build!

Page 42: Rapid Application Development in the Cloud and On-Premises with Docker

Automatic Container Creation!

Page 43: Rapid Application Development in the Cloud and On-Premises with Docker

Completed Deployment!

Page 44: Rapid Application Development in the Cloud and On-Premises with Docker

Changed Application!

Page 45: Rapid Application Development in the Cloud and On-Premises with Docker

Bluemix Services for Docker Applications!§  Bluemix allows not only the hosting of Docker applications

but also provides more than 100 services to build rapidly applications without having to set up infrastructure

§  Services are provisioned when added to applications and can be accessed via REST APIs (plus other language bindings) with user specific credentials

Page 46: Rapid Application Development in the Cloud and On-Premises with Docker

Bluemix Services!§  Databases§  Services to build web apps§  Cognitive services§  Backends for mobile apps§  Internet of Things§  Analytics and Big Data§  Access to on-prem services and data

Page 47: Rapid Application Development in the Cloud and On-Premises with Docker

Demo!§  Leverage Bluemix services

Page 48: Rapid Application Development in the Cloud and On-Premises with Docker

Docker to Cloud Foundry Bridge!

Page 49: Rapid Application Development in the Cloud and On-Premises with Docker

Bind Services!

Page 50: Rapid Application Development in the Cloud and On-Premises with Docker

Bind Services (cont.)!

Page 51: Rapid Application Development in the Cloud and On-Premises with Docker

Bound Service with Credentials!

Page 52: Rapid Application Development in the Cloud and On-Premises with Docker

Sample Application accessing Credentials!

Page 53: Rapid Application Development in the Cloud and On-Premises with Docker

Take-Aways!§  Docker containers allow the standardized packaging of

applications and easy deployments to different environments

§  Docker is currently the de-facto container standard and is evolving into the Open Container Initiative

§  IBM adds enterprise capabilities for Docker images and containers

§  Try Docker in the cloud via the 30 days trial of Bluemix

Page 54: Rapid Application Development in the Cloud and On-Premises with Docker

Thank you!