Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.
Catalin Dinuta edited this page Sep 14, 2020 · 1 revision

Estuary deployer

Docker

Service supports deployment of agent and discovery with or without automatic eureka registration, using the eureka information stored into deployer.
The containers deployed with the templates presented bellow will be connected to the deployer's default startup net, and accessed through it. After user deployed a complete docker-compose environment, then he needs to connect the wanted container to the deployer's net. All information found between {{...}} will be swapped with the info which exists already in deployer's environment using jinja2 templating.
Although the principle of docker-compose segregated envs might seem violated partially, it's a good compromise to have access to the agent(s)/discovery(s) which manages the test framework (using the agent) and execute actions like test start/test run/get test results.

A comprehensive picture with 2 complete docker-compose envs can be found bellow, where the only container connected to the deployer's net is the one needed to control the test framework. The others remain segregated:

image

Steps to deploy and interact with the environment:

  1. deploy your complete docker-compose environment: /docker/deployments
  2. Connect the container which you want to access it to the deployer's net: /docker/deployments/network/<compose_id>?service=<docker_compose_service_name>
    E.g http://192.168.100.12:8083/docker/deployments/network/198c822bc9c3378f?service=agent
  3. Call your endpoints through the deployer: /docker/container/<compose_id>/<your_original_uri>?port=<your_container_port>
    E.g. http://192.168.100.12:8083/docker/container/198c822bc9c3378f/ping?service=agent&port=8080

! Note: Default service name is: container. Default port is 8080. Override these through query params: service & port.

version: '3.7'
services:
  container:
    image: dinutac/estuary-agent:latest
    #    entrypoint: tail -f /etc/alpine-release
    #    entrypoint: bash -c "/home/dev/scripts/wait-for-it.sh -t 20 eureka-server:8080 -- echo \"eureka running\" && sleep 10 && python3 /home/dev/scripts/main_flask.py"
    environment:
      limit: 'sky' #example env var inserted. you can read it with environ('limit') in your jinja2 template
      EUREKA_SERVER: "{{eureka_server}}"
      APP_IP_PORT: "{{app_ip_port}}/docker/container/{{deployment_id}}"
    expose:
      - "8080"
Clone this wiki locally