Dylan conway

Cloudlet Platform Development Setup Guide

Required Software

Note please install required software packages in the order they appear below. For the purpose of integration a number of specific versions have been selected, however this may be subject to change. If a version is not specified below then assume the latest stable version.

WebStorm

WebStorm is a software IDE for JavaScript, which is written in Java and runs on the JVM (platform agnostic). It can be downloaded from the URL below, please ensure you have Java installed.

http://www.jetbrains.com/webstorm/download/index.html

Git

Git is a source control management system, which will be used to maintain the project codebase in a distributed development environment. Installers are available for all major operating systems from the link below.

http://git-scm.com/downloads

A step-by-step guide on how to use Git is available at the URL specified below. It is highly recommended you familiarise yourself with this document if you have no prior experience with Git.

http://git-scm.com/book/en/Getting-Started

Node.js (v0.10.21)

Node.js is a JavaScript platform to create and deploy network applications on. Below is a link to where you can download the relevant software for your platform.

http://nodejs.org/dist/v0.10.21/

For Windows users (.exe) and Mac OS X users (.pkg) installers are available, which will handle the configuration/installation for you. For those using a linux distribution download the tarball file (.tar.gz).Run the following commands to extract files from the tarball and install node. Node also requires some third party software packages, the installation of these can be handled through a package manager.

sudo apt-get install -qy g++ curl libssl-dev apache2-utils
wget http://nodejs.org/dist/v0.10.21/node-v0.10.21.tar.gz
tar -xzvf node-v0.10.21.tar.gz
cd node-v0.10.21/
./configure
make
sudo make install

The last command must be run as a root user, therefor you will be prompted to enter your password

ZeroMQ (v2.2.0)

ZeroMQ (ZMQ) is a socket programming abstraction that facilitates messaging in highly scalable, concurrent environments. The commands show below will download, configure and install ZMQ on a linux based operating system (Ubuntu and Debian). Some distributions of linux will require you to substitute in their package manager (instead of apt-get) for the first command shown below. An installer is available for windows at the URL shown below.

http://zeromq.org/intro:get-the-software

sudo apt-get install g++ uuid-dev binutils libtool autoconf automake
wget http://download.zeromq.org/zeromq-3.2.4.tar.gz
tar -xzvf zeromq-3.2.4.tar.gz
cd zeromq-3.2.4/
./configure
make
sudo make install
sudo ldconfig

SQLite3

SQLite3 is a light weight relational database. Mongrel2 requires a database backend, SQLite3 was chosen for simplicity and performance. Package managers can be used to install it (example below covers Ubuntu and Debian). Installers exist for Windows and Mac OS X users available from the link below.

http://www.sqlite.org/download.html

sudo apt-get install sqlite3
sudo apt-get install libsqlite3-dev

Mongrel2 (v1.8.0)

Mongrel2 is an application server that is platform and language agnostic. Below is a list of commands that will install it on all UNIX-like operating systems (including Mac OS X). Ensure that you have completed the installation of ZeroMQ and SQLite3 before attempting to install Mongrel2.

wget --no-check-certificate https://github.com/zedshaw/mongrel2/tarball/v1.8.0
tar -xzvf v1.8.0
cd zedshaw-mongrel2-bc721eb/
make
sudo make install

To start Mongrel2 you next need to load a configuration file. The configuration file and scripts to load the file, start and stop mongrel are included in the repository at the following URL.

[OPENi Mongrel2 Repo](https://opensourceprojects.eu/p/openi/c60b/ad4e/mongrel2)

Cloning the repo and running the script should start mongrel with the correct configuration.

git clone git@opensourceprojects.eu/p/openi/c60b/ad4e/mongrel2
cd mongrel2/
sh start_mongrel2.sh

May Also Require

OpenStack

Chef

Chef is a tool for automating the configuration of infrastructure. Configuration is written in Ruby and is platform agnostic. Installation instructions are provided for all major platforms at the link below.

http://www.opscode.com/chef/install/

Node Packages

Grunt

Grunt is a JavaScript build tool and below is a list of commands to install it and plugins (such as static analysis tools, test tools etc.). The packages.json file contains the dependencies required. Running the command shown below in the same directory as this file.

npm install

ZMQ Node Module

Now that you have both ZeroMQ (ZMQ) and Node installed, you now require the ZMQ language bindings for Node.The command shown above will also install this from the dependencies declared in packages.json.

Mongrel2 Handler

A handler is required for Node to work with the string format used by Mongrel2. A third party version is available however it is impossible to satisfy both it and grunt's dependencies. Therefor this handler must be extended to work with newer versions of Node.js.

Installer Script (Ubuntu and Debian)

For those who think its a pain to copy and paste commands I have provided an installation script for Ubuntu and Debian. Those of you not using these distributions only need to swap commands using aptitude for the package manager your distro uses. Run the script with the command shown below.

source setup.sh

Repository Location

clone repo command

Attachments
setup.sh (3319 bytes)

Related

Wiki: Home