Browse Source

Make readme generator more flexible

pull/6/head
Dave Syer 11 years ago
parent
commit
9f8b56d3d5
  1. 22
      TODO.md
  2. 31
      src/main/asciidoc/README.adoc
  3. 6
      src/main/asciidoc/intro.adoc
  4. 13
      src/main/ruby/generate_readme.sh
  5. 14
      src/main/ruby/readme.rb

22
TODO.md

@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
## TODO List
- [x] Example front end app (currently in sandbox)
- [x] Example back end service (currently in sandbox)
- [x] Use platform config
- [x] Hystrix integration (hystrix-javanica)
- [x] Feign use spring message converters
- [x] Ribbon (static server list)
- [x] Eureka boot app (Service registration)
- [x] Eureka (apache -> tomcat) see https://github.com/cfregly/fluxcapacitor/wiki/NetflixOSS-FAQ#eureka-service-discovery-load-balancer and https://groups.google.com/forum/?fromgroups#!topic/eureka_netflix/g3p2r7gHnN0
- [x] Archaius bridge to spring environment
- [x] Ribbon (Client side load balancing) (Eureka integration)
- [x] Remove need for *-eureka.properties
- [ ] Use spring boot values as defaults where appropriate
- [x] Synchronous removal of service from eureka on shutdown
- [x] Refresh log levels dynamically
- [x] Router (Zuul) integrated using hystrix/ribbon/eureka
- [ ] Better observable example
- [ ] Distributed refresh environment via platform bus
- [x] Metrics aggregation (turbine)
- [x] Use Eureka for instance discovery rather than static list see https://github.com/Netflix/Turbine/blob/master/turbine-contrib/src/main/java/com/netflix/turbine/discovery/EurekaInstanceDiscovery.java
- [ ] Configure InstanceDiscovery.impl using auto config/config props

31
src/main/asciidoc/README.adoc

@ -1,25 +1,14 @@ @@ -1,25 +1,14 @@
include::intro.adoc[]
== TODO List
== Features
* Service Discovery: Eureka instances can be registered and clients can discover the instances using Spring-managed beans
* Service Discovery: an embedded Eureka server can be created with declarative Java configuration
* Circuit Breaker: Hystrix clients can be built with a simple annotation-driven method decorator
* Circuit Breaker: embedded Hystrix dashboard with declarative Java configuration
* Declarative REST Client: Feign creates a dynamic implementation of an interface decorated with JAX-RS or Spring MVC annotations
* Client Side Load Balancer: Ribbon
* External Configuration: a bridge from the Sprnig Environment to Archaius (enabls native configuration of Netflix components using Spring Boot conventions)
* Router and Filter: automatic regsitration of Zuul filters,a nd a simple convention over configuration approach to reverse proxy creation
- [x] Example front end app (currently in sandbox)
- [x] Example back end service (currently in sandbox)
- [x] Use platform config
- [x] Hystrix integration (hystrix-javanica)
- [x] Feign use spring message converters
- [x] Ribbon (static server list)
- [x] Eureka boot app (Service registration)
- [x] Eureka (apache -> tomcat) see https://github.com/cfregly/fluxcapacitor/wiki/NetflixOSS-FAQ#eureka-service-discovery-load-balancer and https://groups.google.com/forum/?fromgroups#!topic/eureka_netflix/g3p2r7gHnN0
- [x] Archaius bridge to spring environment
- [x] Ribbon (Client side load balancing) (Eureka integration)
- [x] Remove need for *-eureka.properties
- [ ] Use spring boot values as defaults where appropriate
- [x] Synchronous removal of service from eureka on shutdown
- [x] Refresh log levels dynamically
- [x] Router (Zuul) integrated using hystrix/ribbon/eureka
- [ ] Better observable example
- [ ] Distributed refresh environment via platform bus
- [x] Metrics aggregation (turbine)
- [x] Use Eureka for instance discovery rather than static list see https://github.com/Netflix/Turbine/blob/master/turbine-contrib/src/main/java/com/netflix/turbine/discovery/EurekaInstanceDiscovery.java
- [ ] Configure InstanceDiscovery.impl using auto config/config props

6
src/main/asciidoc/intro.adoc

@ -1,3 +1,7 @@ @@ -1,3 +1,7 @@
This project provides Netflix OSS integrations for Spring Boot apps through autoconfiguration
and binding to the Spring Environment and other Spring programming model idioms.
and binding to the Spring Environment and other Spring programming model idioms. With a few
simple annotations you can quickly enable and configure the common patterns inside your
application and build large distributed systems with battle-tested Netflix components. The
patterns provided include Service Discovery (Eureka), Circuit Breaker (Hystrix),
Intelligent Routing (Zuul) and Client Side Load Balancing (Ribbon).

13
src/main/ruby/generate_readme.sh

@ -3,8 +3,17 @@ @@ -3,8 +3,17 @@
base_dir = File.join(File.dirname(__FILE__),'../../..')
src_dir = File.join(base_dir, "/src/main/asciidoc")
require File.join(File.dirname(__FILE__), 'readme.rb')
require 'optparse'
options = {}
ARGV.length > 0 and options[:to_file] = ARGV[0]
input = "#{src_dir}/README.adoc"
SpringCloud::Build.render_file("#{src_dir}/README.adoc", options)
OptionParser.new do |o|
o.on('-o OUTPUT_FILE', 'Output file (default is stdout)') { |file| options[:to_file] = file unless file=='-' }
o.on('-h', '--help') { puts o; exit }
o.parse!
end
input = ARGV[0] if ARGV.length>0
SpringCloud::Build.render_file(input, options)

14
src/main/ruby/readme.rb

@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
require 'open-uri'
module SpringCloud
module Build
@ -6,13 +8,13 @@ module SpringCloud @@ -6,13 +8,13 @@ module SpringCloud
class << self
def process_include out, src, target, attrs
unless target.start_with?('/')
target = File.new(File.join(src, target))
else
target = File.new(target)
unless target.include?(':') || target.start_with?('/')
target = File.join(src, target)
end
target.each do |line|
self.process(out, File.dirname(target), line)
open(target) do |file|
file.each do |line|
self.process(out, File.dirname(target), line)
end
end
end

Loading…
Cancel
Save