-
Notifications
You must be signed in to change notification settings - Fork 4
FieldDB & OLD web services development setup
When developing Dative, it can be helpful to have both the FieldDB and the OLD web services running locally, so you can test full stack behaviour. This page is intended to help developers get these web services running locally.
FieldDB has a few web services: one for authentication and another for corpora.
To install a new developer machine use/read the bash install scripts for your platform mac, or linux. Instructions as of November 2014 are pasted here. For updated instructions view the FieldDB Wiki How to install on your own server.
$ cd $HOME/Downloads && curl -O --retry 999 --retry-max-time 0 -C - https://raw.github.com/OpenSourceFieldlinguistics/FieldDB/master/install_mac_download_and_set_up_fielddb_servers_for_new_developers_quick_start.sh && bash install_mac_download_and_set_up_fielddb_servers_for_new_developers_quick_start.sh
$ cd $HOME/Downloads && wget https://raw.github.com/OpenSourceFieldlinguistics/FieldDB/master/install_linux_download_and_set_up_fielddb_servers_for_new_developers_quick_start.sh && bash install_linux_download_and_set_up_fielddb_servers_for_new_developers_quick_start.sh
Assuming you've run the above script which clones the FieldDB git repos and sets up your environment variables, the following should start the authentication web service locally.
$ cd $FIELDDB_HOME/AuthenticationWebService/
$ ./switch_to_develop_locally_offline.sh
$ node service.js
You can modify the server config files to connect to different local or remote couchdb with different admin users. By convention if the auth server runs in local mode, it connects to a local couchdb at https:localhost:6984 with username admin and password none.
$ tree $FIELDDB_HOME/AuthenticationWebService/lib/
AuthenticationWebService/lib/
├── couchkeys_devserver.js
├── couchkeys_local.js
├── mailconfig_devserver.js
├── mailconfig_local.js
├── nodeconfig_devserver.js
├── nodeconfig_local.jsThe Corpus web service depends on CouchDB installed and running using HTTPS, and serving some template databases. If you run the above script it will attempt to set up your local couchdb for you, using current instructions.
Here are the steps as of Nov 2014. (These steps are for reference only. Don't try use these steps as instructions, read the install script instead which contains the implementable details.)
- Install CouchDB >= 1.3
- Configure the couch sample config
- Use the debug security certificates (or generate your own if you know how)
- Turn on CORS
- create an admin user (by convention we use admin:none but if you want to use something else then you must edit your auth webservice config so that it can contact the couchdb to register new users)
- Replicate the template databases from a production server, or install erica and curl the install api in the installable branch of the auth service which builds the FieldDB code, generate the template databases, sets up database permissions and users.
The following should be the quickest way to install, configure and serve an OLD
locally. (First two lines assume you're using Python's virtualenv.)::
$ virtualenv --no-site-packages env
$ source env/bin/activate
$ easy_install onlinelinguisticdatabase
$ mkdir xyzold
$ cd xyzold
$ paster make-config onlinelinguisticdatabase production.ini
$ paster setup-app production.ini
$ paster serve production.ini
For more details on configuration, see http://online-linguistic-database.readthedocs.org/en/latest/installation.html