DRISTI
  • 👋Welcome to DRISTI
    • Why DRISTI?
  • ⚖️About DRISTI
    • Overview
    • Design Principles
    • Value Proposition
    • Architecture Overview
    • System Users
    • Key Modules
      • Async Applications & Submissions
        • Key Features
        • Process & Workflows
        • Specifications
      • Case Management
        • Key Features
        • Process & Workflows
        • Specifications
      • E-Filling, Scrutiny and Admission
        • Key Features
        • Process & Workflows
        • Specifications
        • Sequence Diagrams
      • Evidence
        • Key Features
        • Process & Workflows
        • Specifications
      • Listing & Scheduling
        • Key Features
        • Process & Workflows
        • Specifications
      • Hearings
        • Key Features
        • Process & Workflows
        • Specifications
      • Orders & Tasks
        • Key Features
        • Process & Workflows
        • Specifications
      • Summons, Bails, Warrants
        • Key Features
        • Process & Workflows
        • Specifications
      • User Benefits
      • User Registration
        • Key Features
        • Process & Workflows
        • Specifications
        • Sequence Diagrams
      • Roles per Module
    • API Specifications
    • Security
    • Privacy
  • 🧰DRISTI Platform
    • Architecture
      • Overview
      • Principles
      • High Level Design
        • Technology Stack
        • Access Control & Roles
        • Data & Analytics
        • Non Functional Requirements
          • Performance
          • Security
          • Data Retention
        • Logging Guidelines
      • Low Level Design
        • Advocate
          • Advocate - API Specifications
          • Sequence Diagram
        • Application
          • Application - API Specifications
          • Sequence Diagram
        • Case
          • Case - API Specifications
          • Sequence Diagram
        • Case Management
          • Case Management - API Specifications
          • Sequence Diagram
        • Evidence
          • Evidence - API Specifications
          • Sequence Diagram
        • Hearing
          • Hearing - API Specifications
          • Sequence Diagram
        • Order
          • Order - API Specifications
          • Sequence Diagram
        • Task
          • Task - API Specifications
          • Sequence Diagram
          • Summons
          • Warrant
      • Architectural and Design Decisions
        • Data Visibility
        • Detailed Case Access
        • Case Numbering
          • Filing Number
          • Court Case Number
          • CNR Number
          • Case Stages, Numbers & Dates
    • Interoperability
    • Release Notes
      • Release 1.1.0
      • Release 1.2.0
      • Release 1.3.0
      • Release 1.4.0
      • Release 1.5.0
      • Release 1.6.0
    • Hotfixes
      • Hotfix Release 17.3
      • Hotfix Release 18.1
      • Hotfix Release 18.2
      • Hotfix Release 18.3
      • Hotfix Release 18.4
      • Hotfix Release 19.1
      • Hotfix Release 19.2
      • Hotfix Release 19.3
      • Hotfix Release 20.1
      • Hotfix Release 20.2
      • Hotfixes Release 20.3
  • 🪝Setup
    • Planning DRISTI Implementation
    • Establish Project & Team
    • Gather Requirements
    • Installation
      • Infrastructure Setup
        • Azure Setup
        • SDC - OpenShift Setup
      • Code Deployment
      • Configuration
        • Functional Configuration
        • Service Configuration
          • Court
            • Court UI
          • Case
            • Case UI
          • Advocate
            • Advocate UI
          • Application
            • Application UI
          • Task
            • Task UI
          • Order
            • Order UI
          • Hearing
            • Hearing UI
          • Evidence
            • Evidence UI
    • Quality Assurance Testing
    • Go Live
    • Operational Support
    • Monitoring
  • 🛣️Roadmap & Updates
    • Roadmap
  • 🌾Resources
    • Source Code
    • Technology Stack
    • Licensing
    • Legal Taxonomy
  • 🌐COMMUNITY
    • Interested in Contributing?
    • Github Discussion
    • Code of Conduct
  • 🪝Setup
    • Coming soon...
    • 🟢ABOUT US
Powered by GitBook
On this page
  1. Setup
  2. Installation

Code Deployment

PreviousSDC - OpenShift SetupNextConfiguration

Last updated 4 months ago

The following section explains how the DRISTI code is deployed on the environment created in the previous steps. Follow this to deploy on Azure.

DRISTI Deployment

  • Create env and env-secret from sample and sample secrets.

  • Check for the DB credential passed for Azure Postgres DB as well as the server host for the DB created, and update the DB credential in the env and env-secret files.

  • Update the env value in the env file with the proper value, also update the filestore bucket name and container name and link for globalconfig.js file with new one for this env.

  • Use Sops to encrypt secret files.

  • Create a new workflow for pucar-deployment and update appropriate variables value from sample.yaml ()

  • Update HELMFILE_ENV: "<ENV NAME>" value in digit deployment step to env as environment and secrets file is named as env.yaml and env-secrets.yaml or similar according to the env file name.

  • Make sure the workflow gets triggered when push/pull requests are based on requirements.

  • For first-time creation, the db-migration part needs to be commented as mdms and workflow service flyway migration needs to be completed before running the init-script otherwise it will create a flyway migration conflict.

  • Trigger the pipeline and review the logs. If you encounter any issues try to resolve them. One better way to troubleshoot infra creation is to run the terraform apply from the local system but make sure to store and use the same tfstate file.

Generate the self Certificate for a domain name mapping for UI: Use the certbot command to create a certificate. Replace "domain" with your actual domain name:

sudo certbot certonly --manual --preferred-challenges=dns --email infra123@beehyv.com --server --agree-tos --manual-public-ip-logging-ok -d "domain"

Configure the DNS Record: Add an "A" record in the DNS-hosted zone for pucar.org. Point the domain name (yourdomain.com) to the IP address of the incoming load balancer.

  • Using certbot, create the certificate and private key and update tls-certs secret to have private key and cert.

  • This will enable UI access.

Create root User for new tenants:

Enable port forward for user service run the following command to create a root user for the tenant Note: Please ensure that you update all the necessary details in the curl command, such as tenant ID, username, password, etc.

Example : curl --location 'http://localhost:8280/user/users/_createnovalidate' --header 'Content-Type: application/json' --data-raw '{"requestInfo":{"apiId":"Rainmaker","ver":".01","ts":null,"action":"_update","did":"1","key":"","msgId":"20170310130900|en_IN","authToken":"2666f331-6376-48b8-ad9a-2ab3d9948af3","userInfo":{"id":24226,"uuid":"11b0e02b-0145-4de2-bc42-c97b96264807","userName":"amr001","name":"leela","mobileNumber":"9814424443","emailId":"leela@llgmail.com","locale":null,"type":"EMPLOYEE","roles":null,"active":true,"tenantId":"pg.citya","permanentCity":null}},"user":{"userName":"TEST-M1","mobileNumber":"9919939947","name":"PGR Admin","password":"eGov@123","type":"EMPLOYEE","roles":[{"name":"SUPERUSER","code":"SUPERUSER","tenantId":"pg"},{"name":"CSR","code":"CSR","tenantId":"pg"},{"name":"EMPLOYEE","code":"EMPLOYEE","tenantId":"pg"}],"tenantId":"pg","active":true}}'

Localization:

"RequestInfo": {

"apiId": "Rainmaker",

"msgId": "1713365188488|ml_IN",

"authToken": "46b52737-cb49-458a-baec-43173c6c61ba",

"plainAccessRequest": {}

},

"tenantId": "kl",

"messages": [

{

"code": "AGE_VALIDATION",

"message": "Invalid Age",

"module": "rainmaker-common",

"locale": "en_IN"

}

]

Another way of doing this is, fetch the localization message from the existing environment which has the same data as mentioned in the sheet, and then just paste that message array in the upsert api given above.

API:

If we have a localization sheet-like (), then we can add localization data directly using the below script.

🪝
https://github.com/pucardotorg/pucar-DevOps/blob/Solutions-Pipeline/.github/workflows/sample.yaml
https://acme-v02.api.letsencrypt.org/directory
https://dristi-kerala-qa.pucar.org/localization/messages/v1/_upsert
https://github.com/pucardotorg/kerala-configs/tree/develop/localization
https://github.com/pucardotorg/dristi-solutions/blob/develop/utilities/localization-scripts/update_localization_in_all_env.py