Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

VirtoCommerce/vc-deploy-apps

Repository files navigation

Kubernetes Deployments

Overview

There are 3 branches:

  • master - used for development
  • qa - used by QA team to test specific releases
  • demo - where demo environments are setup

How to deploy into development environment

To deploy a new Virto Commerce based application for development, do the following steps in the master branch:

  1. Create a new folder called "{name}-app" in "master" branch (master is our dev environment).
  2. Add kustomization.yaml that contains the following (replace "{name}" with an app name used at step 1) under "overlays/dev" folder.
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: dev
bases:
- ../../../common-base
namePrefix: {name}-
commonLabels:
  instance: {name}
  1. Add new file under "apps-config/base" called "{name}-app.yaml" (replace "{name}" with an app name used at step 1).
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: {name}-app
  namespace: argocd
  finalizers:
    - resources-finalizer.argocd.argoproj.io  
spec:
  destination:
    namespace: dev
    server: https://kubernetes.default.svc
  project: tenant
  source:
    path: {name}-app
    repoURL: https://github.com/virtocommerce/vc-deploy-apps
    targetRevision: HEAD
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
  1. Open apps-config/base/kustomization.yaml and add new line under "resources:".
resources:
- base/{name}-app.yaml
  1. Checkin and go to https://argo.govirto.com/. You should see a new application created.

image

  1. Connecting to the database. Since database is created automatically in the configured pool if one doesn't exist, you can connect to it through SQL Manager by specifying "vc-dev-dbserver.database.windows.net" as a server name, "Active Directory - Universal with MFA support" as authentication and Virto username, which simply should be your email address.

image

Description of the main files

deployment-cm.yaml - file is intended for declaring the installed content, for example: modules, assetts, and themes

platform-cm.yaml - contains the environment variables of the platform

storefront-cm.yaml - contains the environment variables of the storefront