Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samuell/devbox-python
A Vagrant/Docker/Virtualbox/Ansible powered vim-based development environment for python.
https://github.com/samuell/devbox-python
Last synced: 2 months ago
JSON representation
A Vagrant/Docker/Virtualbox/Ansible powered vim-based development environment for python.
- Host: GitHub
- URL: https://github.com/samuell/devbox-python
- Owner: samuell
- Created: 2015-03-04T17:52:54.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-08-11T12:31:52.000Z (over 8 years ago)
- Last Synced: 2024-10-04T16:19:36.806Z (3 months ago)
- Language: Shell
- Size: 18.6 KB
- Stars: 13
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DevBox-Python
*With Docker or Virtualbox as provider and Ansible provisioning*A Vagrant box (Virtualbox or Docker as providers and Ansible provisioning)
with a vim-based development environment for python.### Note: There are currently problems with the docker version of the script, so please use the virtualbox version until this is solved!
## Ingredients
- [python](http://python.org)
- [pyenv](http://github.com/yyuu/pyenv)
- [vim](http://www.vim.org)
- [jedi-vim](https://github.com/davidhalter/jedi-vim)
- [vim-pyenv](https://github.com/lambdalisue/vim-pyenv)## Prerequisites
- [Vagrant](https://www.vagrantup.com/)
- [Ansible](http://www.ansible.com/)
- [VirtualBox](https://www.virtualbox.org/) (Not required if you use Docker as provider!)
- [Docker](https://www.docker.com) (Not required if you use Virtualbox as provider!)### Installing the requirements in Ubuntu (tested with 14.04)
1. Install Virtualbox:
```bash
sudo apt-get install virtualbox
```2. Install Docker:
```bash
sudo apt-get install docker.io
```3. Install a recent version of ansible:
```bash
sudo apt-get install ansible/trusty-backports
```*(if you ubuntu version is "trusty", otherwise, replace it with your appropriate version)*
4. Install Vagrant, by first downloadng the proper .deb file from [vagrantup.com](https://www.vagrantup.com/downloads.html)5. ... and then installing it with:
```bash
sudo dpkg -i
```## Setup and Usage
#### Clone the github repository:
```bash
git clone [email protected]:samuell/devbox-python
cd devbox-python
```#### Bring up the VM
With docker provider (Expect it to take at least ~8m):
```bash
vagrant up docker
```With VirtualBox provider (Expect it to take at least ~20m):
```bash
vagrant up virtualbox
```#### Log in to the VM
With docker provider:
```bash
vagrant ssh docker
```With VirtualBox provider:
```bash
vagrant ssh virtualbox
```#### A tip on how you can upload your existing git ssh keys to the new vm:
With the following command you can get the info you need to run scp
against the machine:```bash
vagrant ssh-config [docker | virtualbox]
```Note the hostname and port number (and identity file, if you with),
and run, for example:```bash
scp -i -P \
~/.ssh/id_rsa_ \
vagrant@:/home/vagrant/.ssh/
```Then, sometimes, in order to get the new key activated in your shell
after logging in to the vm, you might need to do:```bash
ssh-agent bash -l
ssh-add ~/.ssh/id_rsa_
```- Autocompletion will happen automatically
- If you have turned off the YouCompleteMe role, you will get autocompletion with ``## Known issues
- There are some really red message from the docker daemon when running `vagrant halt`.
Everything seems to work as expected though (including the shutdown)
- There are some red message on vagrant up, but they are nothing serious, and can be ignored for now.## References
- [Vagrant & Ansible Quickstart Tutorial](http://adamcod.es/2014/09/23/vagrant-ansible-quickstart-tutorial.html)