DIGIT BPA platform

Prerequisites:

  • General: Understanding of Instances, LoadBalancers, SecurityGroups/Firewalls, Apache, Wildfly,  DB Instance, Redis, Elastic Search.
  • Experience of Apache web server, Wildfly application server,  Infra-as-code, Terraform
  • Permission and account to the provision of the above resources.
  • On-premise/private cloud requirements
  • Cloud Interface access to the provision above infra
  • Public cloud requirements
  • AWS or Azure account

Infrastructure Design:

Infrastructure Components:

  1. Basic Requirements: Size, Memory* Size: Standard B2ms (2 vcpus, 8 GiB memory)
  2. Infrastructure type: Services, DB servers, Storage, etc, LoadBalancer, DNS
    * OS: Linux (ubuntu 16.04)
    * Storage: Standard, Storage (general purpose v1)
    * Disk: 50 GiB (Premium SSD)
    * DB: PostgreSQL 9.6 with Basic, 2 vCore(s), 10 GB
  3. Environments to set up (Development, Production, etc)
    Dev, QA, UAT and Prod

Deployment Architecture:

  • Every code commit is well reviewed and merged to master branch through Pull Requests
  • Each merge triggers a new CI Pipeline that ensures CodeQuality and CI Tests before building the artefacts.
  • Artifacts are version controlled and pushed to Artifactory like Nexus. https://repo.egovernments.org
  • After successful CI Jenkins bakes the Docker Images with the Latest Artefacts and pushed the newly baked docker image to Docker Repo.
  • Deployment Pipeline pulls the Image and pushes to the corresponding Env.

      Deployment Scripts: https://github.com/egovernments/egovdevops/tree/master/ear-deployer

Deployment Configurations:

  • Structure of git repo
  • Deployment git repo - Environment Configuration (Dev.yml, QA.yml, etc...)
    An example configuration can be found at ear-deployer

Git Strategy:

Public & Private repo (platform & implementation) -

Public Repositories: All the eGov Platform related projects were kept open, and it's under open source.

DIGIT BPA: https://github.com/egovernments/digit-bpa.git

Folder Structure:

Private Repositories: Usually our Implementation/Customer specific Projects goes under the private repo. 

With some exceptions, eGov Platform projects were made private like our DIGIT-BPA-DCR.

DIGIT DCR: https://github.com/egovernments/digit-dcr.git

Folder Structure:




Creating an ERP cluster:

  1. Spinning up VM on cloud provider/on-premise
  2. Apache Web Server (Configuring Apache2 as a web server and Load Balancer)
  3. Wildfly Application server
  4. Elastic Search
  5. DB setup
  6. Redis (cache/token/session server) and NFS system (Filestore)

Step by Step cluster creation : /wiki/spaces/~967846572/pages/8421495

Platform Build and it’s stages:

  • Checking out the code from GitHub
  • All the necessary packages, and dependencies where pushed/published in the package manager repository (Nexus). This contributes in the continuous integration.
  • The maven Build process (includes the JUnit tests) - Here maven helps to build EAR(Enterprise Application aRchive) file.
  • An artifact is an assembly of any project assets that you put together to test, deploy or distribute your software solution or its part.
    > Examples are a collection of compiled Java classes or a Java application packaged in a Java archive, a Web application as a directory structure or a Web application archive, etc.
  • Deploy the same to the respective environments:

CI Setup: Configuring Build Jobs - Jenkins, CI Job Structure, Build Flow

CD setup: Deploy a service, Continuous Delivery Pipeline, Deployment Flow.

Two ways of Deployments:

  1. Manual Deployment - Copy the EAR files on deployment folder and start the server.
  2. Hot Deployment - using WildFly management console(it always listens at 9990), and using curl upload and publish the EAR.