Skip to content

Installation Instructions on Nodejitsu

gouldingken edited this page Mar 8, 2013 · 30 revisions

CrowdGauge runs on Node.js and can be hosted on any server running Node. These instructions are for hosting on Nodejitsu.com.

Jitsu setup

  1. Install Node.js (this will automatically install the package manager called NPM)
  2. Set up an account on Nodejitsu.com and follow the instructions in the email. Note: for some reason they include the Ubuntu-specific 'sudo' command in the instructions. If you're not on Ubuntu (or similar) just leave that first part off and run "npm install jitsu -g".
  3. As per the email instructions, you will be asked to confirm your account and set up a password.

Clone crowdgauge from github

  1. Clone the github repository: https://github.com/placematters-decision-lab/crowdgauge.git
  2. By default, your application will be run from a subdomain on Nodejitsu (e.g. crowdgauge.jit.su). Open package.json in the root of the repository you just cloned and edit the 'subdomain' property from 'crowdgauge' to whatever you want as your unique URL on jit.su (jitsu will warn you later if its taken).

Deploy your application

  1. Navigate a command window / terminal to the root of the crowdgauge folder you just cloned (where package.json resides).
  2. Run the command: jitsu deploy
  3. The application should upload and attempt to run, but it will return an error at this point because we still need to configure databases.

Database setup

  1. Log in to the Nodejitsu control panel.
  2. Open the 'Apps' tab. Select your app on the side panel and then select the 'Environment variables' tab. Click 'Add variable' to add these keys: COUCH_URL, REDIS_HOST, REDIS_PORT, REDIS_KEY. You may need to click 'Edit' for each new key.
  3. Enter 6379 next to REDIS_PORT
  4. Open the 'Databases' tab. You need to copy multiple variables across so use a new browser tab (or window).
  5. Click CouchDB on the left and then 'Add database'.
    • Copy the connection string and paste in the other window next to the COUCH_URL key under 'Environment variables'.
  6. Click on Redis (By Iriscouch) on the left and then 'Add database'.
    • Copy the Host URL and paste it next to REDIS_HOST
    • Copy the Password and paste it next to REDIS_KEY
  7. Click 'Save'

TODO: add instructions for creating CouchDB user

You're good to go

Redeploy the application as per instructions above.

To start building content, go to your_subdomain.jit.su/client/contribute/index.html

Notes

For the testing phase of crowdgauge (as per the instructions above) the application has not been packaged using NPM. Future versions will be installed as a module using NPM and these instructions are likely to change at that point.

If you run into problems, please see the troubleshooting page