part 1: the developer experience (pivotal cloud platform roadshow)

69
© Copyright 2014 Pivotal. All rights reserved. Pivotal Cloud Platform Deep Dive Part 1: The Developer Experience Pivotal CF Team 1

Upload: pivotal

Post on 15-Jan-2015

1.204 views

Category:

Software


5 download

DESCRIPTION

Part 1: The Developer Experience This workshop introduces the business “why” of Cloud Foundry with a nod to Microservices architectures. It then takes the developer through a hands-on “day in the life” experience of interacting with Pivotal Web Services: Target My Cloud Foundry Provider - walkthrough of PWS registration, download CF CLI, target/login Push My App - push the Spring Music application, high-level talk through of app push/stage/deploy Bind My App to Backing Services - bind Spring Music to an ElephantSQL PostgreSQL database, high-level talk through of service creation/binding, explain VCAP_SERVICES, point to Spring Cloud Scale My App - push cf-scale-boot application, scale up, scale down, high-level talk through of dynamic routing Monitor My App’s Logs - tail cf-scale-boot logs, high-level discussion of loggregator Monitor My App’s Health - hit the “kill switch” in cf-scale-boot, watch the events in the logs, show cf events, watch the app restart, high-level talk through of health manager Monitor My App’s Performance - bind to New Relic service, re-push application, high-level discussion of NR agent fetching via BP, poke around in NR interface Pivotal Cloud Platform Roadshow is coming to a city near you! Join Pivotal technologists and learn how to build and deploy great software on a modern cloud platform. Find your city and register now http://bit.ly/1poA6PG

TRANSCRIPT

Page 1: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Pivotal Cloud Platform Deep DivePart 1: The Developer Experience

Pivotal CF Team

1

Page 2: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

The Developer Experience• Target My Cloud Foundry Provider

• Push My App

• Bind My App to Backing Services

• Scale My App

• Monitor My App’s Logs

• Monitor My App’s Health

• Monitor My App’s Performance

2

Page 3: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 3

https://run.pivotal.io

Page 4: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 4

Page 5: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 5

Page 6: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 6

Page 7: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 7

Page 8: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 8

Page 9: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 9

Page 10: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 10

1. Download the CLI according to your OS

2. Target the cloud

Page 11: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Welcome to Cloud Foundry!

11

Pivotal CF

Page 12: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

The Developer Experience• Target My Cloud Foundry Provider

• Push My App

• Bind My App to Backing Services

• Scale My App

• Monitor My App’s Logs

• Monitor My App’s Health

• Monitor My App’s Performance

12

Page 13: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 13

https://github.com/Pivotal-Field-Engineering/PCF-demo

Login to the CLI

Clone the app

Push the app

Verify app is running

!

Application push

cf api api.run.pivotal.io

cf login

$

$

Email:

Password:

[email protected]

**************

Page 14: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 14

https://github.com/Pivotal-Field-Engineering/PCF-demo

Clone or Download

Login to the CLI

Clone the app

Push the app

Verify app is running

!

Application push

Page 15: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 15

cf push

Login to the CLI

Clone the app

Push the app

Verify app is running

!

Application push

cd PCF-demo

cf push

$

PCF-demo$

Page 16: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 16

Login to the CLI

Clone the app

Push the app

Verify app is running

!

Application push

Navigate to the PWS Web Console

Page 17: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 17

Page 18: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 18

Page 19: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 19

Page 20: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

The Developer Experience• Target My Cloud Foundry Provider

• Push My App

• Bind My App to Backing Services

• Scale My App

• Monitor My App’s Logs

• Monitor My App’s Health

• Monitor My App’s Performance

20

Page 21: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Service creation and bind

21

Create Service

Bind service

Restart App

Verify

!

Click on "Marketplace"

Page 22: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Service creation and bind

22

Create Service

Bind service

Restart App

Verify

!

Choose “Cloud AMQP” (RabbitMQ)

Page 23: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Service creation and bind

23

Create Service

Bind service

Restart App

Verify

!

Select the free plan

Page 24: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Service creation and bind

24

Create Service

Bind service

Restart App

Verify

!

Give it a name and bind it to the app

Page 25: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 25

Create Service

Bind service

Restart App

Verify

!

Give it a name and bind it to the app

Service creation and bind

Page 26: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Service creation and bind

26

Create Service

Bind service

Restart App

Verify

!

Page 27: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Service creation and bind

27

Create Service

Bind service

Restart App

Verify

!

Page 28: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Service creation and bind

28

Create Service

Bind service

Restart App

Verify

!

Click here

Page 29: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Service creation and bind

29

Create Service

Bind service

Restart App

Verify

! Heat Map gets activated as orders come

Page 30: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Service creation and bind

30

Create Service

Bind service

Restart App

Verify

!

Page 31: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 31

Create Service

Bind service

Restart App

Verify

!

cf env pcfdemo $

Service creation and bind

Page 32: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 32

$

Service creation and bind

Create Service

Bind service

Restart App

Verify

!

Page 33: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

The Magic is in Spring Cloud Connectors

33

http://cloud.spring.io/spring-cloud-connectors

Page 34: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 34

Cloud Foundry Connector

Heroku Connector

Core

Spring Service Connector

Spring Cloud Connectors Modules

Page 35: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

From VCAP_SERVICES to Connection Bean

35

Page 36: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

The Developer Experience• Target My Cloud Foundry Provider

• Push My App

• Bind My App to Backing Services

• Scale My App

• Monitor My App’s Logs

• Monitor My App’s Health

• Monitor My App’s Performance

36

Page 37: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 37

Scale instances

Verify

!

Scale my App

Page 38: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Scale my App

Page 39: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Page 40: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 40

Scale instances

Verify

!

Scale my App

Page 41: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 41

Scale instances

Verify

!

Scale my App

Page 42: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved. 42

Scale instances

Verify

!

Scale my App

Page 43: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

The Developer Experience• Target My Cloud Foundry Provider

• Push My App

• Bind My App to Backing Services

• Scale My App

• Monitor My App’s Logs

• Monitor My App’s Health

• Monitor My App’s Performance

43

Page 44: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

cf logs

cf events

Kill app

Verify fail-over

Recover failed instance

cf logs pcfdemo $

Logs, Events and Health Management

Page 45: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

cf logs

cf events

Kill app

Verify fail-over

Recover failed instance

cf events pcfdemo $

Logs, Events and Health Management

Page 46: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Logs, Events and Health Management

cf logs

cf events

Kill app

Verify fail-over

Recover failed instance

Page 47: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Logs and Health Management

cf logs

Kill app

Verify fail-over

Recover failed instance

Page 48: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Logs and Health Management

cf logs

Kill app

Verify fail-over

Recover failed instance

Page 49: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

cf logs

cf events

Kill app

Verify fail-over

Recover failed instance

Logs, Events and Health Management

Click me!

Page 50: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

cf logs

cf events

Kill app

Verify fail-over

Recover failed instance

Logs, Events and Health Management

Click me!

Page 51: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Page 52: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

cf logs

cf events

Kill app

Verify fail-over

Recover failed instance

Logs, Events and Health Managementbut… App is still up !!!

Page 53: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

cf logs

cf events

Kill app

Verify fail-over

Recover failed instance

Logs, Events and Health Management

Refresh page and see IP changing

Page 54: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

cf logs

cf events

Kill app

Verify fail-over

Recover failed instance

Logs, Events and Health Management

Page 55: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

cf logs

cf events

Kill app

Verify fail-over

Recover failed instance

Logs, Events and Health Management

Few seconds and all instances are back again. No intervention needed.

Page 56: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

cf logs

cf events

Kill app

Verify fail-over

Recover failed instance

Logs, Events and Health Management

Page 57: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

The Developer Experience• Target My Cloud Foundry Provider

• Push My App

• Bind My App to Backing Services

• Scale My App

• Monitor My App’s Logs

• Monitor My App’s Health

• Monitor My App’s Performance

57

Page 58: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Create/Bind New Relic

Re-push app

Check New Relic

Monitor App Performance

Page 59: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Create/Bind New Relic

Re-push app

Check New Relic

Monitor App Performance

Page 60: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Create/Bind New Relic

Re-push app

Check New Relic

Monitor App Performance

Page 61: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Create/Bind New Relic

Re-push app

Check New Relic

Monitor App Performance

cf push PCF-demo$

Page 62: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Create/Bind New Relic

Re-push app

Check New Relic

Monitor App Performance

Page 63: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Create/Bind New Relic

Re-push app

Check New Relic

Monitor App Performance

Page 64: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Create/Bind New Relic

Re-push app

Check New Relic

Monitor App Performance

Page 65: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

It’s Time for New Relic

65

Page 66: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

The Developer Experience• Target My Cloud Foundry Provider

• Push My App

• Bind My App to Backing Services

• Scale My App

• Monitor My App’s Logs

• Monitor My App’s Health

• Monitor My App’s Performance

66

Page 67: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

Coming Up•Break (11:30 - 11:45)

• Part Two (11:45 - 1:00)

•Architecture and Operations

• Lunch and Keynote (1:00 - 2:30)

•Break (2:30 - 2:45)

• Part Three (2:45 - 4:00)

• Enabling Continuous Delivery

•Break (4:00 - 4:15)

• Part Four (4:15 - 5:30)

•Custom Buildpacks & Data Services

•DEMO: Write and Deploy a Service Broker

67

Page 68: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

© Copyright 2014 Pivotal. All rights reserved.

THANK YOU!See you after the break!

68

Page 69: Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)

A NEW PLATFORM FOR A NEW ERA