Giter VIP home page Giter VIP logo

rancher-purge's Introduction

Purpose

The purpose of rancher-purge is to keep your rancher hosts uncluttered. Currently, Rancher doesn't have a clean way to remove hosts that are no longer communicating with the Rancher Server. This container will:

  • Identify hosts marked as deactivated
  • Issue a rancher rm --type host to each
  • Allow you to set a custom interval in seconds

Sample docker-compose.yml

version: '2'
services:
  rancher-purge:
    image: wmbutler/rancher-purge
    environment:
      RANCHER_ACCESS_KEY: YOUR_RANCHER_ACCESS_KEY
      RANCHER_SECRET_KEY: YOUR_RANCHER_SECRET_KEY
      RANCHER_URL: http://rancher.cavo.io:8080/v2-beta/schemas
      RANCHER_ENVIRONMENT: YOUR_RANCHER_ENVIRONMENT_ID
      INTERVAL: 180

Notes

  • Environment settings are case sensitive!
  • You can obtain your ACCESS_KEY and SECRET_KEY from the Rancher Server API -> Keys Menu.
  • The RANCHER_URL can be used exactly as shown above. This tool does not support the v1 URL.
  • Your RANCHER_ENVIRONMENT is a bit less obvious but can be found in the address bar of your browser while logged into your Rancher Server. /settings/env/1a5. In this case, the environment is 1a5
  • The default interval is 300 seconds, but you can override that in your environment settings.

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.