Install & Test Cerebral Cortex

Vagrant configuration for developing and testing Cerebral Cortex

Developers and engineers can use this repository to assist in installing and testing Cerebral Cortex, the cloud component of MD2K's software platform.

This configuration has been developed and testing on Ubuntu 17.04 and these instructions reflect this environment.

First, install dependencies and Vagrant:

$ sudo apt install virtualbox virtualbox-dkms virtualbox-guest-additions-iso

$ wget https://releases.hashicorp.com/vagrant/2.0.1/vagrant_2.0.1_x86_64.deb
$ sudo dpkg -i vagrant_2.0.1_x86_64.deb

Next, install the docker-compose plugin for Vagrant:

$ vagrant plugin install vagrant-docker-compose

Clone this repository and launch Cerebral Cortex (Note: Vagrant must be run as superuser to properly forward ports.):

$ git clone https://github.com/MD2KOrg/CerebralCortex-Vagrant
$ cd CerebralCortex-Vagrant
$ sudo vagrant up

Once this process is complete, you should get a Username/Password Authentication Failed response confirming that the system is online, shown below:

$ wget http://localhost/api/v1/auth/
--2017-12-21 21:14:20--  http://localhost/api/v1/auth/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 401 UNAUTHORIZED

Username/Password Authentication Failed.

Starting and stopping Cerebral Cortex

To start Cerebral Cortex:

$ sudo vagrant up

To stop Cerebral Cortex:

$ sudo vagrant halt

To suspend Cerebral Cortex:

$ sudo vagrant suspend

Access Cerebral Cortex's console. Docker-Compose commands can be used to interact with Cerebral Cortex's containers.

$ sudo vagrant ssh
Last login: Fri Dec 22 03:01:17 2017 from 10.0.2.2
[vagrant@cerebralcortex ~]$ cd CerebralCortex-DockerCompose/
[vagrant@cerebralcortex CerebralCortex-DockerCompose]$ docker-compose ps
     Name                    Command               State                                      Ports
---------------------------------------------------------------------------------------------------------------------------------------
md2k-api-server   /entrypoint.sh /start.sh         Up      443/tcp, 80/tcp
md2k-cassandra    /bootstrap.sh cassandra -f       Up      7000/tcp, 7001/tcp, 7199/tcp, 0.0.0.0:9042->9042/tcp, 0.0.0.0:9160->9160/tcp
md2k-grafana      /run.sh                          Up      0.0.0.0:3000->3000/tcp
md2k-influxdb     /entrypoint.sh influxd           Up      0.0.0.0:8086->8086/tcp
md2k-jupyterhub   jupyterhub --no-ssl --conf ...   Up
md2k-kafka        start-kafka.sh                   Up      0.0.0.0:9092->9092/tcp
md2k-minio        /usr/bin/docker-entrypoint ...   Up      0.0.0.0:9000->9000/tcp
md2k-mysql        docker-entrypoint.sh mysqld      Up      0.0.0.0:3306->3306/tcp
md2k-nginx        nginx -g daemon off;             Up      0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp
md2k-zookeeper    /bin/sh -c /usr/sbin/sshd  ...   Up      0.0.0.0:2181->2181/tcp, 22/tcp, 2888/tcp, 3888/tcp


Test using mCerebrum

mCerebrum is the smartphone component of MD2K's software platform. You can download the latest mCerebrum app at https://github.com/MD2Korg/mCerebrum-releases/tree/master/2.0/org.md2k.mcerebrum

Login to the mCerebrum application with the following information:

Once the system successfully authenticates, it will download a predefined configuration file, which can be used to test the platform. Tap the Start Study button to begin collecting and uploading data.

 

 

 

Copyright © 2018 MD2K. MD2K is supported by the National Institutes of Health Big Data to Knowledge Initiative (Grant #1U54EB020404)

Team: Cornell Tech, GA Tech, Harvard, U. Memphis, Northwestern, Ohio State, Open mHealth, UCLA, UCSD, UCSF, UMass, U. Michigan, Utah, WVU