Sanitation
PlatformDomainsAcademyDesign SystemFeedback
v1.4
v1.4
  • Introducing Water-Sanitation
  • Water-Sanitation
    • Solution Design
    • Approach
    • Release Notes
      • FSM 1.4 - Technical Release Summary
      • Service Build Update
        • Release Builds for Core
      • MDMS Changes
      • Configuration Updates
      • Test Cases
      • Localisation
      • Impel Release Notes
      • Gate 2 Checklist
      • Workflow Configuration Changes
      • Master Migration Document
      • Driver-Individual Migration Script
  • Water-Sanitation Product Suite
    • Waste Management System
      • Functional Specifications
        • TQM UI
          • How to Enable TQM UI
          • UI: Plant Operator
            • Landing and Home Page
            • Plant-User Mapping
            • Inbox/Update Tests
            • View Past Test Results/Test's Summary Screen
            • Help Section
          • UI: ULB Admin
            • ULB Admin Home Page
            • Inbox/Test Details Screen
            • View Past Test Results
            • Create Adhoc Test
        • TQM UI/UX Audit
      • Faecal Sludge Management (FSM)
        • Features
        • Sanitation Actors & Interactions
        • User Interface Design
        • FSM User Manual
          • FSM Citizen User Manual
          • Employee User Manual
          • Manage Vendor, Sanitation Worker and Vehicle Details
          • DSO User Manual
          • Septage Treatment Plant Operator User Manual
        • Test Cases
        • FSM Functional Specification
          • Sanitation Worker UI
            • FSM Registry
            • Create Sanitation Worker
            • Edit Sanitation Worker
            • Assign Sanitation Workers to FSM Applications
            • Sanitation Worker Details
          • FSM UI Docs
            • FSM Citizen UI
            • FSM Employee UI
            • FSM DSO UI
            • FSM FSTPO UI
          • FSM UI/UX Audit
        • FSM Technical Specification
          • Vehicle Technical Specification
          • Vendor Technical Specification
          • Calculator Technical Specification
        • FSM Release Notes
          • Known Issues List
        • Product Requirement Document
        • Training
        • Sanitation Worker Welfare
          • Vendor Registry
          • FSM Service
          • Sanitation Worker( FSM 1.4) UI/UX Audit
        • FSM-DSS Technical Documentation
        • Enablement toolkits(Assetization) for FSM
          • Getting started with DIGIT
          • Requirements to enable FSM Module in a new evironment
          • Dependency services of the FSM module
          • Data templates for data collection
          • Data loading steps
            • Loading Billing Slab Data
            • Loading Vendor,Vehicle and Driver Data
            • Loading Localisations
            • Plant Mapping of FSTP
            • Creating users for FSM
          • Preparation of MDMS Data for Data Loading
          • SMS Templates for FSM
        • URC Release Notes
          • Steps to Configure URC
        • Garima Release Notes
          • Steps to Configure Garima
        • User Personas
      • Treatment Quality Monitoring (TQM)
        • Features
        • User Stories
          • Treatment Quality Monitoring Dashboard KPIs
        • User Interface Design
        • User Manual
          • Employee User Manual
          • Treatment Plant Operator User Manual
        • TQM Setup
          • User Manual
        • Release Notes
          • Known Issue List
        • Product Requirement Document: Treatment Quality Monitoring (TQM)
        • PQM Technical Specification
        • TQM Impel Checklist & Roll-out Plan
    • Water & Sewerage Connections
    • NalJal
  • Technology
    • Architecture
      • PQM
        • Low Level Design
          • Services
            • PQM Service
            • PQM Anomaly Finder
            • PQM Scheduler
      • FSM
        • Low Level Design
          • Services
            • FSM Service
            • FSM Calculator
          • Registries
            • FSM Vendor Registry
            • FSM Vehicle Registry
    • Source Code
  • Reference Implementations
    • Odisha - SUJOG
      • Functional Customisation
        • Urban-Rural Convergence
        • Garima Implementation
          • User Interface Design
          • Product Requirement Document (PRD)
      • Technical Customisation
      • Technical Specification: Urban-Rural Convergence
      • Standard Operating Procedure (SOP)
      • Program Rollout Plan
      • Implementation Plan
      • Implementation Guide
      • Implementation Checklist
      • TQM Gate 2 Plans & Checklist
  • Setup
    • Setup
      • On AWS
    • Deployment Guide
      • Legacy/Re-Indexing the FSM Data
      • Legacy/Re-Indexing the PQM Data
      • FSM devops setups
      • FSM Calculator devops setup
      • Vendor registry devops setup
      • Vehicle registry devops setup
    • Development Guide
      • Backend Developer Guide
      • UI Developer Guide
    • Configuration
      • TQM
        • PQM Service
        • PQM Anomaly Finder
        • PQM Scheduler
      • FSM
        • FSM Service
        • Vendor Registry
        • Vehicle Registry
        • FSM Calculator
    • Operations Guide
  • COMMUNITY
    • Community Project: Vehicle Tracking
      • Release Notes
        • Service Build Update
          • Release Builds for Core
        • Test Cases
      • Architecture
        • Vehicle Tracking
          • High Level Design
          • Low Level Design
      • User Manuals
        • Employee User Manual
        • Driver User Manual
      • Demo
      • Product Requirement Document (PRD)
      • Deployment Guide
      • Setup
      • Source Code
    • Contribute
    • Issues
Powered by GitBook

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.

On this page
  • Build and Deployment of vehicle-tracker
  • Jenkins Job Builder Configuration:
  • DockerFile And Jenkins Configuration:
  • Nginx Configuration:
  • Helm Chart Configuration:
  • Run Jenkins Job:
  • Build and Deploy:
  • Technology Stack:

Was this helpful?

Export as PDF
  1. COMMUNITY
  2. Community Project: Vehicle Tracking

Deployment Guide

Build and Deployment of vehicle-tracker

Jenkins Job Builder Configuration:

Configure a Jenkins job builder to automate the build and deployment process.

Configuration File: build-config.yaml

#Vehicle tracking web app - name: 'builds/SANITATION/vehicle-tracker' build: - work-dir: 'frontend/vehicle-tracker/map_web_app/route_map' image-name: 'vehicle-tracker' dockerfile: 'frontend/vehicle-tracker/map_web_app/docker/Dockerfile'

DockerFile And Jenkins Configuration:

Create a docker file for your application

File: Dockerfile

# Docker flutter tags https://hub.docker.com/r/cirrusci/flutter/tags?page=1&name=1.16 FROM ghcr.io/cirruslabs/flutter:3.10.3 AS build ARG WORK_DIR WORKDIR /app # copy the project files COPY ${WORK_DIR} . RUN flutter doctor RUN flutter pub get RUN flutter build web # Create runtime image FROM dwssio/nginx:mainline-alpine ENV WEB_DIR=/var/web/vehicle-tracker #RUN mkdir -p ${WEB_DIR} COPY --from=build /app/build/web/ ${WEB_DIR}/ COPY --from=build /app/nginx.conf /etc/nginx/conf.d/default.conf

File: Jenkinsfile

library 'ci-libs' buildPipeline(configFile: './build/build-config.yml')

Nginx Configuration:

Configure the Nginx to serve the application

File: nginx.conf

server { listen 80; underscores_in_headers on; server_tokens off; location /vehicle-tracker { root /var/web; index index.html index.htm; try_files $uri $uri/ /vehicle-tracker/index.html; } }

Helm Chart Configuration:

Create a helm chart for deployment

Files in the helm chart directory:

Chart.yaml

apiVersion: v2 name: vehicle-tracker description: A Helm chart for Kubernetes # A chart can be either an 'application' or a 'library' chart. # # Application charts are a collection of templates that can be packaged into versioned archives # to be deployed. # # Library charts provide useful utilities or functions for the chart developer. They're included as # a dependency of application charts to inject those utilities and functions into the rendering # pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. version: 0.1.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. appVersion: 1.16.0 dependencies: - name: common version: 0.0.5 repository: file://../../common

values.yaml

# Common Labels labels: app: "vehicle-tracker" group: "web" # Ingress Configs ingress: enabled: true context: "vehicle-tracker" namespace : egov # Init Containers Configs initContainers: {} # Container Configs image: repository: "vehicle-tracker" replicas: "1" httpPort: 80 healthChecks: enabled: true livenessProbePath: "/vehicle-tracker/" readinessProbePath: "/vehicle-tracker/" extraVolumes: | - name: js-injection configMap: name: vehicle-tracker-js-injection extraVolumeMounts: | - mountPath: /etc/nginx/conf.d/sub_filter.conf name: js-injection subPath: sub_filter.conf

templates/Deployment.yaml

# deployment.yaml {{- template "common.deployment" . -}}

templates/Service.yaml

# service.yaml {{- template "common.service" . -}}

templates/Ingress.yaml

# ingress.yaml {{- template "common.ingress" . -}}

templates/subfilter-injection-configmap.yaml

{{- $envOverrides := index .Values (tpl .Chart.Name .) -}} {{- $_ := set . "Values" (merge .Values $envOverrides) -}} {{- if index .Values "custom-js-injection" -}} apiVersion: v1 kind: ConfigMap metadata: name: {{ .Chart.Name }}-js-injection {{- if .Values.global.namespace }} namespace: {{ .Values.global.namespace }} {{- else }} namespace: {{ .Values.namespace }} {{- end }} data: {{- index .Values "custom-js-injection" | nindent 2 }} {{- end -}}

Add the custom js injection config in the environment directory

vehicle-tracker: custom-js-injection: | sub_filter.conf: " sub_filter '<head>' '<head> <script src=https://s3.ap-south-1.amazonaws.com/egov-dev-assets/globalConfigs.js type=text/javascript></script> ';"

Push these changes to the DevOps repository in the desired environment.

Run Jenkins Job:

Trigger the Jenkins job manually or set it up to run automatically on every push to the repository.

Build and Deploy:

Jenkins will build the application using the Dockerfile, and then deploy it using the Helm chart to the desired environment.

For any more information check this repository:

DevOps changes-

Technology Stack:

Frontend: flutter : version: 3.10.5

Backend: java, spring boot

Was this helpful?

Repo changes-

https://github.com/egovernments/SANITATION/blob/HLM-5602-vehicle-tracking-web/frontend/vehicle-tracker/map_web_app/docker/Dockerfile
https://github.com/egovernments/DIGIT-DevOps/tree/unified-env/deploy-as-code/helm/charts/sanitation/vehicle-tracker