Skip to content

java-buildpack + heroku_multi_buildpack + magic = non-java apps using Netflix OSS

License

Notifications You must be signed in to change notification settings

rhardt-pivotal/sidecar-buildpack

Repository files navigation

Cloud Foundry Sidecar Buildpack

Sidecar

The sidecar-buildpack is a Cloud Foundry buildpack that allows any application to use Netflix OSS Eureka and Zuul for service discovery and proxying respectively - regardless of whether or not it is a Spring Boot, Spring, or even a Java application.

Usage

  • Start with an existing Cloud Foundry application

  • add a .sidecar_buildpacks file to the root of the application containing a link to your application’s current buildpack (git repo or .tgz) e.g. https://github.com/cloudfoundry/nodejs-buildpack.git

  • (Optional) implement a '/health' endpoint that returns the following:

    • the content-type header: Content-Type: application/json

    • body: {"status": "UP"}

    • Eureka will show your app as 'Down' unless you properly implement the /health endpoint

  • if your application uses the Command Attribute in its manifest.yml, move the command into a Procfile

  • Deploy with:

    $ cf push -b https://github.com/rhardt-pivotal/sidecar-buildpack

Sample Apps

The following make up a suite of apps that will register with a eureka instance via a sidecar and can then reference one another. They each expose the self-explanatory endpoints /javafortune (a Spring Boot Fortune Teller service), /rubyfortune, /nodefortune, /pythonfortune, and /gofortune.

Bundled Sidecar

The actual sidecar functionality resides in a Spring Boot jar in the Resources directory. The repo for that jar is here

Acknowledgements

This buildpack is built almost entirely of components from the Cloud Foundry Java Buildpack and the Heroku Multi Buildpack

Contributing

Pull requests are welcome; see the contributor guidelines for details.

License

This buildpack is released under version 2.0 of the Apache License.

About

java-buildpack + heroku_multi_buildpack + magic = non-java apps using Netflix OSS

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published