Sign inSign up

dinutac/estuary-deployer

By dinutac

•Updated almost 6 years ago

Estuary docker deployer service which will orchestrate your deployments in docker or K8s

Image
0

2.7K

dinutac/estuary-deployer repository overview

Testing as a service with Docker

Support project:

⁠Testing as a Service

⁠Estuary deployer

Estuary docker deployer service which will run your containers and/or your tests.
Starting with version 2.0.0⁠ the estuary-deployer service can run your tests using the estuary-testrunner⁠ service. Check-out the wiki !

##Coverage & code quality Coverage Status Codacy Badge

⁠Linux status

Build Status

⁠Docker Hub

alpine⁠
centos⁠

⁠Api docs

4.0.1 docker⁠
4.0.1 kubectl⁠

⁠Postman collection

Docker⁠
Kubernetes⁠

⁠Wiki

Wiki⁠

⁠Use cases

  • Debug accelerator. No more logs attached to Jira. QAs can push the related bug-ish image to registry. Then in a docker compose QA can deploy "the bug" on a developer's machine or on dedicated debug machine (security reason due to docker sock mounting). The dev will have all he needs
  • Testing as a service. A complete enevironment SUT/BD/Automation Framework can be deployed and tested
  • Bring up Docker containers remotely through HTTP
  • Templating with Jinja2

⁠Service run

⁠Docker compose
docker-compose up
⁠Docker run - simple
docker network create estuarydeployer_default
docker run \ 
-p 8080:8080
-v /var/run/docker.sock:/var/run/docker.sock \
--net=estuarydeployer_default \
dinutac/estuary-deployer:<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 \
⁠Eureka registration

To have all your deployer instances in a central location we use netflix eureka. This means your client will discover all services used for your test and then spread the tests across all.

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.15

Start your containers by specifying the full hostname or ip of the host machine on where your deployer service resides.

docker network create estuarydeployer_default
docker run params:
Optional:
        -e MAX_DEPLOYMENTS=3 ->  how many deployments to be done. it is an option to deploy a fixed no of docker-compose envs(docker only)
        -e EUREKA_SERVER="http://10.13.14.28:8080/eureka/v2" -> eureka server
        -e APP_IP_PORT="10.13.14.28:8081" -> the app hostname/ip:port. Mandatory if EUREKA_SERVER is used
        -e APP_APPEND_ID="lab" -> id will be appended to the default app name on service registration. Useful for user mappings service-resources on a VM
        -e FLUENTD_IP_PORT="10.13.14.28:24224" -> fluentd log collector agent target ip:port
        -e DEPLOY_ON="docker" -> on what the env to be deployed. Options: docker, kubectl
        -e ENV_EXPIRE_IN=1440 -> how long it will take before the env will be deleted. Default is 1440 min.
Mandatory:
    -p 8080:8080 -> port fwd from docker 8080 to host 8080
    -v /var/run/docker.sock:/var/run/docker.sock -> docker sock mount
    --net=estuarydeployer_default -> bind to this net prior created

dinutac/estuary-deployer:latest



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 \
⁠Fluentd

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

Matcher example:

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

Run example:

docker network create estuarydeployer_default
docker run \
-e FLUENTD_IP_PORT=10.10.10.1:24224 \
-p 8080:8080
-v /var/run/docker.sock:/var/run/docker.sock \
--net=estuarydeployer_default \
dinutac/estuary-deployer:<tag>
⁠Authentication

For auth set HTTP_AUTH_TOKEN env variable.

Run example:

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

Then, access the Http Api. Call example:

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

⁠Api call examples

http://192.168.100.12:8083/kubectl/ping -> if DEPLOY_ON is kubernetes with kubectl. Kubernetes deployments are fully tested
or
http://192.168.100.12:8083/docker/ping -> if DEPLOY_ON is docker. Docker is the default option and is fully tested

⁠Estuary stack

Estuary deployer⁠
Estuary testrunner⁠
Estuary discovery⁠
Estuary viewer⁠

⁠Templating service

Jinja2Docker⁠

Tag summary

Content type

Image

Digest

Size

260.7 MB

Last updated

almost 6 years ago

docker pull dinutac/estuary-deployer