Skip to content

Running your own instance

Chris edited this page Jul 23, 2015 · 13 revisions

Before running the tool

User management is not a novel act, therefore it is outsourced. Three options exist for managing user accounts; Stormpath, "dev-only", custom.

###Stormpath Out of the box, wardleymapstool is setup to use Stormpath, a service that provides full user management (and has have a very reasonable free quota). To use this, it's necessary to register your own account, and configure the API keys. Please be aware that Google+ social login requires additional stormpath configuration and will not work out of the box.

"dev-only"

For the ease of development, you can choose to skip all user account features. To configure this option create a top level config.json with the value

{
    "userProvider": "os"
}

In this mode, all maps will be saved with the USERID of the process running the server.

Custom

You can write your own user-provider, say for corporate directory integration. Details shortly

Running the tool via Docker

This is useful if you want to just try the tool out and get it running in your environment in no time. Follow steps listed below:

git clone https://github.com/cdaniel/wardleymapstool.git
cd wardleymapstool
$EDITOR server/config/stormpathconfig.js # <- put your stormpath keys there
docker build -t wmaps/init .
docker run -p 8080:8080 -t  -i wmaps/init

and then wait around 30 seconds to let the mongodb start (the output should be like this);

The tool should be available in your browser: http://127.0.0.1:8080/

Notes about using docker

  • building docker image requires up to 20 GB of storage. That's the price for isolation.

  • the tool docker images are not published anywhere. They will be built on your machine using the sources that you've checked out. Therefore you should ensure that your repo is up to date:

    git pull origin master

  • Docker caches a lot of things, so updated sources may not be reflected in the build, so you should disable cache during builds.

    docker build --no-cache -t wmaps/init .

  • The tool is running on 8080. Your firewall may be blocking this port.

  • The tool was successfully run on Fedora 21 and Ubuntu Vivid Vervet.

Running the tool via npm

This is the simplest approach to get the tool running. The tool may be slightly out of date, but it gives you a decent experience almost immediately:

  1. Install Python 2.7.10 or greater (this is optional if you are using a distro-packaged npm)
  2. Run npm install wardleymaptool
  3. Start mongoDB
  4. Run npm start

Development setup - manual install

Prerequisities - trivial

  1. Linux
  2. MongoDB
  3. Node.js
  4. 2GB of free space

Running the tool

  1. Checkout the code.
  2. Modify server/config/mongodbdata.js and put there a connection string that allows for mongodb access. This step may be optional if you use out-of-the-box MongoDB, because default connection strings points to a default instance of MongoDB.
  3. Modify server/config/stormpathconfig.js and put there your Stormpath credentials. This is a must have if you want anyone to be able to login into your service.
  4. Run npm start and enjoy the tool at http://127.0.0.1:8080
  5. Run npm tests to run tests.

SSL

It is necessary to put a crt and key file in the main folder of the application (next to config.json), and then to add in config.json following entry:

"ssl" : {
    "key" : "ssl.key",
    "cert" : "ssl.crt"
 }

Note that the service will start on port 8443 instead of 8080.