All Projects → bltavares → Baseline

bltavares / Baseline

Dev box with batteries included

Programming Languages

shell
77523 projects

Baseline

Dev box with batteries

The idea is to provide a simple dev box with tools.

Sometimes you want to play with a project, which leads you to install a lot of stuff on your computer and the filesystem gets messy. Booting your computer begins to slow, because it is loading a database that you never use. Maybe you want to try out a language but it requires you to install all the libraries and compilers.

Now you can mess up all the files in your dev box, and discard when you think it is too messy.

Video cast

Click to watch a live example of baseline

Video Cast

Table of contents

Requirements

Installation

Debian/Ubuntu

wget https://github.com/bltavares/baseline/releases/download/1.3.0/baseline_1.3.0_all.deb
sudo dpkg -i baseline_1.3.0_all.deb

Mac (Homebrew)

brew tap bltavares/tap
brew install baseline

Manual installation

Make sure you have vagrant installed and configured on your machine.

# Adjust the paths to your preferred location
installation_path=/opt/baseline
shell_configuration=$HOME/.bashrc

git clone https://github.com/bltavares/baseline.git $installation_path
echo 'export PATH=$PATH:'$installation_path'/bin' >> $shell_configuration

This command will clone this repo to /opt/baseline by default and add it to your PATH, so the command can be found. Then it will add some autocomplete for you.

Don't worry too much about cloning it into /opt/baseline. Clone it wherever you want, but put that onto your path. One idea is to clone it somewhere, then symlink it to a place on your path.

Autocomplete

To enable autocompletion run the following command:

shell_configuration=$HOME/.bashrc
echo 'eval "$(baseline autocomplete)"' >> $shell_configuration

Adjust the shell configuration variable if you use a different shell.

Commands

init - Create a new box in the project dir

baseline init [<path where you want your box to live. default to '.'> [<git url for the vagrant files. default to https://github.com/bltavares/vagrant-baseline.git> [branch name. default to "master"]]] 

# example
cd awesome-project
baseline init .

# another example
baseline init awesome-project https://github.com/<your-username>/vagrant-baseline.git awesome-code
cd awesome-project

up - Bring a box up with some configuration

baseline up [<environments>]
  • Arguments:
    • environments: optional list of enviroments to start the box with. If no argument is passed, it will come up with the last configuration used.

e.g.:

baseline up ruby nodejs

ssh - Connect to the box

baseline ssh

provision - Provision a running box with the specified environments

baseline provision <environments>

reload - Reload the box configurations

baseline reload

halt - Halt the box

baseline halt

destroy - Destroy the box

baseline destroy

remove - Destroy the box AND removes .baseline

baseline remove

update - Update the box recipes

baseline update

dotfiles

baseline dotfiles <gir url for the dotfiles> 
  • Arguments:
  • git url for the dotfiles: The url to clone dotfiles from

This command will change the configurations to point to your own dotfiles. Then use the environment dots to have it installed in your box.

Eg:

baseline init
baseline dotfiles <github clone url>
baseline up dots nodejs

The dofiles project must have some constraints. Check the instructions.

upgrade

baseline upgrade

Upgrade baseline to the latest version

envs

baseline envs

List the environments supported by the current baseline project

version

baseline version

exec - Executes the command on vagrant on the .baseline folder

baseline exec rsync

List of environments

Currently baseline is only supporting vagrant-baseline vagrant setup. You can check the list of supported environments here.

Using GUI programs

Ssh allows you to forward the X server to your computer. If you want to use a program with a graphical interface or want to code an app that generates graphics, you can ask vagrant to forward it for you.

Just ssh with the following command:

baseline ssh -- -X

Extending with your own puppet scripts

Sometimes you will want to try out some different modules that are not currently in the project. Perhaps you want to set up a webserver for the project you are writing and have it configured and deployed with your project. Or maybe you just want to have some packages installed, or removed.

You can achieve that by extending the project using the .baseline/puppet/custom folder. There is an example file to guide you in extending your vagrant machine.

Packaging

.deb

You need to have make and fpm installed.

make deb

Debugging

When building puppet scripts, a verbose output can help. In those cases we provide the DEBUG variable to increase the output, show debug messages and create dependency graphs.

DEBUG=1 baseline up redis
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].