Skip to content

na-launch/eshop-dotnet-pipeline-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eShop .NET OpenShift Migration and Pipeline Demo

This demo is based on Red Hat OpenShift and uses the eShop Reference Application from the upstream .NET community as an application base.

Purpose of this Demo

The migration and pipeline demo performs the following:

  1. Containerize the application so that it can be migrated to OpenShift. Required changes can be found in the container-base branch.
  2. Build the eShop application, tag the resulting image as dev and promote the tag to qa with OpenShift Pipelines.
  3. Deploy both the Development and QA versions of the application with OpenShift GitOps.
  4. Detect image updates for dev and qa tags with ArgoCD Image Updater.
  5. Based on a source code push, Pipelines as Code will automatically run the respective pipelines from step 2 and report the status.

Setup

This demo assumes the following have been set up:

  • Red Hat OpenShift (tested on 4.19)
  • Code repository hosted on GitHub
  • Image repository hosted on Quay.io

For the community version of ArgoCD Image Updater, we deployed into the openshift-gitops namespace:

oc apply -n openshift-gitops -f https://raw.githubusercontent.com/argoproj-labs/argocd-image-updater/v0.16.0/manifests/install.yaml

Fork this repository to your own GitHub repository which will be used for the application code base.

The Pipeline

Build and Promote

For this demo, we configured authentication to the repositories with a GitHub personal access token and Quay.io robot account. Replace the contents of github-secret.yaml and quay-secret.yaml with your own (the secrets in this repository are just dummy values).

In the build and promote pipelines, replace the value of the IMAGE parameter with your own image. Also in the base deployment, replace the value of the container image to be used with your own. Then deploy the pipelines, which can be run manually:

oc apply -k manifests/build

Pipelines as Code is an enhancement from manual pipeline runs by automating pipeline runs based on source code push. To set this up, configure a GitHub app for Pipelines as Code. In the eshop-dev-repository.yaml definition, update the URL with your own Git fork then apply:

oc apply -k manifests/pipelinesascode

Deploy

The following applications manage the Development and QA versions:

Replace the image in argocd-image-updater.argoproj.io/image-list with your own, then deploy the ArgoCD applications:

oc apply -k manifests/application

Image Updater detects updates to the image digest for the dev and qa tags and deploys the latest image via ArgoCD.

oc apply -k manifests/imageupdater

About

eShop .NET OpenShift Migration and Pipeline Demo

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 84.0%
  • HTML 7.7%
  • CSS 7.1%
  • TypeScript 0.6%
  • PowerShell 0.4%
  • Dockerfile 0.1%
  • JavaScript 0.1%