Skip to content

Commit 9bb589c

Browse files
committed
WIP: readme improvements
1 parent f7447b7 commit 9bb589c

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

README.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,16 @@ is used, see the documentation [here](Documents/cluster.md)
7878

7979
### Interactive
8080

81+
#### Running the Dependencies
82+
83+
Assuming you have Docker-Compose installed, the easiest way to get all of the platform's dependencies up and running with the provided docker-compose dev setup:
84+
85+
`docker-compose -f docker-dev.yml up`
86+
87+
Alternatively, you can start each one individually with the following instructions.
88+
89+
##### Write Journal
90+
8191
* The write side of this system is supported by either a local `leveldb` database or Cassandra. By default, the local `leveldb` is utilized, and some sample data is loaded automatically.
8292
If using `Cassandra` is desired, the following environment variable needs to be set:
8393

@@ -112,6 +122,7 @@ run <full local path to sample file>
112122
```
113123
A sample file is located in the following folder: `panel/src/main/resources/inst_data_2017_dummy.csv`
114124

125+
##### Read Journal
115126

116127
* In order to support the read side, a local PostgreSQL and Cassandra server are needed. Assuming it runs on the default port, on the same machine as the API, the following environment variable needs to be set:
117128

@@ -121,14 +132,16 @@ export JDBC_URL='jdbc:postgresql://localhost/hmda?user=postgres&password=postgre
121132

122133
where `hmda` is the name of the `PostgreSQL` database, owned by the default user with default password (`postgres`)
123134

135+
**Note: if you are running the backend only through sbt, the database needs to be created manually in advance, see instructions [here](https://www.postgresql.org/docs/9.1/static/manage-ag-createdb.html)**
136+
124137
For Cassandra, the following environment variables need to be set (assuming Cassandra is running on a docker container as described above):
125138

126139
```shell
127140
export CASSANDRA_CLUSTER_HOSTS=192.168.99.100
128141
export CASSANDRA_CLUSTER_PORT=9042
129142
```
130143

131-
**Note: if you are running the backend only through sbt, the database needs to be created manually in advance, see instructions [here](https://www.postgresql.org/docs/9.1/static/manage-ag-createdb.html)**
144+
##### Apache Zookeeper
132145

133146
* The `HMDA Platform` is a distributed system that is meant to be run as a clustered application in production.
134147
As such, it needs a mechanism for storing configuration information for additional nodes joining the cluster.
@@ -139,18 +152,17 @@ An easy way to satisfy this requirement is to launch a docker container with `Zo
139152
$ docker run --rm -p 2181:2181 -p 2888:2888 -p 3888:3888 jplock/zookeeper
140153
```
141154

142-
* Set the environemnet variables for Zookeper
155+
* Set the environement variables for Zookeper
143156

144157
```shell
145158
export ZOOKEEPER_HOST=192.168.99.100
146159
export ZOOKEEPER_PORT=2181
147160
```
148161

149-
Alternatively, these dependencies (`Cassandra`, `Zookeeper` and `PostgreSQL`) can be started from `docker` providing default resources for the `HMDA Platform`:
150162

151-
`docker-compose -f docker-dev.yml up`
163+
#### Running the API
152164

153-
* If you want to use the sample files in this repo for testing the app, run the edits in demo mode. Otherwise, edit S025 will trigger for all files.
165+
* If you want to use the sample files in this repo for testing the app, run the edits in demo mode by adding the following environment variable. Otherwise, edit S025 will trigger for all files.
154166

155167
```shell
156168
export EDITS_DEMO_MODE=true
@@ -173,6 +185,9 @@ $ sbt
173185

174186
Confirm that the platform is up and running by browsing to http://localhost:8080
175187

188+
189+
#### Building the Project
190+
176191
* To build JVM artifacts (the default, includes all projects), from the sbt prompt:
177192

178193
```shell

0 commit comments

Comments
 (0)