https://github.com/ajkavanagh/vagrant-base-image
A vagrant 'base' on which to build other projects
https://github.com/ajkavanagh/vagrant-base-image
Last synced: 3 months ago
JSON representation
A vagrant 'base' on which to build other projects
- Host: GitHub
- URL: https://github.com/ajkavanagh/vagrant-base-image
- Owner: ajkavanagh
- License: mit
- Created: 2015-06-07T18:47:52.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-07T19:16:07.000Z (about 10 years ago)
- Last Synced: 2025-01-11T13:17:32.349Z (5 months ago)
- Language: Shell
- Size: 137 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vagrant Base image
This repository is simply a (hopefully) easy to use base image on which to build new git repos that will use vagrant.
As such it contains:
* A Vagrant file and associated provision file.
* Some nice configuration files for setting up tmux and a fancy shell prompt## Vagrant file
Just `git clone` the repository and do Vagrant up to build the vagrant image. Then:
```shell
$ vagrant ssh... wait for the shell from the Vagrant box ...
$ tmux-session
```## Configuration Files
In the `provision` directory, there are various configuration files that are used when building the Vagrant box. These are:
* `dot.bashrc`: This becomes .bashrc in the `/home/vagrant` folder. This is the standard Ubuntu 14.04 .bashrc with a few extra bits to work with Virtualenvs and the fancy prompt, and configures the `$PATH` variable to include `/home/vagrant/bin`.
* `dot.tmux.conf`: This becomes .tmux.conf in the `/home/vagrant` folder.
* The tmux command is `Ctrl-A` rather than `Ctrl-B` because I've used `screen` for 15 years.
* I've changed the split commands to work like Vi(m).
* I've disabled logout, unless you hit `Ctrl-D` three times successively.
* `tmux-session`: This is copied to the `/home/vagrant/bin` folder. This configures tmux to create 3 windows and automatically start iPython Notebook in the 3rd window. Typing `tmux-session` at the command prompt configures the tmux session the first time it is run, and simply connects to a running server on subsequent invocations.
* `virtualenv-svn-git-path-prompt.bash`: This is a collection of functions and a 'fancy prompt' that puts the git repository (or SVN!) and active virtualenv onto the path.## Using this base image
If you want to use this for a new project then don't *just* clone it or fork it as that will create a link back to this repo. What you want to do is (assumes BASH!):
```shell
git clone https://github.com/ajkavanagh/vagrant-base-image.git
git archive --format=tar HEAD | (cd "" && tar xf -)
```This will copy all of the not `.git` related files into the ``.
You'll probably also want to configure the `provision/tmux-session` script to start the programs/tmux sessions that you want for your project.