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
{{ message }}
This repository was archived by the owner on Mar 13, 2025. It is now read-only.
| TOPIC | the kafka subscribe topic name | events_topic |
29
+
| TOPIC | the kafka subscribe topic name | tc-x-events |
30
+
| PARTITION | the kafka partition | 0|
32
31
| KAFKA_OPTIONS | the connection option for kafka | see below about KAFKA options |
33
-
| MONGODB_URL | the MongoDB URL | mongodb://127.0.0.1:27017/events |
32
+
| MONGODB_URL | the MongoDB URL which must be same as Ragnar tool | mongodb://127.0.0.1:27017/ragnar |
33
+
|TC_DEV_ENV| the flag whether to use topcoder development api or production| false|
34
34
| TC_AUTHN_URL | the Topcoder authentication url |https://topcoder-dev.auth0.com/oauth/ro|
35
35
| TC_AUTHN_REQUEST_BODY | the Topcoder authentication request body. This makes use of some environment variables: `TC_USERNAME`, `TC_PASSWORD`, `TC_CLIENT_ID`, `CLIENT_V2CONNECTION`| see `default.js`|
36
36
| TC_AUTHZ_URL | the Topcoder authorization url |https://api.topcoder-dev.com/v3/authorizations|
37
37
| NEW_CHALLENGE_TEMPLATE | the body template for new challenge request. You can change the subTrack, reviewTypes, technologies, .. here | see `default.js`|
38
38
| NEW_CHALLENGE_DURATION_IN_DAYS | the duration of new challenge | 5 |
39
-
| GITHUB_ADMIN_TOKEN| the github repo admin/owner personal access token | see below section 'GitHub OAuth Admin Token'|
40
39
| NODE_MAILER_OPTIONS| the node mailer smtp options, see [here](https://nodemailer.com/smtp/ for more detail)| see `default.js`|
41
40
|EMAIL_SENDER_ADDRESS| the email sender email address||
42
41
|ISSUE_BID_EMAIL_RECEIVER| the email receiver about bid email||
43
-
|TC_RAGNAR_USER_MAPPING_URL| the api URL of Ragnar self service tool to get user mapping | see `default.js`|
44
-
|TC_RAGNAR_ADMIN_LOGIN_BODY| the login request body of Admin user for Ragnar self service tool| see `default.js`|
45
-
|TC_RAGNAR_LOGIN_URL| the api URL of Ragnar self service tool to login| see `default.js`|
46
-
|TC_DEV_ENV| the flag whether to use topcoder development api or production| false|
42
+
|TC_URL| the base URL of topcoder to get the challenge URL| defaults to `https://www.topcoder-dev.com`|
47
43
|GITLAB_API_BASE_URL| the URL for gitlab host| defaults to `https://gitlab.com`|
48
-
|GITLAB_ADMIN_TOKEN|the gitlab repo admin/owner personal access token | see below section 'Gitlab Admin Token'|
49
44
50
45
KAFKA_OPTIONS should be object as described in https://github.com/SOHU-Co/kafka-node#kafkaclient
51
46
For using with SSL, the options should be as
@@ -59,42 +54,30 @@ For using with SSL, the options should be as
59
54
}
60
55
```
61
56
62
-
## GitHub OAuth Admin Token
63
-
64
-
- login into github.com
65
-
- click the upper right avatar, then click `Settings`
66
-
- click the left pannel --> Developer settings --> Personal access tokens
67
-
- click the `Generate new token`, fill in the fields,
68
-
select all scopes,
69
-
- after creating the token, you can see personal access token,
70
-
these should be set to GITHUB_ADMIN_TOKEN environment variables
57
+
## Local Deployment
71
58
72
-
## Gitlab Admin Token
59
+
```shell
60
+
npm start
61
+
```
73
62
74
-
- Log in to your GitLab account.
75
-
- Go to your Profile settings.
76
-
- Go to Access tokens.
77
-
- Choose a name and optionally an expiry date for the token.
78
-
- Choose the `api` scope at minimum.
79
-
- Click on Create personal access token.
80
-
- after creating the token, you can see personal access token,
81
-
these should be set to GITLAB_ADMIN_TOKEN environment variables.
63
+
## Setup for verification
64
+
Before verifying the tool, 4 service needs be configured and run them
65
+
- processor
66
+
- receiver
67
+
- Ragnar Tool
68
+
- Topcoder X (both backend and UI)
82
69
83
-
## Local Setup
70
+
First login in Ragnar tool with admin and Add owner for which requires topcoder handle, git host's username and type of git host.
84
71
85
-
Create a MongoDB database, and configure `MONGODB_URL`.
72
+
Go to Topcoder X UI login with above used topcoder username and
73
+
- go to settings and make sure git hosts are correctly setup, if not click setup and authorize to setup.
86
74
87
-
```shell
88
-
npm start
89
-
```
75
+
- Go to Topcoder X UI and go to project management and add a project from git account and click save, and edit the same project and click 'Add Webhooks' button (you need to add personnel access token), verify that webhooks are set up correctly on git host's project.
90
76
91
-
Run and configure the Ragnar self-service tool
77
+
Now, receiver service can receive the webhooks from git host's project and processor can processes the requests. Now you can verify this service by following the verfication steps below
92
78
93
79
## Verification
94
80
95
-
- properly config and run the `receiver` app.
96
-
- properly config and run the `processor` app.
97
-
- properly config and run the Ragnar self service tool.
98
81
- create an issue in the repo, you can see the logs in `receiver` and `processor`, the `issue.created` event is generated.
99
82
- update an issue in the repo, you can see the logs in `receiver` and `processor`, the `issue.updated` event is generated.
100
83
- create a comment on an issue, you can see the logs in `receiver` and `processor`, the `comment.created` event is generated.
0 commit comments