bonito

command module
v0.0.0-...-a693c21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2017 License: MIT Imports: 5 Imported by: 0

README

Bonito

Description

Bonito lives in the Digital Ocean. Some droplets may be needed temporarily, e.g. during working hours, and not in the weekend or overnight. Bonito helps you to shutdown a droplet, snapshot the data and destoy it, paying no cloud costs until the next droplet is started from the last snapshot.

All this can be done on the Digital Ocean's Dashboard, with a few clicks and a lot of patience - the worse is waiting up to 15 minutes for a snapshot to be taken, before deleting the droplet. It's easy to loose patience and forget to destory the droplet at the end, paying for it till the next day. Bonito waits as long as needed and does not loose patience. Besides, I was curious to do something in Go.

Usage

BE CAREFUL, this is in development. Unless --force is specified, all destructive actions ask for confirmation. I use it myself for a couple of weeks now.

Start with bonito --help

USAGE:
   bonito [global options] command [command options] [arguments...]

VERSION:
   0.1.0

COMMANDS:
     list     lists all snapshots, droplets or keys
     letgo    Let a droplet go -shutdown, snapshot and destroy
     kill     Same as 'letgo --nosnapshot
     up       starts a droplet from a snapshot
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --token value, -t value  Authentication token. Must be provided here or as [$DO_TOKEN_BONITO]
   --help, -h               show help
   --version, -v            print the version

First, you need a Digital Ocean authorization token. See https://cloud.digitalocean.com/settings/api/tokens dor details. Put the token in environment variable DO_TOKEN_BONITO (export DO_TOKEN_BONITO=A7f9...) or provide in the command line with the option --token (bonito --token A7f9... ...).

Each command has its own help, e.g.:

rife:bonito $ ./bonito up --help

To start a server from an existing snapshot:

bonito up --snapshot jenkins [--latest] --name jenkins [--quiet] -keys assen

... work ...
[bonito] created from image [jenkins-2016-12-12-12:33] statuse=[active] ip=188.166.5.244

To shut it down:

bonito letgo --droplet jenkins --nosnapshot --force

Besides:

 bonito list droplets|snapshots|keys

Install

To install, use go get:

$ go get -d github.com/kolov/bonito

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL