Git Product home page Git Product logo

devbox-python's Introduction

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

Prerequisites

Installing the requirements in Ubuntu (tested with 14.04)

  1. Install Virtualbox:

    sudo apt-get install virtualbox
  2. Install Docker:

    sudo apt-get install docker.io
  3. Install a recent version of ansible:

    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

  5. ... and then installing it with:

    sudo dpkg -i <deb-file>

Setup and Usage

Clone the github repository:

git clone [email protected]:samuell/devbox-python
cd devbox-python

Bring up the VM

With docker provider (Expect it to take at least ~8m):

vagrant up docker

With VirtualBox provider (Expect it to take at least ~20m):

vagrant up virtualbox

Log in to the VM

With docker provider:

vagrant ssh docker

With VirtualBox provider:

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:

vagrant ssh-config [docker | virtualbox]

Note the hostname and port number (and identity file, if you with), and run, for example:

scp -i <identity-file-path> -P <portno> \
	~/.ssh/id_rsa_<whateveryounamedit> \
	vagrant@<hostname>:/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:

ssh-agent bash -l
ssh-add ~/.ssh/id_rsa_<whateveryounamedit>
  • Autocompletion will happen automatically
  • If you have turned off the YouCompleteMe role, you will get autocompletion with <C-x><C-o>

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

devbox-python's People

Contributors

samuell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

jvhaggard

devbox-python's Issues

VirtualBox is required even if I choose Docker as provider

VirtualBox (Not required if you use Docker as provider!)

Did I miss something?

vagrant@vagrant:~/git$ cd devbox-python/
vagrant@vagrant:~/git/devbox-python$ ls
copysshkey.sh  Dockerfile  genkeys.sh  keys  playbook.yml  README.md  roles  Vagrantfile
vagrant@vagrant:~/git/devbox-python$ vagrant up docker
genkeys.sh: line 1: $'\r': command not found
genkeys.sh: line 7: syntax error: unexpected end of file
Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
Vagrant uses the `VBoxManage` binary that ships with VirtualBox, and requires
this to be available on the PATH. If VirtualBox is installed, please find the
`VBoxManage` binary and add it to the PATH environmental variable.

But to be honest: I am trying to run it in a VM (Ubuntu 14.04 LTS) which is running on Vagrant + VirtualBox on a Windows 7 host machine :-)))

What about Ansible Local as provisioner?

Ansible can´t run as control machine on Windows. But there´s another option called 'Vagrant Ansible Local provisioner' What about it?

Can´t it be used to make this work on Windows?

It tried a quick fix by changing the line 18 from

vbox.vm.provision :ansible do |ansible|

to

vbox.vm.provision :ansible_local do |ansible|

but the I get this error:

Bringing machine 'virtualbox' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

ansible local provisioner:
* `playbook` does not exist on the guest: C:/vagrant/playbook.yml

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.