Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[13] feat!: new notification service with authz #151

Merged
merged 7 commits into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ The following is a list of all host port allocations for Bento services in devel
| DRS | 7007 | 5682 |
| Event relay | 8750 | Unimplemented |
| Katsu | 8000 | 5432 |
| Notification | 8500 | Unimplemented |
| Notification | 8500 | 5681 |
| Public | 8090 | Unimplemented |
| Redis | 6379 | `N/A` |
| Service Registry | 5010 | Unimplemented |
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ services:
# Runtime
- FLASK_DEBUG=True
- BENTO_DEBUG=True
ports:
- "${BENTOV2_NOTIFICATION_EXTERNAL_PORT}:${BENTOV2_NOTIFICATION_INTERNAL_PORT}"
- "${BENTO_NOTIFICATION_DEBUGGER_EXTERNAL_PORT}:${BENTO_NOTIFICATION_DEBUGGER_INTERNAL_PORT}"
extends:
file: docker-compose.yaml
service: notification
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ services:
- REDIS_HOST=${BENTOV2_REDIS_CONTAINER_NAME}
- REDIS_PORT=${BENTOV2_REDIS_INTERNAL_PORT}
- INTERNAL_PORT=${BENTOV2_NOTIFICATION_INTERNAL_PORT}
- BENTO_AUTHZ_SERVICE_URL
- CORS_ORIGINS=${BENTOV2_PUBLIC_URL};${BENTOV2_PORTAL_PUBLIC_URL}
networks:
- notification-net
- redis-net # For event pub/sub
Expand Down
4 changes: 3 additions & 1 deletion etc/bento.env
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,15 @@ BENTOV2_SERVICE_REGISTRY_CPUS=1

# Notification
BENTOV2_NOTIFICATION_IMAGE=ghcr.io/bento-platform/bento_notification_service
BENTOV2_NOTIFICATION_VERSION=2.4.1
BENTOV2_NOTIFICATION_VERSION=3.0.0
BENTOV2_NOTIFICATION_VERSION_DEV=${BENTOV2_NOTIFICATION_VERSION}-dev
BENTOV2_NOTIFICATION_CONTAINER_NAME=${BENTOV2_PREFIX}-notification
BENTO_NOTIFICATION_NETWORK=${BENTOV2_PREFIX}-notification-net
BENTOV2_NOTIFICATION_INTERNAL_PORT=${BENTO_STD_SERVICE_INTERNAL_PORT}
BENTOV2_NOTIFICATION_EXTERNAL_PORT=8500
BENTOV2_NOTIFICATION_VOL_DIR=${BENTOV2_ROOT_DATA_DIR}/notification/data
BENTO_NOTIFICATION_DEBUGGER_EXTERNAL_PORT=5681
BENTO_NOTIFICATION_DEBUGGER_INTERNAL_PORT=5681

BENTOV2_NOTIFICATION_MEM_LIM=2G
BENTOV2_NOTIFICATION_CPUS=2
Expand Down
2 changes: 1 addition & 1 deletion etc/bento_services.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"notification": {
"service_kind": "notification",
"url_template": "{BENTO_PORTAL_PUBLIC_URL}/api/{service_kind}",
"url_template": "{BENTO_PUBLIC_URL}/api/{service_kind}",
"repository": "[email protected]:bento-platform/bento_notification_service",
"data_service": false
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
location /api/notification { return 302 https://${BENTOV2_PORTAL_DOMAIN}/api/notification/; }
location /api/notification { return 302 https://${BENTOV2_DOMAIN}/api/notification/; }
location /api/notification/ {
# Reverse proxy settings
include /gateway/conf/proxy.conf;
include /gateway/conf/proxy_extra.conf;
include /gateway/conf/proxy_private.conf;

# Forward request to notification service
rewrite ^ $request_uri;
Expand Down