Giter VIP home page Giter VIP logo

dab's Introduction

Dab

standard-readme compliant GitHub license CircleCI Build Status

The Developer lab.

Try in PWD

Dab is a flexible tool for managing multiple interdependent projects and their orchestration, all while providing a friendly user experience and handy devops tools.

Table of Contents

Install

Simply download the dab wrapper script to somewhere in your PATH environment variable, for example:

 $ sudo curl https://raw.githubusercontent.com/Nekroze/dab/master/dab -o /usr/local/bin/dab
 $ sudo chmod 755 /usr/local/bin/dab

After this the dab command should be available in your shell:

 $ dab completion

If you are an OSX user you will want to set the DAB_GID environment variable to 0 to avoid docker access issues and the DAB_AUTOUPDATE_COMPLETION environment variable to false as completion is only supported on Linux out of the box.

Usage

You need only have docker installed and any POSIX compliant shell to run the wrapper scripts and get going with dab. This will start the dab container and forward all arguments into it:

 $ dab --help

If you do not need to build the docker image yourself and just want to use dab, the dab script we just executed is all that is needed and can be used from (or moved to) any location.

It is recommended you add the directory containing the dab script to your shell's PATH environment variable.

If you want to execute dab with sudo and retain set environmental variables, you can use the following to execute dab:

 $ sudo -E dab --help

Stable Updates Stream

The latest image is built off of the ever changing master branch. While all efforts are made to keep the UI and behaviour stable, you may wish to use the stable docker tag (and thus git branch) which receives periodic merges from the master branch.

You can control the image to be used with the DAB_IMAGE_TAG environment variable like so:

export DAB_IMAGE_TAG=stable

Demoing

If you are not yet sure if Dab is right for you, Play With Docker (PWD) will allow you to spin up a temporary cloud server with Dab available. You will be presented with a terminal containing the latest version of Dab ready to use.

Setting up a project

As a developer I work on a heaps of projects each with their own needs and quirks. Lets use dab to manage a project for us, first we need to register its existence:

 $ dab repo add containaruba https://github.com/Nekroze/containaruba.git

This will register the containaruba repository and attempt to clone it into $DAB_REPO_PATH which defaults to ~/dab.

Now we can set the type of entrypoint we want this repo to use.

 $ dab repo entrypoint create containaruba
 $ dab config add repo/containaruba/entrypoint/start ./test.sh

Now whenever we start this repo, or a repo that depends upon this one, the test.sh script within the root of the containaruba repo will be executed.

 $ dab repo entrypoint start containaruba

Using dockerized apps

There is an ever growing selection of tools and services dab provides (checkout dab apps list) for recording metrics, databases, etc.

 $ dab apps start grafana
 $ dab apps start ntopng
 $ dab apps start redis

Updating

Dab has a self updating mechanism in that it will pull the latest version of the dab image when dab is next executed a day or more after the last time it checked. So generally you do not have to do anything at all to stay up to date with the latest features, bug fixes, and security improvements. This new image will update the wrapper script if necessary.

Watching and Learning

The Dab UX project stores user experience tests that should almost always be added to and not modified or removed. This allows for a stable command line interface with a clear notification if that interface changes in the form of changes to that project. Each version of Dab itself is tested against the current tests in Dab UX before released to ensure no regression. These tests are also used to generate the Dab UX Website where you can learn more about what Dab can do for you.

Features

  • Only depends on docker and a small wrapper script
  • Manage code repositories
  • Manage entrypoints into repositories eg. starting and stopping a project
  • Easy tool access like CyberChef
  • Easy service access like Redis
  • Auto update of dab image
  • Setup of private lab network
  • Automatically collect logs to explore via TICK and Logspout
  • Automatically update out of date wrapper script
  • Groups allow combining repositories, and even groups to be orchestrated together
  • Shared base image, most all docker container dab uses utilize an alpine base image that is lean
  • Simple, thanks to the subcommander dispatcher most subcommands are implemented in only a few SLOC
  • Tree structured configuration that can be shared (eg. via git or tar)
  • Managed x509 PKI

Contributing

If you would like to help hone dab into a better tool check out our contributing documentation.

Bill Of Materials

The following projects are used to write dab:

Maintainers

@Nekroze

Contributing

See the contributing file!

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

GPLv3 © 2018 Taylor Lawson

dab's People

Contributors

lachlan-s avatar nekroze avatar tom-schumann 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.