1

Following this tutorial on the Vagrant website, I was able to get a virtual machine up and running very easily, but now I'm trying to create a different virtual machine by forking a repository linked below.

The README in this repository tells me to do this:

$ git clone git://github.com/honza/django-chef.git
$ cd django-chef
# add yourself to the "users" array in the Vagrantfile
$ sudo echo "127.0.0.1 example.example.com" >> /etc/hosts
$ vagrant up
$ fab vagrant:honza bootstrap  # replace with your name
$ vagrant ssh    
$ run            # ME (doctordoder): This command is not found?

"Then open your browser to http://example.example.com:3456."

The difference being that the other tutorial stops at vagrant up, and then the website is available.

When I tried to do these extra steps with this more difficult repository, I got this (I did these commands after I had already run vagrant up in the django-chef directory successfully):
My terminal pic

Where is this so called "run" command in vagrant? Why do I need it? And why is it unavailable to me?

1 Answer 1

1

I think you missed 2 steps, or they didn't work for you:

fab vagrant:honza bootstrap"

this is a fabric command, fabric is a deployment & execution tool for managing systems over ssh. (http://docs.fabfile.org/en/1.4.0/tutorial.html)

You can install it on your mac like this (this install is it in a python virtual environment, so that it doesn't affect your entire machine)

cd django-chef
# create a python virtual environment in .venv
virtualenv .venv
# activate the python virtual environment you just created
. .venv/bin/activate
# install the fabric python package
pip install fabric

After that, the fab vagrant:honza bootstrap command should run for you.

Once that's done, inside your VM, you'll have a working run command, which launches the django development server:

simonm@MacBook:~/src/django-chef (master) AWS=jdr $ vagrant ssh
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic-pae i686)

 * Documentation:  https://help.ubuntu.com/

148 packages can be updated.
65 updates are security updates.

Welcome to your Vagrant-built virtual machine.
Last login: Tue Jan 28 12:31:55 2014 from 10.0.2.2
(example)vagrant@example:/opt/example/apps/example/src$ run
Validating models...

0 errors found
January 28, 2014 - 06:33:25
Django version 1.5.1, using settings 'example.settings_server'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

Hope that helps.
Most of this was not vagrant related, but due to the original documentation for the django-chef repo being vague or assuming you knew stuff (like that you needed fabric installed to actually do the django deploy inside the vagrant managed VM)

1
  • I arrived at this answer a little earlier actually, but thanks for your answer still! Jan 28, 2014 at 19:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .