====== Ticketer Light Gateway ======
Updated by Anna Dowling 03/10/2022
===== Overview =====
The ticketer light gateway application is utilised as a api gateway for the ticketer-light project to bridge the gap between ticketer business logic and exposing a more generalised api layer. It provides data integration points for tickets within Errigal's network access. Currently this is a service oriented application with no front end capabilities.
Repo: https://bitbucket.org/errigal/ticketer-light-gateway/branch/master
===== Local Dev App Urls =====
* http://localhost:8210/ticketer-light-gateway
===== Project Documents =====
https://drive.google.com/drive/u/0/folders/1FbjMFdmZpCJ4jWcqFe4R21mnAr6wUhPy
===== Apis / Data Accessed =====
API endpoints for core Ticket Areas including (using spring-webflux for REST instead of graphql due to underlying business logic):
* Form
* Attachment
* Contact Details
* Email
* Running Log
* Ticket History
* Ticket Updates
* User Data for Ticketer
* Visbility
* Workflow
Graphql Query API endpoints for core Ticket Areas:
type Query {
tickets(criteria: TicketSearchCriteria): [Ticket]
ticketForms(ticketId: ID): [Form]
allForms: [Form]
allFormGroups: [FormGroup]
relatedTickets(ticketId: ID, networkId: ID, visibilities: String!): [Ticket]
users(homeMarket: String): [User]
workflows(active: Boolean, published: Boolean, mockUp: Boolean): [Workflow]
previousStatus(ticketId: ID!): TicketStatus
nextStatuses(workflowId: ID!, statusName: String!): [GNode]
allStatusesForWorkflow(workflowId: ID!): [GNode]
allStatuses: [GNode]
visibilities: [Visibility]
ticketTypes: [TicketType]
ticketPriorities: [TicketPriorityEntry]
hubs: [NetworkElement]
nodesOfHub(hubId: ID!): [NetworkElement]
hubsOfVisibility(visibility: String!): [NetworkElement]
networkIdentifiersOfVisibility(visibility: String!): [NetworkIdentifier]
ofnTicketDeviceDetails(ticketIds: String!): [OFNDevice]
ofnTicketFaultDetails(ticketIds: String!): [OFNFault]
}
Graphql Object types:
Ticket
TicketStatus
Workflow
GNode
NetworkIdentifier
User
Form
KeyValue
FormGroup
Visibility
Region
TicketType
TicketPriorityConfig
TicketPriorityConfigEntry
NetworkElement
OFNFault
OFNDevice
===== Architecture =====
{{ :development:applications:r_d-architecture_-_ticketer_lite.drawio.png?600 |}}
===== Development Configuration =====
Project can be pointed at local or server deployed version of all api endpoints listed above.
See src/main/resources/application.properties for environment configuration for local dev.
===== Deployment =====
The ticketer-light-gateway is deployed to the server handlers in **/var/spring-boot/** and is load balanced. Its environment specific variables are passed via the **application.properties** file to the app at runtime.
Current Config Fields Are:
# Build Info
jenkins.build.identifier=ticketer-light-gateway » ticketer-light-gateway-feature-branches » REL-4.1.0 REL-4.1.0.1
jenkins.build.branch=REL-4.1.0
jenkins.build.number=1
jenkins.build.time=2022-07-26 19:11:38
deployment.time=2022-08-08 15:30:19
spring.main.allow-bean-definition-overriding=true
# General logging settings
spring.application.name=ticketer-light-gateway
logging.file.max-history=5
logging.file.max-size=10MB
logging.file.name=/home/scotty/logs/spring-boot/ticketer-light-gateway.log
# Server settings
server.port=8210
server.servlet.context-path=/ticketer-light-gateway
spring.webflux.base-path=/ticketer-light-gateway
allowedOrigins=https://qanova.errigal.com
# DB Settings
spring.r2dbc.url=r2dbc:mysql://10.91.130.211:3306/ticketer?useUnicode=yes&characterEncoding=UTF-8
spring.r2dbc.username=root
spring.r2dbc.password==T7g(?(HHL
#spring.jpa.show-sql=true
spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true
graphql.mapping=/ticketer-light-gateway/graphql
graphql.servlet.actuator-metrics=true
graphql.annotations.base-package=com.errigal.ticketerlightgateway.model
auth.jwt.jwksUrlPath=https://qanova.errigal.com
userprofile.uri=https://qanova.errigal.com/userprofile
userprofile.clientId=0f59ca3a-353c-11eb-b954-0242ac110002
userprofile.clientSecret=jwha8WbRaTPZMW7mbhhEyl4iB1hAKa+xhGC/mObCXP48m2504MpRkPK5U3EumBSD
ticketer.url=https://qanova.errigal.com/Ticketer
#for OFN email
spring.codec.max-in-memory-size=10MB
#Metrics related configurations
management.endpoint.metrics.enabled=true
management.metrics.tags.application=${spring.application.name}
management.endpoints.web.exposure.include=*
management.endpoint.prometheus.enabled=true
management.metrics.export.prometheus.enabled=true
#Key for jwt decryption
com.errigal.userprofile.key=OO8qfrtYIqAX1EhU
=== Ansible Playbooks ===
ansible-playbook -i ../env-configuration/nova/hosts.ini --diff --vault-id @prompt ticketer-light-gateway.yml --extra-vars "jenkins_build_name='ticketer-light-gateway-feature-branches/job/branchName' appFileExtension='.jar' jenkins_job_build_num=buildNumber actions='upload,stop,deploy,configure,start'"
=== Jenkins Build ===
https://jenkins.errigal.com:8443/job/ticketer-light-gateway/