DIGIT Public Finance Management
PlatformDomainsAcademyDesign SystemFeedback
v1.1-alpha
v1.1-alpha
  • iFIX
  • Blue Print
  • Platform
    • Release Notes
      • mGramSeva Release Notes
        • MDMS & Configuration Updates
        • Test Cases
        • Service Build Updates
        • mGramSeva Product Release Notes
      • iFIX Core Release Notes
        • iFIX Core Build Updates
        • iFIX Core Test Cases
      • iFIX Adaptor Release Notes
        • iFIX Adaptor Build Update
        • iFIX Adaptor Test Cases
    • Features
    • Architecture
      • Principles
      • Specifications
        • Information Model
        • APIs
      • Services
        • iFix Master Data Service
        • iFix Department Entity Service
        • iFix Fiscal Event Service
        • iFix Fiscal Event Post Processor
        • iFix Client Management Service
          • Keycloak Setup
      • Technology
    • Installation
      • Infrastructure Setup
        • Quickstart/Local Setup
        • On AWS
        • On Azure
      • Deploy Services
        • Deploy from your local machine
        • CI/CD
      • API Access Key
      • Configuring Master Data
    • Source Code
  • Exemplar
    • mGramSeva
      • Functionalities
        • Login and Forgot Password
        • User Roles and Home Screen
        • Create Consumer
        • Search Consumer
        • Edit Consumer
        • View Consumer
        • Billing - Bulk Demand Generation
        • Billing - Metered Connection
        • Revenue Collection - Offline
        • Expenditure - Add Expense
        • Expenditure - Modify Expense
        • User Onboarding - Bulk Upload
        • User Onboarding/Walkthrough
        • Feedback - Post Payment
        • SMS Notifications
        • Home Page Notifications
        • Edit User Profile
        • Bill and Receipt PDF
        • Update Expense Search
        • Bulk Demand Generation for Non Metered
        • Demand/Bill Generation for Metered Connection
        • Household Register
        • Tabular Dashboard - Expense
        • Tabular Dashboard - Collection
        • Download Bills and Receipt
      • Architecture
        • Technology
      • Source Code
      • Documents
        • User Manual
        • Demo video
        • UI Mockups
        • mGramSeva UI
          • Application Permissions & Dependencies
        • Tech User Manual
          • Language Selection
          • Login
          • Update Password FTL
          • Forgot Password
          • Home
          • Edit Profile
          • Change Password
          • Generate Bill
          • Search Connection
          • Consumer Details
            • Create Consumer
            • Update Consumer
          • Expenses
            • Add Expenses
            • Search Expense Bills
            • Modify Expenses
          • Dashboard
            • Monthly Dashboard
            • Collections Dashboard
            • Expenditure Dashboard
          • Collect Payment
          • Consumer Feedback
          • Household Register
          • Bluetooth Thermal Printer Integration
          • Application Structure
        • Application Structure
        • Integration Testing
        • Integration Testing With Github Actions
        • Firebase Analytics Integration
        • Backend Services
          • mGramSeva - Water Services
          • mGramSeva - Water Service Calculator
          • mGramSeva e-Challan Service
          • mGramSeva - User Service
          • mGramSeva - Billing Service
          • mGramSeva - User OTP
          • iFix Adapter Integration Service
          • mGramSeva - Rollout Dashboard
          • mGramSeva Scheduler
          • mGramSeva- Services Re-Indexing
          • mGramSeva Dashboard
    • iFIX Adapter
      • iFix Adapter Services v1.0
      • Source Code
      • Installation
        • Local Setup
        • CI/CD
    • iFIX Dashboard
      • Features
      • Architecture
        • Technology
      • Source Code
      • Installation
        • Local Setup
        • CI/CD
      • Documents
        • iFIX Core Data Cleanup
        • Master Data Setup
        • Fiscal Event Aggregator
  • Ecosystem
    • News and Events
  • Community
    • Roadmap
    • Discussions
    • 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
  • 1. Infra Setup
  • H/W or VM Size
  • Tools
  • Infra (Kubernetes Cluster) Creation
  • 2. mGramSeva Setup
  • Prerequisites
  • Deployment

Was this helpful?

  1. Platform
  2. Installation
  3. Infrastructure Setup

Quickstart/Local Setup

mGramSeva Quickstart, this is not for a production

PreviousInfrastructure SetupNextOn AWS

Last updated 3 years ago

Was this helpful?

Quickstart Installation helps you jump start with the mGramSeva basic installation steps with the limited functionalities.‌

mGramSeva is a distributed microservice-based platform that comprises many services which are containerized, depending upon the required features we can run only those services on any container supported orchestration platform like docker compose, Kubernetes, etc.‌

Here in this Quickstart guide we'll install basic services to get the platform up, before we setup mGramSeva, we'll create a lightweight Kubernetes cluster called on a local machine with specified H/W requirement. The H/W requirements are listed below to ensure before we proceed further.‌

1. Infra Setup

To provision a lightweight Kubernetes cluster, please follow the instructions below in context to your OS and install the k3d on your machine.‌

H/W or VM Size

  • min 4 vCPUs (recommended 8)

  • min 8GiB of RAM (recommended 16)

  • min 30GiB of HDD (recommended 30+)

Tools

  • Linux distribution running in a VM or bare metal

    • Ubuntu 18.04 or Debian 10 (VM or bare metal)

    • Install ​

    • ​ on Linux

    • Open terminal and Install k3d on Linux using the below command

    wget -q -O - https://raw.githubusercontent.com/rancher/k3d/main/install.sh | bash
  • OSX or Mac

    • ​ local Kubernetes cluster enabled

    • ​ on Mac

    • Install k3d on Mac, on terminal use (Homebrew is available for MacOS) using the below command

    brew install k3d
  • Windows 10 or above

    • ​ need to be installed

    • ​ on Windows

    • ​ package manager for windows

    • Install as an alternative command prompt that allows most of the Linux commands on windows.

    • Now open gitbash and Install k3d on Windows using the below command

    choco install k3d

Infra (Kubernetes Cluster) Creation

Once the above prerequisites are met, run the following tasks depending upon your OS.‌

  • **login/ssh into the machine, go to terminal/command prompt and run the following commands as an admin user.

  • Create /Kube directory and change permission. To use this directory for persistent data mount. This means all the container logs, data will be stored here.

 mkdir /kube
 chmod 777 /kube

 #if you are unable to create the /kube folder in the root
 # you can create it your user directory and provide the absolue path below

‌

  • Create a cluster with a single master node and 2 agents (Worker Nodes) and mount the pre-created directory (for data persistence).

k3d cluster create --k3s-server-arg "--no-deploy=traefik" --agents 2 -v "/kube:/kube@agent[0,1]" -v "/kube:/kube@server[0]" --port "80:80@loadbalancer"

‌

  • When cluster creation is successful, Get the kubeconfig file, which will allow you to connect the to the cluster at any time.

k3d kubeconfig get k3s-default > k3dconfig
kubectl config use-context k3d-k3s-default --kubeconfig=k3dconfig
  • Verify the Cluster creation by running the following commands from your local machine where the kubectl is installed. It gives you the sample output as below

root@ip:/# kubectl cluster-info

OutPut:
Kubernetes control plane is running at https://0.0.0.0:33931
CoreDNS is running at https://0.0.0.0:33931/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
Metrics-server is running at https://0.0.0.0:33931/api/v1/namespaces/kube-system/services/https:metrics-server:/proxy



root@ip:/# k3d cluster list
NAME          SERVERS   AGENTS   LOADBALANCER
k3s-default   1/1       2/2      true

‌

  • You can verify the workers' nodes created by using the following command.

kubectl get nodes

Output:
NAME                       STATUS   ROLES                  AGE     VERSION
k3d-k3s-default-agent-0    Ready    <none>                 3d18h   v1.21.1+k3s1
k3d-k3s-default-agent-1    Ready    <none>                 3d18h   v1.21.1+k3s1
k3d-k3s-default-server-0   Ready    control-plane,master   3d18h   v1.21.1+k3s1


kubectl top nodes

Output:
W0625 07:56:24.588781   12810 top_node.go:119] Using json format to get metrics. Next release will switch to protocol-buffers, switch early by passing --use-protocol-buffers flag
NAME                       CPU(cores)   CPU%   MEMORY(bytes)   MEMORY%   
k3d-k3s-default-agent-0    547m         6%     1505Mi          9%        
k3d-k3s-default-agent-1    40m          0%     2175Mi          13%       
k3d-k3s-default-server-0   59m          0%     2286Mi          14%

‌

If the above steps are completed successfully, your Cluster is now up and running ready to proceed with the DIGIT Deployment.‌

2. mGramSeva Setup

‌

Now that we have the Infra setup to proceed with the DIGIT Deployment. Following are the tools that need to be installed on the machine before proceeding with the DIGIT Services deployment.‌

What we'll deploy in Quickstart:‌

  • mGramSeva core platform services

Prerequisites

root@ip:/# git clone -b quickstart https://github.com/misdwss/iFix-DevOps

‌

  1. After cloning the repo CD into the folder iFix-DevOps and type the "code ." command that will open the visual editor and opens all the files from the repo iFix-DevOps

root@ip:/# cd iFix-DevOps
root@ip:DIGIT-DevOps# code .

‌

https://github.com/misdwss/iFix-DevOps/blob/quickstart/deploy-as-code/helm/environments/quickstart-config.yaml

‌

127.0.0.1 quickstart.local.digit

‌

Deployment

‌

Once all the prerequisites set up is complete, go to the following repo, run the command and follow the instructions.

root@ip:# cd iFix-DevOps/deploy-as-code/egov-deployer

root@ip:# go run mgramseva_setup.go

#Be prepared for the following questions
1. Do you have the Kubernetes Setup?
2. Provide the path of the intented env kubeconfig file
3. Which version of the DIGIT that you want to install - Choose "Quickstart"
4. What mGremSeva Modules that you choose to install
5. All, done, Now do you want to preview the deployment manifests 
6. Are you good to proceed with the DIGIT Installation

All Done.

‌

You can now test the Digit application status in command prompt/terminal by using the below command.

curl -Is http://quickstart.local.digit/employee/login |  head -n 1HTTP/2 200

mGramSeva uses (required v1.13.3) automated scripts to deploy the builds on to Kubernetes - or or ​

All mGramSeva services are packaged using helm charts​

​ is a CLI to connect to the kubernetes cluster from your machine

Install for making api calls

​ IDE Code for better code/configuration editing capabilities

All the mGramSeva services deployment configurations are in which you would need to and then it to your local.

​ to run some digit bootstrap scripts

Have look at the file that needs to be configured as per any specific values according to your needs. (For a quick start you can run as it is)

Add the following entries in your host file /etc/hosts depending on your OS, instructions can be found .

k3d
Docker
Install kubectl
Docker Desktop
Install kubectl
Homebrew
Docker Desktop for windows
Install kubectl
Install Chocolatey
GitBash
golang
Linux
Windows
Mac
kubectl
CURL
Install Visualstudio
GitRepo
install git
git clone
Install Postman
sample deployment config
here
Installing Helm