- Codemotion Rome 2015

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

Transcript of - Codemotion Rome 2015

Page 1: - Codemotion Rome 2015

ROME 27-28 march 2015

IBM Bluemix e Docker un matrimonio ricco di IBM Bluemix e Docker un matrimonio ricco di IBM Bluemix e Docker un matrimonio ricco di IBM Bluemix e Docker un matrimonio ricco di

sorprese per soluzioni Hybrid Cloudsorprese per soluzioni Hybrid Cloudsorprese per soluzioni Hybrid Cloudsorprese per soluzioni Hybrid Cloud

[email protected] – IBM@gjuljo

Giulio SantoliGiulio SantoliGiulio SantoliGiulio Santoli

ibm.biz/Bluemix2015

Page 2: - Codemotion Rome 2015

ROME 27-28 march 2015 - Giulio Santoli

IBM Bluemix

+ =

To the bride and groom!

Page 3: - Codemotion Rome 2015

ROME 27-28 march 2015 - Giulio Santoli

Bluemix is an openopenopenopen----standardsstandardsstandardsstandards, cloud-based platformplatformplatformplatform for buildingbuildingbuildingbuilding, running, and running, and running, and running, and

managing applications.managing applications.managing applications.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

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

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

ROME 27-28 march 2015 - Giulio Santoli

Bluemix DevOps Services

Cloud

Foundry

Docker

Containers

Open Stack

VMs

Agile

Planning

Web IDE

(Orion)

Delivery

Pipeline

Git

Hosting

BETA

Bluemix & DevOps ServicesBluemix is an application runrunrunrun----timetimetimetime environment, DevOps Services handles the

software lifecyclelifecyclelifecyclelifecycle, from project to delivery.

BETA

Page 7: - Codemotion Rome 2015

ROME 27-28 march 2015 - Giulio Santoli

7

Introducing DockerWhat is What is What is What is DockerDockerDockerDocker????

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

How is this different from Virtual Machines?How is this different from Virtual Machines?How is this different from Virtual Machines?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

ROME 27-28 march 2015 - Giulio Santoli

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

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

• DockerfileDockerfileDockerfileDockerfile – 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

• DockerDockerDockerDocker Hub Hub Hub Hub – centralised repository of Docker images

8

Docker Terminology

Page 9: - Codemotion Rome 2015

ROME 27-28 march 2015 - Giulio Santoli

• MachineMachineMachineMachine

– Create a new Docker host/VM

• SwarmSwarmSwarmSwarm

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

• Compose (Fig)Compose (Fig)Compose (Fig)Compose (Fig)

– Group multiple containers into a single deployable unit

Additional Docker Projects

Page 10: - Codemotion Rome 2015

ROME 27-28 march 2015 - Giulio Santoli

• Member of the Governance Advisory BoardGovernance Advisory BoardGovernance Advisory BoardGovernance Advisory Board

• Strategic partnership with Docker

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

• IBM Containers service on BluemixBluemixBluemixBluemix

– Security

– Multi-container, single- & multi-host

– Scaling group and auto-recovery

• Docker portings to Linux on PowerPowerPowerPower and System zSystem zSystem zSystem z

• Docker support for PureApplicationsPureApplicationsPureApplicationsPureApplications Patterns

• ContainerisedContainerisedContainerisedContainerised IBM software on Docker Hub

IBM & Docker

Page 11: - Codemotion Rome 2015

ROME 27-28 march 2015 - Giulio Santoli

• Scenario 1: Scenario 1: Scenario 1: Scenario 1: everything on local

– Both application and database running on the laptop

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

– Application running on Bluemix using Cloudant

• Scenario 3: Scenario 3: Scenario 3: Scenario 3: dockerized application on local

– Dockerized application using the local database

• Scenario 4Scenario 4Scenario 4Scenario 4: dockerized application on Bluemix

– Dockerized application on Bluemix using Cloudant

Demo (Node.js & CouchDB)

Page 12: - Codemotion Rome 2015

ROME 27-28 march 2015 - Giulio Santoli

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

Page 13: - Codemotion Rome 2015

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

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

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

ROME 27-28 march 2015 - Giulio Santoli

Thank you!

Put to see with Bluemix & Docker

ibm.biz/Bluemix2015ibm.biz/Bluemix2015ibm.biz/Bluemix2015ibm.biz/Bluemix2015

Page 17: - Codemotion Rome 2015

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

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

ROME 27-28 march 2015 - Giulio Santoli

Leave your feedback on Joind.in!

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