/Biblink

Appli qui lie Bible & art

Biblink

Appli qui lie Bible & art

Install Virtualbox

https://www.virtualbox.org/

Install Vagrant

https://www.vagrantup.com/downloads.html

Configure Local VM with Vagrant

  • Add Local VM host in /etc/hosts file: 192.168.56.4 biblink
  • To prevent old ssh keys issues : ssh-keygen -R 192.168.56.4

Start Vagrant on host machine

# vagrant up

Manual install

Couchdb

  • Launch ansible playbook manually from local machine to install couchdb. ansible should be installed on local machine
    $ ansible-playbook -i provisionning/inventories/local provisionning/setup.yml

  • Couchdb config file modification
    $ sudo vi /opt/couchdb/etc/default.ini

  • Let couchdb listen to other IP adresse
    http://docs.couchdb.org/en/stable/config/http.html :
    default.ini:
       bind_address = 0.0.0.0

  • Enable CORS
    http://docs.couchdb.org/en/1.3.0/cors.html :
    default.ini:
       enable_cors = true
       [cors]
       credentials = false
       origins = *

Couchdb commands

  • $ sudo systemctl start couchdb
  • $ sudo systemctl enable couchdb
  • $ systemctl status couchdb

Couchdb check port usage

  • $ netstat -ln | grep 5984

Couchapp

Install couchapp on host machine

# sudo pip install couchapp

Install Argos

  • On host machine, create a database named argos at
    http://127.0.0.1:5984/_utils

  • Clone Argos repo and push couchapp model to Couchdb
    # git clone https://github.com/Hypertopic/Argos.git
    # cd Argos
    # couchapp init
    # couchapp push http://127.0.0.1:5984/argos

Load data (TODO update dataset)


# curl -d @data/HMB_01.json -H "Content-type: application/json" -X POST http://127.0.0.1:5984/argos/_bulk_docs

Access url from host machine

http://192.168.56.4:5984/_utils/

Install Porphyry (TODO automate configuration)


# git clone https://github.com/gumn/Porphyry.git
# cd Porphyry
# npm i
Update services config in src/sonfig/config.json
npm start