Git Product home page Git Product logo

argo-app-ilender's Introduction

Deploy iLender app with GitOps using ArgoCD

This document explains GitOps way of deploying iLender application in Dev, Stage and Prod clusters using ArgoCD.

  • ArgoCD is installed and available in an Openshift Cluster.
  • iLender app is going to be deployed in in-cluster, the Openshift Cluster where ArgoCD is installed.
  • The namespaces ilender-dev-ns, ilender-stage-ns and ilender-prod-ns are considered as Dev, Stage and Prod in-clusters .

The article is based on the the following

  • RedHat OpenShift 4.6 on IBM Cloud (ROKS)

1. Install ArgoCD

Install OpenShift GitOps (which installs Argo CD) using the url https://github.com/redhat-developer/openshift-gitops-getting-started

The ArgoCD is installed and available in openshift-gitops namespace.

2. Yamls

2.1 iLender application

iLender application yaml files for Dev, Stage and Prod are available here.

Dev

Stage

Prod

2.2 ArgoCD application

We need to create an entry (application) in ArgoCD, to point to iLender application. For each Dev, Stage and Prod in-cluster of iLender, we need to have separate entry (application) in ArgoCD. Here the yamls to create app in ArgoCD.

ilender-dev ilender-stage ilender-prod

The ArgoCD appplication looks like the below.

2.3 ServiceAccount for ArgoCD

ArgoCD requires cluster admin rights to access other namespaces to install ilender app. Here is the yaml file for service account.

ilender-dev

Service account is created inside openshift-gitops namespace as we have ArgoCD installed there.

3. Create ServiceAccount in ArgoCD

Run the below command

oc apply -f argo-setup-misc/sa.yaml

4. Create ArgoCD application

4.1. Create ArgoCD application for Dev

Run the below command

oc apply -f argo-app/ilender-dev.yaml

You might be able to see the app like this in ArgoCD.

4.2. Create ArgoCD application for Stage

Run the below command

oc apply -f argo-app/ilender-stage.yaml

You might be able to see the app like this in ArgoCD.

4.3. Create ArgoCD application for Prod

Run the below command

oc apply -f argo-app/ilender-prod.yaml

You might be able to see the app like this in ArgoCD.

5. Deploy iLender

5.1 Deploy iLender in Dev

  1. Click on sync option to install iLender app in Dev in-cluster for the first time.

You might be able to see the app like this in ArgoCD.

  1. Run the below command to get url of the app
oc get routes -n ilender-dev-ns | grep frontweb | awk '{print $2}'

The output would be like this.

ilender-frontweb-ilender-dev-ns.aiops-dev-july-4caea77.us-south.containers.appdomain.cloud
  1. Open the url in the browser and access the application.

5.2 Deploy iLender in Stage

  1. Click on sync option to install iLender app in Stage in-cluster for the first time.

You might be able to see the app like this in ArgoCD.

  1. Run the below command to get url of the app
oc get routes -n ilender-stage-ns | grep frontweb | awk '{print $2}'
  1. Open the url in the browser and access the application.

5.3. Deploy iLender in Prod

  1. Click on sync option to install iLender app in Prod in-cluster for the first time.

  2. Run the below command to get url of the app

oc get routes -n ilender-prod-ns | grep frontweb | awk '{print $2}'
  1. Open the url in the browser and access the application.

6. Deploy iLender based on changes in yaml

6.1 Increasing the Replica in Stage cluster

Want to increase the replica to 2 for ilender-loan microservice. The ArgoCD will deploy the changes in Stage in-cluster if we sync it.

Sync option was set to manual, while we create argo-app for dev, stage and prod. So auto sync option to be enabled.

Here is the ilender-loan with 1 replica.

  1. Update the below yaml for the replica.

  1. Commit the changes.

  1. To enable the auto-sync, click on the APP DETAILS.

  1. Click on the ENABLE AUTO-SYNC.

The changes are synched and 2 instances of ilender-loan is deployed.

6.2 Increasing the Replica in Prod cluster

Want to increase the replica to 3 for ilender-loan microservice in Prod cluster. The ArgoCD will deploy the changes in Prod in-cluster during the sync.

  1. Update the below yaml for the replica.

  1. Commit the changes.

  1. To enable the auto-sync, click on the APP DETAILS.

  2. Click on the ENABLE AUTO-SYNC.

The changes are synched and 3 instances of ilender-loan is deployed.

argo-app-ilender's People

Contributors

gandhicloudlab avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.