Giter VIP home page Giter VIP logo

lithium's Introduction

Lithium

LITHIUM IS DEPRECATED. We're using Juju instead now.

Controlling sysadmin insanity

Lithium is a system of configurations and a command line tool to control cloud based server instances. Currently it supports Linode.

Install

To install prequisites:

npm -f install

Keeping Current

Every now and then you'll need to get fresh copies of the sources (when they change, for example). There are lots of interlinked repositories. Assuming these have already been set up in adjacent directories and you are already in the directory that contains them all, then:

for a in lithium/ swops/ swops-secret/ cobalt/
do
    (cd $a;git pull)
done

Usage

Copy settings-example.json to settings.json and add your public/private key/config paths and your Linode API key.

Activate the environment (fiddles with PATH etc):

. activate

Usage: li <command> [OPTIONS]
 Commands:
  help                                Show this help
  start <instance>                    Start an instance
  stop <instance>                     Stop an instance
  restart <instance>                  Restart an instance
  create <config>                     Create and deploy an instance by config
  destroy <instance-name> ...         Destroy an instance (or instances)
  rename <name> <new-name>            Rename an instance
  sh <instance> <cmd>                 Execute a command on instance
  ssh [user@]<instance-name>          Log in to instance via ssh
  runhook <instance> <config> [hook]  Run deployment hook(s)
  comment <instance> [<comment>]      Make or display a comment
  list [--help] [--verbose]           List instances
  jobs                                List all Linode jobs

Tests

Note: Make sure LITHIUM_CONFIG_PATH and LINODE_API_KEY are unset before running the tests.

To run the tests

npm test

Keep the tests running

mocha -w

Using Lithium

Using lithium spends money. Not much.

li
li list
li create boxecutor
li start boxecutor_1
li deploy boxecutor_1

Server States

                          .---------stop----------.
                          v                       |
+-----+            +-------------+           +---------+
|     | --create-> | not running | --start-> | running |
+-----+            +-------------+           +---------+
   ^                      |                       |
   `-------------------destroy--------------------'

lithium's People

Contributors

aidanhs avatar drj11 avatar ehg avatar frabcus avatar tlevine avatar zarino avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

lithium's Issues

"li sh" messes up stdout

"li sh" prints "exit code: 0" (in green)! This may or may not be a good thing, but it should not print it on stdout which it does now. it should use stderr.

More broadly, perhaps we should make this kind of output optional or just remove it.

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.