Giter VIP home page Giter VIP logo

rancher-service-update's Introduction

Build Status

Rancher service updates

This script written in Go will get all your rancher server services and compare with the latest tag on DockerHub

Getting started

  1. Download latest binary release
  2. (Optional) Add into your $PATH
  3. You need to have some required variables :
  • DockerHub username
  • DockerHub password
  • Rancher API access & secret keys (check http://[SERVER_URL]:[PORT]/env/[ENV]/api/keys)
$ rancher-service-update -u=username -p=password -s=http://[SERVER_URL]:[PORT] --access-key=access_key --secret-key=secret_key # Or via environment

This will print by default a table like :

STACK NAME SERVICE NAME IMAGE ACTUAL TAG LATEST TAG
Stack 1 api php 7.2-stretch 7.7-stretch
front registry/front 1.1.4 1.1.5
database library/postgres 10.3-alpine 10
Other Stack hello-world tutum/hello-world latest latest
Another Stack hello-world ... ... ...

If you want to print result as JSON, add the option -o=json. The default is -o=table

Run as Go binary

$ go get github.com/SkYNewZ/rancher-service-update
# Ensure that $GOPATH is set, or if $HOME/go/bin is into your $PATH
$ go-rancher-service-update -u=username -p=password -s=http://[SERVER_URL]:[PORT] --access-key=access_key --secret-key=secret_key # Or via environment variables

Run as docker container

$ docker run -it --rm \
    -e DOCKER_USERNAME=username \
    -e DOCKER_PASSWORD=password \
    -e RANCHER_SERVER_URL=http://[SERVER_URL]:[PORT] \
    -e RANCHER_ACCESS_KEY=access_key \
    -e RANCHER_SECRET_KEY=secret_key \
    skynewz/rancher-service-update

Usage

Usage:
  rancher-services-check-updates [OPTIONS]

Application Options:
  -u, --docker-username=    DockerHub username [$DOCKER_USERNAME]
  -p, --docker-password=    DockerHub password [$DOCKER_PASSWORD]
  -s, --server=             Rancher server URL [$RANCHER_SERVER_URL]
      --access-key=         Rancher API access key [$RANCHER_ACCESS_KEY]
      --secret-key=         Rancher API secret key [$RANCHER_SECRET_KEY]
  -o, --output=[json|table] Output type (default: table)

Help Options:
  -h, --help                Show this help message

rancher-service-update's People

Contributors

skynewz avatar

Watchers

 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.