GithubHelp home page GithubHelp logo

rancher-cli's Introduction

rancher-cli

Quick commands over rancher-compose and Rancher API interface helping me in devops

Profile-based approach.

Profile is a combination of API endpoint, environment, access keys with a symbolic name. Use rancher profile [profile_name] for quick switching profiles Every profile is stored in ~/.rancher file. CLI will search this file in a working directory and in the home one. Compose files are separated with @[profile_name]

Install

Project is written in NodeJS, so you have to install NodeJS first.

    npm -g i rancher-cli

Then create your first profile: $ rancher init

Usage in CI

I am using rancher-cli container to process deploy operations to many environments from CI side. Every project has different compose@[qa|staging|production|local].yml files in VCS. .rancher file is mounted from a CI agent container.

Commands

init

Create .rancher file in a user home directory

logs

Getting last 200 lines and follow.

rancher logs [regex] -l 200 -f

start/stop

Start or stop multiple services using regexp to match stack/service

rancher stop/start [regex]

up

If service is not created - trigger launch, otherwise upgrade command will be used.

ls

List services and stacks in environment

compose

Fallback to rancher-compose commands

ssh AWS EC2-only (not impl)

Similar to my ssh2ec2 project. Will launch ssh to EC2 instance where service container is running and then be forwarded to the container.

rancher-cli's People

Contributors

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