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-13Lines changed: 26 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -86,28 +86,32 @@ Microservice to manage CRUD operations for all things Projects.
86
86
The project service will be served on `http://localhost:8001`.
87
87
88
88
### Import sample metadata & projects
89
+
89
90
```bash
90
91
CONNECT_USER_TOKEN=<connect user token> npm run demo-data
91
92
```
92
-
This command will create sample metadata entries in the DB (duplicate what is currently in development environment).
93
+
To retrieve data from DEV env we have to provide a valid user token (`CONNECT_USER_TOKEN`). You may login to http://connect.topcoder-dev.com and find the Bearer token in the request headers using browser dev tools.
93
94
94
-
To retrieve data from DEV env we need to provide a valid user token. You may login to http://connect.topcoder-dev.com and find the Bearer token in the request headers using browser dev tools.
95
+
This command for importing data uses API to create demo data. Which has a few pecularities:
96
+
- data in DB would be for sure created
97
+
- data in ElasticSearch Index (ES) would be only created if services [project-processor-es](https://github.com/topcoder-platform/project-processor-es) and [tc-bus-api](https://github.com/topcoder-platform/tc-bus-api) are also started locally. If you don't start them, then imported data wouldn't be indexed in ES, and would be only added to DB. You may start them locally separately, or better use `local/full/docker-compose.yml` as described [next section](#local-deployment-with-other-topcoder-services) which would start them automatically.
98
+
-**NOTE** During data importing a lot of records has to be indexed in ES, so you have to wait about 5-10 minutes after `npm run demo-data` is finished until imported data is indexed in ES. You may watch logs of `project-processor-es` to see if its done or no.
95
99
96
100
### Local Deployment with other Topcoder Services.
97
101
98
102
* There exists an alternate `docker-compose.yml` file that can be used to spawn containers for the following services:
* To have kafka create a list of desired topics on startup, there exists a file with the path `local/full/kafka-client/topics.txt`. Each line from the file will be added as a topic.
113
117
* To run these services simply run the following commands:
@@ -134,6 +138,15 @@ To retrieve data from DEV env we need to provide a valid user token. You may log
134
138
135
139
* The containers have been configured such that all Topcoder services will wait until all the topics listed in `local/full/kafka-client/topics.txt` have been created. To monitor the progress of topic creation, you can view the logs of the `kafka-client` service, which will exit when all topics have been created.
136
140
141
+
***WARNING**<br>
142
+
After all the containers are started, make sure that `project-processor-es` service started successfully, as sometimes it doesn't start successfully as Kafka wasn't yet properly started at that moment. So run `docker-compose logs -f project-processor-es` to see its logs, you should see 3 lines with text `Subscribed to project.action.` like:
0 commit comments