https://github.com/making/cf-eureka-server
Eureka Server on Cloud Foundry
https://github.com/making/cf-eureka-server
Last synced: 12 months ago
JSON representation
Eureka Server on Cloud Foundry
- Host: GitHub
- URL: https://github.com/making/cf-eureka-server
- Owner: making
- Created: 2015-12-19T17:26:16.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-19T17:26:34.000Z (over 10 years ago)
- Last Synced: 2025-04-06T07:43:11.613Z (about 1 year ago)
- Language: Shell
- Homepage:
- Size: 47.9 KB
- Stars: 6
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Eureka Service on Cloud Foundry
This manual shows how to deploy and use Eureka Service on Cloud Foundry.
### Deploy Eureka Service to CF
$ mvn clean package
$ cf push
$ cf apps
Getting apps in org maki-org / space development as admin...
OK
name requested state instances memory disk urls
eureka-server started 1/1 256M 1G eureka-server.192.168.33.10.xip.io
## Expose Eureka Service as a [User-Provided Service](https://docs.cloudfoundry.org/devguide/services/user-provided.html)
$ cf create-user-provided-service eureka-service -p '{"uri":"http://eureka:changeme@eureka-server.192.168.33.10.xip.io"}'
$ cf services
Getting services in org maki-org / space development as admin...
OK
name service plan bound apps last operation
eureka-service user-provided
## Bind Eureka Service to an application
$ cf push foo -p target/foo.jar --no-start
$ cf bind-service foo eureka-service
Discovery client services (like `foo`) should have the following property in `application.property`
eureka.client.service-url.defaultZone=${vcap.services.eureka-service.credentials.uri:http://localhost:8761}/eureka/
and in `application-cloud.properties`
eureka.instance.hostname=${vcap.application.uris[0]}
eureka.instance.non-secure-port=80
eureka.instance.metadata-map.instanceId=${vcap.application.instance_id}
A sample application is [here](https://github.com/making/hello-pws/tree/cloud).