Install & Test Cerebral Cortex

Vagrant configuration for developing and testing Cerebral Cortex

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


Installing Cerebral Cortex
Starting and Stopping Cerebral Cortex
Importing Data
Verifying Data
Testing Using mCerebrum

System Requirements:

To install Cerebral Cortex, we recommend you use an Intel Quad Core i7 processor (or better) with at least 32GB RAM. 
This configuration has been developed and tested on Ubuntu 17.04 with Git previously installed. 

Installing Cerebral Cortex (from source)

First, install dependencies: 

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

When prompted to continue, type Y to begin the installation:


When progress reaches 100%, you should see a message confirming that installation is complete.

Next, you will need to download and install Vagrant:

$ wget

Once the download is complete, type the command below to unpack and complete the Vagrant installation:

$ sudo dpkg -i vagrant_2.0.1_x86_64.deb

Next, use the following command to install the docker-compose plugin for Vagrant:

$ vagrant plugin install vagrant-docker-compose

Then you will need to clone the repository. You must be running Vagrant as a superuser to ensure the ports are forwarded properly. (Note: Be sure you are using the latest version number of CerebralCortex-Vagrant (ie, 2.2.1). To confirm this, find the latest version number here.) 

$ git clone -b 2.2.1

Next, launch Cerebral Cortex using the following commands:

$ cd CerebralCortex-Vagrant
$ sudo vagrant up


The system will download and install all packages. This may take some time.

Once the process is complete, type the following command to test that the system is online:

$ wget http://localhost/api/v1/auth/

You should see a Username/Password Authentication Failed response, as shown below. This message confirms that Cerebral Cortex is installed and the system is online. Note: If you do not see this response, you may try stopping Cerebral Cortex using the command in the next section of these instructions, then restarting it to try again. 

--2017-12-21 21:14:20--  http://localhost/api/v1/auth/
Resolving localhost (localhost)...
Connecting to localhost (localhost)||: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

To remotely access Cerebral Cortex's console:

$ sudo vagrant ssh

To explore and interact with Cerebral Cortex's containers, use Docker-Compose commands (ie,docker-compose psas shown below):

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

Importing data

The file /home/vagrant/CerebralCortex-DockerCompose/cc_config_file/cc_vagrant_configuration.yml contains the parameter that stores the path from where data can be imported into CerebralCortex.

Copy data into the directory used in the configuraton file using the commands below:

cd /home/vagrant/CerebralCortex-DockerCompose/data/
tar -xf mCerebrum_test_data.tar.bz2
rm -f mCerebrum_test_data.tar.bz2

You can use the ls command to confirm the data was successfully copied:


Next, use the following commands to import the copied data into CerebralCortex:

cd /home/vagrant/CerebralCortex-Scripts/data_replay/
python3.6 --conf
cd /home/vagrant/CerebralCortex-KafkaStreamPreprocessor/

The system will import the data into the cloud. This may take some time.

Verifying Data


Testing Using mCerebrum

mCerebrum is the smartphone component of MD2K's software platform. You can download the latest mCerebrum app at

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. For more information about using mCerebrum, visit the Getting Started guide




Copyright © 2020 MD2K. MD2K was established by the National Institutes of Health Big Data to Knowledge Initiative (Grant #1U54EB020404)
Team: Cornell Tech, GA Tech, Harvard, U. Memphis, Northwestern, Ohio State, UCLA, UCSD, UCSF, UMass, U. Michigan, U. Utah, WVU