Giter Site home page Giter Site logo

rancher-webhook's Introduction

Rancher-webhook

This is a small application that listens for notifications from a Docker registry webhook and automatically upgrades the service in Rancher.

Installation

  1. Create a new API key in Rancher
  2. Use the given docker-compose.yml to create a new Rancher stack
  3. Update the environment variables with the API key and Rancher URL
  4. Configure your Docker Hub container to send a webhook to "https://{your_url}/docker_hub"

Example

 scheduler:
  image: ajacques/rancher-webhook:latest
  environment:
    RAILS_ENV: production
    REDIS_URI: redis:6379/resque
  cap_drop:
  - ALL
  links:
  - redis:redis
  command:
  - rake
  - resque:scheduler
Agent:
  image: ajacques/rancher-webhook:latest
  environment:
    RAILS_ENV: production
    REDIS_URI: redis:6379/resque
  cap_drop:
  - ALL
  links:
  - redis:redis
worker:
  image: ajacques/rancher-webhook:latest
  environment:
    QUEUE: '*'
    RAILS_ENV: production
    RANCHER_ACCESS_KEY: {YOUR_ACCESS_KEY}
    RANCHER_SECRET_KEY: {YOUR_RANCHER_SECRET_KEY}
    RANCHER_URI: https://{YOUR_RANCHER_HOST}/v1/projects/1a5
    REDIS_URI: redis:6379/resque
  cap_drop:
  - ALL
  links:
  - redis:redis
  command:
  - rake
  - resque:work
redis:
  image: redis:3.0.7-alpine

Configuration

Add the RANCHER_NON_OVERLAPPED_UPGRADES=true environment variable to any container that can't be started before it's stopped (useful if you're exposing ports from the container.)

rancher-webhook's People

Contributors

ajacques avatar cloudish avatar

Watchers

James Cloos avatar  avatar

rancher-webhook's Issues

Leverage Rancher Service Account Labels

Rancher supports the ability to automatically provision a system account + access keys for agents. We can switch to using them instead of forcing customers to create access keys manually, which would improve first-start work.

Documentation

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.