codemotion rome 2015 ibm bluemix and docker

19
ROME 27-28 march 2015 IBM Bluemix e Docker un matrimonio ricco di sorprese per soluzioni Hybrid Cloud [email protected] IBM @gjuljo Giulio Santoli ibm.biz/Bluemix2015

Upload: gjuljo

Post on 15-Jul-2015

386 views

Category:

Software


6 download

TRANSCRIPT

Page 1: Codemotion Rome 2015 IBM Bluemix and Docker

ROME 27-28 march 2015

IBM Bluemix e Docker un matrimonio ricco di

sorprese per soluzioni Hybrid Cloud

[email protected] – IBM

@gjuljo

Giulio Santoli

ibm.biz/Bluemix2015

Page 2: Codemotion Rome 2015 IBM Bluemix and Docker

ROME 27-28 march 2015 - Giulio Santoli

IBM Bluemix

+ =

To the bride and groom!

Page 3: Codemotion Rome 2015 IBM Bluemix and Docker

ROME 27-28 march 2015 - Giulio Santoli

Bluemix is an open-standards, cloud-based platform for building, running, and

managing applications.

IBM DevOps ServicesManage the software lifecycle, from planning

to production

Internet of ThingsIntegrate your apps with the physical world

Watson ServicesLeverage the power of Cognitive Computing in your apps

Dallas

(now)

London

(now)

Bluemix Public Location

SoftLayer Data Center

What is Bluemix?

Page 4: Codemotion Rome 2015 IBM Bluemix and Docker

ROME 27-28 march 2015 - Giulio Santoli

Infrastructure

as a Service

Code

Data

Runtime

Middleware

OS

Virtualization

Servers

Storage

Networking

Code

Data

Runtime

Middleware

OS

Virtualization

Servers

Storage

Networking

Platform

as a Service

Code

Data

Runtime

Middleware

OS

Virtualization

Servers

Storage

Networking

Traditional

on-premises

We started as a public PaaS

Customer Managed

Service Provider Managed

Page 5: Codemotion Rome 2015 IBM Bluemix and Docker

ROME 27-28 march 2015 - Giulio Santoli

Code

Data

Runtime

Middleware

OS

Virtualization

Servers

Storage

Networking

Code

Data

Runtime

Middleware

OS

Virtualization

Servers

Storage

Networking

Code

Data

Runtime

Middleware

OS

Virtualization

Servers

Storage

Networking

But now Bluemix is much more

*Bluemix Local coming Summer 2015

Customer Managed

Service Provider Managed

Infrastructure

as a Service

Platform

as a ServiceTraditional

on-premises

Page 6: Codemotion Rome 2015 IBM Bluemix and Docker

ROME 27-28 march 2015 - Giulio Santoli

Bluemix DevOps Services

CloudFoundry

DockerContainers

Open StackVMs

AgilePlanning

Web IDE(Orion)

DeliveryPipeline

GitHosting

BETA

Bluemix & DevOps ServicesBluemix is an application run-time environment, DevOps Services handles the

software lifecycle, from project to delivery.

BETA

Page 7: Codemotion Rome 2015 IBM Bluemix and Docker

ROME 27-28 march 2015 - Giulio Santoli

7

Introducing DockerWhat is Docker?

“Docker is an open platform for developers and system admins to build, ship, and run distributed applications.”

How is this different from Virtual Machines?

“Docker runs as an isolated process in userspace on the host operating system, sharing the kernel with other containers. Thus, it enjoys the resource isolation and allocation benefits of VMs but is

much more portable and efficient. ”

Page 8: Codemotion Rome 2015 IBM Bluemix and Docker

ROME 27-28 march 2015 - Giulio Santoli

• Image – layered file system where each layer references the layer below

• Container – runtime instance of an image plus a read/write layer

• Dockerfile – build script that defines:

– an existing image as the starting point

– a set of instructions to augment that image (each of which results in

a new layer in the file system)

– meta-data such as the ports exposed

– the command to execute when the image is run

• Docker Hub – centralised repository of Docker images

8

bootfs (Kernel)

ubuntu:14.04 debian:wheezy

ibm-jre:8.0

websphere-liberty:8.5.5 websphere-liberty:beta

app-a app-b app-c app-eapp-d

c1 c2 c3 c4 c5 c6

mongo:latest

c7 c8= container

= image

Docker Terminology

Page 9: Codemotion Rome 2015 IBM Bluemix and Docker

ROME 27-28 march 2015 - Giulio Santoli

• Machine

– Create a new Docker host/VM

• Swarm

– Manage multiple Docker hosts as if they were one big one

• Compose (Fig)

– Group multiple containers into a single deployable unit

Additional Docker Projects

Page 10: Codemotion Rome 2015 IBM Bluemix and Docker

ROME 27-28 march 2015 - Giulio Santoli

• Member of the Governance Advisory Board

• Strategic partnership with Docker

– IBM will deliver Docker Hub Enterprise (DHE) as an on-premise solution

• IBM Containers service on Bluemix

– Security

– Multi-container, single- & multi-host

– Scaling group and auto-recovery

• Docker portings to Linux on Power and System z

• Docker support for PureApplications Patterns

• Containerised IBM software on Docker Hub

IBM & Docker

Page 11: Codemotion Rome 2015 IBM Bluemix and Docker

ROME 27-28 march 2015 - Giulio Santoli

• Scenario 1: everything on local

– Both application and database running on the laptop

• Scenario 2: running on Bluemix (Cloud Foundry style)

– Application running on Bluemix using Cloudant

• Scenario 3: dockerized application on local

– Dockerized application using the local database

• Scenario 4: dockerized application on Bluemix

– Dockerized application on Bluemix using Cloudant

Demo (Node.js & CouchDB)

Page 12: Codemotion Rome 2015 IBM Bluemix and Docker

ROME 27-28 march 2015 - Giulio Santoli

Scenario 1Local: everything (application & database) running on the laptop

Page 13: Codemotion Rome 2015 IBM Bluemix and Docker

ROME 27-28 march 2015 - Giulio Santoli

Scenario 2Cloud Foundry style: application running on Bluemix + Cloudant

Node.js Cloudant

Bluemix

$> cf push myapplication --no-start

$> cf create-service cloudantNoSQLDB Shared mydatabase

$> cf bind-service myapplication mydatabase

$> cf start myapplication

cf push

Page 14: Codemotion Rome 2015 IBM Bluemix and Docker

ROME 27-28 march 2015 - Giulio Santoli

Scenario 3Dockerized local: application running on Bluemix + Cloudant

$> docker build -t myimage .

$> docker run -d --name mycontainer -p 2222:3000 myimage

Page 15: Codemotion Rome 2015 IBM Bluemix and Docker

ROME 27-28 march 2015 - Giulio Santoli

Scenario 4Dockerized on Bluemix: application running on Bluemix + Cloudant

Docker Cloudant

Bluemix

$> docker tag myimage registry-ice.ng.bluemix.net/gjuljo/myimage

$> docker push registry-ice.ng.bluemix.net/gjuljo/myimage

$> ice run -n mycontainer -b myapplication -p 3000 gjuljo/myimage

$> ice ip bind xxx.xxx.xxx.xxx mycontainer

docker push

Page 16: Codemotion Rome 2015 IBM Bluemix and Docker

ROME 27-28 march 2015 - Giulio Santoli

Thank you!

Put to see with Bluemix & Docker

ibm.biz/Bluemix2015

Page 17: Codemotion Rome 2015 IBM Bluemix and Docker

ROME 27-28 march 2015 - Giulio Santoli

References and Docs- BLUEMIX WEBINARS AND DOCS

http://webinars.mybluemix.net/

https://www.ng.bluemix.net/docs

https://developer.ibm.com/bluemix

- PREREQUISITES AND DOWNLOAD

https://developer.ibm.com/bluemix/support/#prereqs

- COMMAND LINE AND VCAP_SERVICES ENVIRONMENT VARIABLE

https://www.ng.bluemix.net/docs/#cli/index.html#cli

http://docs.cloudfoundry.org/devguide/deploy-apps/environment-variable.html

- MANIFEST GUIDE (manifest.yml)

http://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html

- BUILDPACK FROM CLOUD FOUNDRY COMMUNITY

https://github.com/cloudfoundry-community/cf-docs-contrib/wiki/Buildpacks

Page 18: Codemotion Rome 2015 IBM Bluemix and Docker

ROME 27-28 march 2015 - Giulio Santoli

Tutorials- BUILD YOUR FIRST NODE.JS WEB SITE

https://www.youtube.com/watch?v=GRQnwVhYeWU

http://www.ibm.com/developerworks/library/wa-simplenode1-app/index.html

- EXAMPLE HYBRID MOBILE APP AND PUSH NOTIFICATIONhttp://www.ibm.com/developerworks/mobile/library/mo-push-apache-cordova-app

- EXAMPLE JAVA EE AND CLOUDANT

https://developer.ibm.com/bluemix/2014/07/08/cloudant_on_bluemix

- EXAMPLE MEAN STACK (MongoDB, Express, AngularJS, Node.js)

http://www.ibm.com/developerworks/web/library/wa-nodejs-polling-app/index.html

- EXAMPLE NODE-RED, TWITTER AND WATSON Q&Ahttp://www.ibm.com/developerworks/cloud/library/cl-twitterbot-watson-bluemix-app/index.html

- GETTING STARTED WITH DOCKER

https://developer.ibm.com/bluemix/2014/12/04/ibm-containers-beta-docker

Page 19: Codemotion Rome 2015 IBM Bluemix and Docker

ROME 27-28 march 2015 - Giulio Santoli

Leave your feedback on Joind.in!

https://joind.in/event/view/3347