Step 0: Pre-requisites - make sure you have Minikube and Traefik installed
Step 1: Prepare the Application
Step 2: Prepare a Config Schema for the Module
Step 3: Prepare and push docker images
Step 4: Prepare Kubernetes Manifests to Deploy the Application Locally
Step 5: Prepare Helm Charts to Deploy the Application Locally
Step 6: Prepare helmfile - Auto-Deployer template
Step 7: Adapt Helm Charts to Add-On Mart Specifics
Step 8: Deploy the Application to the TEAM
Overview
This instruction serves as a minimal knowledge base for deploying a simple application using Kubernetes, Docker, and Helm Charts.
It covers the essential steps and requirements for successfully deploying your application on the Add-On Mart infrastructure.
In this instruction, you will find:
- Basic Docker Image Creation: Steps to build and push a Docker image to the remote registry (e.g. DockerHub).
- Preparing Kubernetes Manifests: Guidelines for creating and applying necessary Kubernetes resources such as Deployments, Services, ConfigMaps, Secrets, and Ingress Routes.
- Helm and Helmfile Usage: Instructions on how to use Helm and Helmfile to manage application configurations and deployments.
- Module Schema Preparation: Steps to prepare a module schema that conforms to Add-On Mart requirements.
Artifacts repository:
For the purpose of this tutorial we will be using this artifacts repository: https://gitlab.portaone.com:8949/read-only/tutorial-for-simple-application
Important Notes
Scope: This instruction provides a basic framework for deploying a simple application. Kubernetes, Docker, and source code possibilities offer a vast range of configurations, parameters, workflows, and checks. For more advanced configurations and in-depth understanding, please refer to the official documentation:
Compliance with Add-On Mart Requirements: It is crucial to satisfy the specific requirements of Add-On Mart as outlined in the chapters of this instruction. Failure to adhere to these requirements may result in unsuccessful deployments or improper functioning of the application.
- Remote registry: In the context of local deployment, any remote registry can be used. For simplicity, the documentation uses Dockerhub, as it is a commonly used remote registry. However, the Add-On Mart infrastructure utilizes Harbor as the remote registry for storing Docker images and Helm charts. Therefore, for deployment to the TEAM, the Harbor registry will be used.
- Vendor credentials: Please contact PortaOne staff to obtain vendor access credentials for the Test environment for Add-on Mart (TEAM) service. → New vendor registration in TEAM
Documentation variables:
Some variables were introduced in this instruction to keep consistency, flexibility of documentation and simplicity of instruction/reproducing process. Also, it helps to hide sensitive information.
- <application_name> - substitutes application name.
- <application_version> - substitutes application version. Use Semantic Versioning 2.0.0 format with a numeric identifier only (format example: 0.1.0)
Applied to the image tag, module version, schema version, Helm Charts version, helmfile version.
Obviously, you can define your own different versions for image tag and Helm Charts version (do not forget to indicate the correct image tag in Helm charts or helmfile to keep consistency).
It was decided to use the same version for all attributes to make instruction and flow as simple as possible. - <vendor_name> - vendor name that is used to access Add-On Mart resources and remote registry (Harbor).
- <personal dockerhub repository> - personal DockerHub (registry used for local development in the scope of this instruction)
To reproduce scenarios and deploy application provided in this instruction you can substitute variables:
- manually
- using IDE instruments
- using CLI built-in tools
Overview of Artifacts:
This documentation includes a set of artifacts associated with each instruction module.
Artifacts represent the data, files, and configurations that should be prepared upon completion of each module.
Artifacts are provided directly within the repository, organized by chapters corresponding to the instruction steps. You should refer to the appropriate chapter directory in the repository for the relevant artifacts.
Following the steps outlined in each module will generate specific artifacts that serve as the building blocks for the next phases of deployment or configuration. These artifacts ensure consistency, accuracy, and ease of use throughout the deployment process.
2 Comments
Oleg Kostyuchenko
Oleg Kostyuchenko
Resolved.