Vendor Registry v1.2.1
Overview
Vendor Registry is a system that enables ULBEmployees to create and search Vendor i.e Desluding Operator (DSO) and driver entities with appropriate vehicle Entities for FSM Application. This document contains the details about how to setup the Vendor and describe the functionalities provided.
Pre-requisites
Before you proceed with the configuration, make sure the following pre-requisites are met -
Java 8
Kafka server is up and running
egov-persister service is running and has vendor-persister config path added in it
PSQL server is running and database is created to store FSM Application data
Following services should be up and running:
egov-mdms-service
egov-user-service
boundary-service
vehicle
Key Functionalities
Added payment payment preference and agency attributes for DSO
Added gender attribute in the create and update APIs for Vendor
Updated the Vendor search API to added vehicleCapacity in the search parameter to search all vendors matching the vehicle capacity specified in the search parameter.
Deployment Details
Deploy the latest version of vendor
Add vendor-persister.yml file in config folder in git and add that path in persister . (The file path is to be added in environment yaml file in param called
persist-yml-path
) and restartegov-persister-service.
Integrate the following below changes in vendor-persister.yml
https://github.com/egovernments/configs/commit/95dd26f926ec44d07448926ee4b6b7e031847a57
Configuration Details
MDMS Configuration
NA
Business Service / Workflow Configuration
NA
Actions & Role Action Mapping
After adding Actions and role-action mappings , restart the egov-mdms-service
Actions
{
"id": {{PLACEHOLDER1}},
"name": "Create Vendor/DSO",
"url": "/vendor/v1/_create",
"displayName": "Create Vehicle",
"orderNumber": 0,
"enabled": false,
"serviceCode": "vendor",
"code": "null",
"path": ""
},
{
"id": {{PLACEHOLDER1}},
"name": "Search Vendor/DSO",
"url": "/vendor/v1/_search",
"displayName": "Search Vendor",
"orderNumber": 1,
"enabled": false,
"serviceCode": "vendor",
"code": "null",
"path": ""
},
Role Action Mapping
[
{
"rolecode": "FSM_ADMIN",
"actionid": "{{PLACEHOLDER1}}",
"actioncode": "",
"tenantId": "pb"
},
{
"rolecode": "FSM_ADMIN",
"actionid": "{{PLACEHOLDER2}}",
"actioncode": "",
"tenantId": "pb"
},
{
"rolecode": "FSM_DSO",
"actionid": "{{PLACEHOLDER2}}",
"actioncode": "",
"tenantId": "pb"
},
{
"rolecode": "FSM_EDITOR_EMP",
"actionid": "{{PLACEHOLDER2}}",
"actioncode": "",
"tenantId": "pb"
},
{
"rolecode": "FSM_VIEW_EMP",
"actionid": "{{PLACEHOLDER2}}",
"actioncode": "",
"tenantId": "pb"
},
{
"rolecode": "FSM_EMP_FSTPO",
"actionid": "{{PLACEHOLDER2}}",
"actioncode": "",
"tenantId": "pb"
},
{
"rolecode": "CITIZEN",
"actionid": "{{PLACEHOLDER2}}",
"actioncode": "",
"tenantId": "pb"
}
]
Infra Ops Configuration
Configurations that we can manage through values.yml of vendor in infraops repo as follows
values.yml for vehicle can be found
Description | name in values.yml | Current Value |
---|---|---|
Kafka Consumer Group |
|
|
kafka topic to which service push data to save new Vendor |
|
|
mdms service host |
|
|
Vehicle Service host |
|
|
User service host |
|
|
Location Service Host |
|
|
|
|
|
Configurations sample in Values.yml
# Common Labels
labels:
app: "vendor"
group: "rainmaker"
# Ingress Configs
ingress:
enabled: true
zuul: true
context: "vendor"
# Init Containers Configs
initContainers:
dbMigration:
enabled: true
schemaTable: "vendor_schema"
image:
repository: "vendor-db"
# Container Configs
image:
repository: "vendor"
replicas: "1"
healthChecks:
enabled: true
livenessProbePath: "/vendor/health"
readinessProbePath: "/vendor/health"
appType: "java-spring"
tracing-enabled: true
heap: "-Xmx256m -Xms256m"
java-args: "-Dspring.profiles.active=monitoring"
# Additional Container Envs
env: |
- name: EGOV_VEHICLE_HOST
valueFrom:
configMapKeyRef:
name: egov-service-host
key: vehicle
- name: EGOV_MDMS_HOST
valueFrom:
configMapKeyRef:
name: egov-service-host
key: egov-mdms-service
- name: EGOV_USER_HOST
valueFrom:
configMapKeyRef:
name: egov-service-host
key: egov-user
- name: EGOV_LOCATION_HOST
valueFrom:
configMapKeyRef:
name: egov-service-host
key: egov-location
- name: EGOV_HRMS_HOST
valueFrom:
configMapKeyRef:
name: egov-service-host
key: egov-hrms
- name: SPRING_KAFKA_CONSUMER_GROUP_ID
value: egov-vendor-services
- name: PERSISTER_SAVE_VENDOR_TOPIC
value: save-vendor-application
- name: PERSISTER_UPDATE_VENDOR_TOPIC
value: update-vendor-application
- name: SPRING_KAFKA_PRODUCER_KEY_SERIALIZER
value: org.apache.kafka.common.serialization.StringSerializer
- name: SPRING_KAFKA_PRODUCER_VALUE_SERIALIZER
value: org.springframework.kafka.support.serializer.JsonSerializer
- name: JAVA_OPTS
value: {{ index .Values "heap" | quote }}
- name: JAVA_ARGS
value: {{ index .Values "java-args" | quote }}
- name: SERVER_PORT
value: "8080"
- name: SECURITY_BASIC_ENABLED
value: "false"
- name: MANAGEMENT_SECURITY_ENABLED
value: "false"
{{- if index .Values "tracing-enabled" }}
- name: TRACER_OPENTRACING_ENABLED
value: "true"
{{- end }}
Data Setup
DSO for FSM System is a vendor, For every city/ULB DSO should be created with the Representative details as owner, associated vehicles and drivers
Sample Curl
Integration
Integration Scope
Any system or digit module can integrated with Vendor Service, helps to manage the Vendor with the vehicles, drivers and owner for representative and login for the representative/owner to login into the system to carry our role specific operations
Integration Benefits
Validation of DSO/Vendor availability
Fetch the vehicle assigned to the DSO
Fetch the Drivers assigned to the DSO
Steps to Integration
FSM to call
vendor/v1/_search
to fetch the DSO’sFSM can call
vendor/v1/_search
to fetch the DSO’s and the respective vehicles and drivers
Interaction Diagram
TBD
Reference Docs
Doc Links
Title | Link |
Workflow Technical Document | |
User Technical Document | |
MDMS Technical Document | NEEDS TO BE UPDATED |
IDGen Technical Document | NEEDS TO BE UPDATED |
Localization Technical Document | NEEDS TO BE UPDATED |
Persister Technical Document | NEEDS TO BE UPDATED |
SMS Notification Technical Document | NEEDS TO BE UPDATED |
API Contract | |
Postman Scripts |
API List
Title | Link |
| |
| |
|