Skip to content
Open
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
449 changes: 379 additions & 70 deletions .circleci/config.yml

Large diffs are not rendered by default.

106 changes: 56 additions & 50 deletions dev-ops/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,77 @@
version: '3'
version: '3.8'

# Integration-test infrastructure for project-service.
# All services bind only the ports needed by the Node.js processes running on
# the host. Port mappings use non-default host ports where a long-running
# instance already occupies the default port on the developer's machine.
#
# Usage (local):
# docker-compose -f project-service/dev-ops/docker-compose.yml up -d
# docker-compose -f project-service/dev-ops/docker-compose.yml down
#
# Usage (CI): docker-compose up -d (run from the dev-ops directory)

networks:
elevate_net:
name: elevate_net
driver: bridge

services:
zookeeper:
image: confluentinc/cp-zookeeper:7.3.0
container_name: zookeeper
networks: [elevate_net]
ports:
- '2181:2181'
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000

kafka:
image: 'confluentinc/cp-kafka:7.3.0'
image: confluentinc/cp-kafka:7.3.0
container_name: kafka
networks: [elevate_net]
ports:
- '9092:9092'
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://kafka:9093
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
KAFKA_LOG_RETENTION_HOURS: 1
depends_on:
- zookeeper
networks:
- elevate_net
logging:
driver: none

mongo:
image: 'mongo:4.1.4'
image: mongo:4.4
container_name: mongo
restart: 'always'
command:
- '--logpath'
- '/var/log/mongodb/mongod.log'
networks: [elevate_net]
ports:
- '27017:27017'
networks:
- elevate_net
volumes:
- mongo-data:/data/db
- logs:/var/log/mongodb

redis:
image: 'redis:7.0.0'
image: redis:7.0.0
container_name: redis
restart: 'always'
networks: [elevate_net]
ports:
- '6379:6379'
networks:
- elevate_net
logging:
driver: none
project:
build: '.'
# image: elevate-unnati
# image: shikshalokamqa/elevate-samiksha-service:0.0.6
container_name: project

postgres:
image: postgres:14-alpine
container_name: postgres
networks: [elevate_net]
ports:
- '5003:5003'
volumes:
- .:/var/src
command: ['nodemon', 'app.js']
- '5432:5432'
environment:
- MONGODB_URL=mongodb://mongo:27017/elevate-project
env_file:
- integration_test.env
depends_on:
- kafka
- mongo
- redis
networks:
- elevate_net

networks:
elevate_net:
external: false
volumes:
mongo-data:
logs:
POSTGRES_USER: postgres
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: user

gotenberg:
image: gotenberg/gotenberg:7
container_name: gotenberg
networks: [elevate_net]
ports:
- '3000:3000'
21 changes: 21 additions & 0 deletions dev-ops/entity_integration_test.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
ACCESS_TOKEN_EXPIRY=1440h
ACCESS_TOKEN_SECRET=hsghasghjab1273JHajnbabsjdj1273981273jhajksdh8y3123yhjkah812398yhjqwe7617237yuhdhhdqwu271
ADMIN_ACCESS_TOKEN=N0DM5NAwwCN5KNXKJwlwu6c0nQQt6Rcl
ADMIN_TOKEN_HEADER_NAME=admin-auth-token
API_DOC_URL=/entity-management/api-doc
APPLICATION_BASE_URL=/entity-management/
APPLICATION_ENV=development
APPLICATION_HOST=localhost
APPLICATION_PORT=5002
AUTH_METHOD=native
INTERFACE_SERVICE_URL=http://localhost:3567
INTERNAL_ACCESS_TOKEN=Fqn0m0HQ0gXydRtBCg5l
IS_AUTH_TOKEN_BEARER=false
KAFKA_COMMUNICATIONS_ON_OFF=ON
KAFKA_GROUP_ID=dev.entity
KAFKA_HEALTH_CHECK_TOPIC=entity-health-check-topic-check
KAFKA_URL=localhost:9092
MONGODB_URL=mongodb://localhost:27017/entity
SERVICE_NAME=EntityManagementService
USER_SERVICE_BASE_URL=/user
USER_SERVICE_URL=http://localhost:3567
5 changes: 0 additions & 5 deletions dev-ops/integration_test.env

This file was deleted.

26 changes: 26 additions & 0 deletions dev-ops/interface_integration_test.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
API_DOC_URL=/interface/api-doc
APPLICATION_ENV=development
APPLICATION_PORT=3567
ELEVATE_NOTIFICATION_KAFKA_BROKERS=localhost:9092
ELEVATE_NOTIFICATION_KAFKA_GROUP_ID=dev.mentoring
ELEVATE_NOTIFICATION_KAFKA_TOPIC=dev.notification
ENTITY_SERVICE_BASE_URL=http://localhost:5002
INSTALLED_PACKAGES=elevate-mentoring elevate-survey-observation@1.0.1 elevate-self-creation-portal
MENTORING_SERVICE_BASE_URL=http://localhost:7101
NOTIFICATION_SERVICE_BASE_URL=http://localhost:7201
PROJECT_SERVICE_BASE_URL=http://localhost:5003
RATE_LIMITER_ENABLED=true
RATE_LIMITER_GENERAL_LIMIT=500
RATE_LIMITER_NUMBER_OF_PROXIES=3
RATE_LIMITER_PUBLIC_LOW_LIMIT=5
REQUIRED_BASE_PACKAGES=elevate-mentoring elevate-project elevate-survey-observation self-creation-portal
REQUIRED_PACKAGES=elevate-mentoring@1.2.95 elevate-survey-observation@3.4.2 elevate-project@3.4.1 shiksha-notification@1.1.3 elevate-self-creation-portal@1.0.70
ROUTE_CONFIG_JSON_URLS_PATHS=https://raw.githubusercontent.com/ELEVATE-Project/utils/refs/heads/develop/interface-routes/elevate-routes.json
SAAS_NOTIFICATION_BASE_URL=interface/v1/notification/send-raw
SAAS_NOTIFICATION_SEND_EMAIL_ROUTE=interface/v1/notification/send-raw
SAMIKSHA_SERVICE_BASE_URL=http://localhost:5007
SCHEDULER_SERVICE_BASE_URL=http://localhost:7401
SELF-CREATION-PORTAL_SERVICE_BASE_URL=http://localhost:6001
SUPPORTED_HTTP_TYPES=GET POST PUT PATCH DELETE
SURVEY_SERVICE_BASE_URL=http://localhost:5007
USER_SERVICE_BASE_URL=http://localhost:7001
62 changes: 62 additions & 0 deletions dev-ops/project_integration_test.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
ACCESS_TOKEN_EXPIRY=1440h
ACCESS_TOKEN_SECRET=hsghasghjab1273JHajnbabsjdj1273981273jhajksdh8y3123yhjkah812398yhjqwe7617237yuhdhhdqwu271
ADMIN_ACCESS_TOKEN=N0DM5NAwwCN5KNXKJwlwu6c0nQQt6Rcl
ADMIN_AUTH_TOKEN=N0DM5NAwwCN5KNXKJwlwu6c0nQQt6Rcl
ADMIN_TOKEN_HEADER_NAME=admin-auth-token
API_DOC_URL=/project/api-doc
APPLICATION_BASE_URL=/project/
APPLICATION_ENV=development
APPLICATION_HOST=localhost
APPLICATION_PORT=5003
APP_PORTAL_BASE_URL=https://dev.elevate-ml.shikshalokam.org
AUTH_CONFIG_FILE_PATH=config.json
AUTH_METHOD=native

CLOUD_STORAGE=
CLOUD_STORAGE_ACCOUNTNAME=
CLOUD_STORAGE_BUCKETNAME=
CLOUD_STORAGE_BUCKET_TYPE=
CLOUD_STORAGE_PROJECT=
CLOUD_STORAGE_PROVIDER=
CLOUD_STORAGE_SECRET=

DEFAULT_ORGANISATION_CODE=default_code
DOWNLOADABLE_URL_EXPIRY_IN_SECONDS=300
ELEVATE_PROJECT_SERVICE_URL=https://dev.elevate-apis.shikshalokam.org
ENABLE_REFLECTION=false
ENTITY_BASE_URL=http://localhost:3567
ENTITY_MANAGEMENT_SERVICE_BASE_URL=/entity-management
ENTITY_MONGODB_URL=mongodb://localhost:27017/entity
GOTENBERG_URL=http://localhost:3000
INTERFACE_SERVICE_URL=http://localhost:3567
INTERNAL_ACCESS_TOKEN=Fqn0m0HQ0gXydRtBCg5l
IS_AUTH_TOKEN_BEARER=false
KAFKA_COMMUNICATIONS_ON_OFF=ON
KAFKA_GROUP_ID=dev.projects
KAFKA_HEALTH_CHECK_TOPIC=project-health-check-topic-check
KAFKA_URL=localhost:9092
MONGODB_URL=mongodb://localhost:27017/project
ORGANIZATION_EXTENSION_TOPIC=elevate_project_org_extension_event_listener
ORG_ID_HEADER_NAME=Org-id
ORG_UPDATES_TOPIC=dev.organizationEvent
PRESIGNED_URL_EXPIRY_IN_SECONDS=300
PROGRAM_USER_MAPPING_TOPIC=dev.program
PROJECT_SUBMISSION_TOPIC=elevate.improvement.project.submission.dev
SERVICE_NAME=project
SESSION_VERIFICATION_METHOD=user_service_authenticated
SOURCE_MONGODB_URL=mongodb://localhost:27017/project
SUBMISSION_LEVEL=USER
SUBMISSION_TOPIC=elevate_project_task_submissions_dev
SURVEY_MONGODB_URL=mongodb://localhost:27017/survey
SURVEY_SERVICE_URL=http://localhost:3567/survey
TENANT_CACHE_TTL=86400
TIMEZONE_DIFFRENECE_BETWEEN_LOCAL_TIME_AND_UTC=+05:30
USER_ACCOUNT_EVENT_TOPIC=dev.userCreate
USER_ACTIVITY_TOPIC=dev-user-activities
USER_COURSES_SUBMISSION_TOPIC=elevate_user_courses_dev
USER_COURSES_TOPIC=elevate_user_courses_raw
USER_DELETE_ON_OFF=ON
USER_DELETE_TOPIC=dev.userCreate
USER_SERVICE_BASE_URL=/user
USER_SERVICE_INTERNAL_ACCESS_TOKEN_HEADER_KEY=internal_access_token
VALIDATE_ENTITIES=ON
115 changes: 115 additions & 0 deletions dev-ops/user_integration_test.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
ACCESS_TOKEN_EXPIRY=1440h
ACCESS_TOKEN_SECRET=hsghasghjab1273JHajnbabsjdj1273981273jhajksdh8y3123yhjkah812398yhjqwe7617237yuhdhhdqwu271
ADMIN_INVITEE_UPLOAD_EMAIL_TEMPLATE_CODE=invitee_upload_status
ADMIN_SECRET_CODE=W5bF7gesuS0xsNWmpsKy
ALLOWED_HOST=*,localhost
ALLOWED_IDLE_TIME=86400
API_DOC_URL=/user/api-doc
APPLICATION_BASE_URL=/user
APPLICATION_ENV=development
APPLICATION_HOST=localhost
APPLICATION_PORT=7001
APP_NAME=MentorED


AWS_ACCESS_KEY_ID=
AWS_BUCKET_ENDPOINT=
AWS_BUCKET_REGION=
AWS_SECRET_ACCESS_KEY=
AZURE_ACCOUNT_KEY=
AZURE_ACCOUNT_NAME=

CAPTCHA_ENABLE=false
CAPTCHA_SERVICE=googleRecaptcha
CHANGE_PASSWORD_TEMPLATE_CODE=change_password
CLEAR_INTERNAL_CACHE=userinternal

CLOUD_STORAGE=
CLOUD_STORAGE_ACCOUNTNAME=
CLOUD_STORAGE_BUCKETNAME=
CLOUD_STORAGE_BUCKET_TYPE=
CLOUD_STORAGE_PROJECT=
CLOUD_STORAGE_PROVIDER=
CLOUD_STORAGE_SECRET=

DB_POOL_EVICT_MS=10000
DB_POOL_MAX=20
DB_POOL_MIN=4
DEFAULT_AWS_BUCKET_NAME=mentoring-dev-storage
DEFAULT_AZURE_CONTAINER_NAME=mentoring-images
DEFAULT_GCP_BUCKET_NAME=mentoring-dev-storage-private
DEFAULT_ORGANISATION_CODE=default_code
DEFAULT_ORG_ID=1
DEFAULT_QUEUE=defaultUser-queue
DEFAULT_ROLE=mentee
DEFAULT_TENANT_ORG_CODE=default_code
DEFAULT_TENANT_ORG_NAME=Default Organization
DEV_DATABASE_URL=postgres://postgres@localhost:5432/user
DISABLE_LOG=false
EMAIL_ID_ENCRYPTION_ALGORITHM=aes-256-cbc
EMAIL_ID_ENCRYPTION_IV=c9c7bd480494409071847264652f5c95
EMAIL_ID_ENCRYPTION_KEY=eef7e009626c18724be86afa41a2620e0718561a508c61f92d7ee0377177ef7b
ENABLE_EMAIL_OTP_VERIFICATION=false
ENABLE_LOG=true
ENTITY_MANAGEMENT_SERVICE_BASE_URL=http://localhost:3567/entity-management
ERROR_LOG_LEVEL=silly
EVENT_ENABLE_ORG_EVENTS=false
EVENT_ENABLE_ORG_KAFKA_EVENTS=true
EVENT_ENABLE_TENANT_KAFKA_EVENTS=true
EVENT_ENABLE_USER_EVENTS=false
EVENT_ENABLE_USER_KAFKA_EVENTS=true
EVENT_ORGANIZATION_KAFKA_TOPIC=dev.organizationEvent
EVENT_ORG_LISTENER_URLS=http://localhost:3567/mentoring/v1/organization/eventListener
EVENT_TENANT_KAFKA_TOPIC=dev.tenantEvent
EVENT_USER_KAFKA_TOPIC=dev.userCreate
EVENT_USER_LISTENER_API=http://localhost:3567/mentoring/v1/users/add
GCP_PATH=gcp.json
GCP_PROJECT_ID=sl-dev-project
GENERIC_INVITATION_EMAIL_TEMPLATE_CODE=generic_invite
GOOGLE_RECAPTCHA_HOST=https://www.google.com
GOOGLE_RECAPTCHA_URL=/recaptcha/api/siteverify
INTERFACE_SERVICE_HOST=http://localhost:3567
INTERNAL_ACCESS_TOKEN=Fqn0m0HQ0gXydRtBCg5l
INTERNAL_CACHE_EXP_TIME=86400
INVITEE_EMAIL_TEMPLATE_CODE=invite_user
IS_AUTH_TOKEN_BEARER=false
IV=LHYOA5YnTonqcgrm15k3/Q==
JWT_SECRET=xG7V87nfj2394fJD394jfgh08dfDfh98DKJlndfj9d
KAFKA_GROUP_ID=dev.users
KAFKA_HEALTH_CHECK_TOPIC=user-health-check-topic-check
KAFKA_TOPIC=dev.topic
KAFKA_URL=localhost:9092
KEY=ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz
MENTEE_INVITATION_EMAIL_TEMPLATE_CODE=invite_mentee
MENTORING_SERVICE_URL=http://localhost:3567
MENTOR_INVITATION_EMAIL_TEMPLATE_CODE=invite_mentor
MENTOR_REQUEST_ACCEPTED_EMAIL_TEMPLATE_CODE=mentor_request_accepted
MENTOR_REQUEST_REJECTED_EMAIL_TEMPLATE_CODE=mentor_request_rejected
MENTOR_SECRET_CODE=4567
MONGODB_URL=mongodb://localhost:27017/user
NOTIFICATION_API_URL=https://saas-qa-interface.tekdinext.com/interface/v1/notification/send-raw
NOTIFICATION_KAFKA_TOPIC=dev.notification
NOTIFICATION_MODE=API
OLD_DEV_DATABASE_URL=postgres://shikshalokam:slpassword123@10.148.0.36:9700/saas_dev_user
ORG_ADMIN_INVITATION_EMAIL_TEMPLATE_CODE=invite_org_admin
OTP_EMAIL_TEMPLATE_CODE=emailotp
OTP_EXP_TIME=86400
PORTAL_URL=https://dev.elevate-mentoring.shikshalokam.org/auth/login
PUBLIC_ASSET_BUCKETNAME=mentoring-dev-storage-public
RATING_KAFKA_TOPIC=dev.mentor_rating
RBAC_JWT_SECRET=3609eeeab5d80e873ddb1ffde5f181f540c4973bdbd8ef611f5e7271cdf2e03d
RECAPTCHA_SECRET_KEY=6LfWEKYpAAAAAJS0eukS2Su_5vwlXRs5vPbC34W0
REDIS_HOST=redis://localhost:6379
REFRESH_TOKEN_EXPIRY=7
REFRESH_TOKEN_SECRET=371hkjkjady2y3ihdkajshdkiq23iuekw71yekhaskdvkvegavy23t78veqwexqvxveit6ttxyeeytt62tx236vv
REFRESH_VIEW_INTERVAL=30000
REGISTRATION_EMAIL_TEMPLATE_CODE=registration
REGISTRATION_OTP_EMAIL_TEMPLATE_CODE=registrationotp
SALT_ROUNDS=10
SAMPLE_CSV_FILE_PATH=sample/bulk_user_creation.csv
SCHEDULER_SERVICE_BASE_URL=/scheduler/
SCHEDULER_SERVICE_ERROR_REPORTING_EMAIL_ID=rakesh.k@pacewisdom.com
SCHEDULER_SERVICE_HOST=http://localhost:3567
SCHEDULER_SERVICE_URL=http://localhost:3567/jobs/scheduleJob
SERVICE_NAME=UserService
SIGNED_URL_EXPIRY_IN_SECONDS=900
Loading