+ All Categories
Home > Documents > 付宁([email protected]) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for...

付宁([email protected]) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for...

Date post: 08-Jul-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
33
Transcript
Page 1: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

付宁([email protected])

Page 2: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

Agenda

1. Service Broker2. API3. CF vs. K8s4. Demo

2

Page 3: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

Agenda

1. Service Broker2. API3. CF vs. K8s4. Demo

3

Page 4: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

4

Page 5: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >
Page 6: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >
Page 7: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >
Page 8: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >
Page 9: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

How to use it

9

Service provider:• Implement a service broker

Page 10: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

How to use it

10

Platform Operator:• Deploy the service broker cf push• Register the broker

cf create-service-broker SERVICE_BROKER USERNAME PASSWORD URL

• Enable access cf enable-service-access myservice

Page 11: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

How to use it

11

Developer:

> cf marketplace> cf create-service p-mysql free mydb> cf bind-service myapp mydb> cf restart myapp

Page 12: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

How to use it

12

> cf marketplace bogon:src pivotal$ cf marketplaceGetting services from marketplace in org Test / space Test as admin...OK

service plans descriptionp-mysql 100mb, 1gb, 20gb MySQL databases on demandp-rabbitmq standard RabbitMQ is a robust and scalable high-performance multi-protocol messaging broker.p-redis dedicated-vm Redis service to provide a key-value storecleardb spark, boost*, amp* Highly available MySQL for your Apps.

Page 13: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

How to use it

13

> cf marketplace> cf create-service p-mysql 1gb mydb> cf bind-service myapp mydb> cf restart myapp

Page 14: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

14

"VCAP_SERVICES": { "p-mysql": [ { "credentials": { "hostname": "...", "jdbcUrl": "...", "name": "...", "password": "...", "port": "...", "uri": "...", "username": "..." }, .... }

How does the app use the database?

Page 15: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >
Page 16: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

➢ Standard➢ Portable➢ Simplify➢ Reuse

Page 17: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

https://www.openservicebrokerapi.org/

Page 18: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

Agenda

1. Service Broker2. API3. CF vs. K8s4. Demo

18

Page 19: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

Service Broker

19

○ Catalog of service & plans○ Provision ○ Bind○ Unbind○ Deprovision ○ …...

Page 20: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

Service Broker

20

Page 21: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

Broker API

cloud controller

DB

broker

cf create-service-broker

GET /v2/catalog

200 OK

{ “services”: [ “name”: “myService”, “plans”: [ { “name”: “plan1”, … }, ... ]}

cf marketplace

service plans descriptionmyService plan1, plan2 super sweet service

Page 22: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

Broker API

cloud controller

DB

broker

cf create-service-broker

GET /v2/catalog

200 OK

cf create-service dummy small myDBPUT /v2/service_instances/:guid

201 CREATEDcf services

name service plan bound appsmyDB dummy small

{ “dashboard_url”:“https://...”}

Page 23: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

Broker API

cloud controller

DB

broker

cf create-service-broker

GET /v2/catalog

200 OK

cf create-service dummy small myDBPUT /v2/service_instances/:guid

201 CREATED

name service plan bound appsmyDB dummy small myBoundApp

cf bind-servicePUT /v2/service_instances/:guid/service_bindings/:guid

201 CREATED

{ “credentials”: { “user”: “myUser”, “password”: “sekrit” }}

cf services

Page 24: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

Agenda

1. Service Broker2. API3. CF vs. K8s4. Demo

24

Page 25: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

Kubernetes Service Catalog

https://github.com/kubernetes-incubator/service-catalog

Page 26: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

K8s● kubectl plugin svcat

provision mydb --class=mysql --plan=default

● kubectl plugin svcat bind mydb --name=binding --secret-name=creds

● kubectl create -f kube/myapp.yaml

CF● cf push myapp● Cf create-service

mysql default mydb● cf bind-service

myapp mydb● cf restart myapp

How to use it

26

Page 27: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

Pivotal PCF + AWS Services

Page 28: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

GCP Service Broker

1. Google Cloud Storage2. Google BigQuery3. Google PubSub4. Google Cloud SQL5. Google Machine Learning APIs6. Google Bigtable7. Google Spanner8. Stackdriver Debugger9. Stackdriver Trace

10.

https://github.com/GoogleCloudPlatform/gcp-service-broker

Page 30: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

Agenda

1. Service Broker2. API3. CF vs. K8s4. Demo

30

Page 31: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

Resource

1. https://www.openservicebrokerapi.org/2. https://github.com/openservicebrokerapi/servicebroker3.

31

Page 32: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

background image: 960x540 pixels - send to back of slide and set to 80% transparency

[email protected]

Page 33: 付宁(nfu@pivotal.io) · 2018-11-16 · cleardb spark, boost*, amp* Highly available MySQL for your Apps. How to use it 13 > cf marketplace > cf create-service p-mysql 1gb mydb >

Recommended