Skip to content

Pivotal Cloudfoundry Workshop

Andrew Serff edited this page Nov 21, 2015 · 1 revision

HOME > [NFJS 2015](NFJS 2015) > [Pivotal Cloudfoundry Workshop](Pivotal Cloudfoundry Workshop)

Matt Stein - @mstein

https://github.com/mstine/nfjs_pivotal_cloud_workshop

###Microservices: Loosely coupled service oriented architecture with bounded contexts - Adrian Cockcroft (Technology Fellow at some Venture firm) Lose coupling - deploy my service anytime I want Bounded contexts - If you have to know about surrounding services, you don’t have a bounded context

Why do Microservices matter? Really, they matter because they get us to Continuous Delivery

Spring Boot and DropWizard.io - Spring Boot was inspired by DropWizard.io

The more you decompose your system, the more likely that something in your architecture will fail.

As you build distributed systems, you have new things to worry about like:

  • Service Discovery
  • Load Balancing
  • Fault Tolerance

Spring Cloud + Netflix OSS to the rescue!

Martin Fowler said: You must be this tall (have at least these) to use ride the micro services ride:

  • Rapid Provisioning
  • Basic Monitoring
  • Rapid Application Deployment
  • DevOps Culture

Microservices is the first Operationalized Architecture: It wasn’t developed from a white paper. It was developed after Continuous Delivery and after DevOps came about. It was made by noticing pattern from doing these good practices.

You must have well defined API contracts -> Must deliver an artifact. Look at PACT https://github.com/realestate-com-au/pact http://dius.com.au/2014/05/19/simplifying-micro-service-testing-with-pacts/

###CloudFoundry http://run.pivotal.io - SAAS offering of CF http://network.pivotal.io - run your own CF http://docs.pivotal.io - See the CloudFoundry docs on how to install CF on AWS. There is a CloudFormation template you can use to stand up CloudFoundry on AWS. It’s something like 20 VMs.

###CloudFoundry events: cf events app name will show you auditing of what has gone on with your application (you see these in the console too).

###Logging CF can push logs to anything that uses syslog.

They are working on adding Zipkin (http://zipkin.io/) to give you traceability of your requests across a distributed architecture.

Build packs and Service Brokers are the main extension points that people use.

###HysterixCommands:

  • You can define what health is. Define error states
  • You can have nested HysterixCommands. Your fallback can be a hysteria command too

To fix our refresh times, we need to change these properties:

ribbon.ServerListRefreshInterval
eureka.client.registryFetchIntervalSeconds
eureka.instance.leaseRenewalIntervalInSeconds
Clone this wiki locally