GithubHelp home page GithubHelp logo

isabella232 / docker-ambassador-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openstf/docker-ambassador

0.0 0.0 0.0 4 KB

Our own glorious ambassador to avoid external breakage.

License: Other

Shell 71.03% Dockerfile 28.97%

docker-ambassador-1's Introduction

Warning

This project along with other ones in OpenSTF organisation is provided as is for community, without active development.

You can check any other forks that may be actively developed and offer new/different features here.

Active development has been moved to DeviceFarmer organisation.

docker-ambassador

This docker image is a mashup of ctlc/ambassador and suutari/ambassador. It was made for the OpenSTF example deployment when we realized that ctlc/ambassador was pretty much completely broken.

While there are practically endless existing ambassador images out there, having our own ambassador image allows us more flexibility.

  1. No one will suddenly decide to change the image in a way that breaks it.
  2. It's way, way smaller (~6.5MB vs ctlc/ambassador's ~185MB) while still being an automated build.
  3. Doesn't do stupid things like watch ls or top to keep the background jobs alive. The wait shell built-in is perfect and doesn't waste resources.
  4. Unlike most other ambassador implementations, dies if the underlying socat dies, allowing your supervisor of choice (e.g. systemd) to take over and possibly restart the socket. Make sure to read Caveats, though.
  5. Attempts to shut down cleanly.

Also, note that we are NOT claiming that this old-school ambassador pattern is the best way to go today. It's simply one way to do things.

Usage

The "Link via an ambassador container" article on the Docker website explains the ambassador pattern and potential usage quite clearly. Just replace svendowideit/ambassador with openstf/ambassador where required.

Caveats

If the internal socat somehow manages to die, it won't get restarted. Instead, the container dies with it. We recommend using a proper systemd Service unit for automatically restarting it.

However, if your ambassador handles more than one link, then even if all links except one die, the ambassador will happily stay alive waiting for the last link to die too, which means that systemd won't notice a thing and has no chance to restart the unit to reopen sockets. Most if not all traditional ambassador pattern implementations suffer from this problem as well, many of them even if you're only using a single link.

License

See LICENSE.

Copyright © Simo Kinnunen. All Rights Reserved.

docker-ambassador-1's People

Contributors

koral-- avatar sorccu 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.