Giter Club home page Giter Club logo

capbash

UPDATE!!! Capbash moved from submodules to subtrees. Please remove all submodules, create a ./bits directory and re-add them (sorry for the backwards incompatible changes).

A simple infrastructure tool that uses capistrano and bash to manage remote servers.

This project is meant to change very little, and delegates most of its work to a bootstrap project, shown below: https://github.com/capbash/capbash-bootstrap

This allows you to clone the project, make it your own and still stay up on the current version.

How to Install

You will need to download the installer and run it. This can be down with curl, as follows:

curl -s https://raw.githubusercontent.com/capbash/capbash/master/capbash-installer | bash

This will install capbash into /usr/local/bin/bash. To install it somewhere else, for example:

curl -s https://raw.githubusercontent.com/capbash/capbash/master/capbash-installer | bash -s -- --path ~/.bin

Server Preconditions

Please ensure your new server has a root password, and that an ssh server / client is installed. For example,

This will allow you give your root user a password:

sudo su root
passwd

And, this will install an ssh server / client on Ubuntu.

apt-get install openssh-server openssh-client

Capbash works as root, so you will need to enable root login.

vi /etc/ssh/sshd_config

# Change PermitRootLogin to be
PermitRootLogin yes

Creating a New Capbash Project

You can now create a new 'devops' project, by simply calling:

# default project name is devops
capbash new

# Or, name it what you want
capbash new deploys

This will create a new git project ready for remove deployment.

Deploy to Remote Server

To push the helloworld script to your server, all you need if the IP or hostname of your server (e.g. 192.167.0.48) and your root password.

capbash deploy <IP>

For example,

capbash deploy 127.0.0.1

Adding Bits (aka subtrees)

Install scripts are written in bash, and can be added to your project. First you will want to list our available bits.

capbash ls

Now, you can install any submodule, e.g. docker

capbash install docker

We are working on more bits, as well as a registry to support third party modules.

How to update capbash

To get the latest capbash capabilities, run

capbash update-self

How to project specific modules

From within your project, you can update all modules.

capbash update

Usage

Usage

  capbash [action]

Global Actions (applies outside of any particular project)

  update-self             - Updates capbash to the lastest version
  ls                      - Show all available modules (e.g. docker, nginx)
  help                    - Displays this output.

Project Actions (applies to a specific project, and must be run from within that project)

  udpate                  - Updates all project modules, including the capbash bootstrap
  install <module>        - Installs a particular module into your project, e.g. 'capbash install docker'
  uninstall <module>      - Uninstalls the module, e.b. 'capbash uninstall nginx'

Deployment Actions (applies to a specific project, and is geared towards running things on remote servers)

  deploy <server> <node>  - Deploys to server (e.g. 192.169.10.11) and node (install scripts located in ./nodes directory)
  sync <server>           - Synchronizes project on remote server, but does not install / configure the node

Available Modules

  • monit (for monitoring your server)

  • deploykeys (a simple public/private key manager to enable access to other servers / services)

  • git

  • docker (docker up and running in a jiffy)

  • elixir (installs a tagged version of elixir)

  • mysql (installs mysql in a docker container)

  • drupal (installs a drupal admin console for deploying one or more instances of drupal)

  • phoenix (installs phoenix web applications based on the elixir language)

  • nginx (a webserver running mostly within a container)

  • apache (a webserver running apache2)

capbash's Projects

bits icon bits

A collection of bash scripts for configuring your server

capbash icon capbash

A simple infrastructure tool that uses capistrano and bash to manage remote servers

capbash-cadvisor icon capbash-cadvisor

A capbash submodule for deploying a cadvisor for monitoring your docker containers

capbash-exrm icon capbash-exrm

A capbash submodule for deploying an exrm based elixir projec

capbash-git icon capbash-git

A capbash submodule for install git and clone stuff from git repostiories

digoc icon digoc

Digital Ocean API v2 Elixir Client

dio icon dio

A bash implementation of the Digitial Ocean API

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.