Code Monkey home page Code Monkey logo

rancher-upgrader's Introduction

Rancher Upgrader

Code https://github.com/cr0hn/rancher-upgrader
Issues https://github.com/cr0hn/rancher-upgrader/issues
Python version Python 3.5 or above
Author Daniel García (cr0hn) - @ggdaniel
Last version 1.0.0

The script needs Python 3 (really I don't test it in Python 2)

Support this project

Support this project (to solve issues, new features...) by applying the Github "Sponsor" button.

Briefing

This project try to solve the problem of upgrading Rancher stack services without the need of using the UI.

Why

Because one of the most useful thinks of a PaaS is to automate the deployment process thought your C.I. system.

With this script you can do that.

Installation

Installation process is so easy:

> python3 -m pip install rancher_upgrader

Usage

The script is self-explained, to get help, only use -h option:

> rancher-upgrader -h

usage: rancher-upgrader.py [-h] -n STACK_NAME -s SERVICE_NAME -i NEW_IMAGE -u
                           RANCHER_URL -a RANCHER_ACCESS_KEY -k
                           RANCHER_SECRET_KEY [--retires MAX_RETRIES]
                           [--sleep]

Rancher service upgrader

optional arguments:
  -h, --help            show this help message and exit
  -n STACK_NAME         stack name.
  -s SERVICE_NAME       service name
  -i NEW_IMAGE          new docker image to push in the service
  -u RANCHER_URL        rancher portal url
  -a RANCHER_ACCESS_KEY
                        rancher secret key
  -k RANCHER_SECRET_KEY
                        rancher access key

Extra options:
  --retires MAX_RETRIES
                        maximum number of retries to check upgrade process
  --sleep               sleep time while checking upgrading process

Important things

  • Rancher upgrader will try to upgrade a specific service of a stack
  • If the upgrade fails, automatically It will do a rollback
  • Rancher upgrader will do the complete upgrade process, including the confirmation of the upgrade process when the upgrading process was finished

License

This project is distributed under [BSD clausule 3](<https://github.com/cr0hn/rancher_upgrader/blob/master/LICENSE)

rancher-upgrader's People

Contributors

cr0hn avatar dependabot[bot] avatar hemantthorat avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rancher-upgrader's Issues

'--retires' option causing exception, 'str' object cannot be interpreted as an integer.

Hi,

I tried adding --reties option with value 50 as follows,
python -m pip install --upgrade pip rancher_upgrader requests; rancher-upgrader --retires 50 -n %stack% -s %service% -u %rancher_url% -a %access_token% -k %secret_key% -i %company%/%image%
But, it is failing with exception 'str' object cannot be interpreted as an integer..
It seems --reties and --sleep option needs int() type casting.

Version details:
Python docker image : python:3.6.5-alpine
certifi-2019.6.16 chardet-3.0.4 idna-2.8 pip-19.2.1 rancher-upgrader-1.0.0 requests-2.22.0 urllib3-1.25.3

Can you please add fix ?

Thanks,
Hemant.

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.