Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
0f0ad86
Merge pull request #81 from project-sunbird/release-4.4.0
reshmi-nair Nov 10, 2021
8186d92
Merge pull request #84 from sknirmalkar89/SB-27610
reshmi-nair Nov 19, 2021
8171710
SB-27367: Adding unit test cases
sknirmalkar89 Nov 29, 2021
ce807f7
SB-27367:add otp,email,FCM notification junit test cases
sknirmalkar89 Nov 29, 2021
ce8efce
Merge pull request #85 from sknirmalkar89/SB-27367
reshmi-nair Nov 30, 2021
6c016e6
SB-28008: Appliying log4j vulnerability fix
sknirmalkar89 Dec 16, 2021
4f5e5bc
SB-28008: update telemetry version
sknirmalkar89 Dec 16, 2021
37cc740
Merge pull request #88 from sknirmalkar89/SB-28008
reshmi-nair Dec 16, 2021
a28f86a
SB-28043: fix null pointer issue
sknirmalkar89 Dec 16, 2021
119baf4
Merge pull request #89 from sknirmalkar89/SB-28043
reshmi-nair Dec 16, 2021
28acfa9
Merge pull request #90 from project-sunbird/release-4.5.0
reshmi-nair Dec 21, 2021
374ea90
SB-28075: Adding template APIs
sknirmalkar89 Dec 29, 2021
8d16a33
SB-28075: Fix testcase issue
sknirmalkar89 Dec 29, 2021
10e8881
SB-28075:add testcase
sknirmalkar89 Dec 30, 2021
7712462
Merge pull request #91 from sknirmalkar89/SB-28075
reshmi-nair Dec 30, 2021
1309e59
SB-27940: add soft delete feature and validation for template api
sknirmalkar89 Jan 4, 2022
2eb6fc1
Merge pull request #92 from sknirmalkar89/SB-27940
reshmi-nair Jan 4, 2022
1d86709
Merge pull request #96 from Sunbird-Lern/release-4.6.0
reshmi-nair Jul 29, 2022
2049fec
Issue #SB-30077 fix: Sunbird notification testcases
VenkatKadiveti Jul 29, 2022
083cf76
Merge pull request #97 from VenkatKadiveti/testcases
reshmi-nair Jul 29, 2022
b7e4dcf
feat:LR-138 for cassandra multiple DC changes
prasadmoka Aug 19, 2022
d10b4a4
Merge pull request #98 from prasadmoka/local-5.0.0
reshmi-nair Aug 22, 2022
cbc538f
SB-30930 feat: updated pdata version
Sep 13, 2022
18ccb9b
Merge pull request #99 from amit-tarento/patch-1
reshmi-nair Sep 13, 2022
0189ce0
fix:modified pom for cassandra issue in pre-prod
prasadmoka Sep 22, 2022
b9e98dd
Merge pull request #100 from prasadmoka/local-5.0.0
reshmi-nair Sep 22, 2022
2f40291
fix: Hotfix for preprod issue
prasadmoka Sep 22, 2022
d449955
Merge pull request #101 from prasadmoka/local-5.0.0
reshmi-nair Sep 22, 2022
241ac72
fix: hotfix for preprod
prasadmoka Sep 23, 2022
206d6b5
Merge pull request #102 from prasadmoka/local-5.0.0
reshmi-nair Sep 23, 2022
8f39d86
fix: pre-prod config issue resolved
prasadmoka Sep 26, 2022
f6f74bc
Merge pull request #103 from prasadmoka/local-5.0.0
reshmi-nair Sep 26, 2022
38fb3c8
fix:reverted back changes to release-4.6 changes
prasadmoka Sep 26, 2022
60f6cc9
fix- reverted back changes
prasadmoka Sep 26, 2022
afe0286
Merge pull request #104 from prasadmoka/local-5.0.0
reshmi-nair Sep 26, 2022
9748ad8
Revert "fix:reverted back changes to release-4.6 changes"
Hari-stackroute Sep 27, 2022
3c60908
Merge pull request #105 from Hari-stackroute/revert-104-local-5.0.0
reshmi-nair Sep 27, 2022
eb2fe79
Revert "fix: pre-prod config issue resolved"
Hari-stackroute Sep 27, 2022
a312014
Merge pull request #106 from Hari-stackroute/revert-103-local-5.0.0
reshmi-nair Sep 28, 2022
88bff1b
LR-305 adding yaml files from docs site
BharathwajShankar Jan 25, 2023
5e0f634
LR-305 adding yaml files from docs site
BharathwajShankar Jan 25, 2023
daabb9f
Merge pull request #113 from BharathwajShankar/LR-305-4.6.0
reshmi-nair Jan 31, 2023
ce35bea
Merge pull request #114 from BharathwajShankar/LR-305-5.0.0
reshmi-nair Jan 31, 2023
fe22163
Merge pull request #115 from Sunbird-Lern/release-5.0.0
reshmi-nair Mar 27, 2023
2d7dce5
Issue #LR-394 feat: added exception for throwing error if the feed is…
BharathwajShankar Jun 7, 2023
7e4c314
Issue #LR-394 feat: added exception for throwing error if the feed is…
BharathwajShankar Jun 7, 2023
b1ae61c
Merge pull request #120 from Sunbird-Lern/release-4.6.0
reshmi-nair Jun 9, 2023
ca904dc
Merge pull request #119 from BharathwajShankar/LR-394-Feed-API-Update…
reshmi-nair Jun 9, 2023
c94d58e
Issue #LR-LR-449 feat: updating the readme.md file with notification …
BharathwajShankar Jun 15, 2023
423cf7a
Merge pull request #121 from BharathwajShankar/LR-449-Local-setup-of-…
reshmi-nair Jun 21, 2023
d9a4c1e
LR-449 Updating config variables
reshmi-nair Jun 21, 2023
f790861
Merge pull request #122 from reshmi-nair/release-5.4.0
reshmi-nair Jun 21, 2023
e650382
Issue #LR-513 feat:Ability for Lern to connect to shared instances
BharathwajShankar Jun 26, 2023
2170740
Issue #LR-513 feat:Ability for Lern to connect to shared instances
BharathwajShankar Jun 27, 2023
4bc4b24
Merge pull request #123 from BharathwajShankar/LR-513-Ability-for-Ler…
reshmi-nair Jun 29, 2023
735c712
Issue #LR-664 feat: added notification service api collection
BharathwajShankar Aug 24, 2023
982cd16
Issue #LR-664 feat: added notification service api collection
BharathwajShankar Aug 24, 2023
633f1c6
Issue #LR-664 feat: added notification service api collection with te…
BharathwajShankar Sep 28, 2023
cedda0a
Issue #LR-664 feat: added notification service api collection with te…
BharathwajShankar Oct 25, 2023
c9ed186
Issue #LR-664 merge: Merge pull request #124 from BharathwajShankar/L…
AmiableAnil Nov 20, 2023
374819c
Issue #LR-664 merge: Merge pull request #125 from Sunbird-Lern/releas…
AmiableAnil Nov 20, 2023
3829e4c
Issue #LR-712 feat:fix vulnerability notification service
BharathwajShankar Nov 20, 2023
9834399
Issue #LR-712 feat:fix vulnerability notification service
BharathwajShankar Nov 20, 2023
0b07c56
Issue #LR-712 feat:fix vulnerability notification service
BharathwajShankar Nov 20, 2023
1086b3b
Issue #LR-712 feat:fix vulnerability notification service
BharathwajShankar Nov 20, 2023
4470b48
Issue #LR-712 feat:fix vulnerability notification service
BharathwajShankar Dec 12, 2023
006e5af
Issue #LR-712 feat:fix vulnerability notification service
BharathwajShankar Dec 12, 2023
bb64006
Issue #LR-712 feat:fix vulnerability notification service
BharathwajShankar Dec 26, 2023
75dce33
Issue #LR-712 feat:fix vulnerability notification service
BharathwajShankar Dec 26, 2023
7a88288
Issue #LR-712 feat:fix vulnerability notification service
BharathwajShankar Dec 26, 2023
238fd24
Issue #LR-712 feat:fix vulnerability notification service
BharathwajShankar Dec 26, 2023
9fce039
Issue #LR-712 feat:fix vulnerability notification service
BharathwajShankar Dec 26, 2023
944004d
Issue #LR-712 feat:fix vulnerability notification service
BharathwajShankar Dec 26, 2023
7430531
Issue #LR-712 feat:fix vulnerability notification service
BharathwajShankar Dec 26, 2023
58603ac
Issue #LR-712 feat:fix vulnerability notification service
BharathwajShankar Dec 26, 2023
bb6148f
Issue #LR-712 feat:fix vulnerability notification service
BharathwajShankar Dec 26, 2023
0baad1b
Issue #LR-712 feat:fix vulnerability notification service
BharathwajShankar Dec 26, 2023
21216d1
Issue #LR-712 merge: Merge pull request #127 from BharathwajShankar/L…
AmiableAnil Dec 26, 2023
fb5f582
Issue #LR-712 chore: Updated the pom dependencies
AmiableAnil Dec 26, 2023
954c7cf
Issue #LR-712 chore: Optimize the imports
AmiableAnil Dec 26, 2023
c4ea65e
Merge pull request #128 from AmiableAnil/release-7.0.0
Jayaprakash8887 Dec 26, 2023
03476d5
Issue #LR-712 chore: Optimize the imports
AmiableAnil Dec 27, 2023
43a4b56
Issue #LR-712 chore: Updated the netty-common
AmiableAnil Dec 27, 2023
42c4145
Merge pull request #129 from AmiableAnil/release-7.0.0
Jayaprakash8887 Dec 27, 2023
1fee8fb
Issue #LR-712 feat:fix vulnerability notification service
BharathwajShankar Dec 28, 2023
492f156
Issue #LR-712 merge: Merge pull request #130 from BharathwajShankar/L…
AmiableAnil Dec 28, 2023
a1451dd
Issue #LR-712 chore:fix vulnerability notification service removed ex…
BharathwajShankar Jan 5, 2024
9f88e83
Issue #LR-664 merge: Merge pull request #131 from BharathwajShankar/L…
AmiableAnil Jan 5, 2024
62ff8a0
Issue #LR-741 chore: Upgraded the scala major version from 2.11 to 2.12
AmiableAnil Feb 19, 2024
92f32cd
Issue #LR-741 chore: Upgraded the scala major version from 2.11 to 2.12
AmiableAnil Feb 19, 2024
7761264
Issue #LR-741 chore: Upgraded the scala major version from 2.11 to 2.12
AmiableAnil Feb 19, 2024
f257c41
Issue #LR-741 chore: Upgraded the scala major version from 2.11 to 2.12
AmiableAnil Feb 21, 2024
99f3fec
Issue #LR-741 chore: Upgraded the scala major version from 2.11 to 2.12
AmiableAnil Feb 22, 2024
1c39ff4
Issue #LR-741 chore: Upgraded the scala major version from 2.11 to 2.12
AmiableAnil Feb 22, 2024
4724470
postman pre-requisite script addition (#135)
BharathwajShankar Jun 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ RUN chown -R sunbird:sunbird /home/sunbird
USER sunbird
EXPOSE 9000
WORKDIR /home/sunbird/
CMD java -XX:+PrintFlagsFinal $JAVA_OPTIONS -Dplay.server.http.idleTimeout=180s -cp '/home/sunbird/notification-service-1.0.0/lib/*' play.core.server.ProdServerStart /home/sunbird/notification-service-1.0.0
CMD java -XX:+PrintFlagsFinal $JAVA_OPTIONS -Dlog4j2.formatMsgNoLookups=true -Dplay.server.http.idleTimeout=180s -cp '/home/sunbird/notification-service-1.0.0/lib/*' play.core.server.ProdServerStart /home/sunbird/notification-service-1.0.0
137 changes: 113 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,126 @@
## service-seed-without-router
Play, Akka seed project without router implementation.
# Sunbird-notification-service

Use this for creating a play-based service that leverages all internal actors. By default, runs http on port 9000.
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b963e5ed122f47b5a27b19a87d9fa6de)](https://app.codacy.com/app/sunbird-bot/sunbird-notification-service?utm_source=github.com&utm_medium=referral&utm_content=project-sunbird/sunbird-groups-service&utm_campaign=Badge_Grade_Settings)

This is the repository for notification service micro-service. It provides the APIs for notification service functionality of Sunbird.

### Note
1.In this Application , throw only org.sunbird.BaseException
The code in this repository is licensed under MIT License unless otherwise noted. Please see the [LICENSE](https://github.com/Sunbird-Lern/sunbird-notification-service/blob/master/LICENSE) file for details.
This readme file describes how to install and start groups-service in your development environment.
## Sunbird-notification-service development environment setup:
This readme file contains the instruction to set up and run the Sunbird-notification-service in your development environment.

### Build
### System Requirements

1. Execute clean install `mvn clean install`
### Prerequisites

- Java 11
- Latest Docker
- Latest Maven (Only For Mac m1 users use 3.8.8 Maven version)

### Run
1. For debug mode, <br>
`cd notification-service/service` <br>
`mvn play2:dist` <br>
`mvn play2:run`
### Prepare folders for database data and logs

2. For run mode,
`cd notification-service/service` <br>
`mvn play2:dist` <br>
`mvn play2:start`
To prepare folders for database data and logs, run the following command:

### Verify running status
```shell
mkdir -p ~/sunbird-dbs/cassandra ~/sunbird-dbs/es
export sunbird_dbs_path=~/sunbird-dbs
```

Hit the following Health check curl command
To verify the creation of folders, run:

`curl -X GET \
http://localhost:9000/health \
-H 'Postman-Token: 6a5e0eb0-910a-42d1-9077-c46f6f85397d' \
-H 'cache-control: no-cache'`
```shell
echo $sunbird_dbs_path
```

And, a successful response must be like this:
### Cassandra database setup in Docker

`{"id":"api.200ok","ver":"v1","ts":"2019-01-17 16:53:26:286+0530","params":{"resmsgid":null,"msgid":"8e27cbf5-e299-43b0-bca7-8347f7ejk5abcf","err":null,"status":"success","errmsg":null},"responseCode":"OK","result":{"response":{"response":"SUCCESS","errors":[]}}}`
1. To get the Cassandra image, use the following command:

```shell
docker pull cassandra:3.11.6
```
For Mac M1 users follow the bellow command:
```shell
docker pull --platform=linux/amd64 cassandra:3.11.6
```

For the network, you can either use an existing network or create a new one by executing the following command:
```shell
docker network create sunbird_db_network
```

2. To create the Cassandra instance, run the following command:
```shell
docker run -p 9042:9042 --name sunbird_cassandra \
-v $sunbird_dbs_path/cassandra/data:/var/lib/cassandra \
-v $sunbird_dbs_path/cassandra/logs:/opt/cassandra/logs \
-v $sunbird_dbs_path/cassandra/backups:/mnt/backups \
--network sunbird_db_network -d cassandra:3.11.6
```


For Mac M1 users follow the below command:
```shell
docker run --platform=linux/amd64 -p 9042:9042 --name sunbird_cassandra \
-v $sunbird_dbs_path/cassandra/data:/var/lib/cassandra \
-v $sunbird_dbs_path/cassandra/logs:/opt/cassandra/logs \
-v $sunbird_dbs_path/cassandra/backups:/mnt/backups \
--network sunbird_db_network -d cassandra:3.11.6
```

3. To verify the setup, run the following command, which will show the status of Cassandra as up and running:

```shell
docker ps -a | grep cassandra
```

## To create/load keyspaces and tables to Cassandra

Click the link [sunbird-utils-cassandra-setup](https://github.com/Sunbird-Lern/sunbird-utils/tree/release-5.3.0#readme)
and follow the steps for creating/loading the Cassandra keyspaces and tables to your development environment.

Note: It is mandatory to follow the instructions provided in the link.

4. To verify the creation of keyspaces and tables, connect to the Cassandra Docker container using SSH and run the following command:

```shell
docker exec -it sunbird_cassandra /bin/bash
```

## Sunbird-notification-service Setup

To set up the notification service, follow the steps below:

1. Clone the latest branch of the notification service using the following command:
```shell
git clone https://github.com/Sunbird-Lern/sunbird-notification-service
```

2. Set up the necessary environment variables by running the following script in the path `<project-base-path>/sunbird-notification-service`:
```shell
./scripts/notification-service-config.sh
```

3. Build the application using the following maven command in the path `<project-base-path>/sunbird-notification-service`:
```shell
mvn clean install -DskipTests
```
Make sure the build is successful before proceeding to the next step. If the build is not successful,
fix any configuration issues and rebuild the application.

4. Run the netty server using the following maven command in the path `<project-base-path>/sunbird-notification-service/service`:
```shell
mvn play2:run
```

5. Verify the database connections by running the following command:
```shell
curl --location --request GET 'http://localhost:9000/health’
```
If all connections are established successfully, the health status will be shown as 'true', otherwise it will be 'false'.

Currently, the sunbird-notification-service service is dependent on User org service for getting user and organisation information.
We are planning to implement a mock service soon for these dependencies.

To make the notification service completely working, some pre-required configuration setup is mandatory.
Follow the steps given in the link [pre-required configuration setup](https://github.com/Sunbird-Lern/sunbird-notification-service/blob/release-5.4.0/notificationsetup.md) to complete the setup.
146 changes: 0 additions & 146 deletions all-actors/dependency-reduced-pom.xml

This file was deleted.

Loading