Skip to content

Tools and instructions for setting up a developer environment

License

Notifications You must be signed in to change notification settings

photo/developer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

What is OpenPhoto?

  1. FAQ, Answers to the most common questions.

About the environment

The recommended way to set up a developer environment is with the provided VirtualBox VMs using Vagrant. This lets you create a sandboxed environment that's known to work.

The box is based off Ubuntu Lucid32 with all of the packages pre-installed to be up and running. We followed the installation guide for Ubuntu with Apache with some modifications to make it suitable for development.


Getting set up

Refer to the Vagrant documentation for details.

Download and install VirtualBox 4.1.20

Download the appropriate binary.

  1. Windows
  2. Mac OSX
  3. Linux

Once downloaded you'll need to install the program. We'll be running Virtualbox headless so this is the last time you'll directly interface with Virtualbox.

You can find a complete list of downloads for 4.1.20 here.

Download and install Vagrant 1.3.0

You can download the appropiate binary from Vagrant 1.3.0 download page. Once downloaded you will need to install the program.

There's a complete list of downloads for Vagrant here.

Initialize and boot your VM

Using the base box provided by us run the vagrant box add command. This is a 600MB file so it may take some time.

vagrant box add photo http://photo-developer.s3.amazonaws.com/vagrant-photo-developer-1.0.box

Next you'll need to decide which directory you want to set up your files in. We'll assume it's %HOME%/dev. Open a terminal and cd into that directory and copy the contents of our Vagrantfile into it.

curl -s https://raw.github.com/photo/developer/master/vagrant/Vagrantfile > Vagrantfile

Now you can boot your VM and add a host entry pointing to itself.

vagrant up

# test that it is working by ssh'ing
vagrant ssh

# add the host entry
sudo sh -c 'echo "33.33.33.33 local.photo" >> /etc/hosts'

# return to your host
exit

That's all. Let's get your local host set up to talk to your VM.

Configure your local environment

In order for your local environment to communicate with the virtual environment we're creating you will need to set up an alias in your hosts file.

  1. Windows %SystemRoot%\system32\drivers\etc\hosts
  2. OSX /etc/hosts
  3. Linux /etc/hosts
  4. All others

Append the following to your hosts file.

33.33.33.33 local.photo

What this says is that the VM's IP address is 33.33.33.33 and your local host can access it using the DNS name local.photo.


Make magic happen

Now that everything is set up you should be able to load a browser and go to http://local.photo.

To use MySql you can enter the following information.

  1. Host - localhost
  2. Username - root
  3. Password - (empty)
  4. Database - photo

Troubleshooting

If you have problems, please open an issue and we will aggregate common errors here.

About

Tools and instructions for setting up a developer environment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages