View
310
Download
2
Category
Preview:
Citation preview
PivotalAPI
Tomohiro Ichimura, Pivotal 2017/3/29
!Pivotal !
Cloud Foundry, GemFire, Spring, !tichimura@pivotal.io!
Pivotal
20134EMC, GE ! 2,000, 1,500! , ! !
Pivotal Cloud Foundry! Pivotal Big Data Suite! Pivotal Labs!
How Pivotal Can Help
Languages Clouds
Platform Services OSes
MySQL
Dynatrace AppMon
Spring Cloud Services
Single Sign On
Language Frameworks & Application Services
Language Buildpacks for Staging & Packaging
Self-Service and Role-Based Access Control
Container SSH, Loggregator, Metrics
Build
Project Management
Test
Manage
API Driven Platform, Concourse, Jenkins
Apps Manager, CLI, REST APIs,
Ops Manager
Metrics, AppDynamics, Dynatrace, New Relic
Pivotal Tracker
Pivotal Open Source
https://pivotal.io/open-source
Circle of Code
Circle of Code !
!
!
!
!
!
Circle of Code !
!
!
!
!
!
Circle of Code !
!
!!
!
Circle of Code !
!
!
!
!
!
Circle of Code !
!
!
!
!
!
Circle of Code !
!
!
!
!
!
https://www.youtube.com/watch?v=7APZD0me1nU Pivotal Cloud Foundry Overview Onsi Fakhouri
Circle of Code for You !
!
!
!
!
!
Redmine, Jira, PivotalTracker,!
Node.js, golang, php, Java,!
Jenkins, TeamCity, CircleCI, Concourse, !
Docker, Kubernetes, Vagrant, CloudFormation, Cloud Foundry !
Syslog, Metrics, Analytics, ML, DL, AI, !
Circle of Code with Pivotal
Pivotal Tracker!
Spring Framework!Pivotal Cloud Foundry!
Concourse!
PCF Data Service!Pivotal Big Data Suite!Spring Cloud Services!
Pivotal Labs
A Day In The Life At Pivotal Labs https://www.youtube.com/watch?v=5h-zsDXQH_8
2015 9 2016 1 Pivotal Labs
4-5(Pivotal Labs )
, , , , , , SI, Web
Web API IoT
PaaS (Pivotal Cloud Foundry)
Labs
Pivotal Labs Tokyo
T O K Y O
Circle of Code !
!
!
!
!
!
!
!(
)!
!( )!
Pivotal Tracker
Pivotal Tracker SaaS
10 ( )
( )
Cloud Foundry
https://www.pivotaltracker.com
30 , 30
Cloud Foundry PM
PM ( )
PM
23
(Story)
Save !
Pivotal Tracker Dev/Designer!Prd.M!
UI API !
API Token
https://www.pivotaltracker.com/profile
API ! function executeTrackerApiFetch() { ! // get parameters ! var token = $('#token').val(); ! projectId = $('#project_id').val(); !! // compose request URL ! var url = 'https://www.pivotaltracker.com/services/v5'; ! url += '/projects/' + projectId; ! url += '/stories?filter=state:delivered,finished,rejected,started'; ! url += ',unstarted,unscheduled'; ! url += '&limit=20'; !! // do API request to get story names ! $.ajax({ ! url: url, ! beforeSend: function(xhr) { ! xhr.setRequestHeader('X-TrackerToken', token); ! } ! }).done(displayTrackerApiResponse); ! } !
trackerdemo.cfapps.io
https://www.pivotaltracker.com/help/api/#Browser_Example
$ mkdir trackerdemo; touch Staticfile!$ vi index.html # URL !$ cf push trackerdemo b staticfile_buildpack!
Pivotal Tracker GitHub
click
Settings > Integration & Services > Services
Circle of Code !
!
!!
!
Spring Framework
Spring ? #1 Java
Apache 2.0
100
Netflix Fortune 2000
Spring Boot
Spring Boot
0
2,000,000
4,000,000
6,000,000
8,000,000
10,000,000
12,000,000
source: oss.sonatype.org
Monthly Maven Downloads 10.3M
Spring Boot
Auto Configure
POM Starters
Quick Start
Actuator
Dev Tools
$ java jar myapp.jar
Spring Cloud
Common Patterns for Distributed, Cloud Based Enterprise
Applications
Designed for disposable infrastructure in partnership
with Netflix
Spring Cloud Sleuth Spring Cloud Bus
Spring Cloud Cluster Spring Cloud Security
Spring Cloud Config Spring Cloud Netflix
Spring Cloud for AWS Spring Cloud Connectors
Spring Cloud Zookeeper Spring Cloud Task
Spring Cloud Consul Spring Cloud Data Flow
Spring Cloud !
!
!!
!!
!
!
!( )!
Steeltoe Cloud Native .NET Applications - Friend of Spring Boot, Spring Cloud, and Cloud Foundry
http://steeltoe.io/
API
API
git! Tracker!
Tracker API token!
commit API !(webhook)!
$ git commit -m [Finished #135113059] this story is finished." !
Finished
api !
!
commit !
fixed, completed, or finished -> finished / delivers -> Delivered
!
Circle of Code !
!
!
!
!
!
Concourse
(
)
()
43
Cloud Foundry CI/CD
IaaS, OpenStack, vSphere Bosh, stemcell, Garden, Docker CF app,
OSS/Pivotal Cloud Foundry
Concourse
Job Build
Concourse jobs(tasks)
- name: integration plan: - aggregate: - get: integration-suite - get: controller passed: [controller-mysql, controller-postgres] - get: worker passed: [worker] - task: integration file: integration-suite/task.yml
aggregate
passed
get put
resources !
Git repo S3 Archive ( .tar.gz) Docker Image Bosh.io Release
! put() task() get()
Concourse
https://blog.altoros.com/concourse-ci-architecture-features-and-usage.html
resources: !- name: git-repo-path ! type: git! source: ! uri: YOUR_GITHUB_REPOSITORY !!- name: tracker-output ! type: tracker-resource ! source: ! token: TRACKER_API_TOKEN ! project_id: "TRACKER_PROJECT_ID" ! tracker_url: https://www.pivotaltracker.com!!resource_types: !- name: tracker-resource ! type: docker-image ! source: ! repository: concourse/tracker-resource !!jobs: !- name: deploy ! plan: ! - get: git-repo-path ! - put: tracker-output ! params: ! repos: ! - git-repo-path !
fly!
api!
github! Pivotal!Tracker!
Resource!(pivotaltracker)!
Resource!(git)!
JOB!(Unit Test)!
api!
!commit!( )!
!
git-> concourse -> pivotal tracker!
API!( )!
Circle of Code !
!
!
!
!
!
Startup Velocity
Enterprise Reliability +
API ! deploy!code! Scale? !Service? !Server-less? !
!(Diego)!
!(Elastic Runtime)!
!(Service Broker)!
apigee !
API
Service Registry Circuit Breaker Config Server Load Balancing distributed tracing
Spring Cloud !
!
!!
!!
!
!
!( )!
core boot Cloud Services Service Registry
Config Server
Circuit Breaker
Ops + Platform Dev
Spring Cloud Services Netfix OSS
Service Registry
URLID
Service Registry
(@EnableDiscoveryClient)
Config Server
Git
Config Server
(git
Circuit Breaker
)
Circuit Breaker
Code(@EnableCircuitBreaker)
Circle of Code: !
!
!
!
!
!
Spring Cloud Sleuth
+ Zipkin
Zipkin Server
CLICK 200
https://www.slideshare.net/reshmi9k/implementing-microservices-tracing-with-spring-cloud-and-zipkin-spring-one
https://www.slideshare.net/reshmi9k/implementing-microservices-tracing-with-spring-cloud-and-zipkin-spring-one
org.springframework.cloud
spring-cloud-dependencies
Brixton.SR4
pom
import
org.springframework.cloud
spring-cloud-starter-sleuth
Spring Cloud Sleuth with Maven
SERVICE 1 /readtimeout
REQUEST
BOOM!
SERVICE 2
REQUEST
BOOM!
REQUEST
BOOM!
SPANS SENT TO COLLECTORS
SPANS SENT TO COLLECTORS
STORE IN DB
APP
APP
UI QUERIES FOR TRACE INFO VIA API
Zipkin
org.springframework.cloud
spring-cloud-dependencies
Brixton.SR4
pom
import
org.springframework.cloud
spring-cloud-starter-zipkin
Spring Cloud Sleuth Zipkin with Maven
Circle of Code with Pivotal
Pivotal Tracker!
Spring Framework!Pivotal Cloud Foundry!
Concourse!
PCF Data Service!Pivotal Big Data Suite!Spring Cloud Services!
Circle of Code: !
!
!
!
!
!
!
Pivotal Labs: !( )
!!
!
API
Pivotal
Spring : Spring https://jsug.doorkeeper.jp/
Concourse CI Meetup https://www.meetup.com/Concourse-CI-Tokyo-Meetup/
Cloud Foundry Tokyo Meetup https://www.meetup.com/Cloud-Foundry-Tokyo-Meetup/
Japan Apache GEODE User Group https://j-apache-geode.doorkeeper.jp
https://pivotal-japan.connpass.com
( ) Pivotal Tracker API
API(v5) https://www.pivotaltracker.com/help/api#top https://www.pivotaltracker.com/help/api/rest/v5#Introduction
Token https://www.pivotaltracker.com/profile
pt CLI(community) https://rubygems.org/gems/pt
( ) Concourse API
API(v1) https://github.com/concourse/atc/blob/master/routes.go
Token /api/v1/teams/:team_name/auth/token
:team_name main fly login
fly CLI http://concourse.ci/downloads.html
( ) Cloud Foundy API
UAA API https://docs.cloudfoundry.org/api/uaa/index.html
CC API v2: https://apidocs.cloudfoundry.org/253(2.75.0) v3: http://v3-apidocs.cloudfoundry.org/version/3.13.0/index.html
Token UAA: /oauth/token
https://docs.cloudfoundry.org/api/uaa/#password-grant
cf CLI https://console.run.pivotal.io/tools
Recommended