<commit_before>![Endeavour Logo](http://www.endeavourhealth.org/github/logo-text-left-cropped.png)

# Endeavour Data Service

## Pre-requisites

You will need the following:

* Java 8
* RabbitMQ 3.6
* MySQL and MySQL Workbench
* Tomcat 8 or 9
* Git
* Node.js
* IntelliJ (Ultimate edition)
* Bower
* Typescript
* TSLint


### Java
Download and install the Java SDK (minimum required is 8u102) from [here] (http://www.oracle.com/technetwork/java/javase/downloads/index.html "Java Download")

### RabbitMQ
Download and run the rabbitMQ installer.  If you do not have ERLANG installed you will need to install this first but it will warn you when you try to install RabbitMQ.
Once RabbitMQ is installed, using the command line, navigate to rabbitmq\sbin folder. 
```bash
cd c:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.6\sbin
rabbitmq-plugins enable rabbitmq_management
```
**Note:** If you get a ERLANG_HOME is not set correctly error, ensure your environment variable ERLANG_HOME is set to the erl8.2\bin\ folder. It defaulted to just the erl8.2 folder when I installed it.
Then run the following to enable the plug-ins
```bash
rabbitmq-service.bat stop 
rabbitmq-service.bat install 
rabbitmq-service.bat start
```
Finally, navigate to [here] (http://localhost:15672/#/ "Rabbit MQ") and use a username and password of 'guest' to login and you should see an overview page.  This means RabbitMQ is installed correctly.

### MySQL and MySQL Workbench
Download MySQL and MySQL Workbench from https://dev.mysql.com/downloads/installer/ then install it

Once installed, restore the sample databases found at https://1drv.ms/u/s!AhdraGkSN4_agdYZB2A9tSB_lotG8w
Inside this zip file is an "Instructions.txt" file, which contains steps on how to restore the DBs from the zip - follow this

### Tomcat
To use KeyCloak, a modified version of Tomcat is available [here] (https://drive.google.com/file/d/0B7zLWmSZKB2LY2J0TV9kZW5Vd0k/view?pref=2&pli=1 "key cloak modified tomcat")

Download this zip file and unzip somewhere and remove all the sample webapps, including `ROOT`

### Git
[Download Git] (http://git-scm.com/ "Get Git")

### Node.Js
[Download NodeJS] (https://nodejs.org/en/ "Get Node")

### IntelliJ<commit_msg>Update README to specify MySql 5.7<commit_after>![Endeavour Logo](http://www.endeavourhealth.org/github/logo-text-left-cropped.png)

# Endeavour Data Service

## Pre-requisites

You will need the following:

* Java 8
* RabbitMQ 3.6
* MySQL and MySQL Workbench
* Tomcat 8 or 9
* Git
* Node.js
* IntelliJ (Ultimate edition)
* Bower
* Typescript
* TSLint


### Java
Download and install the Java SDK (minimum required is 8u102) from [here] (http://www.oracle.com/technetwork/java/javase/downloads/index.html "Java Download")

### RabbitMQ
Download and run the rabbitMQ installer.  If you do not have ERLANG installed you will need to install this first but it will warn you when you try to install RabbitMQ.
Once RabbitMQ is installed, using the command line, navigate to rabbitmq\sbin folder. 
```bash
cd c:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.6\sbin
rabbitmq-plugins enable rabbitmq_management
```
**Note:** If you get a ERLANG_HOME is not set correctly error, ensure your environment variable ERLANG_HOME is set to the erl8.2\bin\ folder. It defaulted to just the erl8.2 folder when I installed it.
Then run the following to enable the plug-ins
```bash
rabbitmq-service.bat stop 
rabbitmq-service.bat install 
rabbitmq-service.bat start
```
Finally, navigate to [here] (http://localhost:15672/#/ "Rabbit MQ") and use a username and password of 'guest' to login and you should see an overview page.  This means RabbitMQ is installed correctly.

### MySQL and MySQL Workbench
Download MySQL and MySQL Workbench from https://dev.mysql.com/downloads/mysql/5.7.html then install it. Note that later versions may not be supported.

Once installed, restore the sample databases found at https://1drv.ms/u/s!AhdraGkSN4_agdYZB2A9tSB_lotG8w
Inside this zip file is an "Instructions.txt" file, which contains steps on how to restore the DBs from the zip - follow this

### Tomcat
To use KeyCloak, a modified version of Tomcat is available [here] (https://drive.google.com/file/d/0B7zLWmSZKB2LY2J0TV9kZW5Vd0k/view?pref=2&pli=1 "key cloak modified tomcat")

Download this zip file and unzip somewhere and remove all the sample webapps, including `ROOT`

### Git
[Download Git] (http://git-scm.com/ "Get Git")

### Node.Js
[Download NodeJS] (https://nodejs.org/en/ "Get Node")

### IntelliJ
{'fraction_non_alphanumeric': 0.09474151320168626, 'fraction_numerical': 0.01686265808741957, 'mean_word_length': 4.586121437422553, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5901818', 'n_tokens_mistral': 1529, 'n_tokens_neox': 1405, 'n_words': 546}