GithubHelp home page GithubHelp logo

costela / hetzner-ip-floater Goto Github PK

View Code? Open in Web Editor NEW
7.0 4.0 4.0 7 KB

Minimalistic floating IP setter for container clusters running on Hetzner Cloud

Dockerfile 14.03% Go 85.97%
hetzner hetzner-cloud docker docker-swarm floating-ip

hetzner-ip-floater's Introduction

Docker Automated build Docker Build Status Image Info

โš  This project is unmaintained, but has a "spiritual successor" in hcloud-ip-floater

hetzner-ip-floater

Minimalistic floating IP setter for container clusters (currently tested on docker swarm) running on Hetzner Cloud.

Usage

This project should be used as a container. It will run once and update a given floating IP to point to the node currently running it. This can be used to ensure the floating IP will be reassigned upon node failure, by relying on the underlying cluster to redeploy this service on a healthy node.

This is an example deployment for docker stack deploy:

services:
  app:
    image: costela/hetzner-ip-floater
    secrets:
      - hetzner_api_key_for_floating_ip  # set via `docker secret create`
    environment:
      API_KEY_FILE: /run/secrets/hetzner_api_key_for_floating_ip
      TARGET_HOST: '{{ .Node.Hostname }}'  # uses docker swarm's templating to get node name
      FLOATING_IP_ID: 12345  # taken from Hetzner cloud console
    deploy:
      replicas: 1

This assumes the node's hostnames are the same as their API names, which is the case unless the hostname has been changed after provisioning.

Other considerations

The deployment of hetzner-ip-floater should be limited to those nodes where the floating IP is locally configured, otherwise incoming trafic will be dropped.

The same nodes should also be configured as ingress nodes. When using the default mesh networking on docker swarm, this is already the case for all worker nodes.

hetzner-ip-floater's People

Contributors

costela avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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