Sign inSign up

estuaryoss/discovery

By estuaryoss

•Updated over 4 years ago

Image
0

2.2K

estuaryoss/discovery repository overview

Testing as a service

Support project:

⁠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.8⁠

⁠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 estuaryoss/netflix-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
estuaryoss/discovery:<tag>
⁠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
estuaryoss/discovery:<tag>
⁠Authentication

For auth set HTTP_AUTH_TOKEN env variable.

Run example:

docker run \
-e HTTP_AUTH_TOKEN=mysecret
-p 8080:8080
estuaryoss/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.

⁠Environment variables injection

User defined environment variables will be stored in a 'virtual' environment. The extra env vars will be used by the process that executes system commands.
There are two ways to inject user defined environment variables.

  • call POST on /env endpoint. The body will contain the env vars in JSON format. E.g. {"FOO1":"BAR1"}
  • create an environment.properties file with the extra env vars needed and place it in the same path as the JAR. Example in this repo.

! All environment variables described above can also be set using environment.properties.

⁠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",
   "timestamp" : "2020-08-15 20:18:36.359046",
   "path" : "/eurekaapps?",
   "version" : "4.0.8"
}

⁠Estuary stack

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

Tag summary

Content type

Image

Digest

Size

50.1 MB

Last updated

over 4 years ago

docker pull estuaryoss/discovery