Skip to content

[English] How to install and run Catarse

Adrian Mejia edited this page Aug 20, 2013 · 10 revisions

How to install Catarse on a VM with Vagrant?

There are a few (but small) steps to run catarse on your machine, even if it is a Windows-based one.

We will use Vagrant to install your virtual machine on VirtualBox and give it the exact configuration expected to run catarse at a blow from the source files.

This will take some minutes to go depending on your configurations. The whole process can take more than 10 minutes if your connection is slow. After that, everything will be amazingly fast.

A - Prerequisites check-up

Make sure your environement includes following tools before next step. If not yet, download, install and set them up.

If you use MS Windows, here is a detailed install notice from an other project that share same prerequisites ; stop after Vagrant installation -do not install zamboni-; and restart your computer before next step.

Required tools

  • Vagrant, a development environments builder ;
  • Vagrant-vbguest, a Vagrant plugin which automatically installs the host's VirtualBox Guest Additions on the guest system. ;
  • Librarian-Chef, a bundler for your Chef-based infrastructure repositories ;
  • VirtualBox, a tool to manage and create virtual machines ;
  • Ruby including RubyGems ;
  • git, a distributed version control system, that you obviously know, and use if your read this on Github wiki... for Windows, use mysysgit that provide git commands in your terminal (used by Vagrant) ;

and, for MS Windows users only:

  • putty, to provide console access to your VM through ssh.

B - Setup

Open a terminal application (or "command prompt"), and do the following typing commands:

In Windows, to open the command prompt, go to "Run" and then Type "cmd". In Windows 8 you have to open the Start Menu and Type "R" (this will open the "Run" box).

1. Get the catarse source code

Inside your working directory,

  • Clone the catarse code repository from github to your current local directory : git clone https://github.com/catarse/catarse.

  • Enter the directory that was just created by git cd catarse/.

2. Add some tools to your VM

Inside the catarse/ directory, -librarian-chef install (Add apt, nodejs... and much more. See the Cheffile)

  • gem install vagrant-vbguest

3. Make Vagrant build the VirtualBox VM according to settings in catarse sources

  • Run the Vagrant launching command : vagrant up, since there isn't any VM yet, Vagrant will create the Virtual box VM, configure it, download the box, ... and launch the VM as it will (without initialization) every time you run this again.
  • Install some more tools to help you run Catarse's code : vagrant provision

Voilà. Catarse is running.

C - Use-it and enjoy

From your vagrant directory, once setup is done,

Start and stop your VM

  • Start your VM :vagrant up
  • Stop your VM : vagrant halt

Access your Catarse in your started VM with your browser from your local environment

  • Open your favorite web browser and visit your Catarse : open http://localhost:3000.

Make changes in your Catarse from your local environment

  • Open your favorite editor or IDE, make modifications and commit it to your local environment. Any modifications you do on your machine is reproduced on the Virtual one. Just edit your local files.

Access your VM in console through ssh to run your tests (or others)

  • If you need to run tests or others, run vagrant ssh and then cd /vagrant to enter the Catarse directory on the Virtual Machine. On windows you'll need Putty for this.

Need help on other areas?

  • There are other wikis to help you commit to your server or just make a pull request.
  • Go to "Wiki" link above and go for a ride.