Sign inSign up

dinutac/estuary-discovery

By dinutac

•Updated over 5 years ago

Estuary discovery service. Reads the apps from Eureka

Image
0

5.0K

dinutac/estuary-discovery repository overview

Testing as a service

Support project:

⁠Testing as a Service

⁠Estuary discovery

Estuary discovery service. Aggregator of the estuary-stack.

  • Reads the apps/services registered in Eureka
  • Reads the tests from estuary-agent(s) registered in Eureka
  • Reads the deployments from estuary-deployer(s) registered in Eureka.
  • Controls test sessions by unicasting/broadcasting L7 HTTP messages to the agents

⁠Coverage & code quality

Coverage Status Codacy Badge Maintainability

⁠Linux status

Build Status

⁠Windows status

CircleCI

⁠Docker Hub

alpine⁠

⁠Api docs

4.0.7⁠

⁠Postman collection

Collection⁠

⁠Service HTTP GET examples

curl -i http://localhost:8080/eurekaapps #all apps  
curl -i http://localhost:8080/eurekaapps/estuary #all apps containing estuary  
curl -i http://localhost:8080/eurekaapps/your_app_name #all apps designated by your app name  

⁠Use cases

  • Estuary-viewer stats: deployments / tests / infrastructure registered in Eureka
  • L7 RESTApi broadcasts to the Agents: start test/ get test status / get test results
  • Rapid listing of apps registered with Eureka.
  • Other integrations

⁠Service run

⁠Docker compose
docker-compose up
⁠Eureka registration

Estuary discovery will boot and it will connect to the Eureka. Then it will be able to list all apps.

Start Eureka server with docker:

docker run -p 8080:8080 netflixoss/eureka:1.3.1
or
docker run -p 8080:8080 dinutac/netflixoss-eureka:1.9.25

Start your container by specifying the eureka server in order to discover all other apps.
Optionally you can set PORT environment variable (default=8080).

docker run \
-e EUREKA_SERVER=http://10.10.15.30:8080/eureka/v2
-e APP_IP_PORT=10.10.15.25:8081
-p 8081:8080
dinutac/estuary-discovery:<tag>

Jinja2 templating can be done, just add:
Windows:
-v %cd%/inputs/templates:/data \ 
-v %cd%/inputs/variables:/variables \

Linux:
-v $PWD/inputs/templates:/data \ 
-v $PWD/inputs/variables:/variables \
⁠Kubernetes
kubectl apply -f k8sdeployment.yml
⁠Fluentd logging

Please consult Fluentd⁠ for logging setup.
Estuary-discovery tags all logs in format estuary-discovery.**

Matcher example:

<match estuary*.**>
  @type stdout
</match>

Run example:

docker run \
-e FLUENTD_IP_PORT=10.10.15.28:24224
-p 8080:8080
dinutac/estuary-discovery:<tag>
⁠Authentication

For auth set HTTP_AUTH_TOKEN env variable.

Run example:

docker run \
-e HTTP_AUTH_TOKEN=mysecret
-p 8080:8080
dinutac/estuary-discovery:<tag>

Then, access the Http Api. Call example:

curl -i -H 'Token:mysecret' http:localhost:8080/about

Because discovery acts as an stack aggregator hitting agents or deployers endpoints, you must use the same HTTP_AUTH_TOKEN across all stack, otherwise the aggregation won't work, because the headers are forwarded as they are sent.

⁠Output example

curl -i http://172.17.0.22:8081/eurekaapps⁠

{
   "code" : 1000,
   "description" : {
      "estuary-agent" : [
         {
            "app" : "estuary-agent",
            "healthCheckUrl" : "http://172.17.0.22:8082/ping",
            "homePageUrl" : "http://172.17.0.22:8082/",
            "ipAddr" : "172.17.0.22",
            "port" : "8082",
            "statusPageUrl" : "http://172.17.0.22:8082/ping"
         }
      ],
      "estuary-discovery" : [
         {
            "app" : "estuary-discovery",
            "healthCheckUrl" : "http://172.17.0.22:8081/ping",
            "homePageUrl" : "http://172.17.0.22:8081/",
            "ipAddr" : "172.17.0.22",
            "port" : "8081",
            "statusPageUrl" : "http://172.17.0.22:8081/ping"
         }
      ]
   },
   "message" : "Success",
   "name" : "estuary-discovery",
   "time" : "2020-08-15 20:18:36.359046",
   "version" : "4.0.7"
}

⁠Estuary stack

Estuary deployer⁠
Estuary agent⁠
Estuary discovery⁠
Estuary viewer⁠

Tag summary

Content type

Image

Digest

Size

118.9 MB

Last updated

over 5 years ago

docker pull dinutac/estuary-discovery