Giter Club home page Giter Club logo

estuaryoss / estuary-discovery Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 4.46 MB

Estuary discovery discovers apps/microservices registered in eureka. Aggregates Estuary stack information in one place.

Home Page: http://estuaryoss.github.io

License: Apache License 2.0

Dockerfile 1.25% Python 97.49% Shell 1.01% Jinja 0.25%
estuary-stack testing testing-tools testing-tool test-automation test-automation-as-a-service reverse-proxy parallel-testing distributed-testing automation-as-a-service

estuary-discovery's Introduction

Testing as a service

Estuary Discovery

Estuary Discovery service. Aggregator of the Estuary-Stack.

  • Reads the apps/services registered in Eureka
  • Reads the commands from Estuary-Agent(s) registered in Eureka
  • Sends L7 HTTP messages (commands/environment set & read / file transfers) to the Agents

Coverage & code quality

Codacy Badge Maintainability

Linux status

Build Status

Windows status

CircleCI

Docker Hub

alpine

Api docs

4.2.4

Postman collection

The Postman collection is located in docs folder.

Service HTTP GET examples

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

Compilation - pyinstaller

python -m PyInstaller --onefile --clean --add-data="rest/api/templates/:rest/api/templates/" main.py
python -m PyInstaller --onefile --clean --add-data="rest/api/templates/;rest/api/templates/" main.py

Use cases

  • Input for Estuary UI: commands / file transfers / service infrastructure registered in Eureka
  • L7 HTTP messages to the Agents (environment set / commands / file upload & download)
  • Listings of Apps registered with Eureka.

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=10.10.15.25
-e PORT=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_USER & HTTP_AUTH_PASSWORD env variables.

!!! Use these env variables to secure the service. !!!

Run example:

docker run \
-e HTTP_AUTH_USER=admin \
-e HTTP_AUTH_PASSWORD=estuaryoss123! \
-p 8080:8080
estuaryoss/discovery:<tag>

Then, access the Http Api. Call example:

curl -i -u admin:estuaryoss123! http:localhost:8080/about

Because discovery acts as a stack aggregator hitting agents, you must use the same HTTP_AUTH_USER & HTTP_AUTH_PASSWORD
across all stack, otherwise the aggregation won't work, because the headers are forwarded as they are sent.

Enable HTTPS

Set HTTPS_ENABLE env var option to true or false.
Set the certificate and the private key path with HTTPS_CERT and HTTPS_KEY env variables. If you do not set cert and private key file env vars, it defaults to a folder in the same path called https, and the default files * https/cert.pem* and https/key.pem.

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/eureka/apps

{
  "code": 1000,
  "message": "Success",
  "description": {
    "estuary-discovery": [
      {
        "ipAddr": "localhost",
        "port": "8081",
        "securePort": "8081",
        "app": "estuary-discovery",
        "metadata": {
          "management.port": "8081"
        },
        "homePageUrl": "http://localhost:8081/",
        "healthCheckUrl": "http://localhost:8081/ping",
        "statusPageUrl": "http://localhost:8081/ping"
      }
    ],
    "estuary-agent-java": [
      {
        "ipAddr": "192.168.0.41",
        "port": "8082",
        "securePort": "443",
        "app": "estuary-agent-java",
        "metadata": {
          "name": "Estuary-Agent",
          "management.port": "8082"
        },
        "homePageUrl": "http://localhost:8082/",
        "healthCheckUrl": "http://localhost:8082/actuator/health",
        "statusPageUrl": "http://localhost:8082/actuator/info"
      }
    ]
  },
  "path": "/eureka/apps?",
  "timestamp": "2021-12-19 12:03:51.375734",
  "name": "Estuary-Discovery",
  "version": "4.2.4"
}

Support project:

Estuary stack

Estuary agent
Estuary discovery
Estuary UI

estuary-discovery's People

Contributors

dinuta avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.