Skip to content

hoavt/teracy-dev

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

teracy-dev - get development fun!

This teracy-dev repository was created for developing software at Teracy with ease and fun. We're going to use virtualbox for running as a VM box, chef and vagrant for installing and configuring any necessary packages.

By using this approach, we can work in a consistent development environment. We don't have to install tons of development stuff on the host machine manually to get started.

Before getting started, please see the "Frequently asked question" to know some of the common problems you could meet with proposed solutions.

Usage

  • $ vagrant up to boot the VM
  • $ vagrant ssh to access the VM via SSH

More commands: http://docs.vagrantup.com/v2/cli/index.html

Installation

Follow the guide at: http://dev.teracy.org/docs/develop/getting_started.html

Configuration

All configuration is on Vagrantfile and Vagrant_Config_Default.json files.

To overrwite default configuration, you need to copy content from Vagrant_Config_Default.json to Vagrant_Config.json and adjust it by your needs.

We do this for smooth teracy-dev upgrading.

workspace directory

The workspace directory was created under teracy-dev. This workspace directory is the location where you will store all your work, after $ vagrant up, the following sub directories will be created if they do not exist yet.

workspace/personal: the location to store all your stuffs which you have full control of it (your own projects).

workspace/readonly: the location to store all the stuffs that you could read only (open source projects).

The teracy-dev/workspace directory from host machine was mapped to ~/workspace directory on the virtual machine. So you could access this workspace directory from the virtual machine ($ cd ~/workspace or alias $ ws).

From now on, we will $ vagrant ssh and run command lines on the virtual machine if not explicitly mentioning about running command lines on the host machine.

Training

We offered free training for recruiting newcomers.

Learn more

Frequently asked questions

1. My internet speed is slow, ``$ vagrant up`` took a lot of time and reset to 0% after reaching more than 50%?

For slow internet connection (~200KB/s or lower), you could use a download accelerator to download .box file (400-500MB) first with the link: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04-i386_chef-11.4.4.box

And before $ vagrant up, you must execute the command below:

$ vagrant box add opscode-ubuntu-1204 path_to_the_downloaded_file.box

If you're on Windows and downloaded the .box file to your Desktop, then:

$ vagrant box add opscode-ubuntu-1204 ~/Desktop/opscode_ubuntu-12.04-i386_chef-11.4.4.box

The output could be something similar like this:

Downloading or copying the box...
Extracting box...te: 66.3M/s, Estimated time remaining: 0:00:01)
Successfully added box 'opscode-ubuntu-1204' with provider 'virtualbox'!

2. What OS should I use for best development environment?

You could use any OS to start development (Windows XP, Windows 7, Windows 8, Mac, Ubuntu, etc.)

However, Windows is NOT recommended for best development experience. It's better to work on any *nix compatible OS (Mac OSX, Ubuntu, Fedora, Redhat, etc,.)

Ubuntu 12.04 is a strongly recommended OS for development, get it now at: http://www.ubuntu.com/download/desktop

3. After ``$ vagrant up``, there is an error saying that ``virtualbox`` has error, can't run and quit immediately?

Make sure you install the exact version 4.3.12 of virtualbox.

4. How could I update ``teracy-dev``?

We're trying to make the update as painless as possible so that we don't have to detroy and up again as it is time consuming. We try to make the update with provision, acceptable reload. If we have to destroy and up again, it will be the next major release version.

Follow the command below and you're done:

$ git pull

5. How to use ssh keys on the virtual machine?

5.1.

config.ssh.forward_agent = true is enabled by default.

It means that we don't have to specify username & password each time when working with Git like pull, push, rebase, etc..

5.2.

However, if you want to use new created ssh keys for Vagrant box, then you need to set config.ssh.forward_agent = false on Vagrantfile or comment that line.

  • teracy-dev/home/.ssh on the host machine and ~/.ssh on the virtual machine are in sync. You

could copy your existing ssh keys into one location and it will be available in the other location.

  • Or to create new ssh keys on the virtual machine, just create it and these keys will be copied

into teracy-dev/home/.ssh.