Install - npolar/api.npolar.no GitHub Wiki
After finishing the installation outlined below, you can setup a [new API](New API).
Before you begin, you need to Install CouchDB and Elasticsearch.
Instructions below are for a development machine. For hints on establishing a production platform, see Install-production.
All instructions are tested to work on Ubuntu Server 14.04 LTS.
Development
Ruby (via RVM)
sudo apt-get install curl git
curl -L https://get.rvm.io | bash -s stable --autolibs=enabled --ruby=2.1
source ~/.bashrc # Load RVM path info into the terminal
git clone
sudo apt-get install libxml2-dev libxslt-dev
# git clone [email protected]:npolar/api.npolar.no.git # Read+Write git clone, requires .ssh key
git clone https://github.com/npolar/api.npolar.no.git
cd api.npolar.no
bundle install
Configuration
Configuration is done via environmental variables, run
./bin/npolar-api-configure
setup these. The tool will create a config/env
file and add a source
of this file to ~/.bashrc
Bootstrap
Before you you can start the API, you need to bootstrap the Service API and set a sysadmin user.
Authorization. Unless you have a development LDAP instance, select CouchDB as authorization backend.
Seed file for the Service API: https://github.com/npolar/api.npolar.no/blob/master/seed/service/service-api.json
./bin/npolar-api-bootstrap
Start
cd ~/api.npolar.no
bundle exec shotgun # http://localhost:9393