You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ReadMe.md
+26-30Lines changed: 26 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,8 @@
3
3
## Dependencies
4
4
5
5
- nodejs https://nodejs.org/en/ (v8)
6
-
- Kafka
6
+
- Kafka
7
7
- Informix
8
-
- Postgres
9
8
- Docker, Docker Compose
10
9
11
10
## Configuration
@@ -21,13 +20,19 @@ The following parameters can be set in config files or in env variables:
21
20
if not provided, then SSL connection is not used, direct insecure connection is used;
22
21
if provided, it can be either path to private key file or private key content
23
22
- KAFKA_GROUP_ID: the Kafka group id, default value is 'legacy-project-processor'
24
-
- CREATE_PROJECT_TOPIC: create project Kafka topic, default value is 'project.notification.create'
25
-
- UPDATE_PROJECT_TOPIC: update project Kafka topic, default value is 'project.notification.update'
26
-
- DELETE_PROJECT_TOPIC: delete project member Kafka topic, default value is 'project.notification.delete'
23
+
- CREATE_PROJECT_TOPIC: create project Kafka topic, default value is 'project.action.create'
24
+
- UPDATE_PROJECT_TOPIC: update project Kafka topic, default value is 'project.action.update'
25
+
- DELETE_PROJECT_TOPIC: delete project member Kafka topic, default value is 'project.action.delete'
27
26
- INFORMIX: Informix database configuration parameters, refer `config/default.js` for more information
28
-
- POSTGRES: Postgres database configuration parameters, refer `config/default.js` for more information
27
+
- AUTH0_URL: AUTH0 URL, used to get M2M token
28
+
- AUTH0_PROXY_SERVER_URL: AUTH0 proxy server URL, used to get M2M token
29
+
- AUTH0_AUDIENCE: AUTH0 audience, used to get M2M token
30
+
- TOKEN_CACHE_TIME: AUTH0 token cache time, used to get M2M token
31
+
- AUTH0_CLIENT_ID: AUTH0 client id, used to get M2M token
32
+
- AUTH0_CLIENT_SECRET: AUTH0 client secret, used to get M2M token
33
+
- PROJECTS_API: the topcoder projects API
29
34
30
-
generally, we only need to update INFORMIX_HOST, KAFKA_URLand POSTGRES_URL via environment variables, see INFORMIX_HOST, KAFKA_URL and POSTGRES_URL parameter in docker/sample.api.env
35
+
generally, we only need to update INFORMIX_HOST, KAFKA_URL, PROJECTS_API and M2M-related configuration via environment variables, see the parameters in docker/sample.api.env
31
36
32
37
There is a `/health` endpoint that checks for the health of the app. This sets up an expressjs server and listens on the environment variable `PORT`. It's not part of the configuration file and needs to be passed as an environment variable
33
38
@@ -47,38 +52,27 @@ Configuration for the tests is at `config/test.js`, only add such new configurat
- Modify `dbConfig.masterUrl` in `config/default.json`
79
-
- Run command `npm install` to install dependencies
80
-
- Run command `npm run sync:db` to create tables on Postgres database
81
-
82
76
## Local deployment
83
77
- Given the fact that the library used to access Informix DB depends on Informix Client SDK.
84
78
We will run the application on Docker using a base image with Informix Client SDK installed and properly configured.
@@ -88,28 +82,30 @@ For deployment, please refer to next section 'Local Deployment with Docker'
88
82
89
83
To run the Legacy Project Processor using docker, follow the steps below
90
84
91
-
1. Make sure that Kafka, Postgres and Informix are running as per instructions above.
85
+
1. Make sure that Kafka, Project Service and Informix are running as per instructions above.
92
86
93
87
2. Go to `docker` folder
94
88
95
-
3. Rename the file `sample.api.env` to `api.env` And properly update the IP addresses to match your environment for the variables : KAFKA_URL, INFORMIX_HOST and POSTGRES_URL( make sure to use IP address instead of hostname ( i.e localhost will not work)).Here is an example:
89
+
3. Rename the file `sample.api.env` to `api.env` and uncomment lines `env_file:` and `- api.env` in `docker-compose.yml`.
90
+
91
+
4. Properly update M2M-related configuration and the IP addresses to match your environment for the variables : KAFKA_URL, INFORMIX_HOST and PROJECTS_API ( make sure to use IP address instead of hostname ( i.e localhost will not work)).Here is an example:
4. Once that is done, go to run the following command
98
+
5. Once that is done, go to run the following command
103
99
104
100
```
105
101
docker-compose up
106
102
```
107
103
108
-
5. When you are running the application for the first time, It will take some time initially to download the image and install the dependencies
104
+
6. When you are running the application for the first time, It will take some time initially to download the image and install the dependencies
109
105
110
106
## Running e2e tests
111
107
You need to run `docker-compose build` if modify source files.
112
-
Make sure run `docker-compose up` in `docker` folder once to make sure application will install dependencies and run successfully with Kafka, Postgres and Informix.
108
+
Make sure run `docker-compose up` in `docker` folder once to make sure application will install dependencies and run successfully with Kafka and Informix.
113
109
114
110
To run e2e tests
115
111
Modify `docker/docker-compose.yml` with `command: run test`(uncomment it) and run `docker-compose up` in `docker` folder
0 commit comments