This instruction offers a comprehensive guide on deploying an Amazon Elastic Kubernetes Service (EKS) cluster, ensuring a scalable and secure Kubernetes environment on AWS. For those looking to optimize their EKS cluster configurations, it is highly recommended to consult the AWS EKS Best Practices guide. This resource covers a wide range of topics crucial for the successful deployment and operation of your EKS clusters, including:
Security: Best practices for securing your EKS clusters, including IAM roles, network policies, and secrets management.
Networking: Guidance on setting up VPCs, subnets, and load balancers to ensure efficient and secure network traffic.
Monitoring and Logging: Strategies for implementing comprehensive monitoring and logging solutions using AWS CloudWatch and other tools to maintain visibility into cluster performance and operational health.
Performance: Tips for optimizing cluster performance through the proper selection of EC2 instances, efficient load balancing, and autoscaling configurations.
Cost Optimization: Techniques for managing and reducing costs associated with running EKS clusters, including instance selection and resource allocation strategies.
By adhering to these best practices, developers and system administrators can ensure that their AWS EKS clusters are robust, secure, and cost-effective, facilitating a smooth and efficient CI/CD pipeline for software development.
Our approach to deploying the AWS EKS Cluster is based on the widely-used terraform-aws-eks module from the Terraform AWS Modules community. This module facilitates the creation of AWS Elastic Kubernetes Service (EKS) resources with best practices in mind. We encourage users to review the module's documentation to fully understand its capabilities and how it aligns with the requirements of your specific deployment scenario.
Before the EKS cluster deployment and configuration, make sure to check the prerequisites. Install the required tools listed below:
This instruction offers a comprehensive guide on deploying an Amazon Elastic Kubernetes Service (EKS) cluster, ensuring a scalable and secure Kubernetes environment on AWS. For those looking to optimize their EKS cluster configurations, it is highly recommended to consult the AWS EKS Best Practices guide. This resource covers a wide range of topics crucial for the successful deployment and operation of your EKS clusters, including:
Security: Best practices for securing your EKS clusters, including IAM roles, network policies, and secrets management.
Networking: Guidance on setting up VPCs, subnets, and load balancers to ensure efficient and secure network traffic.
Monitoring and Logging: Strategies for implementing comprehensive monitoring and logging solutions using AWS CloudWatch and other tools to maintain visibility into cluster performance and operational health.
Performance: Tips for optimizing cluster performance through the proper selection of EC2 instances, efficient load balancing, and autoscaling configurations.
Cost Optimization: Techniques for managing and reducing costs associated with running EKS clusters, including instance selection and resource allocation strategies.
By adhering to these best practices, developers and system administrators can ensure that their AWS EKS clusters are robust, secure, and cost-effective, facilitating a smooth and efficient CI/CD pipeline for software development.
Our approach to deploying the AWS EKS Cluster is based on the widely-used terraform-aws-eks module from the Terraform AWS Modules community. This module facilitates the creation of AWS Elastic Kubernetes Service (EKS) resources with best practices in mind. We encourage users to review the module's documentation to fully understand its capabilities and how it aligns with the requirements of your specific deployment scenario.
Before the EKS cluster deployment and configuration, make sure to check the prerequisites. Install the required tools listed below:
This step covers the EKSDeployerRole AWS IAM role creation. To create the role, take the following steps:
Navigate to the IAM module directory:
cd../iam
-
Setup backend for store Terraform states remotely and support state locking and consistency checking via DynamoDB. Insert the missing fields in the iam/providers.tf file:
iam/providers.tf
...
+
Set up the backend for store Terraform states remotely and support state locking and consistency checking via DynamoDB. Insert the missing fields in the iam/providers.tf file:
Create the AWS VPC Subnets for instances and AWS ALB
Create the AWS VPC Routing
To accomplish the tasks outlined above, follow these steps:
Navigate to the VPC module directory:
cd../vpc
-
Setup backend for store Terraform states remotely and support state locking and consistency checking via DynamoDB. Insert the missing fields in the file vpc/providers.tf:
Create the AWS VPC Subnets for instances and AWS ALB
Create the AWS VPC Routing
To accomplish the tasks outlined above, follow these steps:
Navigate to the VPC module directory:
cd../vpc
+
Set up the backend for store Terraform states remotely and support state locking and consistency checking via DynamoDB. Insert the missing fields in the file vpc/providers.tf:
(Optional) Create the AWS IAM role Kaniko to use AWS ECR
To accomplish the tasks outlined above, follow these steps:
Navigate to the EKS module directory:
cd../eks
-
Setup backend for store Terraform states remotely and support state locking and consistency checking via DynamoDB. Insert the missing fields in the file eks/providers.tf:
(Optional) Create the AWS IAM role Kaniko to use AWS ECR
To accomplish the tasks outlined above, follow these steps:
Navigate to the EKS module directory:
cd../eks
+
Set up the backend for store Terraform states remotely and support state locking and consistency checking via DynamoDB. Insert the missing fields in the eks/providers.tf file:
Once AWS EKS Cluster is successfully deployed, you can navigate to our EDP addons to install and manage cluster applications using the GitOps approach.
Once AWS EKS Cluster is successfully deployed, you can navigate to our EDP addons to install and manage cluster applications using the GitOps approach.
This section covers configuring Argo CD for further integrating with an external EKS cluster. This integration necessitates creating two AWS IAM roles:
AWSIRSA_Test_ArgoCDMaster AWS IAM role - for setting up IRSA annotations for the Argo CD application;
EDPArgoCDClusterAdmin AWS IAM role - for working with external EKS clusters and further adding them (please refer to the Add Cluster page for details).
This step covers the AWSIRSA_Test_ArgoCDMaster AWS IAM role creation procedure. To create the role, take the following steps:
Navigate to the Argo CD module directory:
cd../argo-cd
+
Set up the backend for store Terraform states remotely and support state locking and consistency checking via DynamoDB. Insert the missing fields in the argo-cd/providers.tf file:
Fill in the input variables for Terraform run in the argo-cd/template.tfvars file. Refer to the argo-cd/example.tfvars as an example. Please find the detailed description of the variables in the argo-cd/variables.tf file:
Once AWSIRSA_Test_ArgoCDMaster AWS IAM Role is successfully created, you can navigate to our EDP addons to set up IRSA annotations for the Argo CD application:
This step covers the EDPArgoCDClusterAdmin AWS IAM role creation procedure. To create the role, take the following steps:
Navigate to the Argo CD module directory:
cd../argo-cd
+
Set up the backend for store Terraform states remotely and support state locking and consistency checking via DynamoDB. Insert the missing fields in the argo-cd/providers.tf file:
Fill in the input variables for Terraform run in the argo-cd/template.tfvars file. Refer to the argo-cd/example.tfvars as an example. Please find the detailed description of the variables in the argo-cd/variables.tf file:
\ No newline at end of file
diff --git a/search/search_index.json b/search/search_index.json
index 13bfafa2a..29757a438 100644
--- a/search/search_index.json
+++ b/search/search_index.json
@@ -1 +1 @@
-{"config":{"lang":["en"],"separator":"[\\s\\u200b\\-_,:!=\\[\\]()\"`/]+|\\.(?!\\d)|&[lg]t;|(?!\\b)(?=[A-Z][a-z])","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Home","text":""},{"location":"#welcome-to-the-epam-delivery-platform","title":"Welcome to the EPAM Delivery Platform","text":""},{"location":"compliance/","title":"Compliance","text":""},{"location":"compliance/#compliance","title":"Compliance","text":"
The integrity of your deployments is our paramount commitment. We are devoted to strengthening our Kubernetes platform to comply with the most stringent security standards. Trust is the bedrock of our relationships, and we manifest this commitment by undergoing rigorous third-party audits to ensure compliance. We pledge unwavering support as you manage and deploy solutions within your environment, emphasizing security and reliability. Examine our compliance with various frameworks, laws, and regulations to understand our dedication to upholding robust security standards for the solutions you manage and deploy.
"},{"location":"faq/","title":"FAQ","text":""},{"location":"faq/#faq","title":"FAQ","text":""},{"location":"faq/#how-do-i-set-parallel-reconciliation-for-a-number-of-codebase-branches","title":"How Do I Set Parallel Reconciliation for a Number of Codebase Branches?","text":"
Set the CODEBASE_BRANCH_MAX_CONCURRENT_RECONCILES Env variable in codebase-operator by updating Deployment template. For example:
"},{"location":"faq/#how-to-change-the-lifespan-of-an-access-token-that-is-used-for-edp-portal-and-oidc-login-plugin","title":"How To Change the Lifespan of an Access Token That Is Used for EDP Portal and 'oidc-login' Plugin?","text":"
Change the Access Token Lifespan: go to your Keycloak and select Openshift realm > Realm settings > Tokens > Access Token Lifespan > set a new value to the field and save this change.
By default, \"Access Token Lifespan\" value is 5 minutes.
Consult EDP Glossary section for definitions mentioned on this page and EDP Toolset to have a full list of tools used with the Platform. The below table contains a full list of features provided by EDP.
Features Description Cloud Agnostic EDP runs on Kubernetes cluster, so any Public Cloud Provider which provides Kubernetes can be used. Kubernetes clusters deployed on-premises work as well CI/CD for Microservices EDP is initially designed to support CI/CD for Microservices running as containerized applications inside Kubernetes Cluster. EDP also supports CI for:- Terraform Modules, - Open Policy Rules,- Workflows for Java (8,11,17), JavaScript (React, Vue, Angular, Express, Antora), C# (.NET 6.0), Python (FastAPI, Flask, 3.8), Go (Beego, Operator SDK) Version Control System (VCS) EDP installs Gerrit as a default Source Code Management (SCM) tool. EDP also supports GitHub and GitLab integration Branching Strategy EDP supports Trunk-based development as well as GitHub/GitLab flow. EDP creates two Pipelines per each codebase branch: Code Review and Build Repository Structure EDP provides separate Git repository per each Codebase and doesn't work with Monorepo. However, EDP does support customization and runs helm-lint, dockerfile-lint steps using Monorepo approach. Artifacts Versioning EDP supports two approaches for Artifacts versioning: - default (BRANCH-[TECH_STACK_VERSION]-BUILD_ID)- EDP (MAJOR.MINOR.PATCH-BUILD_ID), which is SemVer.Custom versioning can be created by implementing get-version stage Application Library EDP provides baseline codebase templates for Microservices, Libraries, within create strategy while onboarding new Codebase Stages Library Each EDP Pipeline consists of pre-defined steps (stages). CI Pipelines EDP provides CI Pipelines for first-class citizens: - Applications (Microservices) based on Java (8,11,17), JavaScript (React, Vue, Angular, Express, Antora, Next.js), C# (.NET 3.1, .NET 6.0), Python (FastAPI, Flask, 3.8), Go (Beego, Gin, Operator SDK), Helm (Charts, Pipeline)- Libraries based on Java (8,11,17), JavaScript (React, Vue, Angular, Express), Python (FastAPI, Flask, 3.8), Groovy Pipeline (Codenarc), HCL (Terraform), Rego (OPA), Container (Docker), Helm (Charts, Pipeline), C#(.NET 3.1, .NET 6.0) - Autotests based on Java8, Java11, Java17 CD Pipelines EDP provides capabilities to design CD Pipelines (in EDP Portal UI) for Microservices and defines logic for artifacts flow (promotion) from env to env. Artifacts promotion is performed automatically (Autotests), manually (User Approval) or combining both approaches Autotests EDP provides CI pipeline for autotest implemented in Java. Autotests can be used as Quality Gates in CD Pipelines Custom Pipeline Library EDP can be extended by introducing Custom Pipeline Library Dynamic Environments Each EDP CD Pipeline creates/destroys environment upon user requests"},{"location":"glossary/","title":"Glossary","text":""},{"location":"glossary/#glossary","title":"Glossary","text":"
Get familiar with the definitions and context for the most useful EDP terms presented in table below.
Terms Details EDP Component - an item used in CI/CD process EDP Portal UI - an EDP component that helps to manage, set up, and control the business entities. Artifactory - an EDP component that stores all the binary artifacts. NOTE: Nexus is used as a possible implementation of a repository. CI/CD Server - an EDP component that launches pipelines that perform the build, QA, and deployment code logic. NOTE: Tekton is used as a possible implementation of a CI/CD server. Code Review tool - an EDP component that collaborates with the changes in the codebase. NOTE: Gerrit is used as a possible implementation of a code review tool. Identity Server - an authentication server providing a common way to verify requests to all of the applications. NOTE: Keycloak is used as a possible implementation of an identity server. Security Realm Tenant - a realm in identity server (e.g Keycloak) where all users' accounts and their access permissions are managed. The realm is unique for the identity server instance. Static Code Analyzer - an EDP component that inspects continuously a code quality before the necessary changes appear in a master branch. NOTE: SonarQube is used as a possible implementation of a static code analyzer. VCS (Version Control System) - a replication of the Gerrit repository that displays all the changes made by developers. NOTE: GitHub and GitLab are used as the possible implementation of a repository with the version control system. EDP Business Entity - a part of the CI/CD process (the integration, delivery, and deployment of any codebase changes) Application - a codebase type that is built as the binary artifact and deployable unit with the code that is stored in VCS. As a result, the application becomes a container and can be deployed in an environment. Autotests - a codebase type that inspects a product (e.g. an application set) on a stage. Autotests are not deployed to any container and launched from the respective code stage. CD Pipeline (Continuous Delivery Pipeline) - an EDP business entity that describes the whole delivery process of the selected application set via the respective stages. The main idea of the CD pipeline is to promote the application version between the stages by applying the sequential verification (i.e. the second stage will be available if the verification on the first stage is successfully completed). NOTE: The CD pipeline can include the essential set of applications with its specific stages as well. CD Pipeline Stage - an EDP business entity that is presented as the logical gate required for the application set inspection. Every stage has one OpenShift project where the selected application set is deployed. All stages are sequential and promote applications one-by-one. Codebase - an EDP business entity that possesses a code. Codebase Branch - an EDP business entity that represents a specific version in a Git branch. Every codebase branch has a Codebase Docker Stream entity. Codebase Docker Stream - a deployable component that leads to the application build and displays that the last build was verified on the specific stage. Every CD pipeline stage accepts a set of Codebase Docker Streams (CDS) that are input and output. SAMPLE: if an application1 has a master branch, the input CDS will be named as [app name]-[pipeline name]-[stage name]-[master] and the output after the passing of the DEV stage will be as follows: [app name]-[pipeline name]-[stage name]-[dev]-[verified]. Git Server - a custom resource that is responsible for integration with Version Control System (VCS), whether it is GitHub, GitLab or Gerrit. Infrastructure - a codebase type that is used to define and manage the underlying infrastructure of projects using the Infrastructure as Code (IaC) approach, ensuring consistency and reproducibility. Library - a codebase type that is built as the binary artifact, i.e. it`s stored in the Artifactory and can be uploaded by other applications, autotests or libraries. Quality Gate - an EDP business entity that represents the minimum acceptable results after the testing. Every stage has a quality gate that should be passed to promote the application. The stage quality gate can be a manual approve from a QA specialist OR a successful autotest launch. Quality Gate Type - this value defines trigger type that promotes artifacts (images) to the next environment in CD Pipeline. There are manual and automatic types of quality gates. The manual type means that the promoting process should be confirmed in Tekton. The automatic type promotes the images automatically in case there are no errors in the Allure Report. NOTE: If any of the test types is not passed, the CD pipeline will fail. Trigger Type - a value that defines a trigger type used for the CD pipeline triggering. There are manual and automatic types of triggering. The manual type means that the CD pipeline should be triggered manually. The automatic type triggers the CD pipeline automatically as soon as the Codebase Docker Stream was changed. Automated Tests - different types of automated tests that can be run on the environment for a specific stage. Build Pipeline - a Tekton pipeline that builds a corresponding codebase branch in the Codebase. Build Stage - a stage that takes place after the code has been submitted/merged to the repository of the main branch (the pull request from the feature branch is merged to the main one, the Patch set is submitted in Gerrit). Code Review Pipeline - a Tekton pipeline that inspects the code candidate in the Code Review tool. Code Review Stage - a stage where code is reviewed before it goes to the main branch repository of the version control system (the commit to the feature branch is pushed, the Patch set is created in Gerrit). Deploy Pipeline - a Tekton pipeline that is responsible for the CD Pipeline Stage deployment with the full set of applications and autotests. Deployment Stage - a part of the Continuous Delivery where artifacts are being deployed to environments. EDP CI Pipelines - an orchestrator for stages that is responsible for the common technical events, e.g. initialization, in Tekton pipeline. Environment - a part of the stage where the built and packed into an image application are deployed for further testing. It`s possible to deploy several applications to several environments (Team and Integration environments) within one stage. Team Environment - an environment type that can be deployed at any time by the manual trigger of the Deploy pipeline where team or developers can check out their applications. NOTE: The promotion from such kind of environment is prohibited and developed only for the local testing. OpenShift / Kubernetes (K8S) ConfigMap - a resource that stores configuration data and processes the strings that do not contain sensitive information. Docker Container - is a lightweight, standalone, and executable package. Docker Registry - a store for the Docker Container that is created for the application after the Build pipeline performance. OpenShift Web Console - a web console that enables to view, manage, and change OpenShift / K8S resources using browser. Operator Framework - a deployable unit in OpenShift that is responsible for one or a set of resources and performs its life circle (adding, displaying, and provisioning). Path - a route component that helps to find a specified path (e.g. /api) at once and skip the other. Pod - the smallest deployable unit of the large microservice application that is responsible for the application launch. The pod is presented as the one launched Docker container. When the Docker container is collected, it will be kept in Docker Registry and then saved as Pod in the OpenShift project. NOTE: The Deployment Config is responsible for the Pod push, restart, and stop processes. PV (Persistent Volume) - a cluster resource that captures the details of the storage implementation and has an independent lifecycle of any individual pod. PVC (Persistent Volume Claim) - a user request for storage that can request specific size and access mode. PV resources are consumed by PVCs. Route - a resource in OpenShift that allows getting the external access to the pushed application. Secret - an object that stores and manages all the sensitive information (e.g. passwords, tokens, and SSH keys). Service - an external connection point with Pod that is responsible for the network. A specific Service is connected to a specific Pod using labels and redirects all the requests to Pod as well. Site - a route component (link name) that is created from the indicated application name and applies automatically the project name and a wildcard DNS record."},{"location":"overview/","title":"Overview","text":""},{"location":"overview/#overview","title":"Overview","text":"
EPAM Delivery Platform (EDP) is an open-source cloud-agnostic SaaS/PaaS solution for software development, licensed under Apache License 2.0. It provides a pre-defined set of CI/CD patterns and tools, which allow a user to start product development quickly with established code review, release, versioning, branching, build processes. These processes include static code analysis, security checks, linters, validators, dynamic feature environments provisioning. EDP consolidates the top Open-Source CI/CD tools by running them on Kubernetes/OpenShift, which enables web/app development either in isolated (on-prem) or cloud environments.
EPAM Delivery Platform, which is also called \"The Rocket\", is a platform that allows shortening the time that is passed before an active development can be started from several months to several hours.
EDP consists of the following:
The platform based on managed infrastructure and container orchestration
Security covering authentication, authorization, and SSO for platform services
Development and testing toolset
Well-established engineering process and EPAM practices (EngX) reflected in CI/CD pipelines, and delivery analytics
EPAM Delivery Platform (EDP) is suitable for all aspects of delivery starting from development including the capability to deploy production environment. EDP architecture is represented on a diagram below.
Architecture
EDP consists of four cross-cutting concerns:
Infrastructure as a Service;
GitOps approach;
Container orchestration and centralized services;
Security.
On the top of these indicated concerns, EDP adds several blocks that include:
EDP CI/CD Components. EDP component enables a feature in CI/CD or an instance artifacts storage and distribution (Nexus or Artifactory), static code analysis (Sonar), etc.;
EDP Artifacts. This element represents an artifact that is being delivered through EDP and presented as a code.
Artifact samples: frontend, backend, mobile, applications, functional and non-functional autotests, workloads for 3rd party components that can be deployed together with applications.
EDP development and production environments that share the same logic. Environments wrap a set of artifacts with a specific version, and allow performing SDLC routines in order to be sure of the artifacts quality;
Pipelines. Pipelines cover CI/CD process, production rollout and updates. They also connect three elements indicated above via automation allowing SDLC routines to be non-human;
The EDP IaaS layer supports most popular public clouds AWS, Azure and GCP keeping the capability to be deployed on private/hybrid clouds based on OpenStack. EDP containers are based on Docker technology, orchestrated by Kubernetes compatible solutions.
There are two main options for Kubernetes provided by EDP:
Managed Kubernetes in Public Clouds to avoid installation and management of Kubernetes cluster, and get all benefits of scaling, reliability of this solution;
OpenShift that is a Platform as a Service on the top of Kubernetes from Red Hat. OpenShift is the default option for on-premise installation and it can be considered whether the solution built on the top of EDP should be cloud-agnostic or require enterprise support;
There is no limitation to run EDP on vanilla Kubernetes.
Build Community around technology solutions EDP is built on
"},{"location":"roadmap/#deliver-operators-on-operatorhub","title":"Deliver Operators on OperatorHub","text":"
OperatorHub is a defacto leading solution which consolidates Kubernetes Community around Operators. EDP follows the best practices of delivering Operators in a quick and reliable way. We want to improve Deployment and Management experience for our Customers by publishing all EDP operators on this HUB.
Another artifact aggregator which is used by EDP - ArtifactHub, that holds description for both components: stable and under-development.
OperatorHub. Keycloak Operator
EDP Keycloak Operator is now available from OperatorHub both for Upstream (Kubernetes) and OpenShift deployments.
Multiple instances of EDP are run in a single Kubernetes cluster. One way to achieve this is to use Multitenancy. Initially, Kiosk was selected as tools that provides this capability. An alternative option that EDP Team took into consideration is Capsule. Another tool which goes far beyond multitenancy is vcluster going a good candidate for e2e testing scenarios where one needs simple lightweight kubernetes cluster in CI pipelines.
EDP Release 3.5.3
The EPAM Delivery Platform (EDP) has added Capsule as a general tenant management solution for Kubernetes. Capsule is an open-source operator that enables you to create and manage multiple tenants on a shared Kubernetes cluster, while ensuring resource isolation, security, and governance.
EDP Release 3.5.3
Vcluster is actively used in EDP for e2e testing purposes.
EDP provides basic Application Templates for a number of technology stacks (Java, .Net, NPM, Python) and Helm is used as a deployment tool. The goal is to extend this library and provide: Application Templates which are built on pre-defined architecture patterns (e.g., Microservice, API Gateway, Circuit Breaker, CQRS, Event Driven) and Deployment Approaches: Canary, Blue/Green. This requires additional tools installation on cluster as well.
"},{"location":"roadmap/#policy-enforcement-for-kubernetes","title":"Policy Enforcement for Kubernetes","text":"
Running workload in Kubernetes calls for extra effort from Cluster Administrators to ensure those workloads do follow best practices or specific requirements defined on organization level. Those requirements can be formalized in policies and integrated into: CI Pipelines and Kubernetes Cluster (through Admission Controller approach) - to guarantee proper resource management during development and runtime phases. EDP uses Open Policy Agent (from version 2.8.0), since it supports compliance check for more use-cases: Kubernetes Workloads, Terraform and Java code, HTTP APIs and many others. Kyverno is another option being checked in scope of this activity.
EDP should provide secrets management as a part of platform. There are multiple tools providing secrets management capabilities. The aim is to be aligned with GitOps and Operator Pattern approaches so HashiCorp Vault, Banzaicloud Bank Vaults, Bitnami Sealed Secrets are currently used for internal projects and some of them should be made publicly available - as a part of EDP Deployment.
EDP Release 2.12.x
External Secret Operator is a recommended secret management tool for the EDP components.
Conventional Commits and Conventional Changelog are two approaches to be used as part of release process. Today EDP provides only capabilities to manage Release Branches. This activity should address this gap by formalizing and implementing Release Process as a part of EDP. Topics to be covered: Versioning, Tagging, Artifacts Promotion.
EDP has deprecated Jenkins in favour of Tekton. Jenkins is no longer available since EDP v3.4.4.
EDP Release 2.12.x
Argo CD is suggested as a solution providing the Continuous Delivery capabilities.
EDP Release 3.0
Tekton is used as a CI/CD pipelines orchestration tool on the platform. Review edp-tekton GitHub repository that keeps all the logic behind this solution on the EDP (Pipelines, Tasks, TriggerTemplates, Interceptors, etc). Get acquainted with the series of publications on our Medium Page.
EDP has a number of base roles which are used across EDP. In some cases it is necessary to provide more granular permissions for specific users. It is possible to do this using Kubernetes Native approach.
EDP has a number of components which need to report their statuses: Build/Code Review/Deploy Pipelines, changes in Environments, updates with artifacts. The goal for this activity is to onboard Kubernetes Native approach which provides Notification capabilities with different sources/channels integration (e.g. Email, Slack, MS Teams). Some of these tools are Argo Events, Botkube.
Persistent layer, which is based on edp-db (PostgreSQL) and reconciler component should be retired in favour of Kubernetes Custom Resource (CR). The latest features in EDP are implemented using CR approach.
EDP Release 3.0
Reconciler component is deprecated and is no longer supported. All the EDP components are migrated to Kubernetes Custom Resources (CR).
"},{"location":"roadmap/#iii-building-blocks","title":"III. Building Blocks","text":"
Goals:
Introduce best practices from Microservice Reference Architecture deployment and observability using Kubernetes Native Tools
Enable integration with the Centralized Test Reporting Frameworks
Onboard SAST/DAST tool as a part of CI pipelines and Non-Functional Testing activities
EDP Release 2.12.x
SAST is introduced as a mandatory part of the CI Pipelines. The list of currently supported SAST scanners.
"},{"location":"roadmap/#infrastructure-as-code","title":"Infrastructure as Code","text":"
EDP Target tool for Infrastructure as Code (IaC) is Terraform. EDP sees two CI/CD scenarios while working with IaC: Module Development and Live Environment Deployment. Today, EDP provides basic capabilities (CI Pipelines) for Terraform Module Development. At the same time, currently EDP doesn't provide Deployment pipelines for Live Environments and the feature is under development. Terragrunt is an option to use in Live Environment deployment. Another Kubernetes Native approach to provision infrastructure components is Crossplane.
One of the challenges for Application running in Kubernetes is to manage database schema. There are a number of tools which provides such capabilities, e.g. Liquibase, Flyway. Both tools provide versioning control for database schemas. There are different approaches on how to run migration scripts in Kubernetes: in init container, as separate Job or as a separate CD stage. Purpose of this activity is to provide database schema management solution in Kubernetes as a part of EDP. EDP Team investigates SchemaHero tool and use-cases which suits Kubernetes native approach for database schema migrations.
Open Policy Agent is introduced in version 2.8.0. EDP now supports CI for Rego Language, so you can develop your own policies. The next goal is to provide pipeline steps for running compliance policies check for Terraform, Java, Helm Chart as a part of CI process.
Velero is used as a cluster backup tool and is deployed as a part of Platform. Currently, Multitenancy/On-premise support for backup capabilities is in process.
Kong is one of tools which is planned to use as an API Gateway solution provider. Another possible candidate for investigation is Ambassador API Gateway
EDP Platform runs on the latest OKD versions: 4.9 and 4.10. Creating the IAM Roles for Service Account is a recommended way to work with AWS Resources from the OKD cluster.
Improve U\u0425 for different user types to address their concerns in the delivery model
Introduce user management capabilities
Enrich with traceability metrics for products
EDP Release 2.12.x
EDP Team has introduced a new UI component called EDP Headlamp, which will replace the EDP Admin Console in future releases. EDP Headlamp is based on the Kinvolk Headlamp UI Client.
EDP Release 3.0
EDP Headlamp is used as a Control Plane UI on the platform.
EDP Release 3.4
Since EDP v3.4.0, Headlamp UI has been renamed to EDP Portal.
EDP uses Keycloak as an Identity and Access provider. EDP roles/groups are managed inside the Keycloak realm, then these changes are propagated across the EDP Tools. We plan to provide this functionality in EDP Portal using the Kubernetes-native approach (Custom Resources).
The CD Pipeline section in EDP Portal provides basic information, such as environments, artifact versions deployed per each environment, and direct links to the namespaces. One option is to enrich this panel with metrics from the Prometheus, custom resources, or events. Another option is to use the existing dashboards and expose EDP metrics to them, for example, plugin for Lens or OpenShift UI Console.
"},{"location":"roadmap/#split-jira-and-commit-validation-sections","title":"Split Jira and Commit Validation Sections","text":"
Commit Validate step was designed to be aligned with Jira Integration and cannot be used as single feature. Target state is to ensure features CommitMessage Validation and Jira Integration both can be used independently. We also want to add support for Conventional Commits.
EDP Release 3.2.0
EDP Portal has separate sections for Jira Integration and CommitMessage Validation step.
"},{"location":"roadmap/#v-documentation-as-code","title":"V. Documentation as Code","text":"
Goals:
Transparent documentation and clear development guidelines for EDP customization.
Components that provide Documentation as Code feature should be integrated into EDP.
EDP Release 3.4.0
Antora was introduced as framework that provides Documentation as Code capabilities.
Consolidate documentation in a single repository edp-install, use mkdocs tool to generate docs and GitHub Pages as a hosting solution.
"},{"location":"supported-versions/","title":"Supported Versions and Compatibility","text":""},{"location":"supported-versions/#supported-versions-and-compatibility","title":"Supported Versions and Compatibility","text":"
At the EPAM Delivery Platform, our commitment to providing a robust and reliable service involves supporting the latest innovations while ensuring stability and security. To maintain this balance, we focus our active support on our platform's three most recent versions. This approach allows us to dedicate our resources to delivering cutting-edge features, enhancing performance, and fortifying security measures while ensuring a consistent and optimized user experience across the platform.
By concentrating our support on the last three versions, we prioritize staying current with evolving technology landscapes. This enables us to swiftly adapt to advancements in Kubernetes and OpenShift environments, incorporating the latest enhancements, fixes, and optimizations into our platform.
This support model not only fosters innovation but also enables us to deliver a secure, high-performing, and dependable EPAM Delivery Platform that meets the dynamic needs of our users and exceeds expectations for reliability and functionality.
Get acquainted with the list of the latest releases and component versions on which the platform is tested and verified:
Professional Services
You can leverage our professional services to upgrade your platform to the latest version or perform migration from Unsupported to Supported versions.
EDP Release Version Release Date EKS Version OpenShift Version 3.8 Mar 12, 2024 1.26 4.12 3.7 Dec 15, 2023 1.26 4.12 3.6 Nov 03, 2023 1.26 4.12 3.5 Sep 21, 2023 1.26 4.12 3.4 Aug 18, 2023 1.26 4.12 3.3 May 25, 2023 1.26 4.12 3.2 Mar 26, 2023 1.23 4.10 3.1 Jan 24, 2023 1.23 4.10 3.0 Dec 19, 2022 1.23 4.10"},{"location":"developer-guide/","title":"Overview","text":""},{"location":"developer-guide/#overview","title":"Overview","text":"
The EPAM Delivery Platform (EDP) Developer Guide serves as a comprehensive technical resource specifically designed for developers. It offers detailed insights into expanding the functionalities of EDP. This section focuses on explaining the development approach and fundamental architectural blueprints that form the basis of the platform's ecosystem.
Within these pages, you'll find architectural diagrams, component schemas, and deployment strategies essential for grasping the structural elements of EDP. These technical illustrations serve as references, providing a detailed understanding of component interactions and deployment methodologies. Understanding the architecture of EDP and integrating third-party solutions into its established framework enables the creation of efficient, scalable, and customizable solutions within the EPAM Delivery Platform.
The diagram below illustrates how GitHub repositories and Docker registries are interconnected within the EDP ecosystem.
Core componentsCore componentscodebase-operatorcodebase-operatorcd-pipeline-operatorcd-pipeline-operatorEDP Portal(edp-headlamp)EDP Portal...nexus-operatornexus-operatorsonar-operatorsonar-operatorkeycloak-operatorkeycloak-operatoredp-tektonedp-tektonedp-installedp-installClick the IconsText is not SVG - cannot display
As a publicly available product, the EPAM Delivery Platform relies on various channels to share information, gather feedback, and distribute new releases effectively. This section outlines the diverse channels through which users can engage with our platform and stay informed about the latest developments and enhancements.
Our product is presented on AWS and Civo marketplaces. It's essential to ensure that the product information on these platforms is up-to-date and accurately reflects the latest version of our software:
Our platform components, optional enhancements, add-ons, and deployment resources are hosted on GitHub repositories. Explore the following repositories to access the source code of components.
To maintain an active presence on social media channels and share valuable content about our software releases, we continuously publish materials across the following media:
SolutionsHub
Medium
YouTube
"},{"location":"developer-guide/annotations-and-labels/","title":"Annotations and Labels","text":""},{"location":"developer-guide/annotations-and-labels/#annotations-and-labels","title":"Annotations and Labels","text":"
EPAM Delivery Platform uses labels to interact with various resources in a Kubernetes cluster. This guide details the resources, annotations, and labels used by the platform to streamline operations, enhance monitoring, and enforce governance.
The table below contains all the labels used in EDP:
Label Key Target Resources Possible Values Description app.edp.epam.com/secret-type Secrets jira, nexus, sonar, defectdojo, dependency-track,repository Identifies the type of the secret. app.edp.epam.com/integration-secret Secrets true Indicates if the secret is used for integration. app.edp.epam.com/codebase PipelineRun <codebase_name> Identifies the codebase associated with the PipelineRun. app.edp.epam.com/codebasebranch PipelineRun <codebase_name>-<branch_name> Identifies the codebase branch associated with the PipelineRun. app.edp.epam.com/pipeline PipelineRun, Taskrun <environment_name> Used by the EDP Portal to display autotests status(on Deploy environment) app.edp.epam.com/pipelinetype PipelineRun, Taskrun autotestRunner, build, review, deploy Identifies the type of the Pipeline. app.edp.epam.com/parentPipelineRun PipelineRun <cd-pipeline-autotest-runner-name> Used by the EDP Portal to display autotests status(on Deploy environment) app.edp.epam.com/stage PipelineRun, Taskrun <stage_name> Used by the EDP Portal to display autotests status(on Deploy environment) app.edp.epam.com/branch PipelineRun <branch_name> Identifies the branch associated with the PipelineRun. app.edp.epam.com/codebaseType Codebase system,application Identify the type of the codebase. app.edp.epam.com/systemType Codebase gitops Identify system repositories. app.edp.epam.com/gitServer Ingress <gitServer_name> Identifies the ingress associated with the GitServer. app.edp.epam.com/cdpipeline PipelineRun, Taskrun <cdpipeline> Identify cd pipeline associated with the PipelineRun app.edp.epam.com/cdstage PipelineRun, Taskrun <cd_stage_name> Identify cd stage associated with the PipelineRun"},{"location":"developer-guide/annotations-and-labels/#labels-usage-in-secrets","title":"Labels Usage in Secrets","text":"
The table below shows what labels are used by specific secrets:
The list of all the tasks associated with the demo codebase is presented below:
Task Name Labels init-autotest app.edp.epam.com/pipeline: mypipe app.edp.epam.com/pipelinetype: autotestRunner app.edp.epam.com/stage: dev run-autotest app.edp.epam.com/branch: master app.edp.epam.com/codebase: autotests app.edp.epam.com/parentPipelineRun: mypipe-dev-<hash> app.edp.epam.com/pipeline: mypipe app.edp.epam.com/stage: dev wait-for-autotests app.edp.epam.com/pipeline: mypipe app.edp.epam.com/pipelinetype: autotestRunner app.edp.epam.com/stage: dev promote-images app.edp.epam.com/pipeline: mypipe app.edp.epam.com/pipelinetype: autotestRunner app.edp.epam.com/stage: dev"},{"location":"developer-guide/autotest-coverage/","title":"Quality Control","text":""},{"location":"developer-guide/autotest-coverage/#quality-control","title":"Quality Control","text":"
In EPAM Delivery Platform, we guarantee the quality of the product not only by using the most advanced tools and best practices but also by covering the whole product functionality with our dedicated automated tests.
Autotests are significant part of our verification flow. Continuous improvement of the verification mechanisms quality is performed to provide users with the most stable version of the platform.
The autotest coverage status is presented on the scheme below:
In our testing flow, each release is verified by the following tests:
Test Group Description What's Covered API Tests Tekton Gerrit, GitHub, and GitLab API long regression Codebase provisioning, reviewing and building pipelines, adding new branches, deploying applications (in a custom namespace), Jira integration, and rechecking for review pipeline. UI Tests Tekton Gerrit, GitHub, and GitLab UI long regression Codebase provisioning, reviewing and building pipelines, adding new branches, deploying applications (in a custom namespace), Jira integration, and rechecking for review pipeline. Short Tests Tekton Gerrit , GitHub, and GitLab API short regression Codebase provisioning, reviewing and building pipelines, deploying applications (in a custom namespace), rechecking for review pipeline Smoke Tekton Gerrit Smoke Codebase provisioning, reviewing and building pipelines, deploying applications."},{"location":"developer-guide/autotest-coverage/#related-articles","title":"Related Articles","text":"
EDP Project Rules. Working Process
Operator Development
"},{"location":"developer-guide/aws-deployment-diagram/","title":"EDP Deployment on AWS","text":""},{"location":"developer-guide/aws-deployment-diagram/#edp-deployment-on-aws","title":"EDP Deployment on AWS","text":"
This document describes the EPAM Delivery Platform (EDP) deployment architecture on AWS. It utilizes various AWS services such as Amazon Elastic Kubernetes Service (EKS), Amazon EC2, Amazon Route 53, and others to build and deploy software in a repeatable, automated way.
The EDP deployment architecture consists of two AWS accounts: Shared and Explorer. The Shared account hosts shared services, while the Explorer account runs the development team workload and EDP services. Both accounts have an AWS EKS cluster deployed in multiple Availability Zones (AZs). The EKS cluster runs the EDP Services, development team workload, and shared services in the case of the Shared account.
AWS Elastic Kubernetes Service (EKS): A managed Kubernetes service used to run the EDP Services, development team workload, and shared services. EKS provides easy deployment and management of Kubernetes clusters.
Amazon EC2: Instances running within private subnets that serve as nodes for the EKS cluster. Autoscaling Groups are used to deploy these instances, allowing for scalability based on demand.
Amazon Route 53: A DNS web service manages external and internal DNS records for the EDP deployment. It enables easy access to resources using user-friendly domain names.
AWS Application Load Balancer (ALB): Used for managing ingress traffic into the EDP deployment. Depending on requirements, ALBs can be configured as internal or external load balancers.
AWS WAF: Web Application Firewall service used to protect external ALBs from common web exploits by filtering malicious requests.
AWS Certificate Manager (ACM): A service that provisions manages, and deploys SSL/TLS certificates for use with AWS services. ACM is used to manage SSL certificates for secure communication within the EDP deployment.
AWS Elastic Container Registry (ECR): A fully-managed Docker container registry that stores and manages Docker images. ECR provides a secure and scalable solution for storing container images used in the EDP deployment.
AWS Systems Manager Parameter Store: Used to securely store and manage secrets required by various components of the EDP deployment. Parameter Store protects sensitive information such as API keys, database credentials, and other secrets.
"},{"location":"developer-guide/aws-deployment-diagram/#high-availability-and-fault-tolerance","title":"High Availability and Fault Tolerance","text":"
The EKS cluster is deployed across multiple AZs to ensure high availability and fault tolerance. This allows for automatic failover in case of an AZ outage or instance failure. Autoscaling Groups automatically adjust the number of EC2 instances based on demand, ensuring scalability while maintaining availability.
The EPAM Delivery Platform (EDP) deployment architecture on AWS follows best practices and patterns from the Well-Architected Framework. By leveraging AWS services such as EKS, EC2, Route 53, ALB, WAF, ACM, and Parameter Store, the EDP provides a robust and scalable CI/CD system that enables developers to deploy and manage infrastructure and applications quickly. The architecture ensures high availability, fault tolerance, reliability, performance efficiency, security, and cost optimization for the EDP deployment.
"},{"location":"developer-guide/aws-reference-architecture/","title":"EDP Reference Architecture on AWS","text":""},{"location":"developer-guide/aws-reference-architecture/#edp-reference-architecture-on-aws","title":"EDP Reference Architecture on AWS","text":"
The reference architecture of the EPAM Delivery Platform (EDP) on AWS is designed to provide a robust and scalable CI/CD system for developing and deploying software in a repeatable and automated manner. The architecture leverages AWS Managed Services to enable developers to quickly deploy and manage infrastructure and applications. EDP recommends to follow the best practices and patterns from the Well-Architected Framework, the AWS Architecture Center, and EKS Best Practices Guide.
The AWS Cloud comprises three accounts: Production, Shared, and Development.
Note
AWS Account management is out of scope for this document.
Each account serves specific purposes:
The Production account is used to host production workloads. The Production account serves as the final destination for deploying business applications. It maintains a separate ECR registry to store Docker images for production-level applications. The environment is designed to be highly resilient and scalable, leveraging the EPAM Delivery Platform's CI/CD pipeline to ensure consistent and automated deployments. With proper access control and separation from development environments, the Production account provides a stable and secure environment for running mission-critical applications.
The Development account is dedicated to development workload and lower environments. This account hosts the EDP itself, running on AWS EKS. It provides developers an isolated environment to build, test, and deploy their applications in lower environments, ensuring separation from production workloads. Developers can connect to the AWS Cloud using a VPN, enforcing secure access.
The Shared holds shared services that are accessible to all accounts within the organization. These services include SonarQube, Nexus, and Keycloak, which are deployed in Kubernetes Clusters managed by AWS Elastic Kubernetes Service (EKS). The shared services leverage AWS RDS, AWS EFS, and AWS ALB/NLB. The deployment of the shared services is automated using Kubernetes cluster-addons approach with GitOps and Argo CD.
EPAM Delivery Platform Reference Architecture on AWS
"},{"location":"developer-guide/aws-reference-architecture/#infrastructure-as-code","title":"Infrastructure as Code","text":"
Infrastructure as Code (IaC) is a key principle in the EPAM Delivery Platform architecture. Terraform is the IaC tool to provision and manage all services in each account. AWS S3 and AWS DynamoDB serve as the backend for Terraform state, ensuring consistency and reliability in the deployment process. This approach enables the architecture to be version-controlled and allows for easy replication and reproducibility of environments.
The architecture utilizes AWS Elastic Container Registry (ECR) as a Docker Registry for container image management. ECR offers a secure, scalable, and reliable solution for storing and managing container images. It integrates seamlessly with other AWS services and provides a highly available and durable storage solution for containers in the CI/CD pipeline.
"},{"location":"developer-guide/aws-reference-architecture/#iam-roles-for-service-accounts-irsa","title":"IAM Roles for Service Accounts (IRSA)","text":"
The EPAM Delivery Platform implements IAM Roles for Service Accounts (IRSA) to provide secure access to AWS services from Kubernetes Clusters. This feature enables fine-grained access control with individual Kubernetes pods assuming specific IAM roles for authenticated access to AWS resources. IRSA eliminates the need for managing and distributing access keys within the cluster, significantly enhancing security and reducing operational complexity.
The architecture uses the AWS Certificate Manager (ACM) to secure communication between services to provide SSL certificates. ACM eliminates the need to manually manage SSL/TLS certificates, automating the renewal and deployment process. The EDP ensures secure and encrypted traffic within its environment by leveraging ACM.
The architecture's external Application Load Balancer (ALB) endpoint is protected by the AWS Web Application Firewall (WAF). WAF protects against common web exploits and ensures the security and availability of the applications hosted within the EDP. It offers regular rule updates and easy integration with other AWS services.
"},{"location":"developer-guide/aws-reference-architecture/#parameter-store-and-secrets-manager","title":"Parameter Store and Secrets Manager","text":"
The architecture leverages the AWS Systems Manager Parameter Store and Secrets Manager to securely store and manage all secrets and parameters utilized within the EKS clusters\u2014parameter Store stores general configuration information, such as database connection strings and API keys. In contrast, Secrets Manager securely stores sensitive information, such as passwords and access tokens. By centralizing secrets management, the architecture ensures proper access control and reduces the risk of unauthorized access.
"},{"location":"developer-guide/aws-reference-architecture/#observability-and-monitoring","title":"Observability and Monitoring","text":"
For observability and monitoring, the EDP leverages a suite of AWS Managed Services designed to provide comprehensive insights into the performance and health of applications and infrastructure:
AWS CloudWatch is utilized for monitoring and observability, offering detailed insights into application and infrastructure performance. It enables real-time monitoring of logs, metrics, and events, facilitating proactive issue resolution and performance optimization.
AWS OpenSearch Service (successor to Amazon Elasticsearch Service) provides powerful search and analytics capabilities. It allows for the analysis of log data and metrics, supporting enhanced application monitoring and user experience optimization.
AWS Managed Grafana offers a scalable, secure, and fully managed Grafana service, enabling developers to create and share dashboards for visualizing real-time data.
AWS Prometheus Service, a managed Prometheus-compatible monitoring service, is used for monitoring Kubernetes and container environments. It supports powerful queries and provides detailed insights into container and microservices architectures.
The reference architecture of the EPAM Delivery Platform on AWS provides a comprehensive and scalable environment for building and deploying software applications. With a strong focus on automation, security, and best practices, this architecture enables developers to leverage the full potential of AWS services while following industry-standard DevOps practices.
"},{"location":"developer-guide/edp-workflow/","title":"EDP Project Rules. Working Process","text":""},{"location":"developer-guide/edp-workflow/#edp-project-rules-working-process","title":"EDP Project Rules. Working Process","text":"
This page contains the details on the project rules and working process for EDP team and contributors. Explore the main points about working with Gerrit, following the main commit flow, as well as the details about commit types and message below.
Before starting the development, please check the project rules:
It is highly recommended to become familiar with the Gerrit flow. For details, please refer to the Gerrit official documentation and pay attention to the main points:
a. Voting in Gerrit.
b. Resolution of Merge Conflict.
c. Comments resolution.
d. One Jira task should have one Merge Request (MR). If there are many changes within one MR, add the next patch set to the open MR by selecting the Amend commit check box.
Only the Assignee is responsible for the MR merge and Jira task status.
With EDP, the main workflow is based on the getting a Jira task and creating a Merge Request according to the rules described below.
Workflow
Get Jira task \u2192 implement, verify by yourself the results \u2192 create Merge Request (MR) \u2192 send for review \u2192 resolve comments/add changes, ask colleagues for the final review \u2192 track the MR merge \u2192 verify by yourself the results \u2192 change the status in the Jira ticket to CODE COMPLETE or RESOLVED \u2192 share necessary links with a QA specialist in the QA Verification channel \u2192 QA specialist closes the Jira task after his verification \u2192 Jira task should be CLOSED.
Commit Flow
Get a task in the Jira/GitHub dashboard. Please be aware of the following points:
JiraGitHub
a. Every task has a reporter who can provide more details in case something is not clear.
b. The responsible person for the task and code implementation is the assignee who tracks the following:
Actual Jira task status.
Time logging.
Add comments, attach necessary files.
In comments, add link that refers to the merged MR (optional, if not related to many repositories).
Code review and the final merge.
MS Teams chats - ping other colleagues, answer questions, etc.
Verification by a QA specialist.
Bug fixing.
c. Pay attention to the task Status that differs in different entities, the workflow will help to see the whole task processing:
View Jira workflow
d. There are several entities that are used on the EDP project: Story, Improvement, Task, Bug.
a. Every task has a reporter who can provide more details in case something is not clear.
b. The responsible person for the task and code implementation is the assignee who tracks the following:
Actual GitHub task status.
Add comments, attach necessary files.
In comments, add link that refers to the merged MR (optional, if not related to many repositories).
Code review and the final merge.
MS Teams chats - ping other colleagues, answer questions, etc.
Verification by a QA specialist.
Bug fixing.
c. If the task is created on your own, make sure it is populated completely. See an example below:
GitHub issue
Implement feature, improvement, fix and check the results on your own. If it is impossible to check the results of your work before the merge, verify all later.
Create a Merge Request, for details, please refer to the Code Review Process.
When committing, use the pattern: commit type: Commit message (#GitHub ticket number).
a. commit type:
feat: (new feature for the user, not a new feature for build script)
fix: (bug fix for the user, not a fix to a build script)
docs: (changes to the documentation)
style: (formatting, missing semicolons, etc; no production code change)
refactor: (refactoring production code, eg. renaming a variable)
test: (adding missing tests, refactoring tests; no production code change)
chore: (updating grunt tasks etc; no production code change)
!: (added to other commit types to mark breaking changes) For example:
feat!: Add ingress links column into Applications table on stage page (#77)\n\nBREAKING CHANGE: Ingress links column has been added into the Applications table on the stage details page\n
b. Commit message:
brief, for example:
fix: Remove secretKey duplication from registry secrets (#63)
or
descriptive, for example:
feat: Provide the ability to configure hadolint check (#88)\n\n*Add configuration files .hadolint.yaml and .hadolint.yml to stash\n
Note
It is mandatory to start a commit message from a capital letter.
c. GitHub tickets are typically identified using a number preceded by the # sign and enclosed in parentheses.
Note
Make sure there is a descriptive commit message for a breaking change Merge Request. For example:
feat!: Add ingress links column into Applications table on stage page (#77)
BREAKING CHANGE: Ingress links column has been added into the Applications table on the stage details page
Note
If a Merge Request contains both new functionality and breaking changes, make sure the functionality description is placed before the breaking changes. For example:
feat!: Update Gerrit to improve access
Implement Developers group creation process
Align group permissions
BREAKING CHANGES: Update Gerrit config according to groups
This section provides a comprehensive overview of the EDP deployment approach on a Kubernetes cluster. EDP is designed and functions based on a set of key guiding principles:
Operator Pattern Approach: Approach is used for deployment and configuration, ensuring that the platform aligns with Kubernetes native methodologies (see schema below).
Loosely Coupling: EDP comprises several loosely coupled operators responsible for different platform parts. These operators can be deployed independently, enabling the most straightforward platform customization and delivery approach.
Kubernetes Operator
The following deployment diagram illustrates the platform's core components, which provide the minimum functional capabilities required for the platform operation: build, push, deploy, and run applications. The platform relies on several mandatory dependencies:
Ingress: An ingress controller responsible for routing traffic to the platform.
Tekton Stack: Includes Tekton pipelines, triggers, dashboard, chains, etc.
ArgoCD: Responsible for GitOps deployment.
EPAM Delivery Platform Deployment Diagram
Codebase Operator: Responsible for managing git repositories, versioning, and branching. It also implements Jira integration controller.
CD Pipeline Operator: Manages Continuous Delivery (CD) pipelines and CD stages (which is an abstraction of Kubernetes Namespace). Operator acts as the bridge between the artifact and deployment tools, like Argo CD. It defines the CD pipeline structure, artifacts promotion logic and triggers the pipeline execution.
Tekton Pipelines: Manages Tekton pipelines and processes events (EventListener, Interceptor) from Version Control Systems. The pipelines are integrated with external tools like SonarQube, Nexus, etc.
EDP Portal: This is the User Interface (UI) component, built on top of Headlamp.
Business applications are deployed on the platform using the CD Pipeline Operator and Argo CD. By default, the CD Pipeline Operator uses Argo CD as a deployment tool. However, it can be replaced with any other tool, like FluxCD, Spinnaker, etc. The target environment for the application deployment is a Kubernetes cluster where EDP is deployed, but it can be any other Kubernetes cluster.
This page is intended for developers with the aim to share details on how to set up the local environment and start coding in Go language for EPAM Delivery Platform.
Set up your environment by following the steps below.
"},{"location":"developer-guide/local-development/#set-up-your-ide","title":"Set Up Your IDE","text":"
We recommend using GoLand and enabling the Kubernetes plugin. Before installing plugins, make sure to save your work because IDE may require restarting.
"},{"location":"developer-guide/local-development/#set-up-your-operator","title":"Set Up Your Operator","text":"
To set up the cloned operator, follow the three steps below:
Configure Go Build Option. Open folder in GoLand, click the button and select the Go Build option:
Add configuration
Fill in the variables in Configuration tab:
In the Files field, indicate the path to the main.go file;
In the Working directory field, indicate the path to the operator;
In the Environment field, specify the namespace to watch by setting WATCH_NAMESPACE variable. It should equal default but it can be any other if required by the cluster specifications.
In the Environment field, also specify the platform type by setting PLATFORM_TYPE. It should equal either kubernetes or openshift.
Build config
Check cluster connectivity and variables. Local development implies working within local Kubernetes clusters. Kind (Kubernetes in Docker) is recommended so set this or another environment first before running code.
Before making commit and sending pull request, take care of precautionary measures to avoid crashing some other parts of the code.
"},{"location":"developer-guide/local-development/#testing-and-linting","title":"Testing and Linting","text":"
Testing and linting must be used before every single commit with no exceptions. The instructions for the commands below are written here.
It is mandatory to run test and lint to make sure the code passes the tests and meets acceptance criteria. Most operators are covered by tests so just run them by issuing the commands \"make test\" and \"make lint\":
make test\n
The command \"make test\" should give the output similar to the following:
\"make test\" command
make lint\n
The command \"make lint\" should give the output similar to the following:
\"make lint\" command
"},{"location":"developer-guide/local-development/#observe-auto-generated-docs-api-and-manifests","title":"Observe Auto-Generated Docs, API and Manifests","text":"
The commands below are especially essential when making changes to API. The code is unsatisfactory if these commands fail.
Generate documentation in the .MD file format so the developer can read it:
make api-docs\n
The command \"make api-docs\" should give the output similar to the following:
\"make api-docs\" command with the file contents
There are also manifests within the operator that generate zz_generated.deepcopy.go file in /api/v1 directory. This file is necessary for the platform to work but it's time-consuming to fill it by yourself so there is a mechanism that does it automatically. Update it using the following command and check if it looks properly:
make generate\n
The command \"make generate\" should give the output similar to the following:
\"make generate\" command
Refresh custom resource definitions for Kubernetes, thus allowing the cluster to know what resources it deals with.
make manifests\n
The command \"make manifests\" should give the output similar to the following:
\"make manifests\" command
At the end of the procedure, you can push your code confidently to your branch and create a pull request.
"},{"location":"developer-guide/mk-docs-development/","title":"Working With Documentation","text":""},{"location":"developer-guide/mk-docs-development/#working-with-documentation","title":"Working With Documentation","text":"
This section defines necessary steps to start developing the EDP documentation in the MkDocs Framework. The framework presents a static site generator with documentation written in Markdown. All the docs are configured with a YAML configuration file.
Note
For more details on the framework, please refer to the MkDocs official website.
There are two options for working with MkDocs:
Work with MkDocs if Docker is installed
Work with MkDocs if Docker is not installed
Please see below the detailed description of each options and choose the one that suits you.
"},{"location":"developer-guide/mk-docs-development/#mkdocs-with-docker","title":"MkDocs With Docker","text":"
Prerequisites:
Docker is installed.
make utility is installed.
Git is installed. Please refer to the Git downloads.
To work with MkDocs, take the following steps:
Clone the edp-install repository to your local folder.
Run the following command:
make docs
Enter the localhost:8000 address in the browser and check that documentation pages are available.
Open the file editor, navigate to edp-install->docs and make necessary changes. Check all the changes at localhost:8000.
Create a merge request with changes.
"},{"location":"developer-guide/mk-docs-development/#mkdocs-without-docker","title":"MkDocs Without Docker","text":"
Prerequisites:
Git is installed. Please refer to the Git downloads.
Python 3.9.5 is installed.
To work with MkDocs without Docker, take the following steps:
Clone the edp-install repository to your local folder.
Run the following command:
pip install -r hack/mkdocs/requirements.txt\n
Run the local development command:
mkdocs serve --dev-addr 0.0.0.0:8000\n
Note
This command may not work on Windows, so a quick solution is:
python -m mkdocs serve --dev-addr 0.0.0.0:8000\n
Enter the localhost:8000 address in the browser and check that documentation pages are available.
Open the file editor, navigate to edp-install->docs and make necessary changes. Check all the changes at localhost:8000.
The EPAM Delivery Platform\u2019s (EDP) Reference Architecture serves as a blueprint for software delivery, outlining the best practices, tools, and technologies leveraged by the platform to ensure efficient and high-quality software development. It provides a comprehensive guide to navigate the complexities of software delivery, from code to deployment.
EDP operates on Kubernetes, a leading open-source system for automating deployment, scaling, and management of containerized applications. It consolidates a variety of open-source tools, ensuring a flexible and adaptable system that can seamlessly run on any public cloud or on-premises infrastructure. This versatility allows for a wide range of deployment options, catering to diverse business needs and operational requirements.
The EPAM Delivery Platform (EDP) is built on a set of key principles that guide its design and functionality:
Managed Infrastructure and Container Orchestration: EDP is based on a platform that leverages managed infrastructure and container orchestration, primarily through Kubernetes or OpenShift.
Security: EDP places a high emphasis on security, covering aspects such as authentication, authorization, and Single Sign-On (SSO) for platform services.
Development and Testing Toolset: EDP provides a comprehensive set of tools for development and testing, ensuring a robust and reliable software delivery process.
Well-Established Engineering Process: EDP reflects EPAM\u2019s well-established engineering practices (EngX) in its CI/CD pipelines and delivery analytics.
Open-Source and Cloud-Agnostic: As an open-source, cloud-agnostic solution, EDP can be run on any preferred Kubernetes or OpenShift clusters.
DevSecOps Excellence: EDP empowers DevSecOps by making security a mandatory quality gate.
Automated Testing: EDP ensures seamless and predictable regression testing through automated test analysis.
EDP encompasses a comprehensive CI/CD ecosystem integrating essential tools such as the Tekton and Argo CD, augmented by additional functionalities. Within this robust framework, EDP seamlessly integrates SonarQube for continuous code quality assessment, enabling thorough analysis and ensuring adherence to coding standards. Additionally, incorporating Static Application Security Testing (SAST) toolset fortifies platform's security posture by proactively identifying vulnerabilities within the codebase. EDP leverages dedicated artifact storage solutions to manage and version application artifacts securely, ensuring streamlined deployment processes and traceability throughout the software development lifecycle. See the reference architecture diagram below:
EPAM Delivery Platform Reference Architecture
Developers access the platform by authenticating with their corporate credentials. The platform utilizes OpenID Connect (OIDC) for authentication and authorization across all tools and Kubernetes clusters. Using OIDC, EDP establishes a unified and secure authentication mechanism, ensuring seamless access control and user authentication for all integrated tools. This standardized approach upholds strict security protocols, ensuring consistency in authentication and authorization policies across the platform ecosystem. To integrate existing Identity Providers (IdPs), Keycloak serves as an identity broker on the platform. EDP offers the keycloak-operator to streamline Keycloak integration within the platform.
Developers engage with the platform via the EDP Portal, an intuitive interface offering a comprehensive overview of the platform\u2019s capabilities. This centralized hub facilitates seamless navigation and access to various platform tools and components. Within the EDP Portal, developers can generate new components (codebases). The platform integrates with version control systems, optimizing source code management, fostering collaboration, and streamlining code review processes. To create new codebases, developers utilize Application Templates, ensuring a standardized approach to application development. The platform accommodates a range of application templates such as Java, Node.js, .NET, Python, and more. Additionally, developers can design custom templates via the EDP Marketplace to cater to their specific requirements.
Tekton is a potent, adaptable, and cloud-native framework designed for crafting CI/CD systems. It offers a collection of shared, reusable components that empower developers to construct, test, and deploy applications across various cloud providers or on-premises systems. As a foundational element within the EDP CI/CD ecosystem, Tekton seamlessly integrates with other tools and services, providing a robust and adaptable framework for constructing CI/CD pipelines. Tekton Pipelines allow developers to efficiently build, test, and deploy applications, while Tekton Triggers initiate pipelines based on specific events.
The codebase operator is a crucial part of the platform ecosystem. It manages codebases, their creation, deletion, and scaffolding, as well as their associated resources. It provides versioning, branching, and release capabilities and enables seamless integration with Git servers and Jira.
The platform has various cloud-agnostic tools that offer different functionalities, such as artifact storage, static security analysis, and code quality assessment. These tools are accessible through pipelines and codebase controllers. Additionally, the platform supports integration with managed services from cloud providers to deliver its core functionality\u2014for instance, AWS Parameter Store stores secrets and AWS ECR - container images. AzureDevops Artifacts is an option to store artifacts leveraging Azure Cloud capabilities. SonarCloud, a cloud-based version of SonarQube, can be integrated to conduct static code analysis.
The CD Pipeline Operator oversees CD pipelines and their related resources. It offers a collection of shared, reusable components for constructing CD pipelines. Integrated with Tekton and Argo CD, the CD Pipeline Operator harnesses their capabilities, ensuring a robust and dependable software delivery process. With a Kubernetes API interface, the CD Pipeline Operator facilitates the management of CD pipelines. It enables artifact promotion logic and the triggering of CD pipelines based on specific events, further enhancing the efficiency and adaptability of the software delivery workflow.
Argo CD is a pivotal deployment tool adopted within the platform, embracing the GitOps delivery approach. It serves as the foundation for deploying both operational and business workloads. EDP recommends running a dedicated Argo CD instance to manage operational workloads, employing the Kubernetes add-ons approach for streamlined management.
Production workloads operate in isolation within dedicated Kubernetes clusters to uphold stringent standards and ensure the utmost security and resource allocation. This approach guarantees the highest isolation and operational integrity levels for critical production systems, aligning with industry best practices. EDP strongly recommends utilizing a pull model for production deployment. In this model, production deployment is initiated by the Argo CD instance explicitly deployed for the production environment.
The Platform is meticulously engineered to uphold best practices in workload distribution across various environments, including development, testing (manual/automation), user acceptance (UAT), staging, and production. While lower environments like development and testing may feasibly share clusters for workload efficiency, EDP strongly advocates and enforces the necessity of segregating production workloads into dedicated clusters. This segregation ensures the highest isolation, security, and resource allocation levels for mission-critical production systems, adhering to industry standards and ensuring optimal operational integrity.
EDP harnesses the robust capabilities of Kubernetes in conjunction with a suite of powerful tools tailored for monitoring, logging, and tracing. It integrates the Prometheus stack within ecosystem, leveraging its metrics collection, storage, and querying capabilities to enable comprehensive monitoring of system performance and health. EDP runs OpenSearch for centralized logging, enabling efficient log aggregation, analysis, and management across the platform. Incorporating OpenTelemetry enables standardized and seamless observability data collection, facilitating deep insights into platform behavior and performance. Additionally, it allows for connection with external aggregators and tools that support the OpenTelemetry protocol (OTLP).
Platform and Tools
EDP integrates with GitLab, GitHub, and Gerrit for version control. These systems are foundational components enabling efficient source code management, collaboration, and code review processes.
Platform ensures robust security measures by leveraging OpenID Connect (OIDC) for authentication and authorization across all platform tools and Kubernetes clusters. By employing OIDC, EDP establishes a unified and secure authentication mechanism, enabling seamless access control and user authentication for all tools integrated into the platform. This standardized approach ensures stringent security protocols, maintaining authentication consistency and authorization policies across the platform ecosystem.
This document provides an in-depth overview of the Continuous Integration and Continuous Delivery (CI/CD) pipeline reference architecture implemented within the EPAM Delivery Platform (EDP). The pipeline is designed to facilitate efficient and automated software deployment across diverse environments, leveraging a suite of tools and methodologies for enhanced reliability, scalability, and security.
The CI/CD pipeline within EDP orchestrates the software delivery process, encompassing several sequential stages to ensure robustness and reliability.
EPAM Delivery Platform Reference CI/CD Pipeline
The CI/CD Pipeline follows a modular and scalable architecture that leverages various tools to ensure the reliability and efficiency of the software delivery process. The architecture can be divided into stages, each responsible for specific tasks. Explore the key components involved in the pipeline and their functionalities:
Source Code: The pipeline starts with the source code, representing the application's codebase. Developers commit their changes to the source code repository, triggering the pipeline.
Validate Commit Message: The commit message validation component checks the format and content of the commit message. It ensures the commit message follows the correct format and includes a valid Tracking Issue key. It helps maintain a standardized commit message format throughout the application development.
Build: The Build component compiles the source code, runs unit tests, and generates the application artifact. It consumes the artifact from the Artifact Repository (Nexus), ensuring consistent and reliable builds.
SAST with SonarQube: The Static Analysis Security Testing (SAST) component utilizes SonarQube to analyze the source code for potential security vulnerabilities, code smells, and quality issues. This step helps identify and address security or code quality issues early in development.
SCA: The Software Composition Analysis (SCA) component performs dependency analysis using cdxgen, Dependency-Track, Semgrep, and DefectDojo. It checks for known vulnerabilities or license compliance issues in the application's dependencies. By identifying and resolving these issues, it ensures the security and stability of the software.
Publish: The Publish component publishes the application artifact to the Artifact Repository. It posts Docker images to the Docker Registry and stores binary artifacts in the Nexus Repository. This process ensures that the artifacts are securely stored and easily accessed for future deployments.
Deploy: The Deploy component uses Argo CD or Tekton to deploy applications to target environments in Kubernetes, leveraging Helm charts to ensure seamless deployment. Deploy to Test/Quality Assurance/Performance Environments: The final stages of the pipeline involve deploying the application to different environments for testing and quality assurance purposes. The results of the tests are consolidated and reported to the Report Portal, facilitating efficient test reporting and analysis.
The overall architecture of the CI/CD Pipeline ensures a streamlined and automated software delivery process, from source code to deployment. It provides developers with the necessary tools and processes to ensure their applications' quality, security, and scalability. Furthermore, Tekton Chains enhances supply chain security by signing and generating in-toto metadata that verifies the integrity of artifacts and the CI/CD Pipeline.
Note
The tools mentioned in this document are just examples and can be replaced with other tools that offer similar functionality. For instance, instead of Harbor for the Docker Registry, it is possible to use AWS ECR. Consider using Azure Artifacts or JFrog Artifactory instead of Nexus for the artifact repository. Instead of setting up an self-managed instance of SonarQube, leverage SonarCloud, the cloud-based version of SonarQube, as an alternative. The CI/CD Pipeline architecture is flexible and adaptable, allowing the use of different tools based on specific project requirements and platform preferences.
The codebase operator for the EPAM Delivery Platform gathers anonymous data through telemetry. This data provides a clear picture of how the platform is being used and empowers the development team to make informed decisions and strategic enhancements to meet evolving operational needs. The anonymous data collected also plays an essential role in adopting a Software Development Life Cycle (SDLC) process strategically.
The codebase-operator collects the following data:
The version of the platform
The number of codebases created and their parameters: language (for example, Java, NodeJS, etc.), framework (for example, FastAPI, Flask, etc.), build tool (for example, Maven, Gradle, etc.), strategy (for example, Clone, Create, Import), and Type (for example, library, application, etc.)
The number of CD pipelines created and their parameters: deployment type (for example, Auto, Manual), and the number of stages
The number of Git providers connected to the platform and their types (for example, GitHub, GitLab, Gerrit)
Where Jira is enabled or not
The type of the Docker registry connected to the platform (for example, Docker Hub, Harbor, ECR)
The codebase-operator collects the data every 24 hours and sends it to the EDP Telemetry Service. The first data points are collected 24 hours after the codebase-operator is deployed to allow users to opt-out of telemetry.
The codebase-operator collects telemetry data by default. To disable telemetry, set the TELEMETRY_ENABLED environment variable to false in the codebase-operator's deployment configuration. To achieve this, run the following command:
The EDP Operator guide is intended for DevOps and provides information on EDP installation, configuration and customization, as well as the platform support. Inspect the documentation to adjust the EPAM Delivery Platform according to your business needs:
The Installation section provides the prerequisites for EDP installation, including Kubernetes or OpenShift cluster setup, Keycloak, DefectDojo, Kiosk, and Ingress-nginx setup as well as the subsequent deployment of EPAM Delivery Platform.
The Configuration section indicates the options to set the project, backup, Tekton and logging.
The Integration section comprises the AWS, Jira, and Logsight integration options.
The Tutorials section provides information on working with various aspects, for example, using cert-manager in OpenShift, deploying AWS EKS cluster, deploying OKD 4.9 cluster, deploying OKD 4.10 cluster and upgrading Keycloak v.17.0.x-legacy to v.19.0.x on Kubernetes.
"},{"location":"operator-guide/add-ons-overview/","title":"Install via Add-Ons","text":""},{"location":"operator-guide/add-ons-overview/#install-via-add-ons","title":"Install via Add-Ons","text":"
This page describes the entity of Cluster Add-Ons for EPAM Delivery Platform, as well as their purpose, benefits and usage.
"},{"location":"operator-guide/add-ons-overview/#what-are-add-ons","title":"What Are Add-Ons","text":"
EDP Add-Ons is basically a Kubernetes-based structure that enables users to quickly install additional components for the platform using Argo CD applications.
Add-Ons have been introduced into EDP starting from version 3.4.0. They empower users to seamlessly incorporate the platform with various additional components, such as SonarQube, Nexus, Keycloak, Jira, and more. This eliminates the need for manual installations, as outlined in the Install EDP page.
In a nutshell, Add-Ons represent separate Helm Charts that imply to be installed by one click using the Argo CD tool.
All the Add-Ons are stored in our public GitHub repository adhering to the GitOps approach. Apart from default Helm and Git files, it contains both custom resources called Applications for Argo CD and application source code. The repository follows the GitOps approach to enable Add-Ons with the capability to rollback changes when needed. The repository structure is the following:
add-ons - the directory that contains Helm charts of the applications that can be integrated with EDP using Add-Ons.
chart - the directory that contains Helm charts with application templates that will be used to create custom resources called Applications for Argo CD.
To enable EDP Add-Ons, it is necessary to have the configured Argo CD, and connect and synchronize the forked repository. To do this, follow the guidelines below:
Fork the Add-Ons repository to your personal account.
Provide the parameter values for the values.yaml files of the desired Add-Ons you are going to install.
Navigate to Argo CD -> Settings -> Repositories. Connect your forked repository where you have the values.yaml files changed by clicking the + Connect repo button:
Connect the forked repository
In the appeared window, fill in the following fields and click the Connect button:
Name - select the namespace where the project is going to be deployed;
Choose your connection method - choose Via SSH;
Type - choose Helm;
Repository URL - enter the URL of your forked repository.
Repository parameters
As soon as the repository is connected, the new item in the repository list will appear:
Connected repository
Navigate to Argo CD -> Applications. Click the + New app button:
Adding Argo CD application
Fill in the required fields:
Application Name - addons-demo;
Project name - select the namespace where the project is going to be deployed;
Sync policy - select Manual;
Repository URL - enter the URL of your forked repository;
Revision - Head;
Path - select chart;
Cluster URL - enter the URL of your cluster;
Namespace - enter the namespace which must be equal to the Project name field.
As soon as the repository is synchronized, the list of applications that can be installed by Add-Ons will be shown:
Name Description Default Argo CD A GitOps continuous delivery tool that helps automate the deployment, configuration, and lifecycle management of applications in Kubernetes clusters. false AWS EFS CSI Driver A Container Storage Interface (CSI) driver that enables the dynamic provisioning of Amazon Elastic File System (EFS) volumes in Kubernetes clusters. true Cert Manager A native Kubernetes certificate management controller that automates the issuance and renewal of TLS certificates. true DefectDojo A security vulnerability management tool that allows tracking and managing security findings in applications. true DependencyTrack A Software Composition Analysis (SCA) platform that helps identify and manage open-source dependencies and their associated vulnerabilities. true EDP An internal platform created by EPAM to enhance software delivery processes using DevOps principles and tools. false Extensions OIDC EDP Helm chart to provision OIDC clients for different Add-Ons using EDP Keycloak Operator. true External Secrets A Kubernetes Operator that fetches secrets from external secret management systems and injects them as Kubernetes Secrets. true Fluent Bit A lightweight and efficient log processor and forwarder that collects and routes logs from various sources in Kubernetes clusters. false Harbor A cloud-native container image registry that provides support for vulnerability scanning, policy-based image replication, and more. true Nginx ingress An Ingress controller that provides external access to services running within a Kubernetes cluster using Nginx as the underlying server. true Jaeger Operator An operator for deploying and managing Jaeger, an end-to-end distributed tracing system, in Kubernetes clusters. true Keycloak An open-source Identity and Access Management (IAM) solution that enables authentication, authorization, and user management in Kubernetes clusters. true Keycloak PostgreSQL A PostgreSQL database operator that simplifies the deployment and management of PostgreSQL instances in Kubernetes clusters. false MinIO Operator An operator that simplifies the deployment and management of MinIO, a high-performance object storage server compatible with Amazon S3, in Kubernetes clusters. true OpenSearch A community-driven, open-source search and analytics engine that provides scalable and distributed search capabilities for Kubernetes clusters. true OpenTelemetry Operator An operator for automating the deployment and management of OpenTelemetry, a set of observability tools for capturing, analyzing, and exporting telemetry data. true PostgreSQL Operator An operator for running and managing PostgreSQL databases in Kubernetes clusters with high availability and scalability. true Prometheus Operator An operator that simplifies the deployment and management of Prometheus, a monitoring and alerting toolkit, in Kubernetes clusters. true Redis Operator An operator for managing Redis, an in-memory data structure store, in Kubernetes clusters, providing high availability and horizontal scalability. true StorageClass A Kubernetes resource that provides a way to define different classes of storage with different performance characteristics for persistent volumes. true Tekton A flexible and cloud-native framework for building, testing, and deploying applications using Kubernetes-native workflows. true Vault An open-source secrets management solution that provides secure storage, encryption, and access control for sensitive data in Kubernetes clusters. true"},{"location":"operator-guide/advanced-installation-overview/","title":"Overview","text":""},{"location":"operator-guide/advanced-installation-overview/#advanced-installation-overview","title":"Advanced Installation Overview","text":"
This page serves as a brief overview of all the advanced components within EDP. While these third-party tools are not mandatory, they significantly enhance the platform's capabilities, enabling the creation of a robust CI/CD environment.
Although we have dedicated instructions for all of these third-party tools, for those who installed EDP using cluster add-ons, we recommend installing them via add-ons correspondingly.
OpenShift cluster uses Routes to provide access to pods from external resources.\u00a0\u21a9
These tools need to be installed in advance before deploying EDP.\u00a0\u21a9\u21a9
"},{"location":"operator-guide/argocd-integration/","title":"Argo CD Integration","text":""},{"location":"operator-guide/argocd-integration/#argo-cd-integration","title":"Argo CD Integration","text":"
KubeRocketCI uses Argo CD as a part of the Continues Delivery/Continues Deployment implementation. Argo CD follows the best GitOps practices, uses Kubernetes native approach for the Deployment Management, has rich UI and required RBAC capabilities.
"},{"location":"operator-guide/argocd-integration/#argo-cd-deployment-approach-in-kuberocketci","title":"Argo CD Deployment Approach in KubeRocketCI","text":"
Argo CD can be installed using two different approaches:
Cluster-wide scope with the cluster-admin access
Namespaced scope with the single namespace access
Both approaches can be deployed with High Availability (HA) or Non High Availability (non HA) installation manifests.
KubeRocketCI uses the HA deployment with the cluster-admin permissions, to minimize cluster resources consumption by sharing single Argo CD instance across multiple EDP Tenants. Please follow the installation instructions to deploy Argo CD.
"},{"location":"operator-guide/argocd-integration/#argo-cd-integration_1","title":"Argo CD Integration","text":"
See a diagram below for the details:
Argo CD Diagram
Argo CD is deployed in a separate argocd namespace.
Argo CD uses a cluster-admin role for managing cluster-scope resources.
The control-plane application is created using the App of Apps approach, and its code is managed by the control-plane members.
The control-plane is used to onboard new Argo CD Tenants (Argo CD Projects - AppProject).
The EDP Tenant Member manages Argo CD Applications using kind: Application in the edpTenant namespace.
The App Of Apps approach is used to manage the EDP Tenants. Inspect the edp-grub repository structure that is used to provide the EDP Tenants for the Argo CD Projects:
edp-grub\n\u251c\u2500\u2500 LICENSE\n\u251c\u2500\u2500 README.md\n\u251c\u2500\u2500 apps ### All Argo CD Applications are stored here\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 grub-argocd.yaml # Application that provisions Argo CD Resources - Argo Projects (EDP Tenants)\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 grub-keycloak.yaml # Application that provisions Keycloak Resources - Argo CD Groups (EDP Tenants)\n\u251c\u2500\u2500 apps-configs\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 grub\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 argocd ### Argo CD resources definition\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 edp.yaml\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 keycloak ### Keycloak resources definition\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 edp.yaml\n\u251c\u2500\u2500 bootstrap\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 root.yaml ### Root application in App of Apps, which provision Applications from /apps\n\u2514\u2500\u2500 examples ### Examples\n \u2514\u2500\u2500 tenant\n \u2514\u2500\u2500 edp-petclinic.yaml\n
The Root Application must be created under the control-plane scope.
"},{"location":"operator-guide/argocd-integration/#argo-cd-configuration","title":"Argo CD Configuration","text":"
Now that Argo CD is integrated, it is time to configure it properly. To configure Argo CD for KubeRocketCI, follow the steps below:
Modify the argocd-cmd-params-cm ConfigMap in the argocd namespace and add the application.namespaces parameter to the subsection data:
Add a credential template for GitHub, GitLab, Gerrit integrations. The credential template must be created for each Git server.
GitHub/GitLabGerrit
Generate an SSH key pair and add a public key to GitLab or GitHub account.
Warning
Use an additional GitHub/GitLab User to access a repository. For example: - GitHub, add a User to a repository with a \"Read\" role. - GitLab, add a User to a repository with a \"Guest\" role.
Create an Argo CD Project (EDP Tenant), for example, with the edp name:
AppProject
apiVersion: argoproj.io/v1alpha1\nkind: AppProject\nmetadata:\n name: edp\n namespace: argocd\n # Finalizer that ensures that project is not deleted until it is not referenced by any application\n finalizers:\n - resources-finalizer.argocd.argoproj.io\nspec:\n destinations:\n # by default edp work with 'edp-*' namespace\n - namespace: 'edp-*'\n # allow to deploy to specific server (local in our case)\n name: in-cluster\n # Deny all cluster-scoped resources from being created, except for Namespace\n clusterResourceWhitelist:\n - group: ''\n kind: Namespace\n # Allow all namespaced-scoped resources to be created, except for ResourceQuota, LimitRange, NetworkPolicy\n namespaceResourceBlacklist:\n - group: ''\n kind: ResourceQuota\n - group: ''\n kind: LimitRange\n - group: ''\n kind: NetworkPolicy\n # we are ok to create any resources inside namespace\n namespaceResourceWhitelist:\n - group: '*'\n kind: '*'\n # enable access only for specific git server. The example below 'edp' - it is namespace where EDP deployed\n sourceRepos:\n - ssh://git@github.com/*\n # enable capability to deploy objects from namespaces\n sourceNamespaces:\n - edp\n
Check that your new Repository, Known Hosts, and AppProject are added to the Argo CD UI.
Generate Argo CD project token for deploy integration:
Check that your new Application is added to the Argo CD UI under the edp Project scope.
"},{"location":"operator-guide/argocd-integration/#deploy-argo-cd-application-to-remote-cluster-optional","title":"Deploy Argo CD Application to Remote Cluster (Optional)","text":"
KubeRocketCI also supports deploying Argo CD applications to a remote cluster. To deploy applications to remote clusters, follow the steps below:
Create ServiceAccountClusterRoleBinding and Secret for that ServiceAccount.
Receive the bearer token:
BEAR_TOKEN=$(kubectl get secret <serviceaccount-secret-name> -o jsonpath='{.data.token}' | base64 --decode)\n
Update an Argo CD Project (EDP Tenant), with the edp name:
AppProject
apiVersion: argoproj.io/v1alpha1\nkind: AppProject\nmetadata:\n name: edp\nspec:\n destinations:\n # Add block that allow deploy in remote cluster\n # by default edp work with 'edp-*' namespace\n - namespace: 'edp-*'\n # allow to deploy to specific server (remote in our case)\n name: edp-remote-cluster\n
Add a remote cluster in the KubeRocketCI portal. Please refer to the Add Cluster page for details.
"},{"location":"operator-guide/artifacts-verification/","title":"Verification of EDP Artifacts","text":""},{"location":"operator-guide/artifacts-verification/#verification-of-edp-artifacts","title":"Verification of EDP Artifacts","text":"
This documentation outlines platform SLSA integration and guides verifying image authenticity and provenance.
Supply Chain Levels of Software Assurance (SLSA) is a framework for assessing and enhancing software supply chain security. Software Supply Chain Security is a critical aspect of modern software development and deployment. Supply Chain Levels of Software Assurance (SLSA) provides a framework for assessing and enhancing the security of your software supply chain.
EPAM Delivery Platform's container images are signed using cosign with the cosign.pub key for signing and transparency. You can verify a container image's signature by executing the cosign verify command.
To confirm the authenticity of the image, run the cosign verify command. See the example below:
Verification for epamedp/codebase-operator:2.20.0:
Verification for index.docker.io/epamedp/codebase-operator:2.20.0\nThe following checks were performed on each of these signatures:\n - The cosign claims were validated\n - The claims were present in the transparency log\n - The signatures were integrated into the transparency log when the certificate was valid\n - The signatures were verified against the specified public key\n[\n {\n \"critical\": {\n \"identity\": {\n \"docker-reference\": \"index.docker.io/epamedp/codebase-operator\"\n },\n \"image\": {\n \"docker-manifest-digest\": \"sha256:36585a13b5b5ff5a15138e9d16cc74eb3aac4560b77be15161d3b3db25b89e1d\"\n },\n \"type\": \"cosign container image signature\"\n },\n \"optional\": null\n }\n]\n
"},{"location":"operator-guide/artifacts-verification/#verify-container-image-with-slsa-attestations","title":"Verify Container Image With SLSA Attestations","text":"
An SLSA Level 3 provenance is verified using. The following command will verify the signature of an attestation and how it was issued. It will contain the payloadType, payload, and signature.
Run the cosign verify-attestation command using the cosign.pub:
Verification for epamedp/codebase-operator:2.20.0:
Verification for epamedp/codebase-operator:2.20.0\nThe following checks were performed on each of these signatures:\n - The cosign claims were validated\n - The claims were present in the transparency log\n - The signatures were integrated into the transparency log when the certificate was valid\n - The signatures were verified against the specified public key\n{\n \"payloadType\": \"application/vnd.in-toto+json\",\n \"payload\": \"eyJfdHlwZSI6Imh0dHBzOi8vaW4tdG90by5pby9TdGF0ZW1lbnQvdjAuMSIsInByZWRpY2F0ZVR5cGUiOiJodHRwczovL3Nsc2EuZGV2L3Byb3ZlbmFuY2UvdjAuMiIsInN1YmplY3QiOlt7Im5hbWUiOiJpbmRleC5kb2NrZXIuaW8vZXBhbWVkcC9jb2RlYmFzZS1vcGVyYXRvciIsImRpZ2VzdCI6eyJzaGEyNTYiOiIzNjU4NWExM2I1YjVmZjVhMTUxMzhlOWQxNmNjNzRlYjNhYWM0NTYwYjc3YmUxNTE2MWQzYjNkYjI1Yjg5ZTFkIn19XSwicHJlZGljYXRlIjp7ImJ1aWxkZXIiOnsiaWQiOiJodHRwczovL3Rla3Rvbi5kZXYvY2hhaW5zL3YyIn0sImJ1aWxkVHlwZSI6InRla3Rvbi5kZXYvdjFiZXRhMS9UYXNrUnVuIiwiaW52b2NhdGlvbiI6eyJjb25maWdTb3VyY2UiOnt9LCJwYXJhbWV0ZXJzIjp7IkJVSUxERVJfSU1BR0UiOiJnY3IuaW8va2FuaWtvLXByb2plY3QvZXhlY3V0b3I6djEuMTIuMS1kZWJ1ZyIsIkNPTlRFWFQiOiIuLyIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlIiwiSU1BR0UiOiJlcGFtZWRwL2NvZGViYXNlLW9wZXJhdG9yOjIuMjAuMCIsIklNQUdFX1RBUiI6ImNvZGViYXNlLW9wZXJhdG9yXzIuMjAuMCJ9LCJlbnZpcm9ubWVudCI6eyJhbm5vdGF0aW9ucyI6eyJtZXRhLmhlbG0uc2gvcmVsZWFzZS1uYW1lIjoiZWRwLWN1c3RvbS1waXBlbGluZXMiLCJtZXRhLmhlbG0uc2gvcmVsZWFzZS1uYW1lc3BhY2UiOiJlZHAtZGVsaXZlcnkiLCJwaXBlbGluZS50ZWt0b24uZGV2L2FmZmluaXR5LWFzc2lzdGFudCI6ImFmZmluaXR5LWFzc2lzdGFudC1iZjRkNzRkMWM0IiwicGlwZWxpbmUudGVrdG9uLmRldi9yZWxlYXNlIjoiMjI5OWIxNSIsInRla3Rvbi5kZXYvY2F0ZWdvcmllcyI6IkltYWdlIEJ1aWxkIiwidGVrdG9uLmRldi9kaXNwbGF5TmFtZSI6IkJ1aWxkIGFuZCB1cGxvYWQgY29udGFpbmVyIGltYWdlIHVzaW5nIEthbmlrbyIsInRla3Rvbi5kZXYvcGlwZWxpbmVzLm1pblZlcnNpb24iOiIwLjE3LjAiLCJ0ZWt0b24uZGV2L3BsYXRmb3JtcyI6ImxpbnV4L2FtZDY0IiwidGVrdG9uLmRldi90YWdzIjoiaW1hZ2UtYnVpbGQifSwibGFiZWxzIjp7ImFwcC5rdWJlcm5ldGVzLmlvL21hbmFnZWQtYnkiOiJIZWxtIiwiYXBwLmt1YmVybmV0ZXMuaW8vdmVyc2lvbiI6IjAuOC4wIiwiaGVsbS5zaC9jaGFydCI6ImVkcC1jdXN0b20tcGlwZWxpbmVzLTAuOC4wIiwiazhzbGVucy1lZGl0LXJlc291cmNlLXZlcnNpb24iOiJ2MSIsInRla3Rvbi5kZXYvbWVtYmVyT2YiOiJ0YXNrcyIsInRla3Rvbi5kZXYvcGlwZWxpbmUiOiJnZXJyaXQtb3BlcmF0b3JzLWFwcC1yZWxlYXNlLWVkcCIsInRla3Rvbi5kZXYvcGlwZWxpbmVSdW4iOiJlZHAtY29kZWJhc2Utb3BlcmF0b3ItcmVsZWFzZSIsInRla3Rvbi5kZXYvcGlwZWxpbmVUYXNrIjoia2FuaWtvLWJ1aWxkIiwidGVrdG9uLmRldi90YXNrIjoia2FuaWtvLXJlbGVhc2UifX19LCJidWlsZENvbmZpZyI6eyJzdGVwcyI6W3siZW50cnlQb2ludCI6Ii9rYW5pa28vZXhlY3V0b3IgXFxcbiAgLS1kb2NrZXJmaWxlPS93b3Jrc3BhY2Uvc291cmNlL0RvY2tlcmZpbGUgXFxcbiAgLS1jb250ZXh0PS93b3Jrc3BhY2Uvc291cmNlLy4vIFxcXG4gIC0tZGVzdGluYXRpb249ZXBhbWVkcC9jb2RlYmFzZS1vcGVyYXRvcjoyLjIwLjAgXFxcbiAgLS1kaWdlc3QtZmlsZT0vdGVrdG9uL3Jlc3VsdHMvSU1BR0VfRElHRVNUIFxcXG4gIC0tdGFyLXBhdGg9Y29kZWJhc2Utb3BlcmF0b3JfMi4yMC4wLnRhciBcXFxuIiwiYXJndW1lbnRzIjpudWxsLCJlbnZpcm9ubWVudCI6eyJjb250YWluZXIiOiJidWlsZC1hbmQtcHVzaCIsImltYWdlIjoib2NpOi8vZ2NyLmlvL2thbmlrby1wcm9qZWN0L2V4ZWN1dG9yQHNoYTI1NjphN2VhOWY2OWQ3N2Q3ZTdhMGVhODIxZjE1MDY5YmU0NTQyMGE1MzZmODFhYjU3ODdhOTg4NjU5ZTQ4YzI1Mzc3In0sImFubm90YXRpb25zIjpudWxsfSx7ImVudHJ5UG9pbnQiOiJzZXQgLWVcbmltYWdlPVwiZXBhbWVkcC9jb2RlYmFzZS1vcGVyYXRvcjoyLjIwLjBcIlxuZWNobyAtbiBcIiR7aW1hZ2V9XCIgfCB0ZWUgXCIvdGVrdG9uL3Jlc3VsdHMvSU1BR0VfVVJMXCJcbiIsImFyZ3VtZW50cyI6bnVsbCwiZW52aXJvbm1lbnQiOnsiY29udGFpbmVyIjoid3JpdGUtdXJsIiwiaW1hZ2UiOiJvY2k6Ly9kb2NrZXIuaW8vbGlicmFyeS9hbHBpbmVAc2hhMjU2OjcxNDRmN2JhYjNkNGMyNjQ4ZDdlNTk0MDlmMTVlYzUyYTE4MDA2YTEyOGM3MzNmY2ZmMjBkM2E0YTU0YmE0NGEifSwiYW5ub3RhdGlvbnMiOm51bGx9XX0sIm1ldGFkYXRhIjp7ImJ1aWxkU3RhcnRlZE9uIjoiMjAyMy0xMS0wM1QxMzozMDo1NVoiLCJidWlsZEZpbmlzaGVkT24iOiIyMDIzLTExLTAzVDEzOjMxOjE1WiIsImNvbXBsZXRlbmVzcyI6eyJwYXJhbWV0ZXJzIjpmYWxzZSwiZW52aXJvbm1lbnQiOmZhbHNlLCJtYXRlcmlhbHMiOmZhbHNlfSwicmVwcm9kdWNpYmxlIjpmYWxzZX0sIm1hdGVyaWFscyI6W3sidXJpIjoib2NpOi8vZ2NyLmlvL2thbmlrby1wcm9qZWN0L2V4ZWN1dG9yIiwiZGlnZXN0Ijp7InNoYTI1NiI6ImE3ZWE5ZjY5ZDc3ZDdlN2EwZWE4MjFmMTUwNjliZTQ1NDIwYTUzNmY4MWFiNTc4N2E5ODg2NTllNDhjMjUzNzcifX0seyJ1cmkiOiJvY2k6Ly9kb2NrZXIuaW8vbGlicmFyeS9hbHBpbmUiLCJkaWdlc3QiOnsic2hhMjU2IjoiNzE0NGY3YmFiM2Q0YzI2NDhkN2U1OTQwOWYxNWVjNTJhMTgwMDZhMTI4YzczM2ZjZmYyMGQzYTRhNTRiYTQ0YSJ9fV19fQ==\",\n \"signatures\": [\n {\n \"keyid\": \"SHA256:7E2nAQnycq4vfPlzmLZGzpK/Vr6oXKqqGokDyrBSLck\",\n \"sig\": \"MEUCIAZLrA/wTkqmnCZXh85R9Y/Ue5f8wuGgjLMYdoFw9GRLAiEA/sE598EX5fppqbry+xvE+aap8+qHPioOin8t6Ttzx3k=\"\n }\n ]\n}\n
For more details about attestation, please refer to the official cosign documentation page.
Within each release component, you will discover a Rekor UUID, which serves to validate the flow of the release pipeline. Execute the following command to obtain comprehensive information about the release pipeline of codebase-operator with UUID:
By signing all our artifacts, we assure you that they are trustworthy. This guide is indispensable for developers and administrators to enhance their software's reliability and meet modern security standards. The adoption of SLSA will bring you confidence while using the platform.
"},{"location":"operator-guide/aws-marketplace-install/","title":"Install via AWS","text":""},{"location":"operator-guide/aws-marketplace-install/#install-via-aws-marketplace","title":"Install via AWS Marketplace","text":"
This documentation provides the detailed instructions on how to install the EPAM Delivery Platform via the AWS Marketplace.
To initiate the installation process, navigate to our dedicated AWS Marketplace page and commence the deployment of EPAM Delivery Platform.
Disclaimer
EDP is aligned with industry standards for storing and managing sensitive data, ensuring optimal security. However, the use of custom solutions introduces uncertainties, thus the responsibility for the safety of your data is totally covered by platform administrator.
A basic understanding of AWS services and navigation is preferred to facilitate smoother setup and deployment processes. If you are new to AWS, please refer to the AWS Documentation for detailed information on the services and their usage.
Understanding of Kubernetes: Knowledge of Kubernetes concepts and architecture is recommended for effective management and operation of clusters.
Please familiarize yourself with the Prerequisites page before deploying the product. To perform a minimal installation, ensure that you meet the following requirements:
The AWS Elastic Kubernetes Service (EKS) cluster is available for deployment. For detailed instructions on creating a new cluster, please consult the AWS EKS Cluster Creation Guide. Additionally, you can refer to our EKS Deployment Guide for step-by-step instructions tailored to your specific requirements.
The domain name is available and associated with the ingress object in cluster.
Cluster administrator access.
The Tekton resources are deployed.
Access to the cluster via Service Account token is available.
(Optional) To open EDP Portal, navigate to the http://localhost:59480.
(Optional) To get admin token to sign in to EDP Portal:
kubectl get secrets -o jsonpath=\"{.items[?(@.metadata.annotations['kubernetes\\.io/service-account\\.name']=='edp-admin')].data.token}\" -n edp|base64 --decode\n
As a result, you will get access to EPAM Delivery Platform components via EDP Portal UI. Navigate to our Use Cases to try out EDP functionality. Visit other subsections of the Operator Guide to figure out how to configure EDP and integrate it with various tools.
This article outlines how the EPAM Delivery Platform (EDP) leverages Capsule capabilities to enable isolation for both the core platform components and the business applications workload.
EPAM Delivery Platform uses Capsule to ensure resource isolation. It is crucial to define constraints through the Capsule tenant approach. This approach serves two primary objectives: limiting the resources allocated to the EDP components and regulating the resources utilized by each deployed environment.
To ensure isolation for the core platform components, create the edp namespace under the Capsule tenant. Use the template provided in this instruction to create the Capsule tenant specifically for the core components.
The following scheme outlines the general steps involved in configuring Capsule for seamless integration with EDP. This process ensures efficient resource isolation, allowing for the deployment and management of both EDP core platform components and business application workloads. Follow the sequential flow of the scheme to successfully integrate Capsule with the EPAM Delivery Platform:
Capsule Installation - This initial step involves setting up Capsule on your environment.
Tenant Configuration - Once Capsule is installed, the next critical step is configuring the Capsule tenant. This involves defining specific parameters and constraints to regulate the allocation of resources to EDP components.
Impersonation - Impersonation plays a role in managing user identities and permissions within the Capsule environment. This step ensures secure and controlled access to resources.
Create EDP Namespace - The creation of a dedicated namespace under Capsule is crucial for isolating and managing the core components of EDP. This step establishes the environment where EDP will be deployed.
Deploy EDP - The final step involves deploying the EPAM Delivery Platform within the configured Capsule environment.
Define the namespace where EDP will be installed in Capsule values:
values.yaml
manager:\n options:\n # -- Boolean, enforces the Tenant owner, during Namespace creation, to name it using the selected Tenant name as prefix, separated by a dash\n forceTenantPrefix: true\n # enable capsule for EDP tenant and cd-pipeline-operator\n # NOTE: Capsule cannot manage cluster system namespaces\n capsuleUserGroups:\n - capsule.clastix.io\n # enable for cd-pipeline-operator https://github.com/epam/edp-cd-pipeline-operator/blob/release/2.17/deploy-templates/values.yaml#L10\n - system:serviceaccounts:edp # (1)!\n - masters # (2)!\n # uncomment if Argo CD manage main EDP tenant\n #- system:serviceaccounts:argocd\n # uncomment if edp-oidc-admins group manage main EDP tenant https://epam.github.io/edp-install/operator-guide/edp-access-model\n #- edp-oidc-admins\n
Namespace where EDP will be installed.
Group that manages the main EDP tenant.
To install the Capsule tool, use the Cluster Add-Ons approach. For more details, please refer to the Capsule official page.
After installing Capsule, the next crucial step is configuration. Follow the guidelines provided below to configure Capsule and ensure seamless integration with your system:
Group that manages the main EDP tenant. Must be declared in Capsule configuration.
The following example includes additional specifications that can be used to manage the EDP tenant:
Tenant configuration example
apiVersion: capsule.clastix.io/v1beta2\nkind: Tenant\nmetadata:\n name: edp-tenant\nspec:\n ingressOptions:\n allowWildcardHostnames: false\n allowedHostnames:\n allowedRegex: ^.*example.com$ # DNSwildcard for EDP usage\n hostnameCollisionScope: Tenant\n limitRanges:\n items:\n - limits:\n # The default limits apply to each container unless otherwise specified by default\n - default:\n cpu: 768m\n memory: 768Mi\n # The default requests apply to each container unless otherwise specified by default\n defaultRequest:\n cpu: 256m\n memory: 512Mi\n type: Container\n - limits:\n # In case Tekton pipelines need to use volume workspaces. If use emptydir please set it to 0.\n - max:\n storage: 3Gi\n min:\n storage: 3Gi\n type: PersistentVolumeClaim\n # Since EDP uses one namespace, the namespace quota is set to 1\n namespaceOptions:\n quota: 1\n networkPolicies:\n items:\n - ingress:\n - from:\n - namespaceSelector:\n matchLabels:\n capsule.clastix.io/tenant: edp-tenant\n - podSelector: {}\n - ipBlock:\n cidr: 172.32.0.0/16\n podSelector: {}\n policyTypes:\n - Ingress\n # Default EDP admins group to make admin users tenant owners\n owners:\n - clusterRoles:\n - admin\n - capsule-namespace-deleter\n kind: Group\n name: system:masters\n #\n # Uncomment if Argo CD manage main EDP tenant\n #- clusterRoles:\n # - admin\n # - capsule-namespace-deleter\n # kind: ServiceAccount\n # name: system:serviceaccount:argocd:argocd-application-controller\n #\n # Uncomment if edp-oidc-admins group manage main EDP tenant\n #- clusterRoles:\n # - admin\n # - capsule-namespace-deleter\n # kind: Group\n # name: sandbox-oidc-cluster-admins\n resourceQuotas:\n items:\n # The maximum CPU and Memory capacity for the EDP tenant\n - hard:\n limits.cpu: '2'\n limits.memory: 2Gi\n # The maximum number of pods that can be deployed within a namespace\n - hard:\n pods: '15'\n scope: Tenant\n serviceOptions:\n # Enable the capabilities to create ClusterIP service types only\n allowedServices:\n externalName: false\n loadBalancer: false\n nodePort: false\n
To install the Capsule tenant, use the Cluster Add-Ons approach.
Create namespace for the EDP tenant:
Log in as a system:masters member and create a namespace for platform deployment under the Capsule tenant using the following command:
kubectl create namespace edp\n
To ensure that the edp namespace is successfully created under the Capsule tenant, you can verify the status of the Capsule tenant using the following command:
As a result of following these instructions, Capsule policies are used to manage the EDP core components and deployable environments. By adhering to these guidelines, you should successfully install EDP with Capsule enabled as the tenancyEngine.
"},{"location":"operator-guide/configure-keycloak-oidc-eks/","title":"EKS OIDC With Keycloak","text":""},{"location":"operator-guide/configure-keycloak-oidc-eks/#eks-oidc-with-keycloak","title":"EKS OIDC With Keycloak","text":"
This article provides the instruction of configuring Keycloak as OIDC Identity Provider for EKS. The example is written on Terraform (HCL).
To follow the instruction, check the following prerequisites:
terraform 0.14.10
hashicorp/aws = 4.8.0
mrparkers/keycloak >= 3.0.0
hashicorp/kubernetes ~> 2.9.0
kubectl = 1.22
kubelogin >= v1.25.1
Ensure that Keycloak has network availability for AWS (not in a private network).
Note
To connect OIDC with a cluster, install and configure the kubelogin plugin. For Windows, it is recommended to download the kubelogin as a binary and add it to your PATH.
The solution includes three types of the resources - AWS (EKS), Keycloak, Kubernetes. The left part of Keycloak resources remain unchanged after creation, thus allowing us to associate a claim for a user group membership. Other resources can be created, deleted or changed if needed. The most crucial from Kubernetes permissions are Kubernetes RoleBindings and ClusterRoles/Roles. Roles present a set of permissions, in turn RoleBindings map Kubernetes Role to representative Keycloak groups, so a group member can have just appropriate permissions.
resource \"keycloak_openid_client_scope\" \"openid_client_scope\" {\n realm_id = <realm_id>\n name = \"groups\"\n description = \"When requested, this scope will map a user's group memberships to a claim\"\n include_in_token_scope = true\n consent_screen_text = false\n}\n
Add scope to the client by selecting all default client scope:
The resource creation takes around 20-30 minutes. The resource doesn't support updating, so each change will lead to deletion of the old instance and creation of a new instance instead.
When creating the Keycloak group, ClusterRole, and ClusterRoleBinding, a user receives cluster admin permissions. There is also an option to provide admin permissions just to a particular namespace or another resources set in another namespace. For details, please refer to the Mixing Kubernetes Roles page.
Before testing, ensure that a user is a member of the correct Keycloak group. To add a user to a Keycloak group:
Open Keycloak
Choose realm
Open user screen with search field
Find a user and open the configuration
Open Groups tab
In Available Groups, choose an appropriate group
Click the Join button
The group should appear in the Group Membership list
Follow the steps below to test the configuration:
Run kubectl command, it is important to specify the correct kubeconfig:
KUBECONFIG=<path_to_oidc_kubeconfig> kubectl get ingresses -n <namespace_name>\n
After the first run and redirection to the Keycloak login page, log in using credentials (login:password) or using SSO Provider. In case of the successful login, you will receive the following notification that can be closed:
OIDC Successful Login
As the result, a respective response from the Kubernetes will appear in the console in case a user is configured correctly and is a member of the correct group and Roles/RoleBindings.
If something is not set up correctly, the following output error will be displayed:
Error from server (Forbidden): ingresses.networking.k8s.io is forbidden:\nUser \"https://<keycloak_url>/auth/realms/<realm>#<keycloak_user_id>\"\ncannot list resource \"ingresses\" in API group \"networking.k8s.io\" in the namespace \"<namespace_name>\"\n
To update the session, clear cache. The default location for the login cache:
rm -rf ~/.kube/cache\n
"},{"location":"operator-guide/configure-keycloak-oidc-eks/#access-cluster-via-lens","title":"Access Cluster via Lens","text":"
To access the Kubernetes cluster via Lens, follow the steps below to configure it:
Add a new kubeconfig to the location where Lens has access. The default location of the kubeconfig is ~/.kube/config but it can be changed by navigating to File -> Preferences -> Kubernetes -> Kubeconfig Syncs;
(Optional) Using Windows, it is recommended to reboot the system after adding a new kubeconfig;
Authenticate on the Keycloak login page to be able to access the cluster.
Note
Lens does not add namespaces of the project automatically, so it is necessary to add them manually, simply go to Settings -> Namespaces and add the namespaces of a project.
In dynamic projects, changes to the container registry may be necessary. This section provides instructions for switching the container registry.
Warning
Exercise caution: Removing registry settings may disrupt your CI/CD process. New components created after changing the registry, including Components and Environments, will seamlessly function. However, existing 'Components' require additional steps, as outlined below.
To remove container registry integration from the EDP, follow the steps below:
1. In the EDP Portal main menu, navigate to EDP -> Configuration -> Registry.
2. Click the Reset registry button, type the confirm word and then click Confirm:
Registry settings
"},{"location":"operator-guide/container-registries/#update-registry-for-the-existing-components-and-environments","title":"Update Registry for the Existing Components and Environments","text":"
The EPAM Delivery Platform uses CodebaseImageStream custom resource to define Container Registry settings for the codebases. To update the registry for the existing codebases, follow the steps below:
List all the existing CodebaseImageStream CR(s) and copy their <name> and <codebase name> fields:
kubectl get codebaseimagestream -n edp\n
Patch the CodebaseImageStream CR(s) using the commands for the registry you switched to:
If necessary, update the registry credentials for the existing CD pipelines by copying the regcred secret from the edp namespace to all the namespaces managed by the platform. To get the list of the namespaces, run the following command:
kubectl get stages -n edp -o jsonpath='{range .items[*]}{.spec.namespace}{\"\\n\"}{end}'\n
"},{"location":"operator-guide/container-registry-harbor-integration-tekton-ci/","title":"Harbor Integration","text":""},{"location":"operator-guide/container-registry-harbor-integration-tekton-ci/#integrate-harbor-with-edp-pipelines","title":"Integrate Harbor With EDP Pipelines","text":"
Harbor serves as a tool for storing images and artifacts. This documentation contains instructions on how to create a project in Harbor and set up a robot account for interacting with the registry from CI pipelines.
Harbor integration with Tekton enables the centralized storage of container images within the cluster, eliminating the need for external services. By leveraging Harbor as the container registry, users can manage and store their automation results and reports in one place.
Creating two accounts with different permissions to push (read/write) and pull (read-only) project images.
"},{"location":"operator-guide/container-registry-harbor-integration-tekton-ci/#create-new-project","title":"Create New Project","text":"
The process of creating new projects is the following:
Log in to the Harbor console using your credentials.
Navigate to the Projects menu, click the New Project button:
Projects menu
On the New Project menu, enter a project name that matches your EDP namespace in the Project Name field. Keep other fields as default and click OK to continue:
New Project menu
"},{"location":"operator-guide/container-registry-harbor-integration-tekton-ci/#set-up-robot-account","title":"Set Up Robot Account","text":"
To make EDP and Harbor project interact with each other, set up a robot account:
Navigate to your newly created project, select Robot Accounts menu and choose New Robot Account:
Create Robot Account menu
In the pop-up window, fill in the fields as follows:
Name - edp-push;
Expiration time - set the value which is aligned with your organization policy;
Description - read/write permissions;
Permissions - Pull Repository and Push Repository.
To proceed, click the ADD button:
Robot Accounts menu
In the appeared window, copy the robot account credentials or click the Export to file button to save the secret and account name locally:
New credentials for Robot Account
Provision the kaniko-docker-config secrets using kubectl, EDP Portal or with the externalSecrets operator:
It is highly recommended to delete all the resources created via EDP Portal UI first. It can be:
Applications;
Libraries;
Autotests;
Infrastructures;
CD Pipelines.
We recommend deleting them via EDP Portal UI respectively, although it is also possible to delete all the EDP Portal resources using the kubectl delete command.
Delete application namespaces. They should be called according to the edp-<cd-pipeline>-<stage-name> pattern.
Uninstall EDP the same way it was installed.
Run the script that deletes the rest of the custom resources:
The script will prompt user to specify the namespace where EDP was deployed in and choose if the namespace is going to be deleted. This script will delete EDP custom resources in the namespace specified by user.
In Keycloak, delete the edp-main realm, also delete client which is supposed to be called by the edp-main pattern in the openshift realm.
This instruction offers a comprehensive guide on deploying an Amazon Elastic Kubernetes Service (EKS) cluster, ensuring a scalable and secure Kubernetes environment on AWS. For those looking to optimize their EKS cluster configurations, it is highly recommended to consult the AWS EKS Best Practices guide. This resource covers a wide range of topics crucial for the successful deployment and operation of your EKS clusters, including:
Security: Best practices for securing your EKS clusters, including IAM roles, network policies, and secrets management.
Networking: Guidance on setting up VPCs, subnets, and load balancers to ensure efficient and secure network traffic.
Monitoring and Logging: Strategies for implementing comprehensive monitoring and logging solutions using AWS CloudWatch and other tools to maintain visibility into cluster performance and operational health.
Performance: Tips for optimizing cluster performance through the proper selection of EC2 instances, efficient load balancing, and autoscaling configurations.
Cost Optimization: Techniques for managing and reducing costs associated with running EKS clusters, including instance selection and resource allocation strategies.
By adhering to these best practices, developers and system administrators can ensure that their AWS EKS clusters are robust, secure, and cost-effective, facilitating a smooth and efficient CI/CD pipeline for software development.
Our approach to deploying the AWS EKS Cluster is based on the widely-used terraform-aws-eks module from the Terraform AWS Modules community. This module facilitates the creation of AWS Elastic Kubernetes Service (EKS) resources with best practices in mind. We encourage users to review the module's documentation to fully understand its capabilities and how it aligns with the requirements of your specific deployment scenario.
Before the EKS cluster deployment and configuration, make sure to check the prerequisites. Install the required tools listed below:
Git
Terraform
AWS CLI
tfenv
To check the correct tools installation, run the following commands:
Before initiating the deployment, it is crucial to consult the AWS Service Limits documentation. Please review and adjust these limits as necessary to ensure your deployment proceeds smoothly without hitting service constraints.
"},{"location":"operator-guide/deploy-aws-eks/#aws-iam-roles","title":"AWS IAM Roles","text":"
This step covers the EKSDeployerRole AWS IAM role creation. To create the role, take the following steps:
Navigate to the IAM module directory:
cd ../iam\n
Setup backend for store Terraform states remotely and support state locking and consistency checking via DynamoDB. Insert the missing fields in the iam/providers.tf file:
Fill in the input variables for Terraform run in the iam/template.tfvars file. Refer to the iam/example.tfvars as an example. Please find the detailed description of the variables in the iam/variables.tf file:
Create the AWS VPC Subnets for instances and AWS ALB
Create the AWS VPC Routing
To accomplish the tasks outlined above, follow these steps:
Navigate to the VPC module directory:
cd ../vpc\n
Setup backend for store Terraform states remotely and support state locking and consistency checking via DynamoDB. Insert the missing fields in the file vpc/providers.tf:
Fill in the input variables for Terraform run in the vpc/template.tfvars file. Use the vpc/example.tfvars as an example. Please find the detailed description of the variables in the vpc/variables.tf file:
"},{"location":"operator-guide/deploy-aws-eks/#deploy-and-preconfigure-aws-eks","title":"Deploy and preconfigure AWS EKS","text":"
This step will cover the following topics:
Create the EKS Cluster
Create the AWS ASGs for the EKS Cluster
Create the AWS ALB
(Optional) Create the AWS IAM role Kaniko to use AWS ECR
To accomplish the tasks outlined above, follow these steps:
Navigate to the EKS module directory:
cd ../eks\n
Setup backend for store Terraform states remotely and support state locking and consistency checking via DynamoDB. Insert the missing fields in the file eks/providers.tf:
Fill in the input variables for Terraform run in the eks/template.tfvars file. Use the eks/example.tfvars as an example. Please find the detailed description of the variables in the eks/variables.tf file:
Once AWS EKS Cluster is successfully deployed, you can navigate to our EDP addons to install and manage cluster applications using the GitOps approach.
This instruction provides detailed information on the OKD 4.10 cluster deployment in the AWS Cloud and contains the additional setup necessary for the managed infrastructure.
A full description of the cluster deployment can be found in the official documentation.
Create the AWS IAM user with the required permissions. Make sure the AWS account is active, and the user doesn't have a permission boundary. Remove any Service Control Policy (SCP) restrictions from the AWS account.
Generate a key pair for cluster node SSH access. Please perform the steps below:
Generate the SSH key. Specify the path and file name, such as ~/.ssh/id_ed25519, of the new SSH key. If there is an existing key pair, ensure that the public key is in the ~/.ssh directory.
Before deploying the OKD cluster, please perform the steps below:
Download the OKD installer.
Extract the installation program:
tar -xvf openshift-install-linux.tar.gz\n
Download the installation pull secret for any private registry. This pull secret allows to authenticate with the services that are provided by the authorities, including Quay.io, serving the container images for OKD components. For example, here is a pull secret for Docker Hub:
To specify more details about the OKD cluster platform or to modify the values of the required parameters, customize the install-config.yaml file for the AWS. Please see below an example of the customized file:
If the cloud provider account configured on the host does not have sufficient permissions to deploy the cluster, the installation process stops, and the missing permissions are displayed.
When the cluster deployment is completed, directions for accessing the cluster are displayed in the terminal, including a link to the web console and credentials for the kubeadmin user. The kubeconfig for the cluster will be located in okd-deployment/auth/kubeconfig.
Example output
...\nINFO Install complete!\nINFO To access the cluster as the system:admin user when using 'oc', run 'export KUBECONFIG=/home/myuser/install_dir/auth/kubeconfig'\nINFO Access the OpenShift web-console here: https://console-openshift-console.apps.mycluster.example.com\nINFO Login to the console with the user: \"kubeadmin\", and password: \"4vYBz-Ee6gm-ymBZj-Wt5AL\"\nINFO Time elapsed: 36m22s:\n
Warning
The Ignition config files contain certificates that expire after 24 hours, which are then renewed at that time. Do not turn off the cluster for this time, or you will have to update the certificates manually. See OpenShift Container Platform documentation for more information.
"},{"location":"operator-guide/deploy-okd-4.10/#log-into-the-cluster","title":"Log Into the Cluster","text":"
"},{"location":"operator-guide/deploy-okd-4.10/#manage-okd-cluster-without-the-inbound-rules","title":"Manage OKD Cluster Without the Inbound Rules","text":"
In order to manage the OKD cluster without the 0.0.0.0/0 inbound rules, please perform the steps below:
Create a Security Group with a list of your external IPs:
This instruction provides detailed information on the OKD 4.9 cluster deployment in the AWS Cloud and contains the additional setup necessary for the managed infrastructure.
A full description of the cluster deployment can be found in the official documentation.
Create the AWS IAM user with the required permissions. Make sure the AWS account is active, and the user doesn't have a permission boundary. Remove any Service Control Policy (SCP) restrictions from the AWS account.
Generate a key pair for cluster node SSH access. Please perform the steps below:
Generate the SSH key. Specify the path and file name, such as ~/.ssh/id_ed25519, of the new SSH key. If there is an existing key pair, ensure that the public key is in the ~/.ssh directory.
Add the SSH private key identity to the SSH agent for a local user if it has not already been added.
eval \"$(ssh-agent -s)\"\n
Add the SSH private key to the ssh-agent:
ssh-add <path>/<file_name>\n
"},{"location":"operator-guide/deploy-okd/#prepare-for-the-deployment-process","title":"Prepare for the Deployment Process","text":"
Before deploying the OKD cluster, please perform the steps below:
Download the OKD installer.
Extract the installation program:
tar -xvf openshift-install-linux.tar.gz\n
Download the installation pull secret for any private registry.
This pull secret allows to authenticate with the services that are provided by the included authorities, including Quay.io serving container images for OKD components. For example, here is a pull secret for Docker Hub:
To specify more details about the OKD cluster platform or to modify the values of the required parameters, customize the install-config.yaml file for AWS. Please see an example of the customized file below:
If the cloud provider account configured on the host does not have sufficient permissions to deploy the cluster, the installation process stops, and the missing permissions are displayed.
When the cluster deployment is completed, directions for accessing the cluster are displayed in the terminal, including a link to the web console and credentials for the kubeadmin user. The kubeconfig for the cluster will be located in okd-deployment/auth/kubeconfig.
Example output
...\nINFO Install complete!\nINFO To access the cluster as the system:admin user when using 'oc', run 'export KUBECONFIG=/home/myuser/install_dir/auth/kubeconfig'\nINFO Access the OpenShift web-console here: https://console-openshift-console.apps.mycluster.example.com\nINFO Login to the console with the user: \"kubeadmin\", and password: \"4vYBz-Ee6gm-ymBZj-Wt5AL\"\nINFO Time elapsed: 36m22s:\n
Warning
The Ignition config files contain certificates that expire after 24 hours, which are then renewed at that time. Do not turn off the cluster for this time, or you will have to update the certificates manually. See OpenShift Container Platform documentation for more information.
"},{"location":"operator-guide/deploy-okd/#log-into-the-cluster","title":"Log Into the Cluster","text":"
The Amazon Elastic Block Store (Amazon EBS) Container Storage Interface (CSI) driver allows Amazon Elastic Kubernetes Service (Amazon EKS) clusters to manage the lifecycle of Amazon EBS volumes for Kubernetes Persistent Volumes.
An existing AWS Identity and Access Management (IAM) OpenID Connect (OIDC) provider for your cluster. To determine whether you already have an OIDC provider or to create a new one, see Creating an IAM OIDC provider for your cluster.
To add an Amazon EBS CSI add-on, please follow the steps below:
Check your cluster details (the random value in the cluster name will be required in the next step):
kubectl cluster-info\n
Create Kubernetes IAM Trust Policy for Amazon EBS CSI Driver. Replace AWS_ACCOUNT_ID with your account ID, AWS_REGION with your AWS Region, and EXAMPLED539D4633E53DE1B71EXAMPLE with the value that was returned in the previous step. Save this Trust Policy into a file aws-ebs-csi-driver-trust-policy.json.
To get the notion of the IAM Role creation, please refer to the official documentation.
Create the IAM role, for example:
aws iam create-role \\\n --role-name AmazonEKS_EBS_CSI_DriverRole \\\n --assume-role-policy-document file://\"aws-ebs-csi-driver-trust-policy.json\"\n
Attach the required AWS Managed Policy AmazonEBSCSIDriverPolicy to the role with the following command:
aws iam attach-role-policy \\\n --policy-arn arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy \\\n --role-name AmazonEKS_EBS_CSI_DriverRole\n
Add the Amazon EBS CSI add-on using the AWS CLI. Replace my-cluster with the name of your cluster, AWS_ACCOUNT_ID with your account ID, and AmazonEKS_EBS_CSI_DriverRole with the name of the role that was created earlier:
When the plugin is deployed, it creates the ebs-csi-controller-sa service account. The service account is bound to a Kubernetes ClusterRole with the required Kubernetes permissions. The ebs-csi-controller-sa service account should already be annotated with arn:aws:iam::AWS_ACCOUNT_ID:role/AmazonEKS_EBS_CSI_DriverRole. To check the annotation, please run:
kubectl get sa ebs-csi-controller-sa -n kube-system -o=jsonpath='{.metadata.annotations}'\n
In case pods have errors, restart the ebs-csi-controller deployment:
EDP uses two different methods to regulate access to resources, each tailored to specific scenarios:
The initial method involves roles and groups in Keycloak and is used for SonarQube and partly for Nexus.
The second method of resource access control in EDP involves EDP custom resources. This approach requires modifying custom resources that outline the required access privileges for every user or group and is used to govern access to Gerrit, Nexus, EDP Portal, EKS Cluster and Argo CD.
Info
These two approaches are not interchangeable, as each has its unique capabilities.
The Keycloak realm of edp has two realm roles with a composite types named administrator and developer:
The administrator realm role is designed for users who need administrative access to the tools used in the project. This realm role contains the sonar-administrators role. Users who are assigned the administrator realm role will be granted these two roles automatically.
The developer realm role, on the other hand, is designed for users who need access to the development tools used in the project. This realm role also contains the sonar-developers role. Users who are assigned the developer realm role will be granted these two roles automatically.
These realm roles have been defined to make it easier to assign groups of rights to users.
The table below shows the realm roles and the composite types they relate to.
Realm Role Name Regular Role Composite role administrator developer sonar-administrators sonar-developers"},{"location":"operator-guide/edp-access-model/#realm-groups","title":"Realm Groups","text":"
EDP uses two different realms for group management, edp and openshift:
The edp realm contains two groups that are specifically used for controlling access to Argo CD. These groups are named ArgoCDAdmins and ArgoCD-edp-users.
The openshift realm contains five groups that are used for access control in both the EDP Portal and EKS cluster. These groups are named edp-oidc-admins, edp-oidc-builders, edp-oidc-deployers,edp-oidc-developers and edp-oidc-viewers.
Realm Group Name Realm Name ArgoCDAdmins edpArgoCD-edp-usersedpedp-oidc-admins openshift edp-oidc-builders openshift edp-oidc-deployers openshift edp-oidc-developers openshift edp-oidc-viewers openshift"},{"location":"operator-guide/edp-access-model/#sonarqube","title":"SonarQube","text":"
In the case of SonarQube, there are two ways to manage access: via Keycloak and via EDP approach. This sections describes both of the approaches.
"},{"location":"operator-guide/edp-access-model/#manage-access-via-keycloak","title":"Manage Access via Keycloak","text":"
SonarQube access is managed using Keycloak roles in the edp realm. The sonar-developers and sonar-administrators realm roles are the two available roles that determine user access levels. To grant access, the corresponding role must be added to the user in Keycloak.
For example, a user who needs developer access to SonarQube should be assigned the sonar-developers or developer composite role in Keycloak.
"},{"location":"operator-guide/edp-access-model/#edp-approach-for-managing-access","title":"EDP Approach for Managing Access","text":"
EDP provides its own SonarQube Permission Template, which is used to manage user access and permissions for SonarQube projects.
The template is stored in the custom SonarQube resource of the operator, an example of a custom resource can be found below.
The SonarQube Permission Template contains three groups: non-interactive-users, sonar-administrators and sonar-developers:
non-interactive-users are users who do not require direct access to the SonarQube project but need to be informed about the project's status and progress. This group has read-only access to the project, which means that they can view the project's data and metrics but cannot modify or interact with it in any way.
sonar-administrators are users who have full control over the SonarQube project. They have the ability to create, modify, and delete projects, as well as manage user access and permissions. This group also has the ability to configure SonarQube settings and perform other administrative tasks.
sonar-developers are users who are actively working on the SonarQube project. They have read and write access to the project, which means that they can modify the project's data and metrics. This group also has the ability to configure project-specific settings and perform other development tasks.
These groups are designed to provide different levels of access to the SonarQube project, depending on the user's role and responsibilities.
Info
If a user has no group, it will have the sonar-users group by default. This group does not have any permissions in the edp-default Permission Template.
The permissions that are attached to each of the groups are described below in the table:
Group Name Permissions non-interactive-users user sonar-administrators admin, user sonar-developers codeviewer, issueadmin, securityhotspotadmin, user sonar-users -"},{"location":"operator-guide/edp-access-model/#nexus","title":"Nexus","text":"
Users authenticate to Nexus using their Keycloak credentials.
During the authentication process, the OAuth2-Proxy receives the user's role from Keycloak.
Info
Only users with either the administrator or developer role in Keycloak can access Nexus.
Nexus has four distinct roles available, including edp-admin, edp-viewer, nx-admin and nx-anonymous. To grant the user access to one or more of these roles, an entry must be added to the custom Nexus resource.
For instance, in the context of the custom Nexus resource, the user \"user_1@example.com\" has been assigned the \"nx-admin\" role. An example can be found below:
The user should use their credentials from Keycloak when authenticating to Gerrit.
After logging into Gerrit, the user is not automatically attached to any groups. To add a user to a group, the GerritGroupMember custom resource must be created. This custom resource specifies the user's email address and the name of the group to which they should be added.
The ConfigMap below is an example of the GerritGroupMember resource:
After the GerritGroupMember resource is created, the user will have the permissions and access levels associated with that group.
"},{"location":"operator-guide/edp-access-model/#edp-portal-and-eks-cluster","title":"EDP Portal and EKS Cluster","text":"
Both Portal and EKS Cluster use Keycloak groups for controlling access. Users need to be added to the required group in Keycloak to get access. The groups that are used for access control are in the openshift realm.
Note
The openshift realm is used because a Keycloak client for OIDC is in this realm.
Independent group: provides the minimum required permission set.
Extension group: extends the rights of an independent group.
For example, the edp-oidc-viewers group can be extended with rights from the edp-oidc-builders group.
Group Name Independent Group Extension Group edp-oidc-adminsedp-oidc-developersedp-oidc-viewersedp-oidc-buildersedp-oidc-deployers Name Action List View Getting of all namespaced resources Build Starting a PipelineRun from EDP Portal UI Deploy Deploying a new version of application via Argo CD Application Group Name View Build Deploy Full Namespace Access edp-oidc-adminsedp-oidc-developersedp-oidc-viewersedp-oidc-buildersedp-oidc-deployers"},{"location":"operator-guide/edp-access-model/#cluster-rbac-resources","title":"Cluster RBAC Resources","text":"
The edp namespace has five role bindings that provide the necessary permissions for the Keycloak groups described above.
Role Binding Name Role Name Groups tenant-admin cluster-admin edp-oidc-admins tenant-builder tenant-builder edp-oidc-builders tenant-deployer tenant-deployer edp-oidc-deployers tenant-developer tenant-developer edp-oidc-developers tenant-viewer view edp-oidc-viewers , edp-oidc-developers
Note
EDP provides an aggregate ClusterRole with permissions to view custom EDP resources. ClusterRole is named edp-aggregate-view-edp
Info
The tenant-admin RoleBinding will be created in a created namespace by cd-pipeline-operator. tenant-admin RoleBinding assign the admin role to edp-oidc-admins and edp-oidc-developers groups.
"},{"location":"operator-guide/edp-access-model/#grant-user-access-to-the-created-namespaces","title":"Grant User Access to the Created Namespaces","text":"
To provide users with admin or developer privileges for project namespaces, they need to be added to the edp-oidc-admins and edp-oidc-developers groups in Keycloak.
In Argo CD, groups are specified when creating an AppProject to restrict access to deployed applications. To gain access to deployed applications within a project, the user must be added to their corresponding Argo CD group in Keycloak. This ensures that only authorized users can access and modify applications within the project.
Info
By default, only the ArgoCDAdmins group is automatically created in Keycloak.
EDP installation area on a diagram is described by following link;
Once the above step is executed, edp-cd-pipeline-operator service account will be linked to kiosk-edit ClusterRole to get an ability for leveraging Kiosk specific resources (e.g. Space);
Newly created stage in edp installation of EDP generates new Kiosk Space resource that is linked to edp Kiosk Account;
According to Kiosk doc the Space resource creates namespace with RoleBinding that contains relation between service account which is linked to Kiosk Account and kiosk-space-admin ClusterRole. As cd-pipeline-operator ServiceAccount is linked to Account, it has admin permissions in all generated by him namespaces.
This page is a detailed guide on integrating Keycloak with the edp-keycloak-operator to serve as an identity provider for AWS Elastic Kubernetes Service (EKS). It provides step-by-step instructions for creating necessary realms, users, roles, and client configurations for a seamless Keycloak-EKS collaboration. Additionally, it includes guidelines on installing the edp-keycloak-operator using Helm charts.
"},{"location":"operator-guide/eks-oidc-integration/#connect-keycloak-operator-to-keycloak","title":"Connect Keycloak Operator to Keycloak","text":"
The next stage after installing Keycloak is to integrate it with the Keycloak operator. It can be implemented with the following steps:
Create the keycloak secret that will contain username and password to perform the integration. Set your own password. The username must be orchestrator:
As a result, Keycloak is integrated with the AWS Elastic Kubernetes Service. This integration enables users to log in to the EKS cluster effortlessly using their kubeconfig files while managing permissions through Keycloak.
"},{"location":"operator-guide/enable-irsa/","title":"Associate IAM Roles With Service Accounts","text":""},{"location":"operator-guide/enable-irsa/#associate-iam-roles-with-service-accounts","title":"Associate IAM Roles With Service Accounts","text":"
This page contains accurate information on how to associate an IAM role with the service account (IRSA) in EPAM Delivery Platform.
Get acquainted with the AWS Official Documentation on the subject before proceeding.
"},{"location":"operator-guide/enable-irsa/#common-configuration-of-iam-roles-with-service-accounts","title":"Common Configuration of IAM Roles With Service Accounts","text":"
To successfully associate the IAM role with the service account, follow the steps below:
Create an IAM role that will further be associated with the service account. This role must have the following trust policy:
Deploy the amazon-eks-pod-identity-webhook v0.2.0.
Note
The amazon-eks-pod-identity-webhook functionality is provided out of the box in EKS v1.21 and higher. This does not apply if the cluster has been upgraded from older versions. Therefore, skip step 2 and continue from step 3 in this documentation.
2.1. Provide the stable(ed8c41f) version of the Docker image in the deploy/deployment-base.yaml file.
2.2. Provide ${CA_BUNDLE}_in the_deploy/mutatingwebhook.yaml file:
secret_name=$(kubectl -n default get sa default -o jsonpath='{.secrets[0].name}') \\\n CA_BUNDLE=$(kubectl -n default get secret/$secret_name -o jsonpath='{.data.ca\\.crt}' | tr -d '\\n')\n
2.3. Deploy the Webhook:
kubectl apply -f deploy/\n
2.4. Approve the csr:
csr_name=$(kubectl get csr -o jsonpath='{.items[?(@.spec.username==\"system:serviceaccount:default:pod-identity-webhook\")].metadata.name}')\n kubectl certificate approve $csr_name\n
Annotate the created service account with the IAM role:
External Secrets Operator (ESO) can be integrated with EDP.
There are multiple Secrets Providers that can be used within ESO. EDP is integrated with two major providers:
Kubernetes Secrets
AWS Systems Manager Parameter Store
EDP uses various secrets to integrate various applications. Below is a list of secrets that are used in the EPAM Delivery Platform and their description. All the secrets are encoded in Base64 format.
Secret Name Fields Description Used by keycloak usernamepassword Username and password with specific rights for EDP tenant in Keycloak keycloak-operator ci-defectdojo tokenurl DefectDojo tokenDefectDojo URL edp-tekton kaniko-docker-config .dockerconfigjson Serialized JSON that follows docker config patterns edp-tekton regcred .dockerconfigjson Serialized JSON that follows docker config patterns cd-pipeline-operator ci-github id_rsatokensecretString Private key from github repo API tokenRandom string edp-tekton ci-gitlab id_rsatokensecretString Private key from gitlab repo API tokenRandom string edp-tekton ci-jira usernamepassword Jira username Jira password edp-codebase-operator ci-sonarqube tokenurl SonarQube tokenSonarQube URL edp-tekton ci-nexus usernamepasswordurl Nexus usernameNexus passwordNexus URL edp-tekton ci-dependency-track tokenurl Dependency-Track tokenDependency-Track URL edp-tekton oauth2-proxy-cookie-secret cookie-secret Secret key for oauth2-proxy edp-install keycloak-client-headlamp-secret clientSecret Secret key for keycloak client keycloak-operator ci-argocd tokenurl Argo CD tokenArgo CD URL edp-tekton"},{"location":"operator-guide/external-secrets-operator-integration/#edp-core-secrets","title":"EDP Core Secrets","text":"
The list below represents the baseline required for full operation within EDP:
kaniko-docker-config: Used for pushing docker images to a specific registry.
ci-sonarqube: Used in the CI process for SonarQube integration.
ci-nexus: Used for pushing artifacts to the Nexus storage.
These secrets are mandatory for Tekton pipelines to work properly.
All secrets are stored in Kubernetes in pre-defined namespaces. EDP suggests using the following approach for secrets management:
EDP_NAMESPACE-vault, where EDP_NAMESPACE is a name of the namespace where EDP is deployed, such as edp-vault. This namespace is used by EDP platform. Access to secrets in the edp-vault is permitted only for EDP Administrators.
EDP_NAMESPACE-cicd-vault, where EDP_NAMESPACE is a name of the namespace where EDP is deployed, such as edp-cicd-vault. Development team uses access to secrets in the edp-cicd-vaultfor microservices development.
See a diagram below for more details:
In order to install EDP, a list of passwords must be created. Secrets are provided automatically when using ESO.
Each secret must be defined by the ExternalSecret object. A code example below creates the keycloak secret in the edp namespace based on a secret with the same name in the edp-vault namespace:
apiVersion: external-secrets.io/v1beta1\nkind: ExternalSecret\nmetadata:\n name: keycloak\n namespace: edp\nspec:\n refreshInterval: 1h\n secretStoreRef:\n kind: SecretStore\n name: edp-vault\n # target:\n # name: secret-to-be-created # name of the k8s Secret to be created. metadata.name used if not defined\n data:\n - secretKey: username # key to be created\n remoteRef:\n key: keycloak # remote secret name\n property: username # value will be fetched from this field\n - secretKey: password # key to be created\n remoteRef:\n key: keycloak # remote secret name\n property: password # value will be fetched from this field\n
Apply the same approach for enabling secrets management in the namespaces used for microservices development, such as sit and qa on the diagram above.
"},{"location":"operator-guide/external-secrets-operator-integration/#aws-systems-manager-parameter-store","title":"AWS Systems Manager Parameter Store","text":"
AWS SSM Parameter Store can be used as a Secret Provider for ESO. For EDP, it is recommended to use the IAM Roles For Service Accounts approach (see a diagram below).
"},{"location":"operator-guide/external-secrets-operator-integration/#aws-parameter-store-in-edp-scenario","title":"AWS Parameter Store in EDP Scenario","text":"
In order to install EDP, a list of passwords must be created. Follow the steps below, to get secrets from the SSM:
In the AWS, create an AWS IAM policy and an IAM role used by ServiceAccount in SecretStore. The IAM role must have permissions to get values from the SSM Parameter Store.
a. Create an IAM policy that allows to get values from the Parameter Store with the edp/ path. Use your AWS Region and AWS Account Id:
b. Create an AWS IAM role with trust relationships (defined below) and attach the IAM policy. Put your string for Federated value (see more on IRSA enablement for EKS Cluster) and AWS region.
Create a secret in the AWS Parameter Store with the name /edp/my-json-secret. This secret is represented as a parameter of type string within the AWS Parameter Store:
"},{"location":"operator-guide/github-debug-webhooks/","title":"Debug GitHub Webhooks in Jenkins","text":""},{"location":"operator-guide/github-debug-webhooks/#debug-github-webhooks-in-jenkins","title":"Debug GitHub Webhooks in Jenkins","text":"
A webhook enables third-party services like GitHub to send real-time updates to an application. Updates are triggered by an event or an action by the webhook provider (for example, a push to a repository, a Pull Request creation), and pushed to the application via HTTP requests, namely, Jenkins. The GitHub Jenkins job provisioner creates a webhook in the GitHub repository during the Create release pipeline once the Integrate GitHub/GitLab in Jenkins is enabled and the GitHub Webhook Configuration is completed.
The Jenkins setup in EDP uses the following plugins responsible for listening on GitHub webhooks:
GitHub plugin is configured to listen on Push events.
GitHub Pull Request Builder is configured to listen on Pull Request events.
In case of any issues with webhooks, try the following solutions:
Check that the firewalls are configured to accept the incoming traffic from the IP address range that is described in the GitHub documentation.
Check that GitHub Personal Access Token is correct and has sufficient scope permissions.
Check that the job has run at least once before using the hook (once an application is created in EDP, the build job should be run automatically in Jenkins).
Check that both Push and issue comment and Pull Request webhooks are created on the GitHub side (unlike GitLab, GitHub does not need separate webhooks for each branch):
Go to the GitHub repository -> Settings -> Webhooks.
Webhooks settings
Click each webhook and check if the event delivery is successful:
The URL payload must be https://jenkins-the-host.com/github-webhook/ for the GitHub plugin and https://jenkins-the-host.com/ghprbhook/ for the GitHub Pull Request Builder.
The content type must be application/json for Push events and application/x-www-form-urlencoded for Pull Request events.
The html_url in the Payload request must match the repository URL and be without .git at the end of the URL.
Check that the X-Hub-Signature secret is verified. It is provided by the Jenkins GitHub plugin for Push events and by the GitHub Pull Request Builder plugin for Pull Request events. The Secret field is optional. Nevertheless, if incorrect, it can prevent webhook events.
For the GitHub plugin (Push events):
Go to Jenkins -> Manage Jenkins -> Configure System, and find the GitHub plugin section.
Select Advanced -> Shared secrets to add the secret via the Jenkins Credentials Provider.
For the GitHub Pull Request Builder (Pull Request events):
Go to Jenkins -> Manage Jenkins -> Configure System, and find the GitHub Pull Request Builder plugin section.
Check Shared secret that can be added manually.
Redeliver events by clicking the Redeliver button and check the Response body.
Manage webhook
Note
Use Postman to debug webhooks. Add all headers to Postman from the webhook Request -> Headers field and send the payload (Request body) using the appropriate content type.
Jan 17, 2022 8:51:14 AM INFO org.jenkinsci.plugins.github.webhook.subscriber.PingGHEventSubscriber onEvent\nPING webhook received from repo <https://github.com/user-profile/user-repo>!\n
Jan 17, 2022 8:17:53 AM FINE org.jenkinsci.plugins.ghprb.GhprbRootAction\nGot payload event: ping\n
Check that the repo pushing to Jenkins, the GitHub project URL in the project configuration, and the repos in the pipeline Job must be lined up.
Enable the GitHub hook trigger for GITScm polling for the Build job.
GitHub hook trigger
Enable the GitHub Pull Request Builder for the Code Review job.
GitHub pull request builder
Filter through Jenkins log by using Jenkins custom log recorder:
Go to Manage Jenkins -> System log -> Add new log recorder.
The Push events for the GitHub:
Logger Log Level org.jenkinsci.plugins.github.webhook.subscriber.DefaultPushGHEventSubscriber ALL com.cloudbees.jenkins.GitHubPushTrigger ALL com.cloudbees.jenkins.GitHubWebHook ALL org.jenkinsci.plugins.github.webhook.WebhookManager ALL org.jenkinsci.plugins.github.webhook.subscriber.PingGHEventSubscriber ALL
The Pull Request events for the GitHub Pull Request Builder:
Logger Log Level org.jenkinsci.plugins.ghprb.GhprbRootAction ALL org.jenkinsci.plugins.ghprb.GhprbTrigger ALL org.jenkinsci.plugins.ghprb.GhprbPullRequest ALL org.jenkinsci.plugins.ghprb.GhprbRepository ALL
Note
Below is an example of using the Pipeline script with webhooks for the GitHub plugin implemented in the EDP pipelines:
"},{"location":"operator-guide/gitlab-debug-webhooks/","title":"Debug GitLab Webhooks in Jenkins","text":""},{"location":"operator-guide/gitlab-debug-webhooks/#debug-gitlab-webhooks-in-jenkins","title":"Debug GitLab Webhooks in Jenkins","text":"
A webhook enables third-party services like GitLab to send real-time updates to the application. Updates are triggered by an event or action by the webhook provider (for example, a push to a repository, a Merge Request creation), and pushed to the application via the HTTP requests, namely, Jenkins. The GitLab Jenkins job provisioner creates a webhook in the GitLab repository during the Create release pipeline once the Integrate GitHub/GitLab in Jenkins is enabled and the GitLab Integration is completed.
The Jenkins setup in EDP uses the GitLab plugin responsible for listening on GitLab webhook Push and Merge Request events.
In case of any issues with webhooks, try the following solutions:
Check that the firewalls are configured to accept incoming traffic from the IP address range that is described in the GitLab documentation.
Check that GitLab Personal Access Token is correct and has the api scope. If you have used the Project Access Token, make sure that the role is Owner or Maintainer, and it has the api scope.
Check that the job has run at least once before using the hook (once an application is created in EDP, the build job should be run automatically in Jenkins).
Check that both Push Events, Note Events and Merge Requests Events, Note Events webhooks are created on the GitLab side for each branch (unlike GitHub, GitLab must have separate webhooks for each branch).
Go to the GitLab repository -> Settings -> Webhooks:
Webhooks list
Click Edit next to each webhook and check if the event delivery is successful. If the webhook is sent, the Recent Deliveries list becomes available. Click View details.
Webhooks settings
The URL payload must be similar to the job URL on Jenkins. For example: https://jenkins-server.com/project/project-name/MAIN-Build-job is for the Push events. https://jenkins-server.com/project/project-name/MAIN-Code-review-job is for the Merge Request events.
The content type must be application/json for both events.
The \"web_url\" in the Request body must match the repository URL.
Project \"web_url\", \"path_with_namespace\", \"homepage\" links must be without .git at the end of the URL.
Verify the Secret token (X-Gitlab-Token). This token comes from the Jenkins job due to the Jenkins GitLab Plugin and is created by our Job Provisioner:
Go to the Jenkins job and select Configure.
Select Advanced under the Build Triggers and check the Secret token.
Secret token is optional and can be empty. Nevertheless, if incorrect, it can prevent webhook events.
Redeliver events by clicking the Resend Request button and check the Response body.
Note
Use Postman to debug webhooks. Add all headers to Postman from the webhook Request Headers field and send the payload (Request body) using the appropriate content type.
Jan 17, 2022 11:26:34 AM INFO com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic\nWebHook call ed with url: /project/project-name/MAIN-Build-job\nJan 17, 2022 11:26:34 AM INFO com.dabsquared.gitlabjenkins.trigger.handler.AbstractWebHookTriggerHandler handle\nproject-name/MAIN-Build-job triggered for push.\n
Jan 17, 2022 11:14:58 AM INFO com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic\nWebHook called with url: /project/project-name/MAIN-Code-review-job\n
Check that the repository pushing to Jenkins and the repository(ies) in the pipeline Job are lined up. GitLab Connection must be defined in the job settings.
Check that the settings in the Build Triggers for the Build job are as follows:
Build triggers build pipeline
Check that the settings in the Build Triggers for the Code Review job are as follows:
Build triggers code review pipeline
Filter through Jenkins log by using Jenkins custom log recorder:
Go to Manage Jenkins -> System Log -> Add new log recorder.
The Push and Merge Request events for the GitLab:
Logger Log Level com.dabsquared.gitlabjenkins.webhook.GitLabWebHook ALL com.dabsquared.gitlabjenkins.trigger.handler.AbstractWebHookTriggerHandler ALL com.dabsquared.gitlabjenkins.trigger.handler.merge.MergeRequestHookTriggerHandlerImpl ALL com.dabsquared.gitlabjenkins.util.CommitStatusUpdater ALL
"},{"location":"operator-guide/harbor-oidc/","title":"OIDC in Harbor","text":""},{"location":"operator-guide/harbor-oidc/#harbor-oidc-configuration","title":"Harbor OIDC Configuration","text":"
This page provides instructions for configuring OIDC authorization for Harbor. This enables the use of Single Sign-On (SSO) for authorization in Harbor and allows centralized control over user access and rights through a single configuration point.
Create the KeycloakClient custom resource by applying the HarborKeycloakClient.yaml file in the edp namespace. This custom resource will use the keycloak-client-harbor-secret to include the harbor client. After the download, you will receive the created harbor client, and the password that is actually the value of the Kubernetes secret from the step 1:
This page provides the instructions of configuring the OIDC authorization for EDP Portal UI, thus allowing using SSO for authorization in Portal and controlling user access and rights from one configuration point.
group = edp-oidc-admins, edp-oidc-builders, edp-oidc-deployers, edp-oidc-developers, edp-oidc-viewers (Should be created manually in the realm from point 1)
Note
The values indicated above are the result of the Keycloak configuration as an OIDC identity provider. To receive them, follow the instructions on the Keycloak OIDC EKS Configuration page.
"},{"location":"operator-guide/import-strategy-tekton/","title":"Integrate GitHub/GitLab in Tekton","text":""},{"location":"operator-guide/import-strategy-tekton/#integrate-githubgitlab-in-tekton","title":"Integrate GitHub/GitLab in Tekton","text":"
This page describes how to integrate EDP with GitLab or GitHub Version Control System.
To start from, it is required to add both Secret with SSH key, API token, and GitServer resources by taking the steps below.
Generate an SSH key pair and add a public key to GitLab or GitHub account.
ssh-keygen -t ed25519 -C \"email@example.com\"\n
Generate access token for GitLab or GitHub account with read/write access to the API. Both personal and project access tokens are applicable.
GitHubGitLab
To create access token in GitHub, follow the steps below:
Log in to GitHub.
Click the profile account and navigate to Settings -> Developer Settings.
Select Personal access tokens (classic) and generate a new token with the following parameters:
Repo permission
Note
The access below is required for the GitHub Pull Request Builder plugin to get Pull Request commits, their status, and author info.
Admin:repo permission Admin:org permission User permission
Warning
Make sure to save a new personal access token because it won`t be displayed later.
To create access token in GitLab, follow the steps below:
Log in to GitLab.
In the top-right corner, click the avatar and select Settings.
On the User Settings menu, select Access Tokens.
Choose a name and an optional expiry date for the token.
In the Scopes block, select the api scope for the token.
Personal access tokens
Click the Create personal access token button.
Note
Make sure to save the access token as there will not be any ability to access it once again.
In case you want to create a project access token instead of a personal one, take the following steps:
Log in to GitLab and navigate to the project.
On the User Settings menu, select Access Tokens.
Choose a name and an optional expiry date for the token.
Choose a role: Owner or Maintainer.
In the Scopes block, select the api scope for the token.
Project access tokens
Click the Create project access token button.
Create a secret in the edp namespace for the Git account with the id_rsa, username, and token fields. Take the following template as an example (use ci-gitlab instead of ci-github for GitLab):
EDP Portalkubectl
Navigate to EDP Portal -> EDP -> Configuration -> Git Servers. Fill in the required fields:
Project access tokens
Create a manifest file called secret.yaml with the following content filled in:
Argo CD enablement for EDP consists of two major steps:
Argo CD installation
Argo CD integration with EDP (SSO enablement, codebase onboarding, etc.)
Argo CD can be installed in several ways, please follow the official documentation for more details. It is also possible to install Argo CD using the edp-cluster-add-ons.
"},{"location":"operator-guide/install-argocd/#install-with-helm","title":"Install With Helm","text":"
Follow the steps below to install Argo CD using Helm:
For the OpenShift users:
When using the OpenShift platform, apply the SecurityContextConstraints resource. Change the namespace in the users section if required.
Check out the values.yaml file sample of the Argo CD customization, which is based on the HA mode without autoscaling:
View: kubernetes-values.yaml
redis-ha:\n enabled: true\n\ncontroller:\n enableStatefulSet: true\n\nserver:\n replicas: 2\n extraArgs:\n - \"--insecure\"\n env:\n - name: ARGOCD_API_SERVER_REPLICAS\n value: '2'\n ingress:\n enabled: true\n hosts:\n - \"argocd.<Values.global.dnsWildCard>\"\n\n rbacConfig:\n # users may be still be able to login,\n # but will see no apps, projects, etc...\n policy.default: ''\n scopes: '[groups]'\n policy.csv: |\n # default global admins\n g, ArgoCDAdmins, role:admin\n\nrepoServer:\n replicas: 2\n\n# Deploy without sso\ndex:\n enabled: false\n\n# Disabled for multitenancy env with single instance deployment\napplicationSet:\n enabled: false\n
View: openshift-values.yaml
redis-ha:\n enabled: true\n\ncontroller:\n enableStatefulSet: true\n\nserver:\n replicas: 2\n extraArgs:\n - \"--insecure\"\n env:\n - name: ARGOCD_API_SERVER_REPLICAS\n value: '2'\n route:\n enabled: true\n hostname: \"argocd.<.Values.global.dnsWildCard>\"\n termination_type: edge\n termination_policy: Redirect\n\n rbacConfig:\n # users may be still be able to login,\n # but will see no apps, projects, etc...\n policy.default: ''\n scopes: '[groups]'\n policy.csv: |\n # default global admins\n g, ArgoCDAdmins, role:admin\n\nrepoServer:\n replicas: 2\n\n# Deploy without sso\ndex:\n enabled: false\n\n# Disabled for multitenancy env with single instance deployment\napplicationSet:\n enabled: false\n
Please refer to the DefectDojo Helm Chart and Deploy DefectDojo into the Kubernetes cluster sections for details.
To install DefectDojo, follow the steps below:
Check that a security namespace is created. If not, run the following command to create it:
kubectl create namespace defectdojo\n
For the OpenShift users:
When using the OpenShift platform, install the SecurityContextConstraints resource. In case of using a custom namespace for defectdojo, change the namespace in the users section.
Check out the values.yaml file sample of the DefectDojo customization:
View: values.yaml
tag: 2.22.4\nfullnameOverride: defectdojo\nhost: defectdojo.<ROOT_DOMAIN>\nsite_url: https://defectdojo.<ROOT_DOMAIN>\nalternativeHosts:\n - defectdojo-django.defectdojo\n\ninitializer:\n # should be false after initial installation was performed\n run: true\ndjango:\n ingress:\n enabled: true # change to 'false' for OpenShift\n activateTLS: false\n uwsgi:\n livenessProbe:\n # Enable liveness checks on uwsgi container. Those values are use on nginx readiness checks as well.\n # default value is 120, so in our case 20 is just fine\n initialDelaySeconds: 20\n
Go to EDP Portal -> EDP -> Configuration -> DefectDojo and see the Managed by External Secret message.
More details about the External Secrets Operator integration procedure can be found in the External Secrets Operator Integration page.
After following the instructions provided, you should be able to integrate your DefectDojo with the EPAM Delivery Platform using one of the few available scenarios.
Inspect the main steps to install EPAM Delivery Platform. Please check the Prerequisites Overview page before starting the installation. Also to authenticate each of the release artifacts, please refer to the Verification of EDP Artifacts guide. There are two recommended ways to deploy EPAM Delivery Platform:
Using Helm (see below);
Using Argo CD GitOps approach;
Using AWS Marketplace.
Note
The installation process below is given for a Kubernetes cluster. The steps that differ for an OpenShift cluster are indicated in the notes.
Disclaimer
EDP is aligned with industry standards for storing and managing sensitive data, ensuring optimal security. However, the use of custom solutions introduces uncertainties, thus the responsibility for the safety of your data is totally covered by platform administrator.
EDP manages secrets via External Secret Operator to integrate with a multitude of utilities. For insights into the secrets in use and their utilization, refer to the provided External Secrets Operator Integration.
Create an edp namespace or a Kiosk space depending on whether Kiosk is used or not.
Without Kiosk, create a namespace:
kubectl create namespace edp\n
Note
For an OpenShift cluster, run the oc command instead of the kubectl one.
Kiosk is mandatory for EDP v.2.8.x. It is not implemented for the previous versions, and is optional for EDP since v.2.9.x.
(Optional) Deploy and configure Keycloak to enable Single Sign-On approach. To see the details on how to configure Keycloak correctly, please refer to the Install Keycloak page.
helm search repo epamedp/edp-install\nNAME CHART VERSION APP VERSION DESCRIPTION\nepamedp/edp-install 3.8.1 3.8.1 A Helm chart for EDP Install\n
Note
It is highly recommended to use the latest released version.
EDP can be integrated with the following version control systems:
Gerrit
GitHub (by default)
GitLab
This integration implies in what system the development of the application will be or is already being carried out. The global.gitProviders flag in the edp-install controls this integration:
Global VCS configuration (can be multimple values):
Internal Gerrit server can be deployed as a result of EDP deployment when the Gerrit is selected. For more details on how to integrate EDP with GitLab or GitHub instead of Gerrit, please refer to the Integrate GitHub/GitLab in Tekton page.
(Optional) Integrate platform with SonarQube:
External SonarQube - any SonarQube that is installed separately from EDP. For example, SonarQube that is installed using edp-cluster-add-ons or another public SonarQube server. For more details on how EDP recommends to configure SonarQube to work with the platform, please refer to the SonarQube Integration page.
Internal SonarQube - SonarQube that is installed along with EDP.values.yaml
...\nsonar-operator:\n enabled: true\n...\n
(Optional) Integrate platform with Nexus:
External Nexus - any Nexus that is installed separately from EDP. For example, Nexus that installed using edp-cluster-add-ons or another public Nexus server. For more details on how EDP recommends to configure Nexus to work with the platform, please refer to the Nexus Sonatype Integration page.
Internal Nexus - Nexus that is installed along with EDP.values.yaml
...\nnexus-operator:\n enabled: true\n...\n
(Optional) Configure Container Registry for image storage.
Since EDP v3.4.0, we enabled users to configure Harbor registry instead of AWS ECR and Openshift-registry. We recommend installing Harbor using our edp-cluster-add-ons although you can install it any other way. To integrate EDP with Harbor, see Harbor integration page.
To enable Harbor as a registry storage, use the values below:
global:\n # -- platform type that can be either \"kubernetes\" or \"openshift\"\n platform: \"kubernetes\"\n # DNS wildcard for routing in the Kubernetes cluster;\n dnsWildCard: \"example.com\"\n # -- Administrators of your tenant\n # -- Can be gerrit, github or gitlab. By default: github\n gitProviders:\n - github\n dockerRegistry:\n # -- Docker Registry endpoint\n url: \"<AWS_ACCOUNT_ID>.dkr.ecr.<AWS_REGION>.amazonaws.com\"\n type: \"ecr\"\n\nsso:\n enabled: false\n # Keycloak address with which the platform will be integrated\n keycloakUrl: \"https://keycloak.example.com\"\n admins:\n - \"stub_user_one@example.com\"\n developers:\n - \"stub_user_one@example.com\"\n - \"stub_user_two@example.com\"\n\n# AWS Region, e.g. \"eu-central-1\"\nawsRegion:\n\nedp-tekton:\n # Tekton Kaniko configuration section\n kaniko:\n # -- AWS IAM role to be used for kaniko pod service account (IRSA). Format: arn:aws:iam::<AWS_ACCOUNT_ID>:role/<AWS_IAM_ROLE_NAME>\n roleArn:\n gitServers:\n github:\n gitProvider: github\n host: github.com\n webhook:\n skipWebhookSSLVerification: false\n eventListener:\n enabled: true\n resources:\n requests:\n memory: \"64Mi\"\n cpu: \"50m\"\n limits:\n memory: \"128Mi\"\n cpu: \"500m\"\n ingress:\n enabled: true\n\nedp-headlamp:\n config:\n oidc:\n enabled: false\n
Note
Set global.platform=openshift while deploying EDP in OpenShift.
Info
The full installation with integration between tools will take at least 10 minutes.
To check if the installation is successful, run the command below:
helm status edp -n edp\n
You can also check ingress endpoints to get EDP Portal endpoint to enter EDP Portal UI:
kubectl describe ingress -n edp\n
Once EDP is successfully installed, you can navigate to our Use Cases to try out EDP functionality.
The HARBOR_ADMIN_PASSWORD is the initial password of Harbor admin. The secretKey is the secret key that is used for encryption. Must be 16 characters long. The REGISTRY_PASSWD is Harbor registry password. The REGISTRY_HTPASSWD is login and password in htpasswd string format. This value is the string in the password file generated by the htpasswd command where the username is harbor_registry_user and the encryption type is bcrypt. See the example below:
# we use Harbor secret to consolidate all the Harbor secrets\nexistingSecretAdminPassword: harbor\nexistingSecretAdminPasswordKey: HARBOR_ADMIN_PASSWORD\nexistingSecretSecretKey: harbor\n\ncore:\n # The XSRF key. Will be generated automatically if it isn't specified\n xsrfKey: \"\"\njobservice:\n # Secret is used when job service communicates with other components.\n # If a secret key is not specified, Helm will generate one.\n # Must be a string of 16 chars.\n secret: \"\"\nregistry:\n # Secret is used to secure the upload state from client\n # and registry storage backend.\n # If a secret key is not specified, Helm will generate one.\n # Must be a string of 16 chars.\n secret: \"\"\n credentials:\n username: harbor_registry_user\n existingSecret: harbor\nfullnameOverride: harbor\n# If Harbor is deployed behind the proxy, set it as the URL of proxy\nexternalURL: https://core.harbor.domain\nipFamily:\n ipv6:\n enabled: false\nexpose:\n tls:\n enabled: false\n ingress:\n hosts:\n core: core.harbor.domain\n notary: notary.harbor.domain\nupdateStrategy:\n type: Recreate\npersistence:\n persistentVolumeClaim:\n registry:\n size: 30Gi\n jobservice:\n jobLog:\n size: 1Gi\n database:\n size: 2Gi\n redis:\n size: 1Gi\n trivy:\n size: 5Gi\ndatabase:\n internal:\n # The initial superuser password for internal database\n password: \"changeit\"\n
To check if the installation is successful, run the command below:
helm status <harbor-release> -n harbor\n
You can also check ingress endpoints to get Harbor endpoint to enter Harbor UI:
Kubectl version 1.23.0 is installed. Please refer to the Kubernetes official website for details.
Helm version 3.10.0+ is installed. Please refer to the Helm page on GitHub for details.
Info
EDP team is using a Keycloakx helm chart from the codecentric repository, but other repositories can be used as well (e.g. Bitnami). Before installing Keycloak, it is necessary to install a PostgreSQL database.
Info
It is also possible to install Keycloak using the cluster add-ons. For details, please refer to the Install via Add-Ons page.
Install PostgreSQL v15.2.0 using bitnami/postgresql Helm chart v12.1.15:
Info
The PostgreSQL can be deployed in production ready mode. For example, it may include multiple replicas, persistent storage, autoscaling, and monitoring. For details, please refer to the official Chart documentation.
Install Keycloak 20.0.3 using codecentric/keycloakx Helm chart:
Info
Keycloak can be deployed in production ready mode. For example, it may include multiple replicas, persistent storage, autoscaling, and monitoring. For details, please refer to the official Chart documentation.
"},{"location":"operator-guide/install-kiosk/","title":"Set Up Kiosk","text":""},{"location":"operator-guide/install-kiosk/#set-up-kiosk","title":"Set Up Kiosk","text":"
Kiosk is a multi-tenancy extension for managing tenants and namespaces in a shared Kubernetes cluster. Within EDP, Kiosk is used to separate resources and enables the following options (see more details):
Access to the EDP tenants in a Kubernetes cluster;
Multi-tenancy access at the service account level for application deploy.
Inspect the main steps to set up Kiosk for the proceeding EDP installation.
Note
Kiosk deploy is mandatory for EDP v.2.8. In earlier versions, Kiosk is not implemented. Since EDP v.2.9.0, integration with Kiosk is an optional feature. You may not want to use it, so just skip those steps and disable in Helm parameters during EDP deploy.
To provide access to the EDP tenant, generate kubeconfig with Service Account edp permission. The edp account created earlier is located in the security namespace.
It is possible to use Amazon Simple Storage Service Amazon S3 as an object storage for Loki. To configure access, please refer to the IRSA for Loki documentation.
In case of using cluster scheduling and amazon-eks-pod-identity-webhook, it is necessary to restart the Loki pod after the cluster is up and running. Please refer to the Schedule Pods Restart documentation.
Configure custom bucket policy to delete the old data.
Check that edp namespace is created. If not, run the following command to create it:
kubectl create namespace edp\n
For the OpenShift users:
When using the OpenShift platform, install the SecurityContextConstraints resources. In case of using a custom namespace for the reportportal, change the namespace in the users section.
When using the OpenShift platform, install the SecurityContextConstraints resource. In case of using a custom namespace for the reportportal, change the namespace in the users section.
apiVersion: v1\nkind: Service\nmetadata:\n labels:\n app: reportportal\n component: gateway\n name: gateway\n namespace: report-portal\nspec:\n ports:\n # use 8081 to allow for usage of the dashboard which is on port 8080\n - name: http\n port: 8081\n protocol: TCP\n targetPort: 8081\n selector:\n component: gateway\n sessionAffinity: None\n type: ClusterIP\n
Note
For user access: default/1q2w3e For admin access: superadmin/erebus Please refer to the ReportPortal.io page for details.
Note
It is also possible to install ReportPortal via cluster add-ons. For details, please refer to the Install via Add-Ons page.
Kubectl version 1.24.0 or higher is installed. Please refer to the Kubernetes official website for details.
For Openshift/OKD, the latest version of the oc utility is required. Please refer to the OKD page on GitHub for details.
Created AWS ECR repository for Kaniko cache. By default, the Kaniko cache repository name is kaniko-cache and this parameter is located in our Tekton common-library.
"},{"location":"operator-guide/install-tekton/#installation-on-kubernetes-cluster","title":"Installation on Kubernetes Cluster","text":"
To install Tekton resources, follow the steps below:
Info
Please refer to the Install Tekton Pipelines and Install and set up Tekton Triggers sections for details.
Install Tekton pipelines v0.53.4 using the release file:
Note
Tekton Pipeline resources are used for managing and running EDP Tekton Pipelines and Tasks. Please refer to the EDP Tekton Pipelines and EDP Tekton Tasks pages for details.
Install Tekton Triggers v0.25.3 using the release file:
Note
Tekton Trigger resources are used for managing and running EDP Tekton EventListeners, Triggers, TriggerBindings and TriggerTemplates. Please refer to the EDP Tekton Triggers page for details.
"},{"location":"operator-guide/install-tekton/#installation-on-okd-cluster","title":"Installation on OKD cluster","text":"
To install Tekton resources, follow the steps below:
Info
Please refer to the Install Tekton Operator documentation for details.
Note
Tekton Operator also deploys Pipelines as Code CI that requires OpenShift v4.11 (based on Kubernetes v1.24) or higher. This feature is optional and its deployments can be scaled to zero replicas.
Install Tekton Operator v0.67.0 using the release file:
Velero is an open source tool to safely back up, recover, and migrate Kubernetes clusters and persistent volumes. It works both on premises and in a public cloud. Velero consists of a server process running as a deployment in your Kubernetes cluster and a command-line interface (CLI) with which DevOps teams and platform operators configure scheduled backups, trigger ad-hoc backups, perform restores, and more.
In case of using cluster scheduling and amazon-eks-pod-identity-webhook, it is necessary to restart the Velero pod after the cluster is up and running. Please refer to the Schedule Pods Restart documentation.
Install the client side (velero cli) according to the official documentation.
"},{"location":"operator-guide/install-via-civo/","title":"Install via Civo","text":""},{"location":"operator-guide/install-via-civo/#install-edp-via-civo","title":"Install EDP via Civo","text":"
This documentation provides the detailed instructions on how to install the EPAM Delivery Platform via Civo Marketplace. As a prerequisite, ensure to sign up in Civo.
The first step of the installation procedure is to launch the cluster. Please refer to the official instructions that describe this process in detail. To succeed, follow the steps below:
Log in to the personal account.
Create a new Kubernetes cluster with the parameters below. Please refer to the official guidelines for more details:
Name: demo
How many nodes: 1
Select size: Type: Standard, Size: Medium
Network: Default
Firewall: Create a new firewall with the 443 and 6443 ports opened
The cluster deployment takes around two minutes. After cluster deployment, additional 5 minutes are required for both Argo CD and Tekton stacks to get deployed.
As soon as cluster is deployed, ensure all the marketplace applications are installed, too:
Check applications
Download and apply the kubeconfig file:
Download kubeconfig
Ensure all the pods are up and running in both the Tekton and Argo CD namespaces after 5 minutes of waiting. Restart deployments if the pods are failed to deploy:
kubectl get ns\nkubectl get pods -n tekton-pipelines\nkubectl get pods -n argocd\n
As soon as the cluster is deployed, it is time to install the EDP application.
In the Civo portal, navigate to Marketplace -> CI/CD:
Civo Marketplace
Select EDP and choose which Version Control Systems you would prefer to integrate it with and click the Install Apps button:
Add EDP
Wait till the EDP app appears in the Installed applications list:
EDP installed
Wait till all the pods are up and running. Use the kubectl get pods command to check the status of the pods:
kubectl get pods -n edp\n
EDP pods
As soon as all the pods are deployed. Navigate to the Cluster Information tab and copy the DNS name:
Getting DNS
In the new browser tab, access the EDP Portal UI by typing the URL according to the https://edp-headlamp-edp.<DNS_name> format.
Accept the security warning and click the service access token link to open the instructions on how to get a token to log in to the EDP Portal UI.
As soon as the token is created, paste it in the ID token field and click the Authenticate button.
Click the notification in the bottom left corner to open the Cluster Settings menu:
Click notification
In the Cluster Settings menu, enter edp in both default and allowed namespaces and click the Back button:
Note
Don't forget to click the + button to add the allowed namespace.
Cluster Settings menu
Congratulations! You have just installed the EPAM Delivery Platform on the Civo cluster. Now you are ready to proceed with integrating EDP with all the necessary third-party tools. Navigate to the Integrate SonarQube page to proceed with onboarding EDP.
"},{"location":"operator-guide/install-via-helmfile/","title":"Install via Helmfile","text":""},{"location":"operator-guide/install-via-helmfile/#install-via-helmfile","title":"Install via Helmfile","text":"
This article provides the instruction on how to deploy EDP and components in Kubernetes using Helmfile that is intended for deploying Helm charts. Helmfile templates are available in GitHub repository.
Important
The Helmfile installation method for EPAM Delivery Platform (EDP) is currently not actively maintained. We strongly recommend exploring alternative installation options for the most up-to-date and well-supported deployment experience. You may consider using the Add-Ons approach or opting for installation via the AWS Marketplace to ensure a reliable and secure deployment of EDP.
The envs/common.yaml file contains the specification for environments pattern, list of helm repositories from which it is necessary to fetch the helm charts and additional Helm parameters.
The envs/platform.yaml file contains global parameters that are used in various Helmfiles.
The releases/envs/ contains symbol links to environments files.
The releases/*.yaml file contains description of parameters that is used when deploying a Helm chart.
The helmfile.yaml file defines components to be installed by defining a path to Helm releases files.
The envs/ci.yaml file contains stub parameters for CI linter.
The test/lint-ci.sh script for running CI linter with debug loglevel and stub parameters.
The resources/*.yaml file contains additional resources for the OpenShift platform.
Before applying the Helmfile, please fill in the global parameters in the envs/platform.yaml (check the examples in the envs/ci.yaml) and releases/*.yaml files for every Helm deploy.
Pay attention to the following recommendations while working with the Helmfile:
To launch Lint, run the test/lint-ci.sh script.
Display the difference between the deployed and environment state (helm diff):
To deploy the components according to the label, use the selector to target a subset of releases when running the Helmfile. It can be useful for large Helmfiles with the releases that are logically grouped together. For example, to display the difference only for the nginx-ingress file, use the following command:
Keycloak requires a database deployment, so it has two charts: releases/keycloak.yaml and releases/postgresql-keycloak.yaml.
To install Keycloak, follow the steps below:
Create a security namespace:
Note
For the OpenShift users: This namespace is also indicated as users in the following custom SecurityContextConstraints resources: resources/keycloak-scc.yaml and resources/postgresql-keycloak-scc.yaml. Change the namespace name when using a custom namespace.
For EDP, it is required to have Keycloak access to perform the integration. Create a secret with the user and password provisioned in the step 2 of the Keycloak Configuration section.
Before Argo CD deployment, install the following tools:
Keycloak
EDP
To install Argo CD, follow the steps below:
Install Argo CD:
For the OpenShift users:
When using a custom namespace for Argo CD, the `argocd` namespace is also indicated as `users` in the `resources/argocd-scc.yaml` custom `SecurityContextConstraints` resource. Change it there as well.\n
Update the argocd-secret secret in the Argo CD namespace by providing the correct Keycloak client secret (oidc.keycloak.clientSecret) with the value from the keycloak-client-argocd-secret secret in EDP namespace. Then restart the deployment:
Before DefectDojo deployment,first make sure to have the Keycloak configuration.
Info
It is also possible to install DefectDojo via Helm Chart. For details, please refer to the Install DefectDojo page.
To install DefectDojo via Helmfile, follow the steps below:
Create a DefectDojo namespace:
For the OpenShift users:
This namespace is also indicated as users in the resources/defectdojo-scc.yaml custom SecurityContextConstraints resource. Change it when using a custom namespace. Also, change the namespace in the resources/defectdojo-route.yaml file.
kubectl create namespace defectdojo\n
Modify the host in resources/defectdojo-route.yaml (only for OpenShift).
In the envs/platform.yaml file, set the dnsWildCard and edpName parameters.
For the OpenShift users:
The namespace is also indicated as users in the following custom SecurityContextConstraints resources: resources/report-portal-elasticsearch-scc.yaml and resources/report-portal-third-party-resources-scc.yaml. Change the namespace name when using a custom namespace.
To install ReportPortal via Helmfile, follow the steps below:
For the OpenShift users:
The namespace is also indicated as users in the resources/report-portal-reportportal-scc.yaml custom SecurityContextConstraints resource. Change it when using a custom namespace.
Change the namespace in the following files: resources/report-portal-gateway/gateway-config-cm, resources/report-portal-gateway/gateway-deployment, resources/report-portal-gateway/gateway-route, and resources/report-portal-gateway/gateway-service.
Modify the host in resources/report-portal-gateway/gateway-route
This documentation provides a concise introduction to the EPAM Delivery Platform installation options. EPAM Delivery Platform is a flexible tool that can be installed using different methods. Each of them comprises with its own benefits:
Quick Start Guide: This option is ideal for users looking to quickly deploy EDP with minimal prerequisites. Watch our video tutorial for a guided installation experience.
Install via Add-Ons: Recommended for advanced EDP users, this installation streamlines the setup of supported integrations and follows the GitOps approach. Familiarity with Argo CD is recommended.
Install via Helm Charts: While more complex, this method offers the highest level of flexibility, allowing for customization to suit specific needs. It requires a good understanding of EDP.
Install via AWS Marketplace: Optimal for users leveraging AWS infrastructure, offering a minimal setup for testing EDP functionality.
Install via Civo: Preferred for users deploying EDP in a Civo cluster. Follow our step-by-step video tutorial for onboarding EDP to a new Civo cluster.
"},{"location":"operator-guide/jira-gerrit-integration/","title":"Adjust VCS Integration With Jira","text":""},{"location":"operator-guide/jira-gerrit-integration/#adjust-vcs-integration-with-jira","title":"Adjust VCS Integration With Jira","text":"
In order to adjust the Version Control System integration with Jira Server, first make sure you have the following prerequisites:
VCS Server
Jira
Crucible
When checked the prerequisites, follow the steps below to proceed with the integration:
Integrate every project in VCS Server with every project in Crucible by creating a corresponding request in EPAM Support Portal. Add the repositories links and fill in the Keep Informed field as this request must be approved.
Request example
Provide additional details to the support team. If the VCS is Gerrit, inspect the sample below of its integration:
2.1 Create a new \"crucible-\" user in Gerrit with SSH key and add a new user to the \"Non-Interactive Users\" Gerrit group;
2.2 Create a new group in Gerrit \"crucible-watcher-group\" and add the \"crucible-\" user;
2.3 Provide access to All-Projects for the \"crucible-watcher-group\" group:
Gerrit All-Projects configuration
Gerrit All-Projects configuration
To link commits with Jira ticket, being in Gerrit, enter a Jira ticket ID in a commit message using the specific format:
[PROJECT-CODE-1234]: commit message
where PROJECT-CODE is a specific code of a project, 1234 is an ID number, and a commit message.
As a result, all Gerrit commits will be displayed on Crucible:
This documentation guide provides step-by-step instructions for enabling the Jira integration option in the EDP Portal UI for EPAM Delivery Platform. Jira integration allows including useful metadata in Jira tickets.
Integrating Jira can provide a number of benefits, such as increased visibility and traceability, automatic linking code changes to relevant Jira issues, streamlining the management and tracking of development progress.
By linking CI pipelines to Jira issues, teams can get a better understanding of the status of their work and how it relates to the overall development process. This can help to improve communication and collaboration, and ultimately lead to faster and more efficient delivery of software.
Enabling Jira integration allows for the automatic population of three fields in Jira tickets: Fix Versions, Components, and Labels. Each of these fields provides distinct benefits:
Fix Versions: helps track progress against release schedules;
Components: allows grouping related issues together;
Labels: enables identification of specific types of work.
Teams can utilize these fields to enhance their work prioritization, identify dependencies, improve collaboration, and ultimately achieve faster software delivery.
The value of the credentialName property is the name of the Secret, which is indicated in the first point above.
"},{"location":"operator-guide/jira-integration/#enable-jira-using-helm-chart","title":"Enable Jira Using Helm Chart","text":"
There is also a possibility to set up Jira integration when deploying EPAM Delivery Platform. To follow this approach, please familiarize yourself with the following parameters of the values.yaml file in the EDP installer. Enabling the jira.integration parameter creates the following custom resources:
EDPComponent;
JiraServer;
External Secrets Operator (in case it is used).
To set up Jira integration along with EDP, follow the steps below:
Create the ci-jira secret in the edp namespace as it's described above.
Deploy the platform with the jira.integration parameter set to true in the values.yaml file.
To use Jira integration, you need to set up your codebases accordingly.
When creating a codebase, navigate to the Advanced Settings tab. Select the Integrate with Jira server check box and fill in the required fields:
Advanced settings
There are four predefined variables with the respective values that can be specified singly or as a combination. These variables show different data depending on which versioning type is currently used:
If the EDP versioning type is used:
EDP_COMPONENT \u2013 returns application-name;
EDP_VERSION \u2013 returns 0.0.0-SNAPSHOT or 0.0.0-RC;
EDP_SEM_VERSION \u2013 returns 0.0.0;
EDP_GITTAG \u2013 returns build/0.0.0-SNAPSHOT.2 or build/0.0.0-RC.2.
If the default versioning type is used:
EDP_COMPONENT \u2013 returns application-name;
EDP_VERSION \u2013 returns the date when the application was tagged. (Example: 20231023-131217);
EDP_SEM_VERSION \u2013 returns the date when the application was tagged. (Example: 20231023-131217);
EDP_GITTAG \u2013 returns the date when the application was tagged. (Example: 20231023-131217).
Note
There are no character restrictions when combining the variables. You can concatenate them using the dash sign. Combination samples: EDP_SEM_VERSION-EDP_COMPONENT; EDP_COMPONENT-hello-world/EDP_VERSION; etc.
If the Jira integration is set up correctly, you will start seeing additional metadata in the tickets:
Supplemental information
If metadata is not visible in a Jira ticket, check the status field of the JiraIssueMetadata Custom Resources in the edp namespace. The codebase operator deletes this resource after successful processing, but in case of an error, the 'JiraIssueMetadata' resource may still exist within the namespace.
"},{"location":"operator-guide/kaniko-irsa/","title":"IAM Roles for Kaniko Service Accounts","text":""},{"location":"operator-guide/kaniko-irsa/#iam-roles-for-kaniko-service-accounts","title":"IAM Roles for Kaniko Service Accounts","text":"
Note
The information below is relevant in case ECR is used as Docker container registry. Make sure that IRSA is enabled and amazon-eks-pod-identity-webhook is deployed according to the Associate IAM Roles With Service Accounts documentation.
The \"build-image-kaniko\" stage manages ECR through IRSA that should be available on the cluster. Follow the steps below to create a required role:
Create AWS IAM Policy \"AWSIRSA\u2039CLUSTER_NAME\u203a\u2039EDP_NAMESPACE\u203aKaniko_policy\":
Attach the \"AWSIRSA\u2039CLUSTER_NAME\u203a\u2039EDP_NAMESPACE\u203aKaniko_policy\" policy to the \"AWSIRSA\u2039CLUSTER_NAME\u203a\u2039EDP_NAMESPACE\u203aKaniko\" role.
Define the resulted arn role value into the kaniko.roleArn parameter in values.yaml during the EDP installation.
"},{"location":"operator-guide/kibana-ilm-rollover/","title":"Aggregate Application Logs Using EFK Stack","text":""},{"location":"operator-guide/kibana-ilm-rollover/#aggregate-application-logs-using-efk-stack","title":"Aggregate Application Logs Using EFK Stack","text":"
This documentation describes the advantages of EFK stack over the traditional ELK stack, explains the value that this stack brings to EDP and instructs how to set up the EFK stack to integrate the advanced logging system with your application.
The ELK (Elasticsearch, Logstash and Kibana) stack gives the ability to aggregate logs from all the managed systems and applications, analyze these logs and create visualizations for application and infrastructure monitoring, faster troubleshooting, security analytics and more.
Here is a brief description of the ELK stack default components:
Beats family - The logs shipping tool that conveys logs from the source locations, such as Filebeat, Metricbeat, Packetbeat, etc. Beats can work instead of Logstash or along with it.
Logstash - The log processing framework for log collecting, processing, storing and searching activities.
Elasticsearch - The distributed search and analytics engine based on Lucene Java library.
Kibana - The visualization engine that queries the data from Elasticsearch.
We use FEK (also called EFK) (Fluent Bit, Elasticsearch, Kibana) stack in Kubernetes instead of ELK because this stack provides us with the support for Logsight for Stage Verification and Incident Detection. In addition to it, Fluent Bit has a smaller memory fingerprint than Logstash. Fluent Bit has the Inputs, Parsers, Filters and Outputs plugins similarly to Logstash.
FEK Stack
"},{"location":"operator-guide/kibana-ilm-rollover/#automate-elasticsearch-index-rollover-with-ilm","title":"Automate Elasticsearch Index Rollover With ILM","text":"
In this guide, index rollover with the Index Lifecycle Management ILM is automated in the FEK stack.
The resources can be created via API using curl, Postman, Kibana Dev Tools console or via GUI. They are going to be created them using Kibana Dev Tools.
Go to Management \u2192 Dev Tools in the Kibana dashboard:
Dev Tools
Create index lifecycle policy with the index rollover:
Note
This policy can also be created in GUI in Management \u2192 Stack Management \u2192 Index Lifecycle Policies.
Index Lifecycle has several phases: Hot, Warm, Cold, Frozen, Delete. Indices also have different priorities in each phase. The warmer the phase, the higher the priority is supposed to be, e.g., 100 for the hot phase, 50 for the warm phase, and 0 for the cold phase.
In this Use Case, only the Hot and Delete phases are configured. So an index will be created, rolled over to a new index when 1gb in size or 1day in time and deleted in 7 days. The rollover may not happen exactly at 1GB because it depends on how often Kibana checks the index size. Kibana usually checks the index size every 10 minutes but this can be changed by setting the indices.lifecycle.poll_interval monitoring timer.
index.lifecycle.rollover_alias is required when using a policy containing the rollover action and specifies which alias to rollover on behalf of this index. The intention here is that the rollover alias is also defined on the index.
number_of_shards is the quantity of the primary shards. Elasticsearch index is really just a logical grouping of one or more physical shards, where each shard is actually a self-contained index. By distributing the documents in an index across multiple shards and distributing those shards across multiple nodes, Elasticsearch can ensure redundancy, which both protects against hardware failures and increases query capacity as nodes are added to a cluster. As the cluster grows (or shrinks), Elasticsearch automatically migrates shards to re-balance the cluster. Please refer to the official documentation here.
number_of_replicas is the number of replica shards. A replica shard is a copy of a primary shard. Elasticsearch will never assign a replica to the same node as the primary shard, so make sure you have more than one node in your Elasticsearch cluster if you need to use replica shards. The Elasticsearch cluster details and the quantity of nodes can be checked with:
GET _cluster/health\n
Since we use one node, the number_of_shards is 1 and number_of_replicas is 0. If you put more replicas within one node, your index will get yellow status in Kibana, yet still be working.
Create an empty index with write permissions:
Note
This index can also be created in GUI in Management \u2192 Stack Management \u2192 Index Management \u2192 Indices.
The code above will create an index in the{index_name}-{current_date}-{rollover_index_increment} format. For example: fluent-bit-kube-2023.03.17-000001.
Please refer to the official documentation on the index rollover with Date Math here.
Note
It is also possible to use index pattern below if the date math format does not seem applicable:
Index
PUT fluent-bit-kube-000001\n{\n \"aliases\": {\n \"fluent-bit-kube\": {\n \"is_write_index\": true\n }\n }\n}\n
Check the status of the created index:
GET fluent-bit-kube*-000001/_ilm/explain\n
Configure Fluent Bit. Play attention to the Elasticsearch Output plugin configuration.
The important fields in the [OUTPUT] section are Index fluent-bit-kube since we should use the index with the same name as Rollover Alias in Kibana and Logstash_Format Off as we use the Rollover index pattern in Kibana that increments by 1.
ConfigMap example with Configuration Variables for HTTP_User and HTTP_Passwd:
ConfigMap fluent-bit
data:\n fluent-bit.conf: |\n [SERVICE]\n Daemon Off\n Flush 10\n Log_Level info\n Parsers_File parsers.conf\n Parsers_File custom_parsers.conf\n HTTP_Server On\n HTTP_Listen 0.0.0.0\n HTTP_Port 2020\n Health_Check On\n\n [INPUT]\n Name tail\n Tag kube.*\n Path /var/log/containers/*.log\n Parser docker\n Mem_Buf_Limit 5MB\n Skip_Long_Lines Off\n Refresh_Interval 10\n [INPUT]\n Name systemd\n Tag host.*\n Systemd_Filter _SYSTEMD_UNIT=kubelet.service\n Read_From_Tail On\n Strip_Underscores On\n\n [FILTER]\n Name kubernetes\n Match kube.*\n Kube_Tag_Prefix kube.var.log.containers.\n Kube_URL https://kubernetes.default.svc:443\n Kube_CA_File /var/run/secrets/kubernetes.io/serviceaccount/ca.crt\n Kube_Token_File /var/run/secrets/kubernetes.io/serviceaccount/token\n Merge_Log Off\n Merge_Log_Key log_processed\n K8S-Logging.Parser On\n K8S-Logging.Exclude On\n [FILTER]\n Name nest\n Match kube.*\n Operation lift\n Nested_under kubernetes\n Add_prefix kubernetes.\n [FILTER]\n Name modify\n Match kube.*\n Copy kubernetes.container_name tags.container\n Copy log message\n Copy kubernetes.container_image tags.image\n Copy kubernetes.namespace_name tags.namespace\n [FILTER]\n Name nest\n Match kube.*\n Operation nest\n Wildcard tags.*\n Nested_under tags\n Remove_prefix tags.\n\n [OUTPUT]\n Name es\n Match kube.*\n Index fluent-bit-kube\n Host elasticsearch-master\n Port 9200\n HTTP_User ${ES_USER}\n HTTP_Passwd ${ES_PASSWORD}\n Logstash_Format Off\n Time_Key @timestamp\n Type flb_type\n Replace_Dots On\n Retry_Limit False\n Trace_Error Off\n
Create index pattern (Data View starting from Kibana v8.0):
Go to Management \u2192 Stack Management \u2192 Kibana \u2192 Index patterns and create an index with the fluent-bit-kube-* pattern:
Index Pattern
Check logs in Kibana. Navigate to Analytics \u2192 Discover:
Logs in Kibana
Note
In addition, in the top-right corner of the Discover window, there is a button called Inspect. Clicking on it will reveal the query that Kibana is sending to Elasticsearch. These queries can be used in Dev Tools.
Monitor the created indices:
GET _cat/indices/fluent-bit-kube-*\n
Note
Physically, the indices are located on the elasticsearch Kubernetes pod in /usr/share/elasticsearch/data/nodes/0/indices. It is recommended to backup indices only via Snapshots.
We've configured the index rollover process. Now the index will be rolled over to a new one once it reaches the indicated size or time in the policy, and old indices will be removed according to the policy as well.
When you create an empty index that corresponds to the pattern indicated in the index template, the index template attaches rollover_alias with the fluent-bit-kube name, policy and other configured data. Then the Fluent Bit Elasticsearch output plugin sends logs to the Index fluent-bit-kube rollover alias. The index rollover process is managed by ILM that increments our indices united by the rollover_alias and distributes the log data to the latest index.
"},{"location":"operator-guide/kibana-ilm-rollover/#ilm-without-rollover-policy","title":"ILM Without Rollover Policy","text":"
It is also possible to manage index lifecycle without rollover indicated in the policy. If this is the case, this section will explain how to refactor the index to make it look that way: fluent-bit-kube-2023.03.18.
Note
The main drawback of this method is that the indices can be managed only by their creation date.
To manage index lifecycle without rollover policy, follow the steps below:
Create a Policy without rollover but with indices deletion:
Change the Fluent Bit [OUTPUT] config to this one:
ConfigMap fluent-bit
[OUTPUT]\n Name es\n Match kube.*\n Host elasticsearch-master\n Port 9200\n HTTP_User ${ES_USER}\n HTTP_Passwd ${ES_PASSWORD}\n Logstash_Format On\n Logstash_Prefix fluent-bit-kube\n Logstash_DateFormat %Y.%m.%d\n Time_Key @timestamp\n Type flb_type\n Replace_Dots On\n Retry_Limit False\n Trace_Error On\n
Restart Fluent Bit pods.
Fluent Bit will be producing a new index every day with the new date in its name like in the fluent-bit-kube-2023.03.18 name. Index deleting will be performed according to the policy.
"},{"location":"operator-guide/kibana-ilm-rollover/#tips-on-fluent-bit-debugging","title":"Tips on Fluent Bit Debugging","text":"
If you experience a lot of difficulties when dealing with Fluent Bit, this section may help you.
Fluent Bit has docker images labelled -debug, e.g., cr.fluentbit.io/fluent/fluent-bit:2.0.9-debug.
Change that image in the Kubernetes Fluent Bit DaemonSet and add the Trace_Error On parameter to the [OUTPUT] section in the Fluent Bit configmap:
[OUTPUT]\n Trace_Error On\n
After adding the parameter above, you will start seeing more informative logs that will probably help you find out the reason of the problem.
"},{"location":"operator-guide/kubernetes-cluster-settings/","title":"Set Up Kubernetes","text":""},{"location":"operator-guide/kubernetes-cluster-settings/#set-up-kubernetes","title":"Set Up Kubernetes","text":"
Make sure the cluster meets the following conditions:
Kubernetes cluster is installed with minimum 2 worker nodes with total capacity 8 Cores and 32Gb RAM.
Machine with kubectl is installed with a cluster-admin access to the Kubernetes cluster.
Ingress controller is installed in a cluster, for example ingress-nginx.
Ingress controller is configured with the disabled HTTP/2 protocol and header size of 64k support.
Find below an example of the Config Map for the NGINX Ingress controller:
Load balancer (if any exists in front of the Ingress controller) is configured with session stickiness, disabled HTTP/2 protocol and header size of 32k support.
Cluster nodes and pods have access to the cluster via external URLs. For instance, add in AWS the VPC NAT gateway elastic IP to the cluster external load balancers security group).
Keycloak instance is installed. To get accurate information on how to install Keycloak, please refer to the Install Keycloak instruction.
Helm 3.10 or higher is installed on the installation machine with the help of the Installing Helm instruction.
Storage classes are used with the Retain Reclaim Policy and Delete Reclaim Policy.
We recommended using our storage class as default storage class.
Info
By default, EDP uses the default Storage Class in a cluster. The EDP development team recommends using the following Storage Classes. See an example below.
Storage class templates with the Retain and Delete Reclaim Policies:
In order to understand if a microservice or a component is ready for the deployment, EDP suggests analyzing logs via Logsight to decide if the deployment is risky or not.
Please find more about Logsight in the official documentation:
Logsight key features and workflow
Log analysis
Stage verification
"},{"location":"operator-guide/logsight-integration/#logsight-as-a-quality-gate","title":"Logsight as a Quality Gate","text":"
Integration with Logsight allows enhancing and optimizing software releases by creating an additional quality gate.
Logsight can be configured in two ways:
SAAS - online system; for this solution a connection string is required.
Self-deployment - local installation.
To work with Logsight, a new Deployment Risk stage must be added to the pipeline. On this stage, the logs are analyzed with the help of Logsight mechanisms.
On the verification screen of Logsight, continuous verification of the application deployment can be monitored, and tests can be compared for detecting test flakiness.
For example, two versions of a microservice can be compared in order to detect critical differences. Risk score will be calculated for the state reached by version A and version B. Afterwards, the deployment risk will be calculated based on individual risk scores.
If the deployment failure risk is greater than a predefined threshold, the verification gate blocks the deployment from going to the target environment. In such case, the Deployment Risk stage of the pipeline is not passed, and additional attention is required. The exact log messages can be displayed in the Logsight verification screen, to help debug the problem.
"},{"location":"operator-guide/logsight-integration/#use-logsight-for-edp-development","title":"Use Logsight for EDP Development","text":"
Please find below the detailed description of Logsight integration with EDP.
Logsight provides a deployment approach using Helm charts. Please find below the stack of components that must be deployed:
logsight\u00a0- the core component.
logsight-backend\u00a0- the backend that provides all necessary APIs and user management.
logsight-frontend\u00a0- the frontend that provides the user interface.
logsight-result-api\u00a0- responsible for obtaining results, for example, during the verification.
Below is a diagram of interaction when integrating the components:
Logsight Structure
"},{"location":"operator-guide/logsight-integration/#configure-fluentbit-for-sending-log-data","title":"Configure FluentBit for Sending Log Data","text":"
Logsight is integrated with the EDP logging stack. The integration is based on top of the EFK (ElasticSearch-FluentBit-Kibana) stack. It is necessary to deploy a stack with the security support, namely, enable the certificate support.
A FluentBit config indicates the namespace from which the logs will be received for further analysis. Below is an example of the FluentBit config for getting logs from the edp-delivery-edp-delivery-sit namespace:
View: fluent-bit.conf
[INPUT]\n Name tail\n Tag kube.sit.*\n Path /var/log/containers/*edp-delivery-edp-delivery-sit*.log\n Parser docker\n Mem_Buf_Limit 5MB\n Skip_Long_Lines Off\n Refresh_Interval 10\n\n[FILTER]\n Name kubernetes\n Match kube.sit.*\n Kube_URL https://kubernetes.default.svc:443\n Kube_CA_File /var/run/secrets/kubernetes.io/serviceaccount/ca.crt\n Kube_Token_File /var/run/secrets/kubernetes.io/serviceaccount/token\n Kube_Tag_Prefix kube.sit.var.log.containers.\n Merge_Log Off\n K8S-Logging.Parser On\n K8S-Logging.Exclude On\n\n[FILTER]\n Name nest\n Match kube.sit.*\n Operation lift\n Nested_under kubernetes\n Add_prefix kubernetes.\n\n[FILTER]\n Name modify\n Match kube.sit.*\n Copy kubernetes.container_name tags.container\n Copy log message\n Copy kubernetes.container_image tags.image\n Copy kubernetes.namespace_name tags.namespace\n\n[FILTER]\n Name nest\n Match kube.sit.*\n Operation nest\n Wildcard kubernetes.*\n Nested_under kubernetes\n Remove_prefix kubernetes.\n\n[OUTPUT]\n Name es\n Match kube.sit.*\n Host elasticsearch-master\n Port 9200\n HTTP_User elastic\n HTTP_Passwd *****\n Logstash_Format On\n Logstash_Prefix sit\n Time_Key @timestamp\n Type flb_type\n Replace_Dots On\n Retry_Limit False\n\n[OUTPUT]\n Match kube.sit.*\n Name http\n Host logsight-backend\n Port 8080\n http_User logsight@example.com\n http_Passwd *****\n uri /api/v1/logs/singles\n Format json\n json_date_format iso8601\n json_date_key timestamp\n
A deployment-risk stage is added to the EDP CD pipeline.
Deployment Risk
If the deployment risk is above 70%, the red state of the pipeline is expected.
EDP consists of a set of containerized components. For the convenience of tracking the risk deployment trend for each component, this data is stored as Jenkins artifacts.
If the deployment risk is higher than the threshold of 70%, the EDP promotion of artifacts for the next environments does not pass. The deployment risk report can be analyzed in order to avoid the potential problems with updating the components.
To study the report in detail, use the link from the Jenkins pipeline to the Logsight verification screen:
Logsight Insights Logsight Insights
In this example, logs from different versions of the gerrit-operator were analyzed. As can be seen from the report, a large number of new messages appeared in the logs, and the output frequency of other notifications has also changed, which led to the high deployment risk.
The environment on which the analysis is performed can exist for different time periods. Logsight only processes the minimum total number of logs since the creating of the environment.
"},{"location":"operator-guide/loki-irsa/","title":"IAM Roles for Loki Service Accounts","text":""},{"location":"operator-guide/loki-irsa/#iam-roles-for-loki-service-accounts","title":"IAM Roles for Loki Service Accounts","text":"
Note
Make sure that IRSA is enabled and amazon-eks-pod-identity-webhook is deployed according to the Associate IAM Roles With Service Accounts documentation.
It is possible to use Amazon Simple Storage Service Amazon S3 as object storage for Loki. In this case Loki requires access to AWS resources. Follow the steps below to create a required role:
Create AWS IAM Policy \"AWSIRSA\u2039CLUSTER_NAME\u203a\u2039LOKI_NAMESPACE\u203aLoki_policy\":
Attach the \"AWSIRSA\u2039CLUSTER_NAME\u203a\u2039LOKI_NAMESPACE\u203aLoki_policy\" policy to the \"AWSIRSA\u2039CLUSTER_NAME\u203a\u2039LOKI_NAMESPACE\u203aLoki\" role.
Make sure that Amazon S3 bucket with name loki-\u2039CLUSTER_NAME\u203a exists.
Provide key value eks.amazonaws.com/role-arn: \"arn:aws:iam:::role/AWSIRSA\u2039CLUSTER_NAME\u203a\u2039LOKI_NAMESPACE\u203aLoki\" into the serviceAccount.annotations parameter in values.yaml during the Loki Installation.
"},{"location":"operator-guide/manage-custom-certificate/#enable-the-spi-truststore-of-keycloak","title":"Enable the SPI Truststore of Keycloak","text":"
To import custom certificates to Keycloak, follow the steps below:
Generate the cacerts local keystore and import the certificate there using the keytool tool:
Add the certificate by mounting the custom-ca-certificates secret to the operator pod as a volume.
Example of specifying custom certificates for the keycloak-operator:
...\nkeycloak-operator:\n enabled: true\n\n # -- Additional volumes to be added to the pod\n extraVolumes:\n - name: custom-ca\n secret:\n defaultMode: 420\n secretName: custom-ca-certificates\n\n # -- Additional volumeMounts to be added to the container\n extraVolumeMounts:\n - name: custom-ca\n mountPath: /etc/ssl/certs/CA.crt\n readOnly: true\n subPath: CA.crt\n...\n
Note
Before moving ahead, be aware that starting from version 3.3.0, our development team has officially deprecated the Jenkins deploy scenario. This means that as of version 3.3.0 and in all subsequent versions (3.3.x and above), the Jenkins deploy scenario is no longer supported or actively maintained. For users running versions 3.3.x and below, the Jenkins deploy scenario remains available. However, we encourage you to plan for the transition to a supported deployment method to ensure continued compatibility and access to the latest features and enhancements. To perform migration, please familiarize yourself with the Migrate CI Pipelines From Jenkins to Tekton. For those who still use EDP v3.3.x and below, the information below remains valid and applicable.
For Sonar, Jenkins and Gerrit, change the flag in the caCerts.enabled field to true. Also, change the name of the secret in the caCerts.secret field to custom-ca-certificates.
Example of specifying custom certificates for Gerrit via the gerrit-operator helm chart values:
...\ngerrit-operator:\n enabled: true\n gerrit:\n caCerts:\n # -- Flag for enabling additional CA certificates\n enabled: true\n # -- Change init CA certificates container image\n image: adoptopenjdk/openjdk11:alpine\n # -- Name of the secret containing additional CA certificates\n secret: custom-ca-certificates\n...\n
"},{"location":"operator-guide/manage-custom-certificate/#integrate-custom-certificates-into-jenkins-agents","title":"Integrate Custom Certificates Into Jenkins Agents","text":"
This section describes how to add custom certificates to Jenkins agents to use them from Java applications.
Info
For example, curl doesn't use keystore files specified in this part of the documentation.
EDP Jenkins agents keep keystore files in two places:
/etc/ssl/certs/java folder with the cacerts file;
/opt/java/openjdk/lib/security folder with the blocked.certs, cacerts, default.policy and public_suffix_list.dat files.
Copy the files in /etc/ssl/certs/java and /opt/java/openjdk/lib/security directories from Jenkins agent pod to the local tmp folder. There is a copy_certs.sh script below that can manage this. It copies the files in /etc/ssl/certs/java and /opt/java/openjdk/lib/security directories from Jenkins agent pod to the local tmp folder and imports the custom certificate into the keystore files, after which it creates the jenkins-agent-opt-java-openjdk-lib-security-cacerts and jenkins-agent-etc-ssl-certs-java-cacerts secrets from updated keystore files in EDP namespace. Also, the jenkins-agent-opt-java-openjdk-lib-security-cacerts secret contains three additional files: blocked.certs, default.policy and public_suffix_list.dat which managed by the copy_certs.sh script as well. Expand the drop-down button below to see the contents of the copy_certs.sh script.
View: copy_certs.sh
# Fill in the variables `ns` and `ca_file`\nns=\"edp-project\"\nca_file=\"/tmp/CA.crt\"\n\nimages=$(kubectl get -n \"${ns}\" cm jenkins-slaves -ojson | jq -r \".data[]\" | grep image\\> | sed 's/\\s*<.*>\\(.*\\)<.*>/\\1/')\n\nimage=$(for i in ${images[@]}; do echo $i; done | grep maven-java8)\npod_name=$(echo \"${image}\" | tr '.:/' '-')\n\noverrides=\"{\\\"apiVersion\\\":\\\"v1\\\",\\\"kind\\\":\\\"Pod\\\",\\\"metadata\\\":{\\\"name\\\":\\\"${pod_name}\\\", \\\"namespace\\\": \\\"${ns}\\\"},\n\\\"spec\\\":{\\\"containers\\\":[{\\\"name\\\":\\\"${pod_name}\\\",\\\"image\\\":\\\"${image}\\\",\n\\\"command\\\":[\\\"sh\\\",\\\"-c\\\",\\\"while true;do sleep 30;done;\\\"]}]}}\"\n\nkubectl run -n \"${ns}\" \"${pod_name}\" --image \"${image}\" --overrides=\"${overrides}\"\n\nkubectl wait --for=condition=ready pod \"${pod_name}\" -n \"${ns}\"\n\ncacerts_location=$(kubectl exec -n \"${ns}\" \"${pod_name}\" \\\n -- find / -name cacerts -exec ls -la \"{}\" \\; 2>/dev/null | grep -v ^l | awk '{print $9}')\n\nfor cacerts in ${cacerts_location[@]}; do echo $(dirname \"${cacerts}\"); kubectl exec -n \"${ns}\" \"${pod_name}\" -- ls $(dirname \"${cacerts}\"); done\n\nfor cacerts in ${cacerts_location[@]}; do \\\n echo $(dirname \"${cacerts}\"); \\\n mkdir -p \"/tmp$(dirname \"${cacerts}\")\"; \\\n from_files=''; \\\n for file in $(kubectl exec -n \"${ns}\" \"${pod_name}\" -- ls $(dirname \"${cacerts}\")); do \\\n kubectl exec -n \"${ns}\" \"${pod_name}\" -- cat \"$(dirname \"${cacerts}\")/${file}\" > \"/tmp$(dirname \"${cacerts}\")/${file}\"; \\\n from_files=\"${from_files} --from-file=/tmp$(dirname \"${cacerts}\")/${file}\"\n done ; \\\n keytool -import -storepass changeit -alias kubernetes -file ${ca_file} -noprompt -keystore \"/tmp${cacerts}\"; \\\n kubectl -n \"${ns}\" create secret generic \"jenkins-agent${cacerts//\\//-}\" $from_files \\\ndone\n\nkubectl delete -n \"${ns}\" pod \"${pod_name}\" --force --grace-period=0\n
Before using the copy_certs.sh script, keep in mind the following:
assign actual values to the variables ns and ca_file;
the script collects all the images from the jenkins-slaves ConfigMap and uses the image of the maven-java8 agent as the base image of the temporary pod to get the keystore files;
custom certificate is imported using the keytool application;
the jenkins-agent-opt-java-openjdk-lib-security-cacerts and jenkins-agent-etc-ssl-certs-java-cacerts secrets will be created in the EDP namespace.
Run the copy_certs.sh script from the previous point after the requirements are met.
Update manually the jenkins-slaves ConfigMap.
Add this block with the mount of secrets to the <volumes></volumes> block of each Jenkins agent:
"},{"location":"operator-guide/migrate-ci-pipelines-from-jenkins-to-tekton/","title":"Migrate CI Pipelines From Jenkins to Tekton","text":""},{"location":"operator-guide/migrate-ci-pipelines-from-jenkins-to-tekton/#migrate-ci-pipelines-from-jenkins-to-tekton","title":"Migrate CI Pipelines From Jenkins to Tekton","text":"
To migrate the CI pipelines for a codebase from Jenkins to Tekton, follow the steps below:
Migrate CI Pipelines From Jenkins to Tekton
Deploy a Custom EDP Scenario With Tekton and Jenkins CI Tools
Disable Jenkins Triggers
Manage Tekton Triggers the Codebase(s)
Switch CI Tool for Codebase(s)
"},{"location":"operator-guide/migrate-ci-pipelines-from-jenkins-to-tekton/#deploy-a-custom-edp-scenario-with-tekton-and-jenkins-ci-tools","title":"Deploy a Custom EDP Scenario With Tekton and Jenkins CI Tools","text":"
Make sure that Tekton stack is deployed according to the documentation. Enable Tekton as an EDP subcomponent:
The sample above shows the usage of Gerrit VCS where the <codebase_name> value is your codebase name.
If using GitHub or GitLab, additionally remove the webhook from the relevant repository.
If webhooks generation for new codebase(s) is not required, correct the code above so that it creates a webhook in the job-provisioner.
To recreate the pipeline in Jenkins, trigger the job-provisioner.
Check that the new pipeline is created without triggering Gerrit events.
"},{"location":"operator-guide/migrate-ci-pipelines-from-jenkins-to-tekton/#manage-tekton-triggers-the-codebases","title":"Manage Tekton Triggers the Codebase(s)","text":"
By default, each Gerrit project inherits configuration from the All-Projects repository.
To exclude triggering in Jenkins and Tekton CI tools simultaneously, edit the configuration in the All-Projects repository or in the project which inherits rights from your project.
Edit the webhooks.config file in the refs/meta/config and remove all context from this configuration.
Warning
The clearance of the webhooks.config file will disable the pipeline trigger in Tekton.
To use Tekton pipelines, add the configuration to the corresponding Gerrit project (webhooks.config file in the refs/meta/config):
"},{"location":"operator-guide/migrate-ci-pipelines-from-jenkins-to-tekton/#switch-ci-tool-for-codebases","title":"Switch CI Tool for Codebase(s)","text":"
Go to the codebase Custom Resource and change the spec.ciTool field from jenkins to tekton.
To configure the multitenant logging, it is necessary to deploy the following components:
Grafana
Loki
Logging-operator
In Grafana, every tenant represents an organization, i.e. it is necessary to create an organization for every namespace in the cluster. To get more details regarding the architecture of the Logging Operator, please review the Diagram 1.
Logging operator scheme
Note
It is necessary to deploy Loki with the auth_enabled: true flag with the aim to ensure that the logs are separated for each tenant. For the authentication, Loki requires the HTTP header X-Scope-OrgID.
"},{"location":"operator-guide/multitenant-logging/#review-project-logs-in-grafana","title":"Review Project Logs in Grafana","text":"
To find the project logs, navigate to Grafana and follow the steps below:
Note
Grafana is a common service for different customers where each customer works in its own separated Grafana Organization and doesn't have any access to another project.
Choose the organization by clicking the Current Organization drop-down list. If a user is assigned to several organizations, switch easily by using the Switch button.
Current organization
Navigate to the left-side menu and click the Explore button to see the Log Browser:
Grafana explore
Click the Log Browser button to see the labels that can be used to filter logs (e.g., hostname, namespace, application name, pod, etc.):
Note
Enable the correct data source, select the relevant logging data from the top left-side corner, and pay attention that the data source name always follows the \u2039project_name\u203a-logging pattern.
Log browser
Filter out logs by clicking the Show logs button or write the query and click the Run query button.
Review the results with the quantity of logs per time, see the example below:
Logs example
Expand the logs to get detailed information about the object entry:
Expand logs
Use the following buttons to include or remove the labels from the query:
EDP provides the ability to deploy services to namespaces. By default, EDP creates these namespaces automatically. This chapter describes the alternative way of namespace creation and management.
Namespaces are typically created by the platform when running CD Pipelines. The operator creates them according to the specific format: edp-<application-name>-<stage-name>. The cd-pipeline-operator should have the permissions to automatically create namespaces when deploying applications and delete them when uninstalling applications.
Occasionally, there are cases when automatic creation of namespaces is not allowed. For example, due to security reasons of the project, EDP user may need to disable this setting. This option is manipulated by the manageNamespace parameter which is located in the values.yaml file. The manageNamespace parameter is set to true by default, but it can be changed to false. As an aftermath, after setting the manageNamespace parameter users are supposed to face the problem that they can not deploy their application in EDP Portal UI because of permission restrictions:
Namespace creation error
The error message shown above says that user needs to create the namespace in the edp-<application-name>-<stage-name> format first before creating stages. In addition to it, the cd-pipeline-operator must be granted with the administrator permissions to have the ability to manage this namespace. To create namespace manually, follow the steps below:
Create the namespace by running the command below:
The edp-<pipelineName>-<stageName> format for namespaces is set by default but is not mandatory. You can set your custom namespace when creating an Environment.
Create the administrator RoleBinding resource by applying the file below with the kubectl apply -f grant_admin_permissions.yaml command:
The manageNamespace parameter also defines the resources that will be created depending on the cluster deployed whether it is OpenShift or Kubernetes. This scheme displays the nesting of operator input parameters:
CD Pipeline Operator Input Parameter Scheme
Note
When deploying application on the OpenShift cluster, the registry-view RoleBinding is created in the main namespace.
This documentation guide provides comprehensive instructions for integrating Nexus with the EPAM Delivery Platform.
Info
In EDP release 3.5, we have changed the deployment strategy for the nexus-operator component, now it is not installed by default. The nexusURL parameter management has been transferred from the values.yaml file to Kubernetes secrets.
To ensure strong authentication and accurate access control, creating a Nexus Sonatype service account with the name ci.user is crucial. This user serves as a unique identifier, facilitating connection with the EDP ecosystem.
To create the Nexus ci.userand define repository parameters follow the steps below:
Open the Nexus UI and navigate to Server administration and configuration -> Security -> User. Click the Create local user button to create a new user:
Nexus user settings
Type the ci-user username, define an expiration period, and click the Generate button to create the token:
Nexus create user
EDP relies on a predetermined repository naming convention all repository names are predefined. Navigate to Server administration and configuration -> Repository -> Repositories in Nexus. You can only create a repository with the required language.
Nexus repository list
JavaJavaScriptDotnetPython
a) Click Create a repository by selecting \"maven2(proxy)\" and set the name as \"edp-maven-proxy\". Enter the remote storage URL as \"https://repo1.maven.org/maven2/\". Save the configuration.
b) Click Create a repository by selecting \"maven2(hosted)\" and set the name as \"edp-maven-snapshot\". Change the Version policy to \"snapshot\". Save the configuration.
c) Click Create a repository by selecting \"maven2(hosted)\" and set the name as \"edp-maven-releases\". Change the Version policy to \"release\". Save the configuration.
d) Click Create a repository by selecting \"maven2(group)\" and set the name as \"edp-maven-group\". Change the Version policy to \"release\". Add repository to group. Save the configuration.
a) Click Create a repository by selecting \"npm(proxy)\" and set the name as \"edp-npm-proxy\". Enter the remote storage URL as \"https://registry.npmjs.org\". Save the configuration.
b) Click Create a repository by selecting \"npm(hosted)\" and set the name as \"edp-npm-snapshot\". Save the configuration.
c) Click Create a repository by selecting \"npm(hosted)\" and set the name as \"edp-npm-releases\". Save the configuration.
d) Click Create a repository by selecting \"npm(hosted)\" and set the name as \"edp-npm-hosted\". Save the configuration.
e) Click Create a repository by selecting \"npm(group)\" and set the name as \"edp-npm-group\". Add repository to group. Save the configuration.
a) Click Create a repository by selecting \"nuget(proxy)\" and set the name as \"edp-dotnet-proxy\". Select Protocol version NuGet V3. Enter the remote storage URL as \"https://api.nuget.org/v3/index.json\". Save the configuration.
b) Click Create a repository by selecting \"nuget(hosted)\" and set the name as \"edp-dotnet-snapshot\". Save the configuration.
c) Click Create a repository by selecting \"nuget(hosted)\" and set the name as \"edp-dotnet-releases\". Save the configuration.
d) Click Create a repository by selecting \"nuget(hosted)\" and set the name as \"edp-dotnet-hosted\". Save the configuration.
e) Click Create a repository by selecting \"nuget(group)\" and set the name as \"edp-dotnet-group\". Add repository to group. Save the configuration.
a) Click Create a repository by selecting \"pypi(proxy)\" and set the name as \"edp-python-proxy\". Enter the remote storage URL as \"https://pypi.org\". Save the configuration.
b) Click Create a repository by selecting \"pypi(hosted)\" and set the name as \"edp-python-snapshot\". Save the configuration.
c) Click Create a repository by selecting \"pypi(hosted)\" and set the name as \"edp-python-releases\". Save the configuration.
d) Click Create a repository by selecting \"pypi(group)\" and set the name as \"edp-python-group\". Add repository to group. Save the configuration.
Provision secrets using manifest, EDP Portal or with the externalSecrets operator
EDP PortalManifestExternal Secrets Operator
Go to EDP Portal -> EDP -> Configuration -> Nexus. Update or fill in the URL, nexus-user-id, nexus-user-password and click the Save button:
"},{"location":"operator-guide/notification-msteams/","title":"MS Teams Notification","text":""},{"location":"operator-guide/notification-msteams/#microsoft-teams-notification","title":"Microsoft Teams Notification","text":"
This section describes how to set up and add notification status to Tekton pipelines by sending pipeline status to the Microsoft Teams channel.
To create a link to Incoming Webhook for the Microsoft Teams channel, follow the steps below:
1. Open the channel which will be receiving notifications and click the \u2022\u2022\u2022 button from the upper-right corner. Select Connectors in the dropdown menu: Microsoft Teams menu
2. In the search field, type Incoming Webhook and click Configure: Connectors
3. Provide a name and upload an image for the webhook if necessary. Click Create: Connectors setup
4. Copy and save the unique WebHookURL presented in the dialog. Click Done: WebHookURL
5. Create a secret with the within the edp namespace.
OAuth2-Proxy is a versatile tool that serves as a reverse proxy, utilizing the OAuth 2.0 protocol with various providers like Google, GitHub, and Keycloak to provide both authentication and authorization. This guide instructs readers on how to protect their applications' endpoints using OAuth2-Proxy. By following these steps, users can strengthen their endpoints' security without modifying their current application code. In the context of EDP, it has integration with the Keycloak OIDC provider, enabling it to link with any component that lacks built-in authentication.
Note
OAuth2-Proxy is disabled by default when installing EDP.
"},{"location":"operator-guide/openshift-cluster-settings/","title":"Set Up OpenShift","text":""},{"location":"operator-guide/openshift-cluster-settings/#set-up-openshift","title":"Set Up OpenShift","text":"
Make sure the cluster meets the following conditions:
OpenShift cluster is installed with minimum 2 worker nodes with total capacity 8 Cores and 32Gb RAM.
Load balancer (if any exists in front of OpenShift router or ingress controller) is configured with session stickiness, disabled HTTP/2 protocol and header size of 64k support.
Find below an example of the Config Map for the NGINX Ingress Controller:
Cluster nodes and pods have access to the cluster via external URLs. For instance, add in AWS the VPC NAT gateway elastic IP to the cluster external load balancers security group).
Keycloak instance is installed. To get accurate information on how to install Keycloak, please refer to the Install Keycloak instruction.
The installation machine with oc is installed with the cluster-admin access to the OpenShift cluster.
Helm 3.10 is installed on the installation machine with the help of the Installing Helm instruction.
Storage classes are used with the Retain Reclaim Policy and Delete Reclaim Policy.
We recommended using our storage class as default storage class.
Info
By default, EDP uses the default Storage Class in a cluster. The EDP development team recommends using the following Storage Classes. See an example below.
Storage class templates with the Retain and Delete Reclaim Policies:
"},{"location":"operator-guide/overview-devsecops/","title":"Secure Delivery","text":""},{"location":"operator-guide/overview-devsecops/#secure-delivery-on-the-platform","title":"Secure Delivery on the Platform","text":"
The EPAM Delivery Platform emphasizes the importance of incorporating security practices into the software development lifecycle through the DevSecOps approach. By integrating a diverse range of open-source and enterprise security tools tailored to specific functionalities, organizations can ensure efficient and secure software development. These tools, combined with fundamental DevSecOps principles such as collaboration, continuous security, and automation, contribute to the identification and remediation of vulnerabilities early in the process, minimizes risks, and fosters a security-first culture across the organization.
The EPAM Delivery Platform enabling seamless integration with various security tools and vulnerability management systems, enhancing the security of source code and ensuring compliance.
The below table categorizes various open-source and enterprise security tools based on their specific functionalities. It provides a comprehensive view of the available options for each security aspect. This classification facilitates informed decision-making when selecting and integrating security tools into a development pipeline, ensuring an efficient and robust security stance. EDP supports the integration of both open-source and enterprise security tools, providing a flexible and versatile solution for security automation. See table below for more details.
DefectDojo is a comprehensive vulnerability management and security orchestration platform facilitating the handling of uploaded security reports. Examine the prerequisites and fundamental instructions for installing DefectDojo on Kubernetes or OpenShift platforms.
Dependency Track is an intelligent Software Composition Analysis (SCA) platform that provides a comprehensive solution for managing vulnerabilities in third-party and open-source components.
Gitleaks is a versatile SAST tool used to scan Git repositories for hardcoded secrets, such as passwords and API keys, to prevent potential data leaks and unauthorized access.
Trivy is a simple and comprehensive vulnerability scanner for containers and other artifacts, providing insight into potential security issues across multiple ecosystems.
Grype is a fast and reliable vulnerability scanner for container images and filesystems, maintaining an up-to-date vulnerability database for efficient and accurate scanning.
Tfsec is an effective Infrastructure as Code (IaC) security scanner, tailored specifically for reviewing Terraform templates. It helps identify potential security issues related to misconfigurations and non-compliant practices, enabling developers to address vulnerabilities and ensure secure infrastructure deployment.
Checkov is a robust static code analysis tool designed for IaC security, supporting various IaC frameworks such as Terraform, CloudFormation, and Kubernetes. It assists in detecting and mitigating security and compliance misconfigurations, promoting best practices and adherence to industry standards across the infrastructure.
Cdxgen is a lightweight and efficient tool for generating Software Bill of Materials (SBOM) using CycloneDX, a standard format for managing component inventory. It helps organizations maintain an up-to-date record of all software components, their versions, and related vulnerabilities, streamlining monitoring and compliance within the software supply chain.
Semgrep CLI is a versatile and user-friendly command-line interface for the Semgrep security scanner, enabling developers to perform Static Application Security Testing (SAST) for various programming languages. It focuses on detecting and preventing potential security vulnerabilities, code quality issues, and custom anti-patterns, ensuring secure and efficient code development.
Clair is an open-source container security tool that is designed to help you assess the security of container images and identify vulnerabilities within them. It is particularly useful for organizations using container orchestration platforms such as Kubernetes.
OpenVAS is an open-source network vulnerability scanner and security management tool. It is designed to identify and assess security vulnerabilities in computer systems, networks, and applications. OpenVAS provides a comprehensive set of features for vulnerability scanning, assessment, and management.
TruffleHog is an open-source Python tool designed for finding and identifying potentially sensitive and secret information in the source code and commit history of Git repositories. It's particularly useful for locating unintentional disclosures of confidential data, such as API keys, passwords, and other credentials, that might have been inadvertently committed to a code repository.
Git-secrets is an open-source tool that helps prevent the accidental committing of secrets, sensitive information, and other types of confidential data into Git repositories. It is designed to enforce security best practices and reduce the risk of unintentional data exposure by scanning Git repositories for predefined secret patterns.
ELK Stack (Fluent Bit, Elasticsearch, Kibana) stack is used in Kubernetes instead of ELK because this stack provides us with the support for Logsight for Stage Verification and Incident Detection. In addition to it, Fluent Bit has a smaller memory fingerprint than Logstash. Fluent Bit has the Inputs, Parsers, Filters and Outputs plugins similarly to Logstash.
Loki is a log aggregation system and log processing system designed for cloud-native environments. It is part of the CNCF (Cloud Native Computing Foundation) and is often used alongside other CNCF projects like Prometheus for monitoring and observability.
OpenSearch is the flexible, scalable, open-source way to build solutions for data-intensive applications. Explore, enrich, and visualize your data with built-in performance, developer-friendly tools, and powerful integrations for machine learning, data processing, and more.
OWASP Dependency-Check is a software composition analysis tool that helps identify and report known security vulnerabilities in project dependencies. It is particularly valuable for developers and organizations looking to secure their applications by identifying and addressing vulnerabilities in the libraries and components they use.
OWASP Zed Attack Proxy (ZAP) is an security testing tool for finding vulnerabilities in web applications during the development and testing phases. ZAP is designed to help developers and security professionals identify and address security issues and potential vulnerabilities in web applications. It provides automated and manual testing capabilities, as well as a wide range of features for security testing.
The EDP leverages the multi-tenancy approach to deliver a business-centric solution for managing containerized applications. The essence of this approach lies in using the additional tools for efficient resource allocation in a Kubernetes cluster. This approach grants tenants a considerable level of autonomy without risking the overall system's security and stability. It allows different users or teams to share the resources of a single Kubernetes cluster while keeping their workloads isolated. The resulting benefits include cost reduction, increased efficiency, improved scalability, and enhanced system resilience.
The EDP project inherently can work with Capsule and Kiosk, two tools that enable managing multi-tenancy. While Kiosk empowers the creation of isolated environments within a Kubernetes cluster, Capsule extends these capabilities further by imposing restrictions on resource usage. Through effective use of these tools, the EDP project offers a robust multi-tenancy model that ensures optimal resource utilization and secure separation of responsibilities.
EPAM Delivery Platform provides the implemented Static Application Security Testing support allowing to work with the Semgrep security scanner and the DefectDojo vulnerability management system to check the source code for known vulnerabilities.
This page describes the supported package registry providers and provides detailed instruction on how to adjust configurations to work properly with these package registry providers.
Currently, KubeRocketCI Tekton pipelines support the following package registries:
Nexus;
GitLab;
GitHub;
Azure DevOps.
The table below displays the supported registries and the languages they correspond to:
Language Framework Build Tool Proxy Registry Snapshots/Releases Registry Java Java 8Java 11Java 17 Maven NexusGitlabGitHubAzure DevOps NexusGitlabGitHubAzure DevOps Python Python 3.8FastAPIFlask Python NexusGitlabAzure DevOps NexusGitlabAzure DevOps C# .Net 3.1.Net 6.0 .Net No proxy is used for this language. NexusGitlabGitHubAzure DevOps JavaScript ReactVueAngularExpressNext.jsAntora NPM NexusGitlabGitHubAzure DevOps NexusGitlabGitHubAzure DevOps"},{"location":"operator-guide/package-registry/#proxy-package-registry-configuration","title":"Proxy Package Registry Configuration","text":"
By default, KubeRocketCI uses Nexus as the proxy registry for storing and caching application dependencies. This setting is fixed and cannot be modified.
The edp-tekton Helm Chart allows to override the default settings for package registries through tekton.configs part of its values.yaml file.
To provide necessary credentials for accessing the package registries, the user should create the package-registries-auth-secret secret and set the tekton.packageRegistriesSecret.enabled value to true to mount the secret into the pipeline.
To replace the default name of the secret, the user should set the tekton.packageRegistriesSecret.name parameter to the desired value:
CI_USERNAME and CI_PASSWORD - these environment variables are used for authentication to Nexus.
CI_AZURE_DEVOPS_USERNAME and CI_AZURE_DEVOPS_PASSWORD - these environment variables are used for authentication to Azure DevOps registry.
Secrets:
CI_AZURE_DEVOPS_USERNAME and CI_AZURE_DEVOPS_PASSWORD - these environment variables are taken from the package-registries-auth-secret secret.
Example: custom-maven-settings.yaml
apiVersion: v1\nkind: ConfigMap\nmetadata:\n name: new-custom-maven-settings\ndata:\n settings.xml: |\n <settings xmlns=\"http://maven.apache.org/SETTINGS/1.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd\">\n <localRepository>/workspace/source/cache</localRepository>\n\n <pluginGroups>\n <pluginGroup>org.sonarsource.scanner.maven</pluginGroup>\n </pluginGroups>\n <servers>\n <!-- The \"nexus\" server is defined to provide credentials required by the mirror. -->\n <server>\n <id>nexus</id>\n <username>${env.CI_USERNAME}</username>\n <password>${env.CI_PASSWORD}</password>\n </server>\n <!-- The \"azure-devops-registry\" server is defined to provide credentials required by the Azure DevOps registry.\n Username and password are used for authentication.\n More documentation: https://learn.microsoft.com/en-us/azure/devops/artifacts/get-started-maven?view=azure-devops -->\n <server>\n <id>azure-devops-registry</id>\n <username>${env.CI_AZURE_DEVOPS_USERNAME}</username>\n <password>${env.CI_AZURE_DEVOPS_PASSWORD}</password>\n </server>\n </servers>\n\n <mirrors>\n <mirror>\n <!--This sends everything else to /public -->\n <id>nexus</id>\n <mirrorOf>*</mirrorOf>\n <url>http://nexus.nexus:8081/repository/edp-maven-group</url>\n </mirror>\n </mirrors>\n\n <profiles>\n <profile>\n <id>sonar</id>\n <activation>\n <activeByDefault>true</activeByDefault>\n </activation>\n <properties>\n <sonar.login>\n ${env.SONAR_TOKEN}\n </sonar.login>\n <sonar.host.url>\n ${env.SONAR_HOST_URL}\n </sonar.host.url>\n </properties>\n </profile>\n <!-- Azure DevOps registry profile for managing artifacts within Azure DevOps. -->\n <profile>\n <id>azure-devops-registry</id>\n <properties>\n <altSnapshotDeploymentRepository>azure-devops-registry::default::https://pkgs.dev.azure.com/<ORGANIZATION_NAME>/<PROJECT_NAME>/_packaging/<FEED_NAME>/maven/v1</altSnapshotDeploymentRepository>\n <altReleaseDeploymentRepository>azure-devops-registry::default::https://pkgs.dev.azure.com/<ORGANIZATION_NAME>/<PROJECT_NAME>/_packaging/<FEED_NAME>/maven/v1</altReleaseDeploymentRepository>\n </properties>\n </profile>\n </profiles>\n <!-- Specify the active profile here. If you want to push packages to nexus (default), gitlab registry, github registry,\n or Azure DevOps registry, change the activeProfile id to the required profile id. -->\n <activeProfiles>\n <activeProfile>azure-devops-registry</activeProfile>\n </activeProfiles>\n </settings>\n
A new custom configuration map should contain the .npmrc-ci, .npmrc-publish-snapshots and .npmrc-publish-releases files, which override the default npm configuration.
For example, the following configuration map contains the .npmrc-ci, .npmrc-publish-snapshots and .npmrc-publish-releases files with the following settings:
'upBase64' (\"${CI_USERNAME}:${CI_PASSWORD}\" string in base64) - this environment variable is used for authentication to Nexus.
CI_AZURE_DEVOPS_USERNAME and CI_AZURE_DEVOPS_PASSWORD_IN_BASE64 - these environment variables are used for authentication to Azure DevOps registry.
Secrets:
CI_AZURE_DEVOPS_USERNAME and CI_AZURE_DEVOPS_PASSWORD_IN_BASE64 - these environment variables are taken from the package-registries-auth-secret secret.
For customizing python settings, a new configuration map can be prepared to replace the default pythonConfigMap. This custom configuration map should contain the PIP_TRUSTED_HOST, PIP_INDEX, PIP_INDEX_URL, REPOSITORY_URL_SNAPSHOTS and REPOSITORY_URL_RELEASES environment variables, which overrides the default python configuration.
For example, the following configuration map contains the following settings:
"},{"location":"operator-guide/report-portal-integration-tekton/","title":"Integration With Tekton","text":""},{"location":"operator-guide/report-portal-integration-tekton/#integration-with-tekton","title":"Integration With Tekton","text":"
ReportPortal integration with Tekton allows managing all automation results and reports in one place, visualizing metrics and analytics, team collaborating to associate statistics results.
For integration, take the following steps:
Log in to the ReportPortal console and navigate to the User Profile menu:
ReportPortal profile
Copy the Access token and use it as a value while creating a kubernetes secret for the ReportPortal credentials:
In the Configuration examples section of the ReportPortal User Profile menu, copy the following REQUIRED fields: rp.endpoint, rp.launch and rp.project. Insert these fields to the pytest.ini file in root directory of your project:
In root directory of the project create/update requirements.txt file and fill with following. it's mandatory to install report-portal python library (version may vary):
pytest-reportportal == 5.1.2\n
Create a custom Tekton task:
View: Custom Tekton task
apiVersion: tekton.dev/v1beta1\nkind: Task\nmetadata:\n labels:\n app.kubernetes.io/version: '0.1'\n name: pytest-reportportal\n namespace: edp\nspec:\n description: |-\n This task can be used to run pytest integrated with report portal.\n params:\n - default: .\n description: The path where package.json of the project is defined.\n name: PATH_CONTEXT\n type: string\n - name: EXTRA_COMMANDS\n type: string\n - default: python:3.8-alpine3.16\n description: The python image you want to use.\n name: BASE_IMAGE\n type: string\n - default: rp-credentials\n description: name of the secret holding the rp token\n name: rp-secret\n type: string\n steps:\n - env:\n - name: HOME\n value: $(workspaces.source.path)\n - name: RP_UUID\n valueFrom:\n secretKeyRef:\n key: rp_uuid\n name: $(params.rp-secret)\n image: $(params.BASE_IMAGE)\n name: pytest\n resources: {}\n script: >\n #!/usr/bin/env sh\n set -e\n export PATH=$PATH:$HOME/.local/bin\n $(params.EXTRA_COMMANDS)\n # tests are being run from ./test directory in the project\n pytest ./tests --reportportal\n workingDir: $(workspaces.source.path)/$(params.PATH_CONTEXT)\n workspaces:\n - name: source\n
Add this task ref to your Tekton pipeline after tasks:
Navigate to Client Scopes > Create client scope and create a new scope with the SAML protocol type.
Navigate to Client Scopes > your_scope_name > Mappers > Configure a new mapper > select the User Attribute mapper type. Add three mappers for the email, first name, and last name by typing lastName, firstName, and email in the User Attribute field:
Name is a display name in Keycloak.
User Attribute is a user property for mapping.
SAML Attribute Name is an attribute used for requesting information in the ReportPortal configuration.
SAML Attribute NameFormat: Basic.
Aggregate attribute values: Off.
User mapper sample Scope mappers
Navigate to Clients > Create client and fill in the following fields:
Client type: SAML.
Client ID: report.portal.sp.id.
Warning
The report.portal.sp.id Client ID is a constant value.
Navigate to Client > your_client > Settings and add https://<report-portal-url\\>/* to the Valid redirect URIs.
Navigate to Client > your_client > Keys and disable Client signature required.
Client keys
Navigate to Client > your_client > Client scopes and add the scope created on step 3 with the default Assigned type.
"},{"location":"operator-guide/restore-edp-with-velero/","title":"Restore EDP Tenant With Velero","text":""},{"location":"operator-guide/restore-edp-with-velero/#restore-edp-tenant-with-velero","title":"Restore EDP Tenant With Velero","text":"
You can use the Velero tool to restore a EDP tenant. Explore the main steps for backup and restoring below.
Delete all related entities in Keycloak: realm and clients from master/openshift realms. Navigate to the entities list in the Keycloak, select the necessary ones, and click the deletion icon on the entity overview page. If there are customized configs in Keycloak, save them before making backup.
Remove keycloak realm
To restore EDP, install and configure the Velero tool. Please refer to the Install Velero documentation for details.
Remove all locks for operators. Delete all config maps that have \u2039OPERATOR_NAME\u203a-operator-lock names. Then restart all pods with operators, or simply run the following command:
kubectl -n edp delete cm $(kubectl -n edp get cm | grep 'operator-lock' | awk '{print $1}')\n
Recreate the admin password and delete the Jenkins pod. Or change the script to update the admin password in Jenkins every time when the pod is updated.
This documentation serves as a detailed guide on configuring access rights within SonarQube projects. It is primarily aimed at ensuring that only authorized users can view and interact with the projects hosted on the SonarQube platform. The guide is structured to assist both new and existing SonarQube projects in managing their visibility settings effectively.
Upon logging into SonarQube through the OpenID Connect mechanism, users are automatically assigned to the sonar-users group, granting them access to all projects. However, this document outlines methods to customize these default settings to enhance security and privacy. It is divided into two main sections: one focusing on restricting access for the new projects and the other on configuring access for the existing projects.
"},{"location":"operator-guide/sonarqube-visibility/#restrict-access-for-new-projects","title":"Restrict Access for New Projects","text":"
In its default configuration, SonarQube does not restrict access to newly created projects, making them accessible to all instance users. To modify this behavior and set new projects to private by default, follow these instructions:
Open the SonarQube UI in the browser.
Navigate to the Administration tab:
Nexus user settings
Note
Ensure you have admin rights to see the Administration section.
Click the Projects button and select Management:
Nexus user settings
On the project management page, click pencil icon at the top-right corner::
Nexus user settings
Select Private and click Change Default Visibility:
Nexus user settings
"},{"location":"operator-guide/sonarqube-visibility/#configure-access-for-existing-projects","title":"Configure Access for Existing Projects","text":"
To make all the current projects private, follow the steps below:
In the Projects tab, enter the project you want to make private.
In the project page, click the Prject Settings button and select Permissions:
Nexus user settings
In the project permissions page, select Private:
Nexus user settings
Repeat the procedure for all of the projects you want to make private.
This documentation guide provides comprehensive instructions for integrating SonarQube with the EPAM Delivery Platform.
Info
In EDP release 3.5, we have changed the deployment strategy for the sonarqube-operator component, now it is not installed by default. The sonarURL parameter management has been transferred from the values.yaml file to Kubernetes secrets.
To establish robust authentication and precise access control, generating a SonarQube token is essential. This token is a distinct identifier, enabling effortless integration between SonarQube and EDP. To generate the SonarQube token, proceed with the following steps:
Open the SonarQube UI and navigate to Administration -> Security -> User. Create a new user or select an existing one. Click the Options List icon to create a token:
SonarQube user settings
Type the ci-user username, define an expiration period, and click the Generate button to create the token:
SonarQube create token
Click the Copy button to copy the generated <Sonarqube-token>:
SonarQube token
Provision secrets using Manifest, EDP Portal or with the externalSecrets operator:
EDP PortalManifestExternal Secrets Operator
Go to EDP Portal -> EDP -> Configuration -> SonarQube. Update or fill in the URL and Token fields and click the Save button:
"},{"location":"operator-guide/ssl-automation-okd/","title":"Use Cert-Manager in OpenShift","text":""},{"location":"operator-guide/ssl-automation-okd/#use-cert-manager-in-openshift","title":"Use Cert-Manager in OpenShift","text":"
The following material covers Let's Encrypt certificate automation with cert-manager using AWS Route53.
The cert-manager is a Kubernetes/OpenShift operator that allows to issue and automatically renew SSL certificates. In this tutorial, the steps to secure DNS Name will be demonstrated.
Below is an instruction on how to automatically issue and install wildcard certificates on OpenShift Ingress Controller and API Server covering all cluster Routes. To secure separate OpenShift Routes, please refer to the OpenShift Route Support project for cert-manager.
Install the cert-manager operator via OpenShift OperatorHub that uses Operator Lifecycle Manager (OLM):
Go to the OpenShift Admin Console \u2192 OperatorHub, search for the cert-manager, and click Install:
Cert-Manager Installation
Modify the ClusterServiceVersion OLM resource, by selecting the Update approval \u2192 Manual. If selecting Update approval \u2192 Automatic after the automatic operator update, the parameters in the ClusterServiceVersion will be reset to default.
Note
Installing an operator with Manual approval causes all operators installed in namespace openshift-operators to function as manual approval strategy. In case the Manual approval is chosen, review the manual installation plan and approve it.
Cert-Manager Installation
Navigate to Operators \u2192 Installed Operators and check the operator status to be Succeeded:
Cert-Manager Installation
In case of errors, troubleshoot the Operator issues:
"},{"location":"operator-guide/ssl-automation-okd/#create-aws-role-for-route53","title":"Create AWS Role for Route53","text":"
The cert-manager should be configured to validate Wildcard certificates using the DNS-based method.
Check the DNS Hosted zone ID in AWS Route53 for your domain.
Hosted Zone ID
Create Route53 Permissions policy in AWS for cert-manager to be able to create DNS TXT records for the certificate validation. In this example, cert-manager permissions are given for a particular DNS zone only. Replace Hosted zone ID XXXXXXXX in the \"Resource\": \"arn:aws:route53:::hostedzone/XXXXXXXXXXXX\".
Create an AWS Role with Custom trust policy for the cert-manager service account to use the AWS IRSA feature and then attach the created policy. Replace the following:
${aws-account-id} with the AWS account ID of the EKS cluster.
${aws-region} with the region where the EKS cluster is located.
${eks-hash} with the hash in the EKS API URL; this will be a random 32 character hex string, for example, 45DABD88EEE3A227AF0FA468BE4EF0B5.
${namespace} with the namespace where cert-manager is running.
${service-account-name} with the name of the ServiceAccount object created by cert-manager.
By default, it is \"system:serviceaccount:openshift-operators:cert-manager\" if cert-manager is installed via OperatorHub.
Attach the created Permission policy for Route53 to the Role.
Modify the cert-managerDeployment with the correct file system permissions fsGroup: 1001, so that the ServiceAccount token can be read.
Note
In case the ServiceAccount token cannot be read and the operator is installed using the OperatorHub, add fsGroup: 1001 via OpenShift ClusterServiceVersion OLM resource. It should be a cert-manager controller spec. These actions are not required for OpenShift v4.10.
If you have separate public and private DNS zones for the same domain (split-horizon DNS), modify the cert-managerDeployment in order to validate DNS TXT records via public recursive nameservers.
Note
Otherwise, you will be getting an error during a record validation:
Waiting for DNS-01 challenge propagation: NS ns-123.awsdns-00.net.:53 returned REFUSED for _acme-challenge.\n
To avoid the error, add --dns01-recursive-nameservers-only --dns01-recursive-nameservers=8.8.8.8:53,1.1.1.1:53 as ARGs to the cert-manager controller Deployment.
The Deployment must be modified via OpenShift ClusterServiceVersion OLM resource if the operator was installed using the OperatorHub. The OpenShift ClusterServiceVersion OLM resource includes several Deployments, and the ARGs must be modified only for the cert-manager controller.
Save the resource. After that, OLM will try to reload the resource automatically and save it to the YAML file. If OLM resets the config file, double-check the entered values.
Create the ClusterIssuer resource for Let's Encrypt Staging and Prod environments that signs a Certificate using cert-manager.
Note
Let's Encrypt has a limit of duplicate certificates in the Prod environment. Therefore, a ClusterIssuer has been created for Let's Encrypt Staging environment. By default, Let's Encrypt Staging certificates will not be trusted in your browser. The certificate validation cannot be tested in the Let's Encrypt Staging environment.
Change user@example.com with your contact email.
Replace hostedZoneID XXXXXXXXXXX with the DNS Hosted zone ID in AWS for your domain.
Replace the region value ${region}.
The secret under privateKeySecretRef will be created automatically by the cert-manager operator.
In two different namespaces, create a Certificate resource for the OpenShift Router (Ingress controller for OpenShift) and for the OpenShift APIServer.
OpenShift Router supports a single wildcard certificate for Ingress/Route resources in different namespaces (so called, default SSL certificate). The Ingress controller expects the certificates in a Secret to be created in the openshift-ingress namespace; the API Server, in the openshift-config namespace. The cert-manager operator will automatically create these secrets from the Certificate resource.
Replace ${DOMAIN} with your domain name. It can be checked with oc whoami --show-server. Put domain names in quotes.
The certificate for OpenShift Router in the `openshift-ingress` namespace
"},{"location":"operator-guide/ssl-automation-okd/#modify-openshift-router-and-api-server-custom-resources","title":"Modify OpenShift Router and API Server Custom Resources","text":"
Update the Custom Resource of your Router (Ingress controller). Patch the defaultCertificate object value with { \"name\": \"router-certs\" }:
"},{"location":"operator-guide/ssl-automation-okd/#move-from-lets-encrypt-staging-environment-to-prod","title":"Move From Let's Encrypt Staging Environment to Prod","text":"
Test the Staging certificate on the OpenShift Admin Console. The --insecure flag is used because Let's Encrypt Staging certificates are not trusted in browsers by default:
Please note that these actions will lead to logging your account out of the OpenShift Admin Console, since certificates will be deleted. Accept the certificate warning in the browser and log in again after that.
Otherwise, use web tools like Google Admin Toolbox:
DNS Validation
If the correct TXT value is shown (the value corresponds to the current TXT value in the DNS zone), it means that the DNS propagation is complete and Let's Encrypt is able to access the record in order to validate it and issue a trusted certificate.
Note
If the DNS validation challenge self check fails, cert-manager will retry the self check with a fixed 10-second retry interval. Challenges that do not ever complete the self check will continue retrying until the user intervenes by either retrying the Order (by deleting the Order resource) or amending the associated Certificate resource to resolve any configuration errors.
As soon as the domain ownership has been verified, any cert-manager affected validation TXT records in the AWS Route53 DNS zone will be cleaned up.
Please find below the issues that may occur and their troubleshooting:
When certificates are not issued for a long time, or a cert-manager resource is not in a Ready state, describing a resource may show the reason for the error.
Basically, the cert-manager creates the following resources during a Certificate issuance: CertificateRequest, Order, and Challenge. Investigate each of them in case of errors.
Use the cmctl tool to show the state of a Certificate and its associated resources.
Check the cert-manager controller pod logs:
oc get pod -n openshift-operators | grep 'cert-manager'\noc logs -f cert-manager-${replica_set}-${random_string} -n openshift-operators\n
Certificate error debugging: a. Decode certificate chain located in the secrets:
oc get secret router-certs -n openshift-ingress -o 'go-template={{index .data \"tls.crt\"}}' | base64 -d | while openssl x509 -noout -text; do :; done 2>/dev/null\noc get secret api-certs -n openshift-config -o 'go-template={{index .data \"tls.crt\"}}' | base64 -d | while openssl x509 -noout -text; do :; done 2>/dev/null\n
"},{"location":"operator-guide/ssl-automation-okd/#remove-obsolete-certificate-authority-data-from-kubeconfig","title":"Remove Obsolete Certificate Authority Data From Kubeconfig","text":"
After updating the certificates, the access to the cluster via Lens or CLI will be denied because of the untrusted certificate errors:
$ oc whoami\nUnable to connect to the server: x509: certificate signed by unknown authority\n
Such behavior appears because the oc tool references an old CA data in the kubeconfig file.
Note
Examine the Certificate Authority data using the following command:
This certificate has the CA:TRUE parameter, which means that this is a self-signed root CA certificate.
To fix the error, remove the old CA data from your OpenShift kubeconfig file:
sed -i \"/certificate-authority-data/d\" $KUBECONFIG\n
Since this field will be absent in the kubeconfig file, system root SSL certificate will be used to validate the cluster certificate trust chain. On Ubuntu, Let's Encrypt OpenShift cluster certificates will be validated against Internet Security Research Group root in /etc/ssl/certs/ca-certificates.crt.
The cert-manager automatically renews the certificates based on the X.509 certificate's duration and the renewBefore value. The minimum value for the spec.duration is 1 hour; for spec.renewBefore, 5 minutes. It is also required that spec.duration > spec.renewBefore.
Use the cmctl tool to manually trigger a single instant certificate renewal:
Ensure the following requirements are met first before moving ahead:
Kube prometheus stack is installed;
Tekton pipeline is installed.
"},{"location":"operator-guide/tekton-monitoring/#create-and-apply-the-additional-scrape-config","title":"Create and Apply the Additional Scrape Config","text":"
To create and apply the additional scrape config, follow the steps below:
Create the kubernetes secret file with the additional scrape config:
EPAM Delivery Platform provides Continuous Integration based on Tekton.
Tekton is an open-source Kubernetes native framework for creating CI pipelines, allowing a user to compile, build and test applications.
The edp-tekton GitHub repository provides all Tekton implementation logic on the platform. The Helm charts are used to deploy the resources inside the Kubernetes cluster. Tekton logic is decoupled into separate components:
Edp-tekton components diagram
The diagram above describes the following:
Common-library is the Helm chart of Library type which stores the common logic shareable across all Tekton pipelines. This library contains Helm templates that generate common Tekton resources.
Pipelines-library is the Helm chart of the Application type which stores the core logic for the EDP pipelines. Tekton CRs like Pipelines, Tasks, EventListeners, Triggers, TriggerTemplates, and other resources are delivered with this chart.
Custom-pipelines is the Helm chart of the Application type which implements custom logic running specifically for internal EDP development, for example, CI and Release. It also demonstrates the customization flow on the platform.
Tekton-dashboard is a multitenancy-adopted implementation of the upstream Tekton Dashboard. It is configured to share Tekton resources across a single namespace.
EDP Interceptor is the custom Tekton Interceptor which enriches the payload from the VCSs events with EDP data from the Codebase CR specification. These data are used to define the Pipeline logic.
Inspect the schema below that describes the logic behind the Tekton functionality on the platform:
Component view for the Tekton on EDP
The platform logic consists of the following:
The EventListener exposes a dedicated Pod that runs the sink logic and receives incoming events from the VCSs (Gerrit, GitHub, GitLab) through the Ingress. It contains triggers with filtering and routing rules for incoming requests.
Upon the Event Payload arrival, the EventListener runs triggers to process information or validate it via different interceptors.
The EDP Interceptor extracts information from the codebases.v2.edp.epam.com CR and injects the received data into top-level 'extensions' field of the Event Payload. The Interceptor consists of running Pod and Service.
The Tekton Cel Interceptor does simple transformations of the resulting data and prepares them for the Pipeline parameters substitution.
The TriggerTemplate creates a PipelineRun instance with the required parameters extracted from the Event Payload by Interceptors. These parameters are mandatory for Pipelines.
The PipelineRun has a mapping to the EDP Tekton Pipelines using a template approach which reduces code duplication. Each Pipeline is designed for a specific VCS (Gerrit, GitLab, GitHub), technology stack (such as Java or Python), and type (code-review, build).
A Pipeline consists of separate EDP Tekton or open-source Tasks. They are arranged in a specific order of execution in the Pipeline.
Each Task is executed as a Pod on the Kubernetes cluster. Also, Tasks can have a different number of steps that are executed as a Container in Pod.
The Kubernetes native approach allows the creation of PipelineRun either with the kubectl tool or using the EDP Portal UI.
"},{"location":"operator-guide/upgrade-edp-3.0/","title":"v2.12 to 3.0","text":""},{"location":"operator-guide/upgrade-edp-3.0/#upgrade-edp-v212-to-30","title":"Upgrade EDP v2.12 to 3.0","text":"
Important
Before starting the upgrade procedure, please make the necessary backups.
Kiosk integration is disabled by default. With EDP below v.3.0.x, define the global.kioskEnabled parameter in the values.yaml file. For details, please refer to the Set Up Kiosk page.
The gerrit-ssh-port parameter is moved from the gerrit-operator.gerrit.sshport to global.gerritSSHPort values.yaml file.
In edp-gerrit-operator, the gitServer.user value is changed from the jenkins to edp-civalues.yaml file.
This section provides the details on upgrading EDP to 3.0. Explore the actions and requirements below.
Update Custom Resource Definitions (CRDs). Run the following command to apply all necessary CRDs to the cluster:
Add proper Helm annotations and labels as indicated below. This step is necessary starting from the release v.3.0.x as custom resources are managed by Helm and removed from the Keycloak Controller logic.
To verify the installation, it is possible to test the deployment before applying it to the cluster with the following command: helm upgrade edp epamedp/edp-install -n <edp-namespace> --values values.yaml --version=3.0.x --dry-run
Update image versions for the Jenkins agents in the ConfigMap:
"},{"location":"operator-guide/upgrade-edp-3.1/","title":"v3.0 to 3.1","text":""},{"location":"operator-guide/upgrade-edp-3.1/#upgrade-edp-v30-to-31","title":"Upgrade EDP v3.0 to 3.1","text":"
Important
We suggest making a backup of the EDP environment before starting the upgrade procedure.
This section provides the details on the EDP upgrade to v3.1. Explore the actions and requirements below.
Update Custom Resource Definitions (CRDs). Run the following command to apply all necessary CRDs to the cluster:
To verify the installation, it is possible to test the deployment before applying it to the cluster with the following command: helm upgrade edp epamedp/edp-install -n <edp-namespace> --values values.yaml --version=3.1.0 --dry-run
"},{"location":"operator-guide/upgrade-edp-3.2/","title":"v3.1 to 3.2","text":""},{"location":"operator-guide/upgrade-edp-3.2/#upgrade-edp-v31-to-32","title":"Upgrade EDP v3.1 to 3.2","text":"
Important
We suggest making a backup of the EDP environment before starting the upgrade procedure.
This section provides the details on the EDP upgrade to v3.2.2. Explore the actions and requirements below.
Update Custom Resource Definitions (CRDs). Run the following command to apply all necessary CRDs to the cluster:
EDP 3.2.2 features OIDC configuration for EDP Portal. If this parameter is required, create keycloak-client-headlamp-secret as described in this article:
EDP release 3.2.2 uses the default cluster storageClass and we must check previous storageClass parameters. Align , if required, the storageClassName in EDP values.yaml to the same that were used by EDP PVC. For example:
edp-tekton:\n buildTool:\n go:\n cache:\n persistentVolume:\n # -- Specifies storageClass type. If not specified, a default storageClass for go-cache volume is used\n storageClass: ebs-sc\n\njenkins-operator:\n enabled: true\n jenkins:\n storage:\n # -- Storageclass for Jenkins data volume\n class: gp2\n\nsonar-operator:\n sonar:\n storage:\n data:\n # -- Storageclass for Sonar data volume\n class: gp2\n database:\n # -- Storageclass for database data volume\n class: gp2\n\ngerrit-operator:\n gerrit:\n storage:\n # -- Storageclass for Gerrit data volume\n class: gp2\n\nnexus-operator:\n nexus:\n storage:\n # -- Storageclass for Nexus data volume\n class: gp2\n
To upgrade EDP to the v3.2.2, run the following command:
To verify the installation, it is possible to test the deployment before applying it to the cluster with the following command: helm upgrade edp epamedp/edp-install -n <edp-namespace> --values values.yaml --version=3.2.2 --dry-run
"},{"location":"operator-guide/upgrade-edp-3.3/","title":"v3.2 to 3.3","text":""},{"location":"operator-guide/upgrade-edp-3.3/#upgrade-edp-v32-to-33","title":"Upgrade EDP v3.2 to 3.3","text":"
Important
We suggest making a backup of the EDP environment before starting the upgrade procedure.
Note
We currently disabled cache volumes for go and npm in the EDP 3.3 release.
This section provides the details on the EDP upgrade to v3.3.0. Explore the actions and requirements below.
Update Custom Resource Definitions (CRDs). Run the following command to apply all necessary CRDs to the cluster:
To verify the installation, it is possible to test the deployment before applying it to the cluster with the --dry-run tag: helm upgrade edp epamedp/edp-install -n edp --values values.yaml --version=3.3.0 --dry-run
In EDP v3.3.0, a new feature was introduced allowing manual pipeline re-triggering by sending a comment with /recheck. To enable the re-trigger feature for applications that were added before the upgrade, please proceed with the following:
4.1 For Gerrit VCS, add the following event to the webhooks.config configuration file in the All-Projects repository:
4.2 For GitHub VCS, check the Issue comments permission for each webhook in every application added before the EDP upgrade to 3.3.0.
4.3 For GitLab VCS, check the Comments permission for each webhook in every application added before the EDP upgrade to 3.3.0.
"},{"location":"operator-guide/upgrade-edp-3.4/","title":"v3.3 to 3.4","text":""},{"location":"operator-guide/upgrade-edp-3.4/#upgrade-edp-v33-to-34","title":"Upgrade EDP v3.3 to 3.4","text":"
Important
We suggest making a backup of the EDP environment before starting the upgrade procedure.
Note
Pay attention that the following components: perf-operator, edp-admin-console, edp-admin-console-operator, and edp-jenkins-operator are deprecated and should be additionally migrated in order to avoid their deletion. For migration details, please refer to the Migrate CI Pipelines From Jenkins to Tekton instruction.
This section provides the details on the EDP upgrade to v3.4.1. Explore the actions and requirements below.
Update Custom Resource Definitions (CRDs). Run the following command to apply all necessary CRDs to the cluster:
Since the values.yaml file structure has been modified, move the dockerRegistry subsection to the global section:
The dockerRegistry value has been moved to the global section:
global:\n dockerRegistry:\n # -- Define Image Registry that will to be used in Pipelines. Can be ecr (default), harbor\n type: \"ecr\"\n # -- Docker Registry endpoint\n url: \"<AWS_ACCOUNT_ID>.dkr.ecr.<AWS_REGION>.amazonaws.com\"\n
(Optional) To integrate EDP with Jira, rename the default values from epam-jira-user to jira-user for a secret name. In case Jira is already integrated, it will continue working.
(Optional) To switch to the Harbor registry, change the secret format for the external secret from kaniko-docker-config v3.3.0 to kaniko-docker-config v3.4.1:
To verify the installation, it is possible to test the deployment before applying it to the cluster with the --dry-run tag: helm upgrade edp epamedp/edp-install -n edp --values values.yaml --version=3.4.1 --dry-run
"},{"location":"operator-guide/upgrade-edp-3.5/","title":"v3.4 to 3.5","text":""},{"location":"operator-guide/upgrade-edp-3.5/#upgrade-edp-v34-to-35","title":"Upgrade EDP v3.4 to 3.5","text":"
Important
We suggest making a backup of the EDP environment before starting the upgrade procedure.
This section provides detailed instructions for upgrading EPAM Delivery Platform to version 3.5.3. Follow the steps and requirements outlined below:
Update Custom Resource Definitions (CRDs). Run the following command to apply all necessary CRDs to the cluster:
Codebase-operator v2.19.0 is not compatible with the previous versions. Please become familiar with the breaking change in Git Server Custom Resource Definition.
Familiarize yourself with the updated file structure of the values.yaml file and adjust your values.yaml file accordingly:
By default, the deployment of sub components such as edp-sonar-operator, edp-nexus-operator, edp-gerrit-operator, and keycloak-operator, have been disabled. Set them back to true in case they are needed or manually deploy external tools, such as SonarQube, Nexus, Gerrit and integrate them with the EPAM Delivery Platform.
The default Git provider has been changed from Gerrit to GitHub:
The sonarUrl and nexusUrl parameters have been deprecated. All the URLs from external components are stored in integration secrets:
global:\n # -- Optional parameter. Link to use custom sonarqube. Format: http://<service-name>.<sonarqube-namespace>:9000 or http://<ip-address>:9000\n sonarUrl: \"\"\n # -- Optional parameter. Link to use custom nexus. Format: http://<service-name>.<nexus-namespace>:8081 or http://<ip-address>:<port>\n nexusUrl: \"\"\n
Keycloak integration has been moved from the global section to the sso section. Update the parameters accordingly:
Old format:
global:\n # -- Keycloak URL\n keycloakUrl: https://keycloak.example.com\n # -- Administrators of your tenant\n admins:\n - \"stub_user_one@example.com\"\n # -- Developers of your tenant\n developers:\n - \"stub_user_one@example.com\"\n - \"stub_user_two@example.com\"\n
New format:
sso:\n enabled: true\n # -- Keycloak URL\n keycloakUrl: https://keycloak.example.com\n # -- Administrators of your tenant\n admins:\n - \"stub_user_one@example.com\"\n # -- Developers of your tenant\n developers:\n - \"stub_user_one@example.com\"\n - \"stub_user_two@example.com\"\n
(Optional) The default secret name for Jira integration has been changed from jira-user to ci-jira. Please adjust the secret name in the parameters accordingly:
To verify the installation, it is possible to test the deployment before applying it to the cluster with the --dry-run tag: helm upgrade edp epamedp/edp-install -n edp --values values.yaml --version=3.5.3 --dry-run
"},{"location":"operator-guide/upgrade-edp-3.6/","title":"v3.5 to 3.6","text":""},{"location":"operator-guide/upgrade-edp-3.6/#upgrade-edp-v35-to-36","title":"Upgrade EDP v3.5 to 3.6","text":"
Important
We suggest backing up the EDP environment before starting the upgrade procedure.
This section provides detailed instructions for upgrading the EPAM Delivery Platform to version 3.6.0. Follow the steps and requirements outlined below:
Update Custom Resource Definitions (CRDs). Run the following command to apply all the necessary CRDs to the cluster:
Familiarize yourself with the updated structure of the values.yaml file and adjust it accordingly:
2.1 A new parameter called space has been added to the DockerRegistry section. It is designed to form URLs in CodebaseImageStreams. This parameter is set the same as the EPAM Delivery Platform namespace name. Ensure you define the space parameter prior to the update.
Warning
This parameter is a significant change and must be set before the update.
2.2 Subcomponents, such as sonar-operator, nexus-operator, and keycloak-operator, have been removed since dependencies are no longer provisioned by the edp-install Helm Chart. To install and integrate shared components with EDP, please use the edp-cluster-add-ons approach or refer to the SonarQube Integration and Nexus Sonatype Integration documentation pages.
2.3 The Argo CD integration dependency has been deleted as now we implement it using edp-cluster-add-ons approach. To install and integrate Argo CD as a shared component, use the edp-cluster-add-ons approach.
2.4 The handling of secrets for stages namespaces in the cd-pipeline-operator has been updated. The parameter manageSecrets has been replaced with secretManager. If your environment previously utilized this parameter, manually modify it from manageSecrets: true to secretManager: own. Otherwise, set it to secretManager: none:
cd-pipeline-operator:\n # -- flag that indicates whether the operator should manage secrets for stages;\n # own - just copy secrets;\n # eso - secrete will be managed by External Secrets Operator(operator should be installed in the cluster);\n # none - not enable secrets management logic;\n secretManager: none\n
To upgrade EDP to the v3.6.0, run the following command:
To verify the installation, it is possible to test the deployment before applying it to the cluster with the --dry-run tag: helm upgrade edp epamedp/edp-install -n edp --values values.yaml --version=3.6.0 --dry-run
"},{"location":"operator-guide/upgrade-edp-3.7/","title":"v3.6 to 3.7","text":""},{"location":"operator-guide/upgrade-edp-3.7/#upgrade-edp-v36-to-37","title":"Upgrade EDP v3.6 to 3.7","text":"
Important
We suggest backing up the EDP environment before starting the upgrade procedure.
This section provides detailed instructions for upgrading the EPAM Delivery Platform to version 3.7.5. Follow the steps and requirements outlined below:
To upgrade EDP to the v3.7.5, run the following command:
To verify the installation, it is possible to test the deployment before applying it to the cluster with the --dry-run tag: helm upgrade edp epamedp/edp-install -n edp --values values.yaml --version=3.7.5 --dry-run
"},{"location":"operator-guide/upgrade-keycloak-19.0/","title":"v17.0 to 19.0","text":""},{"location":"operator-guide/upgrade-keycloak-19.0/#upgrade-keycloak-v170-to-190","title":"Upgrade Keycloak v17.0 to 19.0","text":"
Starting from Keycloak v.18.x.x, the Keycloak server has been moved from the Wildfly (JBoss) Application Server to Quarkus framework and is called Keycloak.X.
There are two ways to upgrade Keycloak v.17.0.x-legacy to v.19.0.x on Kubernetes, please perform the steps described in the Prerequisites section of this tutorial, and then select a suitable upgrade strategy for your environment:
Upgrade Postgres database to a minor release v.11.17
Migrate Postgres database from Postgres v.11.x to v.14.5
Before upgrading Keycloak, please perform the steps below:
Create a backup/snapshot of the Keycloak database volume. Locate the AWS volumeID and then create its snapshot on AWS:
Find the PVC name attached to the Postgres pod. It can be similar to data-keycloak-postgresql-0 if the Postgres StatefulSet name is keycloak-postgresql:
kubectl get pods keycloak-postgresql-0 -n security -o jsonpath='{.spec.volumes[*].persistentVolumeClaim.claimName}{\"\\n\"}'\n
Locate the PVvolumeName in the data-keycloak-postgresql-0 Persistent Volume Claim:
kubectl get pvc data-keycloak-postgresql-0 -n security -o jsonpath='{.spec.volumeName}{\"\\n\"}'\n
Get volumeID in the Persistent Volume:
kubectl get pv ${pv_name} -n security -o jsonpath='{.spec.awsElasticBlockStore.volumeID}{\"\\n\"}'\n
Add two additional keys: password and postgres-password, to the keycloak-postgresql secret in the Keycloak namespace.
Note
The password key must have the same value as the postgresql-password key.
The postgres-password key must have the same value as the postgresql-postgres-password key.
The latest chart for Keycloak.X does not have an option to override Postgres password and admin password keys in the secret, and it uses the Postgres defaults, therefore, a new secret scheme must be implemented:
"},{"location":"operator-guide/upgrade-keycloak-19.0/#upgrade-postgres-database-to-a-minor-release-v1117","title":"Upgrade Postgres Database to a Minor Release v.11.17","text":"
To upgrade Keycloak by upgrading Postgres Database to a minor release v.11.17, perform the steps described in the Prerequisites section of this tutorial, and then perform the following steps:
Since the Keycloak.X release, Keycloak and Postgres database charts are separated. Upgrade Keycloak, and then install the Postgres database.
Note
nameOverride: \"keycloak\" sets the name of the Keycloak pod. It must be the same Keycloak name as in the previous StatefulSet.
Change Ingress host name to the Keycloak host name.
hostname: keycloak-postgresql is the hostname of the pod with the Postgres database that is the same as Postgres StatefulSet name, for example, keycloak-postgresql.
\"/opt/keycloak/bin/kc.sh start --auto-build\" was used in the legacy Keycloak version. However, it is no longer required in the new Keycloak version since it is deprecated and used by default.
Optionally, use the following command for applying the old Keycloak theme:
bin/kc.sh start --features-disabled=admin2\n
View: keycloak-values.yaml
nameOverride: \"keycloak\"\n\nreplicas: 1\n\n# Deploy the latest verion\nimage:\n tag: \"19.0.1\"\n\n# start: create OpenShift realm which is required by EDP\nextraInitContainers: |\n - name: realm-provider\n image: busybox\n imagePullPolicy: IfNotPresent\n command:\n - sh\n args:\n - -c\n - |\n echo '{\"realm\": \"openshift\",\"enabled\": true}' > /opt/keycloak/data/import/openshift.json\n volumeMounts:\n - name: realm\n mountPath: /opt/keycloak/data/import\n\nextraVolumeMounts: |\n - name: realm\n mountPath: /opt/keycloak/data/import\n\nextraVolumes: |\n - name: realm\n emptyDir: {}\n\ncommand:\n - \"/opt/keycloak/bin/kc.sh\"\n - \"--verbose\"\n - \"start\"\n - \"--http-enabled=true\"\n - \"--http-port=8080\"\n - \"--hostname-strict=false\"\n - \"--hostname-strict-https=false\"\n - \"--spi-events-listener-jboss-logging-success-level=info\"\n - \"--spi-events-listener-jboss-logging-error-level=warn\"\n - \"--import-realm\"\n\nextraEnv: |\n - name: KC_PROXY\n value: \"passthrough\"\n - name: KEYCLOAK_ADMIN\n valueFrom:\n secretKeyRef:\n name: keycloak-admin-creds\n key: username\n - name: KEYCLOAK_ADMIN_PASSWORD\n valueFrom:\n secretKeyRef:\n name: keycloak-admin-creds\n key: password\n - name: JAVA_OPTS_APPEND\n value: >-\n -XX:+UseContainerSupport\n -XX:MaxRAMPercentage=50.0\n -Djava.awt.headless=true\n -Djgroups.dns.query={{ include \"keycloak.fullname\" . }}-headless\n\n# This block should be uncommented if you install Keycloak on Kubernetes\ningress:\n enabled: true\n annotations:\n kubernetes.io/ingress.class: nginx\n ingress.kubernetes.io/affinity: cookie\n rules:\n - host: keycloak.<ROOT_DOMAIN>\n paths:\n - path: '{{ tpl .Values.http.relativePath $ | trimSuffix \"/\" }}/'\n pathType: Prefix\n\n# This block should be uncommented if you set Keycloak to OpenShift and change the host field\n# route:\n# enabled: false\n# # Path for the Route\n# path: '/'\n# # Host name for the Route\n# host: \"keycloak.<ROOT_DOMAIN>\"\n# # TLS configuration\n# tls:\n# enabled: true\n\nresources:\n limits:\n memory: \"2048Mi\"\n requests:\n cpu: \"50m\"\n memory: \"512Mi\"\n\n# Check database readiness at startup\ndbchecker:\n enabled: true\n\ndatabase:\n vendor: postgres\n existingSecret: keycloak-postgresql\n hostname: keycloak-postgresql\n port: 5432\n username: admin\n database: keycloak\n
Upgrade the Keycloak Helm chart:
Note
The Helm chart is substituted with the new Keyacloak.X instance.
Change the namespace and the values file name if required.
If there are error messages when upgrading via Helm, make sure that StatefulSets are removed. If they are removed and the error still persists, try to add the --force flag to the Helm command:
Postgres v.11 and Postgres v.14.5 are not compatible.
Postgres image will be upgraded to a minor release v.11.17.
fullnameOverride: \"keycloak-postgresql\" sets the name of the Postgres StatefulSet. It must be the same as in the previous StatefulSet.
View: postgres-values.yaml
fullnameOverride: \"keycloak-postgresql\"\n\n# PostgreSQL read only replica parameters\nreadReplicas:\n # Number of PostgreSQL read only replicas\n replicaCount: 1\n\nglobal:\n postgresql:\n auth:\n username: admin\n existingSecret: keycloak-postgresql\n secretKeys:\n adminPasswordKey: postgres-password\n userPasswordKey: password\n database: keycloak\n\nimage:\n registry: docker.io\n repository: bitnami/postgresql\n tag: 11.17.0-debian-11-r3\n\nauth:\n existingSecret: keycloak-postgresql\n secretKeys:\n adminPasswordKey: postgres-password\n userPasswordKey: password\n\nprimary:\n persistence:\n enabled: true\n size: 3Gi\n # If the StorageClass with reclaimPolicy: Retain is used, install an additional StorageClass before installing PostgreSQL\n # (the code is given below).\n # If the default StorageClass will be used - change \"gp2-retain\" to \"gp2\"\n storageClass: \"gp2-retain\"\n
Install the Postgres database chart:
Note
Change the namespace and the values file name if required.
Log in to Keycloak and check that everything works as expected.
"},{"location":"operator-guide/upgrade-keycloak-19.0/#clean-and-analyze-database","title":"Clean and Analyze Database","text":"
Optionally, run the vacuumdb application on the database, to recover space occupied by \"dead tuples\" in the tables, analyze the contents of database tables, and collect statistics for PostgreSQL query engine to improve performance:
"},{"location":"operator-guide/upgrade-keycloak-19.0/#migrate-postgres-database-from-postgres-v11x-to-v145","title":"Migrate Postgres Database From Postgres v.11.x to v.14.5","text":"
Info
There is a Postgres database migration script at the end of this tutorial. Please read the section below before using the script.
To upgrade Keycloak by migrating Postgres database from Postgres v.11.x to v.14.5, perform the steps described in the Prerequisites section of this tutorial, and then perform the following steps:
Log in to the current Keycloak Postgres pod and create a logical backup of all roles and databases using the pg_dumpall application. If there is no access to the Postgres Superuser, backup the Keycloak database with the pg_dump application:
Note
The secret key postgresql-postgres-password is for the postgres Superuser and postgresql-password is for admin user. The admin user is indicated by default in the Postgres Helm chart. The admin user may not have enough permissions to dump all Postgres databases and roles, so the preferred option for exporting all objects is using the pg_dumpall tool with the postgres Superuser.
If the PGPASSWORD variable is not specified before using the pg_dumpall tool, you will be prompted to enter a password for each database during the export.
If the -l keycloak parameter is specified, pg_dumpall will connect to the keycloak database for dumping global objects and discovering what other databases should be dumped. By default, pg_dumpall will try to connect to postgres or template1 databases. This parameter is optional.
The pg_dumpall --clean option adds SQL commands to the dumped file for dropping databases before recreating them during import, as well as DROP commands for roles and tablespaces (pg_dump also has this option). If the --clean parameter is specified, connect to the postgres database initially during import via psql. The psql script will attempt to drop other databases immediately, and that will fail for the database you are connected to. This flag is optional, and it is not included into this tutorial.
If there is no working password for the postgres Superuser, try the admin user using the pg_dump tool to export the keycloak database without global roles:
Double-check that the contents of the dumped file is not empty. It usually contains more than 4000 lines.
Copy the file with the database dump to a local machine. Since tar may not be present in the pod and kubectl cp will not work without tar, use the following command:
Please find below the alternative commands for exporting the database to the local machine without copying the file to a pod for Postgres and admin users:
Delete all previous Keycloak resources along with the Postgres database and keycloak StatefulSets, Ingress, and custom resources via Helm, or via the tool used for their deployment.
helm list -n security\nhelm delete keycloak -n security\n
Warning
Don't delete the whole namespace. Keep the keycloak-postgresql and keycloak-admin-creds secrets.
Delete the volume in AWS, from which a snapshot has been created. Then delete the PVC:
fullnameOverride: \"keycloak-postgresql\" sets the name of the Postgres StatefulSet. It must be same as in the previous StatefulSet.
View: postgres-values.yaml
nameOverride: \"keycloak-postgresql\"\n\n# PostgreSQL read only replica parameters\nreadReplicas:\n # Number of PostgreSQL read only replicas\n replicaCount: 1\n\nglobal:\n postgresql:\n auth:\n username: admin\n existingSecret: keycloak-postgresql\n secretKeys:\n adminPasswordKey: postgres-password\n userPasswordKey: password\n database: keycloak\n\nauth:\n existingSecret: keycloak-postgresql\n secretKeys:\n adminPasswordKey: postgres-password\n userPasswordKey: password\n\nprimary:\n persistence:\n enabled: true\n size: 3Gi\n # If the StorageClass with reclaimPolicy: Retain is used, install an additional StorageClass before installing PostgreSQL\n # (the code is given below).\n # If the default StorageClass will be used - change \"gp2-retain\" to \"gp2\"\n storageClass: \"gp2-retain\"\n
Install the Postgres database:
Note
Change the namespace and the values file name if required.
Database import must be done before deploying Keycloak, because Keycloak will write its own data to the database during the start, and the import will partially fail. If that happened, scale down the keycloak StatefulSet, and try to drop the Keycloak database in the Postgres pod:
If there still are some conflicting objects like roles, drop them via the DROP ROLE command.
If the previous steps do not help, downscale the Keycloak and Postgres StatefulSets and delete the attached PVC (save the volumeID before removing), and delete the volume on AWS if using gp2-retain. In case of using gp2, the volume will be deleted automatically after removing PVC. After that, redeploy the Postgres database, so that the new PVC is automatically created.
Import the SQL dump file to the Postgres database cluster:
Info
Since the databases were exported in the sql format, the psql tool will be used to restore (reload) them. pg_restore does not support this plain-text format.
If the entire Postgres database cluster was migrated with the postgres Superuser using pg_dumpall, use the import command without indicating the database:
If the database was migrated with the admin user using pg_dump, the postgres Superuser still can be used to restore it, but, in this case, a database must be indicated:
Warning
If the database name was not indicated during the import for the file dumped with pg_dump, the psql tool will import this database to a default Postgres database called postgres.
If the postgres Superuser is not accessible in the Postgres pod, run the command under the admin or any other user that has the database permissions. In this case, indicate the database as well:
After a successful import, delete the dump file from the pod for security reasons:
kubectl exec -n security ${postgresql_pod} \"--\" sh -c \"rm /tmp/keycloak_wildfly_db_dump.sql\"\n
Note
Please find below the alternative commands for importing the database from the local machine to the pod without storing the backup on a pod for postgres or admin users:
nameOverride: \"keycloak\" sets the name of the Keycloak pod. It must be the same Keycloak name as in the previous StatefulSet.
Change Ingress host name to the Keycloak host name.
hostname: keycloak-postgresql is the hostname of the pod with the Postgres database that is the same as Postgres StatefulSet name, for example, keycloak-postgresql.
\"/opt/keycloak/bin/kc.sh start --auto-build\" was used in the legacy Keycloak version. However, it is no longer required in the new Keycloak version since it is deprecated and used by default.
Optionally, use the following command for applying the old Keycloak theme:
bin/kc.sh start --features-disabled=admin2\n
Info
Automatic database migration will start after the Keycloak installation.
View: keycloak-values.yaml
nameOverride: \"keycloak\"\n\nreplicas: 1\n\n# Deploy the latest verion\nimage:\n tag: \"19.0.1\"\n\n# start: create OpenShift realm which is required by EDP\nextraInitContainers: |\n - name: realm-provider\n image: busybox\n imagePullPolicy: IfNotPresent\n command:\n - sh\n args:\n - -c\n - |\n echo '{\"realm\": \"openshift\",\"enabled\": true}' > /opt/keycloak/data/import/openshift.json\n volumeMounts:\n - name: realm\n mountPath: /opt/keycloak/data/import\n\nextraVolumeMounts: |\n - name: realm\n mountPath: /opt/keycloak/data/import\n\nextraVolumes: |\n - name: realm\n emptyDir: {}\n\ncommand:\n - \"/opt/keycloak/bin/kc.sh\"\n - \"--verbose\"\n - \"start\"\n - \"--http-enabled=true\"\n - \"--http-port=8080\"\n - \"--hostname-strict=false\"\n - \"--hostname-strict-https=false\"\n - \"--spi-events-listener-jboss-logging-success-level=info\"\n - \"--spi-events-listener-jboss-logging-error-level=warn\"\n - \"--import-realm\"\n\nextraEnv: |\n - name: KC_PROXY\n value: \"passthrough\"\n - name: KEYCLOAK_ADMIN\n valueFrom:\n secretKeyRef:\n name: keycloak-admin-creds\n key: username\n - name: KEYCLOAK_ADMIN_PASSWORD\n valueFrom:\n secretKeyRef:\n name: keycloak-admin-creds\n key: password\n - name: JAVA_OPTS_APPEND\n value: >-\n -XX:+UseContainerSupport\n -XX:MaxRAMPercentage=50.0\n -Djava.awt.headless=true\n -Djgroups.dns.query={{ include \"keycloak.fullname\" . }}-headless\n\n# This block should be uncommented if you install Keycloak on Kubernetes\ningress:\n enabled: true\n annotations:\n kubernetes.io/ingress.class: nginx\n ingress.kubernetes.io/affinity: cookie\n rules:\n - host: keycloak.<ROOT_DOMAIN>\n paths:\n - path: '{{ tpl .Values.http.relativePath $ | trimSuffix \"/\" }}/'\n pathType: Prefix\n\n# This block should be uncommented if you set Keycloak to OpenShift and change the host field\n# route:\n# enabled: false\n# # Path for the Route\n# path: '/'\n# # Host name for the Route\n# host: \"keycloak.<ROOT_DOMAIN>\"\n# # TLS configuration\n# tls:\n# enabled: true\n\nresources:\n limits:\n memory: \"2048Mi\"\n requests:\n cpu: \"50m\"\n memory: \"512Mi\"\n\n# Check database readiness at startup\ndbchecker:\n enabled: true\n\ndatabase:\n vendor: postgres\n existingSecret: keycloak-postgresql\n hostname: keycloak-postgresql\n port: 5432\n username: admin\n database: keycloak\n
Deploy Keycloak:
Note
Change the namespace and the values file name if required.
Log in to Keycloak and check if everything has been imported correctly.
"},{"location":"operator-guide/upgrade-keycloak-19.0/#clean-and-analyze-database_1","title":"Clean and Analyze Database","text":"
Optionally, run the vacuumdb application on the database, to analyze the contents of database tables and collect statistics for the Postgres query optimizer:
Please read the Migrate Postgres Database From Postgres v.11.x to v.14.5 section of this tutorial before using the script.
Note
The kubectl tool is required for using this script.
This script will likely work for any other Postgres database besides Keycloak after some adjustments. It queries the pg_dump, pg_dumpall, psql, and vacuumdb commands under the hood.
The following script can be used for exporting and importing Postgres databases as well as optimizing them with the vacuumdb application. Please examine the code and make the adjustments if required.
By default, the following command exports Keycloak Postgres databases from a Kubernetes pod to a local machine:
./script.sh\n
After running the command, please follow the prompt.
To import a database backup to a newly created Postgres Kubernetes pod, pass a database dump sql file to the script:
./script.sh path-to/db_dump.sql\n
The -h flag prints help, and -c|-v runs the vacuumdb garbage collector and analyzer.
View: keycloak_db_migration.sh
#!/bin/bash\n\n# set -x\n\ndb_migration_help(){\n echo \"Keycloak Postgres database migration\"\n echo\n echo \"Usage:\"\n echo \"------------------------------------------\"\n echo \"Export Keycloak Postgres database from pod\"\n echo \"Run without parameters:\"\n echo \" $0\"\n echo \"------------------------------------------\"\n echo \"Import Keycloak Postgres database to pod\"\n echo \"Pass filename to script:\"\n echo \" $0 path/to/db_dump.sql\"\n echo \"------------------------------------------\"\n echo \"Additional options: \"\n echo \" $0 [OPTIONS...]\"\n echo \"Options:\"\n echo \"h Print Help.\"\n echo \"c|v Run garbage collector and analyzer.\"\n}\n\nkeycloak_ns(){\n printf '%s\\n' 'Enter keycloak namespace: '\n read -r keycloak_namespace\n\n if [ -z \"${keycloak_namespace}\" ]; then\n echo \"Don't skip namespace\"\n exit 1\n fi\n}\n\npostgres_pod(){\n printf '%s\\n' 'Enter postgres pod name: '\n read -r postgres_pod_name\n\n if [ -z \"${postgres_pod_name}\" ]; then\n echo \"Don't skip pod name\"\n exit 1\n fi\n}\n\npostgres_user(){\n printf '%s\\n' 'Enter postgres username: '\n printf '%s' \"Skip to use [postgres] superuser: \"\n read -r postgres_username\n\n if [ -z \"${postgres_username}\" ]; then\n postgres_username='postgres'\n fi\n}\n\npgdb_host_info(){\n database_name='keycloak'\n db_host='localhost'\n db_port='5432'\n}\n\npostgresql_admin_pass(){\n postgresql_password='POSTGRES_PASSWORD'\n postgresql_admin_password=\"$(kubectl exec -n \"${keycloak_namespace}\" \"${postgres_pod_name}\" \"--\" \\\n sh -c \"printenv ${postgresql_password}\")\"\n}\n\npostgresql_su_pass(){\n postgresql_postgres_password='POSTGRES_POSTGRES_PASSWORD'\n postgresql_superuser_password=\"$(kubectl exec -n \"${keycloak_namespace}\" \"${postgres_pod_name}\" \"--\" \\\n sh -c \"printenv ${postgresql_postgres_password}\")\"\n\n if [ -z \"${postgresql_superuser_password}\" ]; then\n echo \"SuperUser password variable does not exist. Using user password instead...\"\n postgresql_admin_pass\n postgresql_superuser_password=\"${postgresql_admin_password}\"\n fi\n}\n\nkeycloak_pgdb_export(){\n current_cluster=\"$(kubectl config current-context | tr -dc '[:alnum:]-')\"\n exported_db_name=\"keycloak_db_dump_${current_cluster}_${keycloak_namespace}_${postgres_username}_$(date +\"%Y%m%d%H%M\").sql\"\n\n if [ \"${postgres_username}\" == 'postgres' ]; then\n # call a function to get a pass for postgres user\n postgresql_su_pass\n kubectl exec -n \"${keycloak_namespace}\" \"${postgres_pod_name}\" \"--\" \\\n sh -c \"PGPASSWORD='\"${postgresql_superuser_password}\"' pg_dumpall -h \"${db_host}\" -p \"${db_port}\" -U \"${postgres_username}\"\" > \"${exported_db_name}\"\n else\n # call a function to get a pass for admin user\n postgresql_admin_pass\n kubectl exec -n \"${keycloak_namespace}\" \"${postgres_pod_name}\" \"--\" \\\n sh -c \"PGPASSWORD='\"${postgresql_admin_password}\"' pg_dump -h \"${db_host}\" -p \"${db_port}\" -U \"${postgres_username}\" -d \"${database_name}\"\" > \"${exported_db_name}\"\n fi\n\n separate_lines=\"---------------\"\n\n if [ ! -s \"${exported_db_name}\" ]; then\n rm -f \"${exported_db_name}\"\n echo \"${separate_lines}\"\n echo \"Something went wrong. The database dump file is empty and was not saved.\"\n else\n echo \"${separate_lines}\"\n grep 'Dumped' \"${exported_db_name}\" | sort -u\n echo \"Database has been exported to $(pwd)/${exported_db_name}\"\n fi\n}\n\nkeycloak_pgdb_import(){\n echo \"Preparing Import\"\n echo \"----------------\"\n\n if [ ! -f \"$1\" ]; then\n echo \"The file $1 does not exist.\"\n exit 1\n fi\n\n keycloak_ns\n postgres_pod\n postgres_user\n pgdb_host_info\n\n if [ \"${postgres_username}\" == 'postgres' ]; then\n # restore full backup with all databases and roles as superuser or a single database\n postgresql_su_pass\n if [ -n \"$(cat \"$1\" | grep 'CREATE ROLE')\" ]; then\n cat \"$1\" | kubectl exec -i -n \"${keycloak_namespace}\" \"${postgres_pod_name}\" \"--\" \\\n sh -c \"cat | PGPASSWORD='\"${postgresql_superuser_password}\"' psql -h \"${db_host}\" -p \"${db_port}\" -U \"${postgres_username}\"\"\n else\n cat \"$1\" | kubectl exec -i -n \"${keycloak_namespace}\" \"${postgres_pod_name}\" \"--\" \\\n sh -c \"cat | PGPASSWORD='\"${postgresql_superuser_password}\"' psql -h \"${db_host}\" -p \"${db_port}\" -U \"${postgres_username}\" -d \"${database_name}\"\"\n fi\n else\n # restore a single database\n postgresql_admin_pass\n cat \"$1\" | kubectl exec -i -n \"${keycloak_namespace}\" \"${postgres_pod_name}\" \"--\" \\\n sh -c \"cat | PGPASSWORD='\"${postgresql_admin_password}\"' psql -h \"${db_host}\" -p \"${db_port}\" -U \"${postgres_username}\" -d \"${database_name}\"\"\n fi\n}\n\nvacuum_pgdb(){\n echo \"Preparing garbage collector and analyzer\"\n echo \"----------------------------------------\"\n\n keycloak_ns\n postgres_pod\n postgres_user\n pgdb_host_info\n\n if [ \"${postgres_username}\" == 'postgres' ]; then\n postgresql_su_pass\n kubectl exec -n \"${keycloak_namespace}\" \"${postgres_pod_name}\" \"--\" \\\n sh -c \"PGPASSWORD='\"${postgresql_superuser_password}\"' vacuumdb --analyze --all -h \"${db_host}\" -p \"${db_port}\" -U \"${postgres_username}\"\"\n else\n postgresql_admin_pass\n kubectl exec -n \"${keycloak_namespace}\" \"${postgres_pod_name}\" \"--\" \\\n sh -c \"PGPASSWORD='\"${postgresql_admin_password}\"' vacuumdb --analyze -h \"${db_host}\" -p \"${db_port}\" -U \"${postgres_username}\" -d \"${database_name}\"\"\n fi\n}\n\nwhile [ \"$#\" -eq 1 ]; do\n case \"$1\" in\n -h | --help)\n db_migration_help\n exit 0\n ;;\n -c | --clean | -v | --vacuum)\n vacuum_pgdb\n exit 0\n ;;\n --)\n break\n ;;\n -*)\n echo \"Invalid option '$1'. Use -h|--help to see the valid options\" >&2\n exit 1\n ;;\n *)\n keycloak_pgdb_import \"$1\"\n exit 0\n ;;\n esac\n shift\ndone\n\nif [ \"$#\" -gt 1 ]; then\n echo \"Please pass a single file to the script\"\n exit 1\nfi\n\necho \"Preparing Export\"\necho \"----------------\"\nkeycloak_ns\npostgres_pod\npostgres_user\npgdb_host_info\nkeycloak_pgdb_export\n
The Version Control Systems (VCS) section is dedicated to delivering comprehensive information on VCS within the EPAM Delivery Platform. This section comprises detailed descriptions of all the deployment strategies, along with valuable recommendations for their optimal usage, and the list of supported VCS, facilitating seamless integration with EDP.
EDP offers the following strategies to work with repositories:
Create from template \u2013 creates a project on the pattern in accordance with an application language, a build tool, and a framework selected while creating application. This strategy is recommended for projects that start developing their applications from scratch.
Note
Under the hood, all the built-in application frameworks, build tools and frameworks are stored in our public GitHub repository.
Import project - enables working with the repository located in the added Git server. This scenario is preferred when the users already have an application stored in their own pre-configured repository and intends to continue working with their repository while also utilizing EDP simultaneously.
Note
In order to use the Import project strategy, make sure to adjust it with the Integrate GitHub/GitLab in Tekton page. The Import project strategy is not applicable for Gerrit. Also, it is impossible to choose the Empty project field when using the Import project strategy while creating appication since it is implied that you already have a ready-to-work application in your own repository, whereas the \"Empty project\" option creates a repository but doesn't put anything in it.
Clone project \u2013 clones the indicated repository into EPAM Delivery Platform. In this scenario, the application repository is forked from the original application repository to EDP. Since EDP doesn't support multiple VCS integration for now, this strategy is recommended when the user has several applications located in several repositories.
"},{"location":"operator-guide/velero-irsa/","title":"IAM Roles for Velero Service Accounts","text":""},{"location":"operator-guide/velero-irsa/#iam-roles-for-velero-service-accounts","title":"IAM Roles for Velero Service Accounts","text":"
Note
Make sure that IRSA is enabled and amazon-eks-pod-identity-webhook is deployed according to the Associate IAM Roles With Service Accounts documentation.
Velero AWS plugin requires access to AWS resources. Follow the steps below to create a required role:
Create AWS IAM Policy \"AWSIRSA\u2039CLUSTER_NAME\u203a\u2039VELERO_NAMESPACE\u203aVelero_policy\":
Attach the \"AWSIRSA\u2039CLUSTER_NAME\u203a\u2039VELERO_NAMESPACE\u203aVelero_policy\" policy to the \"AWSIRSA\u2039CLUSTER_NAME\u203a\u2039VELERO_NAMESPACE\u203aVelero\" role.
Make sure that Amazon S3 bucket with name velero-\u2039CLUSTER_NAME\u203a exists.
Provide key value eks.amazonaws.com/role-arn: \"arn:aws:iam:::role/AWSIRSA\u2039CLUSTER_NAME\u203a\u2039VELERO_NAMESPACE\u203aVelero\" into the serviceAccount.server.annotations parameter in values.yaml during the Velero Installation.
"},{"location":"operator-guide/waf-tf-configuration/","title":"Configure AWS WAF With Terraform","text":""},{"location":"operator-guide/waf-tf-configuration/#configure-aws-waf-with-terraform","title":"Configure AWS WAF With Terraform","text":"
This page contains accurate information on how to configure AWS WAF using Terraform with the aim to have a secured traffic exposure and to prevent the Host Header vulnerabilities.
Prerequisites (mostly the left part of the scheme) - AWS ALB, Compute Resources (EC2, EKS, etc.).
WAF configuration (the right part of the scheme).
The WAF ACL resource is the main resource used for the configuration; The default web ACL option is Block.
Overview WAF Solution
The ACL includes three managed AWS rules that secure the exposed traffic:
AWS-AWSManagedRulesCommonRuleSet
AWS-AWSManagedRulesLinuxRuleSet
AWS-AWSManagedRulesKnownBadInputsRuleSet
AWS provides a lot of rules such as baseline and use-case specific rules, for details, please refer to the Baseline rule groups.
There is the PreventHostInjections rule that prevents the Host Header vulnerabilities. This rule includes one statement that declares that the Host Header should match Regex Pattern Set, thus only in this case it will be passed.
The Regex Pattern Set is another resource that helps to organize regexes, in fact, is a set of regexes. All regexes added to the single set are matched by the OR statement, i.e. when exposing several URLs, it is necessary to add this statement to the set and refer to it in the rule.
To create the Regex Pattern Set, inspect the following code:
resource \"aws_wafv2_regex_pattern_set\" \"common\" {\n name = \"Common\"\n scope = \"REGIONAL\"\n\n regular_expression {\n regex_string = \"^.*(some-url).*((.edp-epam)+)\\\\.com$\"\n }\n\n # Add here additional regular expressions for other endpoints, they are merging with OR operator, e.g.\n\n /*\n regular_expression {\n regex_string = \"^.*(keycloak).*((.edp-epam)+)\\\\.com$\"\n }\n */\n\n tags = var.tags\n}\n
It includes 'regex_string', for example: url - some-url.edp-epam.com, In addition, it is possible to add other links to the same resource using the regular_expression element.
There is the Terraform code for the aws_wafv2_web_acl resource:
As mentioned previously, ACL includes three managed AWS rules (group rules), for visibility, enabling sampling, and CloudWatch in the config. The 'PreventHostInjections' custom rule refers to the created pattern set and declares the Host Header, as well as sets the 'Action' if matched to 'Allow'.
AWS ALB can be created in the scope of this Terraform code or created previously. When creating ALB to expose links, the ALB should have a security group that allows some external traffic.
When ALB is associated with the WAF ACL, direct the traffic to the ALB by the Route53 CNAME record:
module \"some_url_exposure\" {\n source = \"terraform-aws-modules/route53/aws//modules/records\"\n version = \"2.0.0\"\n\n zone_name = \"edp-epam.com\"\n\n records = [\n {\n name = \"some-url\"\n type = \"CNAME\"\n ttl = 300\n records = [aws_lb.<aws_alb_for_waf>.dns_name]\n }\n ]\n}\n
In the sample above, the module is used, but it is also possible to use a Terraform resource.
Welcome to the Troubleshooting Guide for the EPAM Delivery Platform. Here, we offer essential information to assist you with the challenges you may encounter while using the platform. This guide is designed to address common issues and answer frequently asked questions, aiming to streamline your troubleshooting process and enhance your experience. Whether you're dealing with deployment setbacks, authentication hurdles, or configuration complexities, you'll find helpful insights and solutions here.
In EDP, all software components, such as applications, libraries, Terraform infrastructures, and automated tests, are termed as codebases. EDP provides flexible methods for scaffolding these components.
This guide will lead you through creating a Go application using the Gin framework. The EDP Marketplace will be utilized to streamline the application creation process.
Having created the Go application, proceed to build it by performing the following actions:
In the component details page, expand the application and click the Go to the Source Code button:
Application details
In the opened Source Code, create new branch called test.
In the SonarCloud organization page, copy the value of the SonarCloud organization name:
Organization key
In the test branch in GitHub, open the sonar-project.properties file and include the sonar.language=go, sonar.scanner.force-deprecated-java-version=true, and sonar.organization parameters where sonar.organization is equal to the value copied in the previous step, resulting in the following configuration:
This step is necessary due to SonarCloud's discontinuation of support for Java 11, which is utilized in the sonarqube-scanner image. This solution is designed specifically for the EDP 3.7.x and lower versions. Users of EDP 3.8.x and higher versions can skip this step.
In the component details page, click the Trigger build pipeline run button:
Triggering pipeline run
Enable port-forwarding for the edp-tekton-dashboard service (in case ingress is not deployed):
To observe the build pipeline status, click the tree diagram icon in the Diagram column:
Tree diagram window
Once the build is failed, click the failed stage name to open the Tekton pipeline run:
Failure details
The initial pipeline is expected to fail, primarily due to SonarCloud intricacies. It is imperative to set a Quality Gate in SonarCloud after the initial pipeline run and subsequently re-trigger the build pipeline. After the pipeline failure, a new project is expected to appear in the organization.
In the SonarCloud organization, select the newly appeared project and click the Set New Code Definition button:
New code definition
In the New Code page, set the Previous version option and click Save:
New Code page
In EDP Portal, trigger build pipeline run one more time and wait until the pipeline run is finished.
Build pipelines are designed to generate an executable image of an application. Once built, the image can be run in a target environment.
Now that you have successfully built an application, the next step involves creating an environment for deployment. To deploy the application, it is necessary to install and integrate Argo CD. To deploy the application, we need to install and integrate Argo CD. To do this, navigate to the Integrate Argo CD page.
Now, proceed to deploy our first application. This page provides comprehensive instructions on creating an environment and deploying the application within it.
As a prerequisite, create a GitOps repository in your GitHub account. EDP Portal adheres to the GitOps approach when working with environments. In a GitOps repository, values are saved to redefine the default behavior (parameters) of deployment for each environment. The creation of a GitOps repository involves the following two steps:
In EDP Portal, navigate to EDP -> Configuration -> Deployment -> GitOps:
In the Environments list, click the Environment name:
Environments list
In the Environment details page, click the stage name to enter the stage details:
Environment details
Once you enter the stage details, proceed to deploy the application:
Select an application;
Select the Image stream version;
Click the Deploy button.
Deploying application
Congratulations! You have passed the Quick Start guide! We hope you enjoyed this journey.
Now that you have a good understanding of how EDP works, you can further enhance its capabilities by integrating it with Nexus. Additionally, explore other functionalities detailed in our Use Cases section. If you're eager to unlock the full potential of EDP, navigate to the Operator Guide to fine-tune your EDP for optimal performance!
EPAM Delivery Platform employs Argo CD as a Continuous Deployment tool for its purposes. This page provides guidance on the installation procedure for Argo CD.
The next step is to integrate Argo CD with EDP. Proceed with the instructions below:
Navigate to the directory that stores the ed25519 key created before during the GitHub integration. For details, please refer to the Integrate GitHub page.
Copy the SSH private key to the Argo CD namespace. Remember to fill in the ACCOUNT_NAME variable:
EDP utilizes container registries for storing and distributing application images. This page provides instructions on integrating your platform with DockerHub.
To integrate EPAM Delivery Platform with DockerHub, complete the guidelines below:
Log in to your DockerHub account.
In the DockerHub main page, click your user icon at the top right corner and select Account Settings.
In the Account Settings page, select the Security tab and click New Access Token.
Enter the token description, select the Read, Write, Delete permission and click Generate.
Copy the generated token:
DockerHub token
In EDP Portal, navigate to EDP -> Configuration -> Registry and click the Add Registry button.
In the Registry Provider field, select DockerHub. Define the following values and click Save:
Registry Endpoint: https://docker.io
Registry Space: DockerHub account name
User: DockerHub account name
Password/Token: Your generated access token
Use the Push Account's credentials: check
DockerHub integration
Note
In the DockerHub context, the Registry Space field is equivalent to the account/organization name.
With all integrations in place, let us move forward with creating applications. Please proceed to the Create Application page for further instructions.
To initiate work in the EPAM Delivery Platform, integration with a Version Control System (VCS) is essential. This integration facilitates the use of create, clone, and import strategies for handling source code. This tutorial focuses on the create strategy, wherein an application is directly created in the integrated VCS solution for subsequent work. Here, you will find instructions on how to integrate EDP with GitHub.
Note
Prior to moving forward, ensure you possess an active GitHub account and have successfully deployed EDP.
To integrate EDP with GitHub, follow the steps below:
Generate an SSH key pair:
ssh-keygen -t ed25519 -C \"email@example.com\"\n
Add the created SSH key (the public part) to the GitHub account:
In the GitHub main page, click your user icon. Navigate to Settings -> SSH and GPG keys and click New SSH key.
Create the quick_start key. Insert your ed25519.pub key data and click Add SSH key:
Repo permission
Generate an access token for the GitHub account with read/write access to the API:
Log in to GitHub.
Click the profile account and navigate to Settings -> Developer Settings.
Select Personal access tokens (classic) and generate a new token with the following parameters:
Repo permission
Note
The following (Admin:repo, Admin:org, and User) access is necessary for the GitHub Pull Request Builder plugin to retrieve Pull Request commits, their status, and author information.
Admin:repo permission Admin:org permission User permission
Save a new personal access token.
In EDP Portal, navigate to EDP -> Configuration -> Git Servers. Define the following values and click Save:
Git provider: select GitHub
Host: github.com
User: Git
SSH port: 22
HTTPS port: 443
Private SSH key: your generated SSH private key
Access token: your account token generated in GitHub
Git Server configuration
Ensure the Git server has a green status. To store container images, integrate EDP with a container registry by navigating to the Integrate DockerHub page.
It is mandatory for EDP to have SonarQube integrated with the platform as all the pipelines include the sonar step.
SonarQube is a robust tool employed in build and code review pipelines to elevate code quality by detecting and reporting issues, along with offering improvement recommendations. SonarCloud, the SaaS solution provided by SonarQube, serves this purpose.
This guide will lead you through the configuration process of SonarCloud for your project.
Note
An alternative option is to use an independent SonarQube instance.
To integrate SonarCloud with the platform, follow the steps below:
Sign up in the SonarCloud with your GitHub account.
Once you are logged in with GitHub, import an organization from GitHub:
Import organization
Note
It is crucial to have the organization created in SonarCloud. If you were signed up in SonarCloud using a GitHub account, SonarCloud will suggest you creating an organization with name that is equivalent to your GitHub account name.
In the Create an organization menu, choose the free plan and click Create organization:
Choose plan
In your account menu, select the Security tab and generate token:
Generate token
In EDP Portal, navigate to EDP -> Configuration -> Code Quality. Define the following values and click Save:
URL: https://sonarcloud.io
Token: account token generated in SonarCloud
SonarQube integration
After completing the SonarQube integration, proceed to integrate the platform with GitHub. Navigate to the Integrate GitHub page for further instructions.
This page serves as the starting point for the quick start guide, where we will install Tekton as a prerequisite and then proceed to install the EPAM Delivery Platform itself.
In the login menu, paste the generated token in the ID token field and click the Authenticate button.
Upon logging in, specify the namespace for EDP Portal where EDP is deployed by clicking the cluster settings link in the bottom left corner of the UI:
Specify namespaces
In the Cluster Settings page, define the following for fields:
Default namespace: edp
Allowed namespaces: edp
Cluster Settings menu
Note
Remember to click the + icon when adding the allowed namespace.
After completing these steps, you will get access to EPAM Delivery Platform components through the EDP Portal UI. You can now proceed with the integration steps, starting with the SonarQube integration.
This page serves as an introductory part of the Quick Start guide. It outlines the core steps and reasons to perform them.
The purpose of this guide is to swiftly demonstrate the key functionalities of the EPAM Delivery Platform (EDP). After completing this guide, users will have a clear understanding of EDP\u2019s capabilities. This guide is designed for those who wish to quickly explore EDP.
Before deploying EDP, ensure to deploy a local Kubernetes cluster. We recommend allocating 4 CPUs and 8 GB of RAM to it.
Alternatively, use any cloud provider that offers Kubernetes service with sufficient CPU and RAM capacity. For instance, we encourage you to check out our video tutorial, where we demonstrate the installation of EDP via the Civo Marketplace. In this case you will be able to skip the installation part of the guide and proceed with adjusting integrations.
The very first step of the guide is to prepare the cluster environment for the EDP setup process by installing the Tekton tool. Immediately after this we will be able to install EDP.
All the guidelines are described in the Platform Installation page. Alternatively, watch our video tutorial that clearly demonstrates this process.
The Use Cases section provides useful recommendations of how to operate with the EPAM Delivery Platform tools and manage the custom resources. Get acquainted with the description of technical scenarios and solutions.
Scaffold And Deploy FastAPI Application
Rapidly create, customize, and deploy FastAPI applications using a scaffolding tool and standardized processes, streamlining development and enhancing code quality for quicker and reliable feature releases.
Scaffold Now
Bring Your Own Framework
Facilitate the onboarding of custom tools and frameworks into the EPAM Delivery Platform by integrating custom Tekton libraries, empowering the modification of pipelines and tasks for tailored workflows.
Summon the Kraken
Secrets Management For Application Deployment
Ensure secure handling of sensitive data by leveraging an external secret store within the EPAM Delivery Platform, allowing secure transmission and usage of confidential information across namespaces, facilitating secure connections to databases during development and deployment, tailored for Developers.
Run Securely
Autotest As the Quality Gate
Implement autotests as a quality gate within the Continuous Deployment pipeline, verifying application stability and functionality, allowing reliable versions to be promoted while enabling quick creation of applications, streamlined testing, and seamless deployment updates for Developers and Quality Assurance specialists.
Set Quality Gate
"},{"location":"use-cases/application-scaffolding/","title":"Scaffold and Deploy FastAPI Application","text":""},{"location":"use-cases/application-scaffolding/#scaffold-and-deploy-fastapi-application","title":"Scaffold and Deploy FastAPI Application","text":""},{"location":"use-cases/application-scaffolding/#overview","title":"Overview","text":"
This use case describes the creation and deployment of a FastAPI application to enable a developer to quickly generate a functional code structure for a FastAPI web application (with basic read functionality), customize it to meet specific requirements, and deploy it to a development environment. By using a scaffolding tool and a standardized process for code review, testing and deployment, developers can reduce the time and effort required to build and deploy a new application while improving the quality and reliability of the resulting code. Ultimately, the goal is to enable the development team to release new features and applications more quickly and efficiently while maintaining high code quality and reliability.
To scaffold and deploy FastAPI Application, follow the steps below.
"},{"location":"use-cases/application-scaffolding/#scaffold-the-new-fastapi-application","title":"Scaffold the New FastAPI Application","text":"
Open EDP Portal URL. Use the Sign-In option.
Logging screen
Ensure Namespace value in the User Settings tab points to the namespace with the EDP installation.
Settings button
Create the new Codebase with the Application type using the Create strategy. To do this, open EDP tab.
Cluster overview
Select the Components Section under the EDP tab and push the create + button.
Components tab
Select the Application Codebase type because we are going to deliver our application as a container and deploy it inside the Kubernetes cluster. Choose the Create strategy to scaffold our application from the template provided by the EDP and press the Proceed button.
Step codebase info
On the Application Info tab, define the following values and press the Proceed button:
Application name: fastapi-demo
Default branch: main
Application code language: Python
Language version/framework: FastAPI
Build tool: Python
Application info
On the Advances Settings tab, define the below values and push the Apply button:
CI tool: Tekton
Codebase versioning type: edp
Start version from: 0.0.1 and SNAPSHOT
Advanced settings
Check the application status. It should be green:
Application status
"},{"location":"use-cases/application-scaffolding/#deploy-the-application-to-the-development-environment","title":"Deploy the Application to the Development Environment","text":"
This section describes the application deployment approach from the latest branch commit. The general steps are:
Build the initial version (generated from the template) of the application from the last commit of the main branch.
Create a CD Pipeline to establish continuous delivery to the development environment.
Deploy the initial version to the development env.
To succeed with the steps above, follow the instructions below:
Build Container from the latest branch commit. To build the initial version of the application's main branch, go to the fastapi-demo application -> branches -> main and select the Build menu.
Application building
Build pipeline for the fastapi-demo application starts.
Pipeline building
Track Pipeline's status by accessing Tekton Dashboard by clicking the fastapi-demo-main-build-lb57m application link.
Console logs
Ensure that Build Pipeline was successfully completed.
Create CD Pipeline. To enable application deployment create a CD Pipeline with a single environment - Development (with the name dev).
Go to EDP Portal -> EDP -> CD Pipelines tab and push the + button to create pipeline. In the Create CD Pipeline dialog, define the below values:
Pipeline tab:
Pipeline name: mypipe
Deployment type: Container, since we are going to deploy containers
Pipeline tab with parameters
Applications tab. Add fastapi-demo application, select main branch, and leave Promote in pipeline unchecked:
Applications tab with parameters
Stages tab. Add the dev stage with the values below:
Stage name: dev
Description: Development Environment
Trigger type: Manual. We plan to deploy applications to this environment manually
Quality gate type: Manual
Step name: approve
Push the Apply button
Stages tab with parameters
Deploy the initial version of the application to the development environment:
Open CD Pipeline with the name mypipe.
Select the dev stage from the Stages tab.
In the Image stream version select version 0.0.1-SNAPSHOT.1 and push the Deploy button.
CD Pipeline deploy
"},{"location":"use-cases/application-scaffolding/#check-the-application-status","title":"Check the Application Status","text":"
To ensure the application is deployed successfully, follow the steps below:
Ensure application status is Healthy and Synced, and the Deployed version points to 0.0.1-SNAPSHOT.1:
Pipeline health status
Check that the selected version of the container is deployed on the dev environment. ${EDP_ENV} - is the EDP namespace name:
# Check the deployment status of fastapi-demo application\n$ kubectl get deployments -n ${EDP_ENV}-mypipe-dev\nNAME READY UP-TO-DATE AVAILABLE AGE\nfastapi-demo-dl1ft 1/1 1 1 30m\n\n# Check the image version of fastapi-demo application\n$ kubectl get pods -o jsonpath=\"{.items[*].spec.containers[*].image}\" -n ${EDP_ENV}-mypipe-dev\n012345678901.dkr.ecr.eu-central-1.amazonaws.com/${EDP_ENV}/fastapi-demo:0.0.1-SNAPSHOT.1\n
"},{"location":"use-cases/application-scaffolding/#deliver-new-code","title":"Deliver New Code","text":"
This section describes the Code Review process for a new code. We need to deploy a new version of our fastapi-demo application that deploys Ingress object to expose API outside the Kubernetes cluster.
Perform the below steps to merge new code (Pull Request) that passes the Code Review flow. For the steps below, we use Gerrit UI but the same actions can be performed using the command line and git tool:
Login to Gerrit UI, select fastapi-demo project, and create a change request.
Browse Gerrit Repositories and select fastapi-demo project.
Browse Gerrit repositories
In the Commands section of the project, push the Create Change button.
Create Change request
In the Create Change dialog, provide the branch main and the Description (commit message):
Enable ingress for application\n\nCloses: #xyz\n
Push the Create button.
Create Change
Push the Edit button of the merge request and add deployment-templates/values.yaml for modification.
Update values.yaml file
Review the deployment-templates/values.yaml file and change the ingress.enabled flag from false to true. Then push the SAVE & PUBLISH button. As soon as you get Verified +1 from CI, you are ready for review: Push the Mark as Active button.
Review Change
You can always check your pipelines status from:
Gerrit UI.
Pipeline Status Gerrit
EDP Portal.
Pipeline Status EDP Portal
With no Code Review Pipeline issues, set Code-Review +2 for the patchset and push the Submit button. Then, your code is merged to the main branch, triggering the Build Pipeline. The build Pipeline produces the new version of artifact: 0.0.1-SNAPSHOT.2, which is available for the deployment.
Gerrit Code Review screen
Deliver the New Version to the Environment. Before the new version deployment, check the ingress object in dev namespace:
$ kubectl get ingress -n ${EDP_ENV}-mypipe-dev\nNo resources found in ${EDP_ENV}-mypipe-dev namespace.\n
No ingress object exists as expected.
Deploy the new version 0.0.1-SNAPSHOT.2 which has the ingress object in place. Since we use Manual deployment approach, we perform version upgrade by hand.
Go to the CD Pipelines section of the EDP Portal, select mypipe pipeline and choose dev stage.
In the Image stream version select the new version 0.0.1-SNAPSHOT.2 and push the Update button.
Check that the new version is deployed: application status is Healthy and Synced, and the Deployed version points to 0.0.1-SNAPSHOT.2.
CD Pipeline Deploy New Version
Check that the new version with Ingress is deployed:
# Check the version of the deployed image\nkubectl get pods -o jsonpath=\"{.items[*].spec.containers[*].image}\" -n ${EDP_ENV}-mypipe-dev\n012345678901.dkr.ecr.eu-central-1.amazonaws.com/edp-delivery-tekton-dev/fastapi-demo:0.0.1-SNAPSHOT.2\n\n# Check Ingress object\nkubectl get ingress -n ${EDP_ENV}-mypipe-dev\nNAME CLASS HOSTS ADDRESS PORTS AGE\nfastapi-demo-ko1zs <none> fastapi-demo-ko1zs-example.com 12.123.123.123 80 115s\n\n# Check application external URL\ncurl https://your-hostname-appeared-in-hosts-column-above.example.com/\n{\"Hello\":\"World\"}\n
"},{"location":"use-cases/autotest-as-quality-gate/","title":"Autotest as a Quality Gate","text":""},{"location":"use-cases/autotest-as-quality-gate/#autotest-as-a-quality-gate","title":"Autotest as a Quality Gate","text":"
This use case describes the flow of adding an autotest as a quality gate to a newly created CD pipeline with a selected build version of an application to be promoted. The purpose of autotests is to check if application meets predefined criteria for stability and functionality, ensuring that only reliable versions are promoted. The promotion feature allows users to implement complicated testing, thus improving application stability.
To implement autotests as Quality Gates, follow the steps below:
Ensure the namespace is specified in the cluster settings. Click the Settings icon in the top right corner and select Cluster settings:
Cluster settings
Enter the name of the default namespace, then enter your default namespace in the Allowed namespaces field and click the + button. You can also add other namespaces to the Allowed namespaces:
Specify namespace
Create several applications using the Create strategy. Navigate to the EDP tab, choose Components, click the + button:
Add component
Select Application and Create from template:
Create new component menu
Note
Please refer to the Add Application section for details.
On the Codebase info tab, define the following values and press the Proceed button:
Git server: gerrit
Git repo relative path: js-application
Component name: js-application
Description: js application
Application code language: JavaScript
Language version/Provider: Vue
Build tool: NPM
Codebase info tab
On the Advanced settings tab, define the below values and push the Apply button:
Default branch: main
Codebase versioning type: default
Advanced settings tab
Repeat the procedure twice to create the go-application and python-application applications. These applications will have the following parameters:
go-application:
Git server: gerrit
Git repo relative path: go-application
Component name: go-application
Description: go application
Application code language: Go
Language version/Provider: Gin
Build tool: Go
Default branch: main
Codebase versioning type: default
python-application:
Git server: gerrit
Git repo relative path: python-application
Component name: python-application
Description: python application
Application code language: Python
Language version/Provider: FastAPI
Build tool: Python
Default branch: main
Codebase versioning type: default
In the Components tab, click one of the applications name to enter the application menu:
Components list
Click the three dots (⋮) button, select Build:
Application menu
Click the down arrow (v) to observe and wait for the application to be built:
Application building
Click the application run name to watch the building logs in Tekton:
Tekton pipeline run
Wait till the build is successful:
Successful build
Repeat steps 8-12 for the rest of the applications.
The steps below instruct how to create autotests in EDP:
Create a couple of autotests using the Create strategy. Navigate to the EDP tab, choose Components, click on the + button. Select Autotest and Clone project:
Add autotest
Note
Please refer to the Add Autotest section for details.
On the Codebase info tab, define the following values and press the Proceed button:
"},{"location":"use-cases/autotest-as-quality-gate/#create-cd-pipeline","title":"Create CD Pipeline","text":"
Now that applications and autotests are created, create pipeline for them by following the steps below:
Navigate to the CD Pipelines tab and click the + button:
CD pipelines tab
On the Pipeline tab, in the Pipeline name field, enter demo-pipeline:
Pipeline tab
On the Applications tab, add all the three applications, specify the main branch for all for them and check Promote in pipeline for Go and JavaScript applications:
Applications tab
On the Stages tab, click the Add stage button to open the Create stage menu:
Stages tab
In the Create stage menu, specify the following parameters and click Apply:
Cluster: In cluster
Stage name: dev
Description: dev
Trigger type: manual
Quality gate type: Autotests
Step name: dev
Autotest: demo-autotest-gradle
Autotest branch: main
Create stage menu
After the dev stage is added, click Apply:
Create stage menu
After the pipeline is created, click its name to open the pipeline details page:
Enter pipeline
In the pipeline details page, click the Create button to create a new stage:
Create a new stage
In the Create stage menu, specify the following parameters:
After the CD pipeline is created, deploy applications and run autotests by following the steps below:
Click the dev stage name to expand its details, specify image versions for each of the applications in the Image stream version field and click Deploy:
Deploy applications
Once applications are built, scroll down to Quality Gates and click Promote:
Promote in pipeline
Once promotion procedure is finished, the promoted applications will become available in the Sit stage. You will be able to select image stream versions for the promoted applications. The non-promoted application will stay grey in the stage and won't be allowed to get deployed:
"},{"location":"use-cases/external-secrets/","title":"Secured Secrets Management for Application Deployment","text":""},{"location":"use-cases/external-secrets/#secured-secrets-management-for-application-deployment","title":"Secured Secrets Management for Application Deployment","text":"
This Use Case demonstrates how to securely manage sensitive data, such as passwords, API keys, and other credentials, that are consumed by application during development or runtime in production. The approach involves storing sensitive data in an external secret store that is located in a \"vault\" namespace (but can be Vault, AWS Secret Store or any other provider). The process implies transmitting confidential information from the vault namespace to the deployed namespace for the purpose of establishing a connection to a database.
To begin, you will need an application first. Here are the steps to create it:
Open EDP Portal URL. Use the Sign-In option:
Logging screen
In the top right corner, enter the Cluster settings and ensure that both Default namespace and Allowed namespace are set:
Cluster settings
Create the new Codebase with the Application type using the Create strategy. To do this, click the EDP tab:
Cluster overview
Select the Components section under the EDP tab and push the + button:
Components tab
Select the Application Codebase type because we are going to deliver our application as a container and deploy it inside the Kubernetes cluster. Select the Create strategy to use predefined template:
Step codebase info
On the Application Info tab, define the following values and press the Proceed button:
Application name: es-usage
Default branch: master
Application code language: Java
Language version/framework: Java 17
Build tool: Maven
Step application info
On the Advanced Settings tab, define the below values and push the Apply button:
CI tool: Tekton
Codebase versioning type: default
Step application info
Check the application status. It should be green:
Application status
"},{"location":"use-cases/external-secrets/#create-cd-pipeline","title":"Create CD Pipeline","text":"
This section outlines the process of establishing a CD pipeline within EDP Portal. There are two fundamental steps in this procedure:
Build the application from the last commit of the master branch;
Create a CD Pipeline to establish continuous delivery to the SIT environment.
To succeed with the steps above, follow the instructions below:
Create CD Pipeline. To enable application deployment, create a CD Pipeline with a single environment - System Integration Testing (SIT for short). Select the CD Pipelines section under the EDP tab and push the + button:
CD-Pipeline tab
On the Pipeline tab, define the following values and press the Proceed button:
Pipeline name: deploy
Deployment type: Container
Pipeline tab
On the Applications tab, add es-usage application, select master branch, leave Promote in pipeline unchecked and press the Proceed button:
Pipeline tab
On the Stage tab, add the sit stage with the values below and push the Apply button:
Stage name: sit
Description: System integration testing
Trigger type: Manual. We plan to deploy applications to this environment manually
Quality gate type: Manual
Step name: approve
Stage tab
"},{"location":"use-cases/external-secrets/#configure-rbac-for-external-secret-store","title":"Configure RBAC for External Secret Store","text":"
Note
In this scenario, three namespaces are used: demo, which is the namespace where EDP is deployed, demo-vault, which is the vault where developers store secrets, anddemo-deploy-sit, which is the namespace used for deploying the application. The target namespace name for deploying application is formed with the pattern: edp-<cd_pipeline_name>-<stage_name>.
To make the system to function properly, it is imperative to create the following resources:
"},{"location":"use-cases/tekton-custom-pipelines/","title":"Deploy Application With Custom Build Tool/Framework","text":""},{"location":"use-cases/tekton-custom-pipelines/#deploy-application-with-custom-build-toolframework","title":"Deploy Application With Custom Build Tool/Framework","text":"
This Use Case describes the procedure of adding custom Tekton libraries that include pipelines with tasks. In addition to it, the process of modifying custom pipelines and tasks is enlightened as well.
This case is based on our predefined repository and application. Your case may be different.
To create and then modify a custom Tekton library, please follow the steps below:
"},{"location":"use-cases/tekton-custom-pipelines/#add-custom-application-to-edp","title":"Add Custom Application to EDP","text":"
Open EDP Portal URL. Use the Sign-In option:
Logging screen
In the top right corner, enter the Cluster settings and ensure that both Default namespace and Allowed namespace are set:
Cluster settings
Create the new Codebase with the Application type using the Clone strategy. To do this, click the EDP tab:
Cluster overview
Select the Components section under the EDP tab and push the create + button:
Components tab
Select the Application codebase type because is meant to be delivered as a container and deployed inside the Kubernetes cluster. Choose the Clone strategy and this example repository:
Step codebase info
In the Application Info tab, define the following values and click the Proceed button:
Application name: tekton-hello-world
Default branch: master
Application code language: Other
Language version/framework: go
Build tool: shell
Application info
Note
These application details are required to match the Pipeline name gerrit-shell-go-app-build-default.
The PipelineRun name is formed with the help of TriggerTemplates in pipelines-library so the Pipeline name should correspond to the following structure:
As an example, let's assume that we need to add the helm-lint pipeline task to the review pipeline. To implement this, insert the code below to the gerrit-review.yaml file underneath the hello task:
The helm-lint task references to the default pipeline-library Helm chart which is applied to the cluster during EDP installation.
The runAfter parameter shows that this Pipeline task will be run after the hello pipeline task.
Build Helm dependencies in the custom chart:
helm dependency update .\n
Ensure that the chart is valid and all the indentations are fine:
helm lint .\n
To validate if the values are substituted in the templates correctly, render the templated YAML files with the values using the following command. It generates and displays all the manifest files with the substituted values:
helm template .\n
Install the custom chart with the command below. You can also use the --dry-run flag to simulate the chart installation and catch possible errors:
Since we applied the Tekton library to the Kubernetes cluster in the previous step, let's test the review and build pipelines for our tekton-hello-world application.
Perform the below steps to merge new code (Merge Request) that passes the Code Review flow. For the steps below, we use Gerrit UI but the same actions can be performed using the command line and Git tool:
Log into Gerrit UI, select tekton-hello-world project, and create a change request.
Browse Gerrit Repositories and select tekton-hello-world project:
Browse Gerrit repositories
Clone the tekton-hello-world repository to make the necessary changes or click the Create Change button in the Commands section of the project to make changes via Gerrit GUI:
Create Change request
In the Create Change dialog, provide the branch master, write some text in the Description (commit message) and click the Create button:
Create Change
Click the Edit button of the merge request and add deployment-templates/values.yaml to modify it and change the ingress.enabled flag from false to true:
Update values.yaml file Update values.yaml file
Check the Review Pipeline status. The helm-lint pipeline task should be displayed there:
Review Change
Review the deployment-templates/values.yaml file and push the SAVE & PUBLISH button. As soon as you get Verified +1 from CI bot, the change is ready for review. Click the Mark as Active and Code-review buttons:
Review Change
Click the Submit button. Then, your code is merged to the main branch, triggering the Build Pipeline.
Review Change
Note
If the build is added and configured, push steps in the pipeline, it will produce a new version of artifact, which will be available for the deployment in EDP Portal.
Check the pipelines in the Tekton dashboard:
Tekton custom pipelines Tekton custom pipelines
What happens under the hood: 1) Gerrit sends a payload during Merge Request event to the Tekton EventListener; 2) EventListener catches it with the help of Interceptor; 3) TriggerTemplate creates a PipelineRun.
The KubeRocketCI (a.k.a. EPAM Delivery Platform) portal user guide is intended for developers and provides details on working with the KubeRocketCI portal, different codebase types, and the KubeRocketCI CI/CD flow.
The KubeRocketCI portal is a central management tool in the KubeRocketCI ecosystem that provides the ability to define pipelines, project resources and new technologies in a simple way. Using the KubeRocketCI portal enables to manage business entities:
Create such codebase types as Applications, Libraries, Autotests and Infrastructures;
Create/Update CD Pipelines;
Add external Git servers and Clusters.
Below is the Overview page of the KubeRocketCI portal:
Overview page
Application widgets \u2013 shows the information on codebases created in the default and allowed namespaces, reflecting the overall amount of entities and their statuses.
Top bar panel \u2013 contains documentation link, notifications, KubeRocketCI portal settings, and cluster settings, such as default and allowed namespaces.
Quick links \u2013 displays the corresponding links to the major adjusted toolset.
Pipeline runs \u2013 displays all the pipeline runs initiated in both the default and allowed namespaces.
KubeRocketCI portal is a complete tool allowing to manage and control the codebases (applications, autotests, libraries and infrastructures) added to the environment as well as to create a CD pipeline.
Inspect the main features available in the KubeRocketCI portal by following the corresponding link:
KubeRocketCI portal allows you to create an application, clone an existing repository with the application to your Version Control System (VCS), or using an external repository and importing an application to the environment. When an application is created or cloned, the system automatically generates a corresponding repository within the integrated Version Control System. You can create an Application in YAML or via the two-step menu in the dialog.
To add an application, navigate to the Components section on the navigation bar and click + Create component:
Create new application
Once clicked, the Create new component dialog will appear, then select Application and choose one of the strategies:
Application info
Create from template \u2013 creates a project on the pattern in accordance with an application language, a build tool, and a framework. This strategy is recommended for projects that start developing their applications from scratch.
Import project - allows using existing VCS repository to integrate with KubeRocketCI. While importing the existing repository, select the Git server from the drop-down list and define the relative path to the repository, such as epmd-edp/python-python-flask.
Note
In order to use the Import project strategy, make sure to adjust it with the Integrate GitLab/GitHub in Tekton page.
Clone project \u2013 clones the indicated repository into KubeRocketCI. While cloning the existing repository, it is required to fill in the Repository URL field and specify the credentials if needed:
Clone application
"},{"location":"user-guide/add-application/#create-application-in-yaml","title":"Create Application in YAML","text":"
Click Edit YAML in the upper-right corner of the Create Application dialog to open the YAML editor and create the Application.
Edit YAML
To edit YAML in the minimal editor, turn on the Use minimal editor toggle in the upper-right corner of the Create Application dialog.
To save the changes, select the Save & Apply button.
"},{"location":"user-guide/add-application/#create-application-via-ui","title":"Create Application via UI","text":"
The Create Application dialog contains two steps:
The Codebase Info Menu
The Advanced Settings Menu
"},{"location":"user-guide/add-application/#codebase-info-menu","title":"Codebase Info Menu","text":"
Follow the instructions below to fill in the fields of the Codebase Info menu:
In our example, we will use the Create from template strategy:
Create application
Select all the settings that define how the application will be added to Git server:
Git server - the pre-configured server where the component will be hosted. Select one from the from the drop-down list. Please refer to the Manage Git Servers page to learn how to create the one.
Repository name - the relative path to the repository, such as epmd-edp/python-python-flask.
Component name - the name of the application. Must be at least two characters using the lower-case letters, numbers and inner dashes.
Description - brief and concise description that explains the purpose of the application.
Empty project - check this box to create a application with an empty repository. The empty repository option is available only for the Create from template strategy.
Specify the application language properties:
Application Code Language - defines the code language with its supported frameworks:
Java \u2013 selecting specific Java version (8,11,17 are available).
JavaScript - selecting JavaScript allows using React, Vue, Angular, Express, Next.js and Antora frameworks.
Python - selecting Python allows using the Python v.3.8, FastAPI, Flask frameworks.
Go - selecting Go allows using the Beego, Gin and Operator SDK frameworks.
C# - selecting C# allows using the .Net v.3.1 and .Net v.6.0 frameworks.
Helm - selecting Helm allows using the Helm framework.
Other - selecting Other allows extending the default code languages when creating a codebase with the clone/import strategy.
Note
The Create from template strategy does not allow to customize the default code language set.
Language version/framework - defines the specific framework or language version of the application. The field depends on the selected code language.
Select Build Tool - allows to choose the build tool to use. A set tools and can be changed in accordance with the selected code language.
Java - selecting Java allows using the Gradle or Maven tool.
JavaScript - selecting JavaScript allows using the NPM tool.
C# - selecting C# allows using the .Net tool.
Python - selecting Python allows using Python tool.
Go - selecting Go allows using Go tool.
Helm - selecting Helm allows using Helm tool.
Note
The Select Build Tool field disposes of the default tools and can be changed in accordance with the selected code language.
Note
Tekton pipelines offer built-in support for Java Maven Multi-Module projects. These pipelines are capable of recognizing Java deployable modules based on the information in the pom.xml file and performing relevant deployment actions. It's important to note that although the Dockerfile is typically located in the root directory, Kaniko, the tool used for building container images, uses the targets folder within the deployable module's context. For a clear illustration of a Multi-Module project structure, please refer to this example on GitHub, which showcases a commonly used structure for Java Maven Multi-Module projects.
In the Advanced Settings menu, specify the branch options and define the Jira settings:
Advanced settings
Default branch - the name of the branch where you want the development to be performed.
Note
The default branch cannot be deleted.
Codebase versioning type - defines how will the application tag be changed once the new image version is built. There are two versioning types:
default: Using the default versioning type, in order to specify the version of the current artifacts, images, and tags in the Version Control System, a developer should navigate to the corresponding file and change the version manually.
edp: Using the edp versioning type, a developer indicates the version number from which all the artifacts will be versioned and, as a result, automatically registered in the corresponding file (e.g. pom.xml). When selecting the edp versioning type, the extra fields will appear, type the version number from which you want the artifacts to be versioned:
Edp versioning
Note
The Start Version From field should be filled out in compliance with the semantic versioning rules, e.g. 1.2.3 or 10.10.10. Please refer to the Semantic Versioning page for details.
Specify the pattern to validate a commit message - the regular expression used to indicate the pattern that is followed on the project to validate a commit message in the code review pipeline. An example of the pattern: ^[PROJECT_NAME-d{4}]:.*$.
JIRA integration
Integrate with Jira server - this check box is used in case it is required to connect Jira tickets with the commits and have a respective label in the Fix Version field.
Note
To adjust the Jira integration functionality, first apply the necessary changes described on the Adjust Jira Integration page, and Adjust VCS Integration With Jira.
Jira Server - the integrated Jira server with related Jira tasks.
Specify the pattern to find a Jira ticket number in a commit message - based on this pattern, the value from KubeRocketCI will be displayed in Jira.
Mapping fields
Mapping field name - the section where the additional Jira fields are specified the names of the Jira fields that should be filled in with attributes from KubeRocketCI:
Select the name of the field in a Jira ticket. The available fields are the following: Fix Version/s, Component/s and Labels.
Click the Add button to add the mapping field name.
Enter Jira pattern for the field name:
For the Fix Version/s field, select the EDP_VERSION variable that represents an EDP upgrade version, as in 2.7.0-SNAPSHOT.Combine variables to make the value more informative. For example, the pattern EDP_VERSION-EDP_COMPONENT will be displayed as 2.7.0-SNAPSHOT-nexus-operator in Jira.
For the Component/s field select the EDP_COMPONENT variable that defines the name of the existing repository. For example, nexus-operator.
For the Labels field select the EDP_GITTAGvariable that defines a tag assigned to the commit in Git Hub. For example, build/2.7.0-SNAPSHOT.59.
Click the bin icon to remove the Jira field name.
Click the Apply button to add the application to the Components list.
Note
After the complete adding of the application, inspect the Manage Applications page to learn how you can operate applications.
KubeRocketCI portal allows you to clone an existing repository with the autotest to your Version Control System (VCS), or using an external repository and adding an autotest for further running in stages or using them as quality gates for applications. When an autotest is cloned, the system automatically generates a corresponding repository within the integrated VCS. You can create an autotest in YAML or via the two-step menu in the dialog.
Info
Please refer to the Add Application section for the details on how to add an application codebase type. For the details on how to use autotests as quality gates, please refer to the Stages Menu section of the Add Environment documentation.
To add an autotest, navigate to the Components section on the navigation bar and click + Create component:
Create new autotest
Once clicked, the Create new component dialog will appear, then select Autotest and choose one of the strategies:
Create new autotest
Clone project \u2013 clones the indicated repository into KubeRocketCI. While cloning the existing repository, it is required to fill in the Repository URL field and specify the credentials if needed.
Import project - allows using existing VCS repository to integrate with KubeRocketCI. While importing the existing repository, select the Git server from the drop-down list and define the relative path to the repository, such as /epmd-edp/examples/basic/edp-auto-tests-simple-example.
Note
In order to use the Import project strategy, make sure to adjust it with the Integrate GitLab/GitHub With Tekton page.
"},{"location":"user-guide/add-autotest/#create-autotest-in-yaml","title":"Create Autotest in YAML","text":"
Click Edit YAML in the upper-right corner of the Create Autotest dialog to open the YAML editor and create an autotest:
Edit YAML
To edit YAML in the minimal editor, turn on the Use minimal editor toggle in the upper-right corner of the Create Autotest dialog.
To save the changes, select the Save & Apply button.
"},{"location":"user-guide/add-autotest/#create-autotest-via-ui","title":"Create Autotest via UI","text":"
The Create Autotest dialog contains the two steps:
The Codebase Info Menu
The Advanced Settings Menu
"},{"location":"user-guide/add-autotest/#the-codebase-info-menu","title":"The Codebase Info Menu","text":"
In our case, we will use the Clone strategy:
Clone autotest
Select all the settings that define how the autotest will be added to Git server:
Git server - the pre-configured server where the component will be hosted. Select one from the from the drop-down list. Please refer to the Manage Git Servers page to learn how to create the one.
Repository name - the relative path to the repository, such as /epmd-edp/examples/basic/edp-auto-tests-simple-example.
Component name - the name of the autotest. Must be at least two characters using the lower-case letters, numbers and inner dashes.
Description - brief and concise description that explains the purpose of the autotest.
Specify the autotest language properties:
Autotest code language - defines the code language with its supported frameworks. Selecting Other allows extending the default code languages and get the necessary build tool.
Language version/framework - defines the specific framework or language version of the autotest. The field depends on the selected code language. Specify Java 8, Java 11 or Java 17 to be used.
Build Tool - allows to choose the build tool to use. In case of autotests, Gradle and Maven are available.
Autotest report framework - all the autotest reports will be created in the Allure framework by default.
Click the Proceed button to switch to the next menu.
In the Advanced Settings menu, specify the branch options and define the Jira settings:
Advanced settings
Default branch - the name of the branch where you want the development to be performed.
Note
The default branch cannot be deleted.
Codebase versioning type - defines how will the autotest tag be changed once the new image version is built. There are two versioning types:
default: Using the default versioning type, in order to specify the version of the current artifacts, images, and tags in the Version Control System, a developer should navigate to the corresponding file and change the version manually.
edp: Using the edp versioning type, a developer indicates the version number from which all the artifacts will be versioned and, as a result, automatically registered in the corresponding file (e.g. pom.xml). When selecting the edp versioning type, the extra fields will appear, type the version number from which you want the artifacts to be versioned:
Edp versioning
Type the version number from which you want the artifacts to be versioned.
Note
The Start Version From field must be filled out in compliance with the semantic versioning rules, e.g. 1.2.3 or 10.10.10. Please refer to the Semantic Versioning page for details.
Specify the pattern to validate a commit message - the regular expression used to indicate the pattern that is followed on the project to validate a commit message in the code review pipeline. An example of the pattern: ^[PROJECT_NAME-d{4}]:.*$.
Jira integration
Integrate with Jira server - this check box is used in case it is required to connect Jira tickets with the commits and have a respective label in the Fix Version field.
Note
To adjust the Jira integration functionality, first apply the necessary changes described on the Adjust Jira Integration page, and Adjust VCS Integration With Jira.
Jira Server - the integrated Jira server with related Jira tasks.
Specify the pattern to find a Jira ticket number in a commit message - based on this pattern, the value from KubeRocketCI will be displayed in Jira.
Mapping field name
Mapping field name - the section where the additional Jira fields are specified the names of the Jira fields that should be filled in with attributes from KubeRocketCI:
Select the name of the field in a Jira ticket. The available fields are the following: Fix Version/s, Component/s and Labels.
Click the Add button to add the mapping field name.
Enter Jira pattern for the field name:
For the Fix Version/s field, select the EDP_VERSION variable that represents an KubeRocketCI upgrade version, as in 2.7.0-SNAPSHOT.Combine variables to make the value more informative. For example, the pattern EDP_VERSION-EDP_COMPONENT will be displayed as 2.7.0-SNAPSHOT-nexus-operator in Jira.
For the Component/s field select the EDP_COMPONENT variable that defines the name of the existing repository. For example, nexus-operator.
For the Labels field select the EDP_GITTAGvariable that defines a tag assigned to the commit in Git Hub. For example, build/2.7.0-SNAPSHOT.59.
Click the bin icon to remove the Jira field name.
After the complete adding of the autotest, inspect the Autotest Overview page to learn how you can operate applications.
Portal provides the ability to deploy an environment on your own and specify the essential components.
Navigate to the Environments section on the navigation bar and click Create (the plus sign icon on the right side of the screen). Once clicked, the Create CD Pipeline dialog will appear.
The creation of the environment becomes available as soon as an application is created including its provisioning in a branch and the necessary entities for the environment. You can create the environment in YAML or via the three-step menu in the dialog.
"},{"location":"user-guide/add-cd-pipeline/#create-environment-in-yaml","title":"Create Environment in YAML","text":"
Click Edit YAML in the upper-right corner of the Create CD Pipeline dialog to open the YAML editor and create the environment.
Edit YAML
To edit YAML in the minimal editor, turn on the Use minimal editor toggle in the upper-right corner of the Create CD Pipeline dialog.
To save the changes, select the Save & Apply button.
"},{"location":"user-guide/add-cd-pipeline/#create-environment-in-the-dialog","title":"Create Environment in the Dialog","text":"
The Create CD Pipeline dialog contains the three steps:
Before proceeding, ensure to familiarize yourself with the Manage GitOps page as it might be required to add a GitOps repository first before creating an environment:
Add GitOps repository
To create an environment, follow the steps below:
Navigate to the Environments tab and click the + Create Environment button:
Environments menu
The Pipeline tab of the Create CD Pipeline menu is presented below:
Create CD pipeline
Enter the Environment name that will be displayed in the Environments list.
Click the Proceed button to move onto the Applications tab.
Type the name of the pipeline in the Pipeline Name field by entering at least two characters and by using the lower-case letters, numbers and inner dashes.
Note
The namespace created by the environment has the following pattern combination: [kuberocketci namespace]-[environment name]-[stage name]. Please be aware that the namespace length should not exceed 63 symbols.
Select the deployment type from the drop-down list:
Container - the pipeline will be deployed in a Docker container;
Custom - this mode allows to deploy non-container applications and customize the Init stage of environment.
Click the Proceed button to switch to the next menu.
The Pipeline tab of the Create CD Pipeline menu is presented below:
Environment applications
Select the necessary application from the Mapping field name drop-down menu and click Add.
Specify the application parameters:
Branch - Select the application branch from the drop-down menu.
Promote in pipeline - Select the this check box in order to transfer the application from one to another stage by the specified codebase Docker branch. If the Promote in pipeline check box is not selected, the same codebase Docker stream will be deployed regardless of the stage, i.e. the codebase Docker stream input, which was selected for the pipeline, will always be used.
Note
If there is another deployed environment stage with the respective codebase Docker stream (= image stream as an OpenShift term), the pattern combination will be as follows: [pipeline name]-[stage name]-[application name]-[verified].
Click the Proceed button to switch to the next menu.
On the Stages menu, click the Add Stage button and fill in the necessary fields in the Adding Stage window :
CD stages
Adding stage
Set the proper cluster options:
Cluster - Choose the cluster to deploy the stage in;
Stage name - Enter the stage name;
Namespace - Specify the Kubernetes namespace where the resources will be deployed in. By default, this field is pre-populated automatically but keep in mind that the namespace name must be no longer than 63 symbols;
Description - Enter the description for this stage;
Trigger type - Select the trigger type. The key benefit of the automatic deploy feature is to keep environments up-to-date. The available trigger types are Manual and Auto. When the Auto trigger type is chosen, the environment will initiate automatically once the image is built. Manual implies that user has to perform deploy manually by clicking the Deploy button in the environment menu. Please refer to the Architecture Scheme of CD Pipeline Operator page for additional details.
Note
Automatic deploy will start working only after the first manual deploy.
Pipeline template - Choose a predefined blueprint outlining the deployment process for your application. While you have the option to incorporate custom deployment templates by generating a resource of the PipelineTemplate category, you can also opt for one of the preexisting options: with autotests or without.
Select the quality gate options:
Quality gate type - Select the quality gate type:
Manual - means that the promoting process should be confirmed in Tekton manually;
Autotests - means that the promoting process should be confirmed by the successful passing of the autotests.;
Step name - Type the step name, which will be displayed in Tekton, for every quality gate;
Autotest - Select the previously created autotest name;
Autotest branch - Specify a branch for the autotest.
Note
Execution sequence. The image promotion and execution of the pipelines depend on the sequence in which the environments are added.
Click the Apply button to display the stage in the Stages menu.
Continuous delivery menu
Click the Apply button to start the provisioning of the pipeline.
As a result, a new environment will be created in the environments list.
This page provides comprehensive instructions on how to integrate a new cluster into the KubeRocketCI workloads. By doing so, it creates an opportunity for users to employ multi-cluster deployment, thereby facilitating the segregation of different environments across various clusters.
Before moving ahead, ensure you have already performed the guidelines outlined in the Argo CD Integration page.
"},{"location":"user-guide/add-cluster/#deploy-to-remote-cluster","title":"Deploy to Remote Cluster","text":"
To deploy an application to a remote cluster, follow the steps below:
Navigate to KubeRocketCI portal -> Configuration -> Clusters and click the + Add cluster button:
Clusters menu
In the drop-down window, specify the required fields:
Cluster Name - a unique and descriptive name for the new cluster;
Cluster Host - the cluster\u2019s endpoint URL (e.g., example-cluster-domain.com);
Cluster Token - a Kubernetes token with permissions to access the cluster. This token is required for proper authorization;
Skip TLS verification - allows connect to cluster without cluster certificate verification;
Cluster Certificate - a Kubernetes certificate essential for authentication. Obtain this certificate from the configuration file of the user account you intend to use for accessing the cluster.
Note
The Cluster Certificate field is hidden if the skip TLS verification option is enabled.
Add cluster
Click the Apply button to add the cluster.
As a result, the Kubernetes secret will be created for further integration and you will be able to select the integrated cluster when creating a new stage:
To add a Git server, navigate to the Git servers section on the navigation bar and click Create (the plus sign icon in the lower-right corner of the screen). Once clicked, the Create Git server dialog will appear. You can create a Git server in YAML or via the three-step menu in the dialog.
"},{"location":"user-guide/add-git-server/#create-git-server-in-yaml","title":"Create Git Server in YAML","text":"
Click Edit YAML in the upper-right corner of the Create Git server dialog to open the YAML editor and create a Git server.
Edit YAML
To edit YAML in the minimal editor, turn on the Use minimal editor toggle in the upper-right corner of the Create Git server dialog.
To save the changes, select the Save & Apply button.
"},{"location":"user-guide/add-git-server/#create-git-server-in-the-dialog","title":"Create Git Server in the Dialog","text":"
Fill in the following fields:
Create Git server
Git provider - select Gerrit, GitLab or GitHub.
Host - enter a Git server endpoint.
User - enter a user for Git integration.
SSH port - enter a Git SSH port.
HTTPS port - enter a Git HTTPS port.
Private SSH key - enter a private SSH key for Git integration.
Access token - enter an access token for Git integration. To generate this token, go to GitLab/GitHub account -> Settings -> SSH and GPG keys -> select New SSH key and add SSH key.
Click the Apply button to add the Git server to the Git servers list. As a result, the Git Server object and the corresponding secret for further integration will be created.
KubeRocketCI portal allows you to create an application, clone an existing repository with the application to your Version Control System (VCS), or using an external repository and importing an application to the environment. When an application is created or cloned, the system automatically generates a corresponding repository within the integrated Version Control System. The functionality of the Infrastructure codebase type is to create resources in cloud provider. You can create an Infrastructure in YAML or via the two-step menu in the dialog.
To add an infrastructure, navigate to the Components section on the navigation bar and click + Create component:
Create new infrastructure
Once clicked, the Create new component dialog will appear, then select Infrastructure and choose one of the strategies:
Infrastructure info
In the Create new component menu, select the necessary configuration strategy. The choice will define the parameters you will need to specify:
Create from template \u2013 creates a project on the pattern in accordance with an infrastructure language, a build tool, and a framework.
Import project - allows using existing VCS repository to integrate with KubeRocketCI. While importing the existing repository, select the Git server from the drop-down list and define the relative path to the repository, such as epmd-edp/python-python-flask.
Note
In order to use the Import project strategy, make sure to adjust it with the Integrate GitLab/GitHub With Tekton page.
Clone project \u2013 clones the indicated repository into KubeRocketCI. While cloning the existing repository, it is required to fill in the Repository URL field and specify the Repository credentials field if needed:
Clone infrastructure
"},{"location":"user-guide/add-infrastructure/#create-infrastructure-in-yaml","title":"Create Infrastructure in YAML","text":"
Click Edit YAML in the upper-right corner of the Create Infrastructure dialog to open the YAML editor and create the Infrastructure.
Edit YAML
To edit YAML in the minimal editor, turn on the Use minimal editor toggle in the upper-right corner of the Create Infrastructure dialog.
To save the changes, select the Save & Apply button.
"},{"location":"user-guide/add-infrastructure/#create-infrastructure-via-ui","title":"Create Infrastructure via UI","text":"
The Create Infrastructure dialog contains the two steps:
The Codebase Info Menu
The Advanced Settings Menu
"},{"location":"user-guide/add-infrastructure/#codebase-info-menu","title":"Codebase Info Menu","text":"
In our example, we will use the Create from template strategy.
Select all the settings that define how the infrastructure will be added to Git server:
Create infrastructure
Git server - the pre-configured server where the component will be hosted. Select one from the from the drop-down list. Please refer to the Manage Git Servers page to learn how to create the one.
Repository name - the relative path to the repository, such as epmd-edp/python-python-flask.
Component name - the name of the infrastructure. Must be at least two characters using the lower-case letters, numbers and inner dashes.
Description - brief and concise description that explains the purpose of the infrastructure.
Empty project - check this box to create a infrastructure with an empty repository. The empty repository option is available only for the Create from template strategy.
Specify the infrastructure language properties:
Infrastructure code language - defines the code language with its supported frameworks.
Language version/framework - defines the specific framework or language version of the infrastructure. The field depends on the selected code language.
Build Tool - allows to choose the build tool to use. A set tools and can be changed in accordance with the selected code language.
In the Advanced Settings menu, specify the branch options and define the Jira settings:
Advanced settings
Follow the instructions below to fill in the fields of the Advanced Setting menu:
Default branch - the name of the branch where you want the development to be performed.
Note
The default branch cannot be deleted.
Codebase versioning type - defines how will the infrastructure tag be changed once the new image version is built. There are two versioning types:
default: Using the default versioning type, in order to specify the version of the current artifacts, images, and tags in the Version Control System, a developer should navigate to the corresponding file and change the version manually.
edp: Using the edp versioning type, a developer indicates the version number from which all the artifacts will be versioned and, as a result, automatically registered in the corresponding file (e.g. pom.xml). When selecting the edp versioning type, the extra fields will appear, type the version number from which you want the artifacts to be versioned:
Edp versioning
Note
The Start Version From field should be filled out in compliance with the semantic versioning rules, e.g. 1.2.3 or 10.10.10. Please refer to the Semantic Versioning page for details.
Specify the pattern to validate a commit message - the regular expression used to indicate the pattern that is followed on the project to validate a commit message in the code review pipeline. An example of the pattern: ^[PROJECT_NAME-d{4}]:.*$.
JIRA integration
Integrate with Jira server - this check box is used in case it is required to connect Jira tickets with the commits and have a respective label in the Fix Version field.
Note
To adjust the Jira integration functionality, first apply the necessary changes described on the Adjust Jira Integration page, and Adjust VCS Integration With Jira.
Jira Server - the integrated Jira server with related Jira tasks.
Specify the pattern to find a Jira ticket number in a commit message - based on this pattern, the value from KubeRocketCI will be displayed in Jira.
Mapping fields
Mapping field name - the section where the additional Jira fields are specified the names of the Jira fields that should be filled in with attributes from KubeRocketCI:
Select the name of the field in a Jira ticket. The available fields are the following: Fix Version/s, Component/s and Labels.
Click the Add button to add the mapping field name.
Enter Jira pattern for the field name:
For the Fix Version/s field, select the EDP_VERSION variable that represents an EDP upgrade version, as in 2.7.0-SNAPSHOT.Combine variables to make the value more informative. For example, the pattern EDP_VERSION-EDP_COMPONENT will be displayed as 2.7.0-SNAPSHOT-nexus-operator in Jira.
For the Component/s field select the EDP_COMPONENT variable that defines the name of the existing repository. For example, nexus-operator.
For the Labels field select the EDP_GITTAGvariable that defines a tag assigned to the commit in Git Hub. For example, build/2.7.0-SNAPSHOT.59.
Click the bin icon to remove the Jira field name.
Click the Apply button to add the infrastructure to the Components list.
Note
After the complete adding of the application, inspect the Manage Infrastructures page to learn how you can operate with infrastructure codebase types.
KubeRocketCI portal allows you to create a library, clone an existing repository with the library to your Version Control System (VCS), or using an external repository and importing a library to the environment. When a library is created or cloned, the system automatically generates a corresponding repository within the integrated VCS. You can create a library in YAML or via the two-step menu in the dialog.
To add a library, navigate to the Components section on the navigation bar and click + Create component:
Create new library
Once clicked, the Create new component dialog will appear, then select Library and choose one of the strategies:
Create new component menu
In the Create new component menu, select the necessary configuration strategy. The choice will define the parameters you will need to specify:
Create from template \u2013 creates a project on the pattern in accordance with a library language, a build tool, and a framework.
Import project - allows using existing VCS repository to integrate with KubeRocketCI. While importing the existing repository, select the Git server from the drop-down list and define the relative path to the repository, such as epmd-edp/python-python-flask.
Note
In order to use the Import project strategy, make sure to adjust it with the Integrate GitLab/GitHub With Tekton page.
Clone project \u2013 clones the indicated repository into KubeRocketCI. While cloning the existing repository, it is required to fill in the Repository URL field and specify the Repository credentials field if needed:
Clone library
"},{"location":"user-guide/add-library/#create-library-in-yaml","title":"Create Library in YAML","text":"
Click Edit YAML in the upper-right corner of the Create Library dialog to open the YAML editor and create the library:
Edit YAML
To edit YAML in the minimal editor, turn on the Use minimal editor toggle in the upper-right corner of the Create Application dialog.
To save the changes, select the Save & Apply button.
"},{"location":"user-guide/add-library/#create-library-via-ui","title":"Create Library via UI","text":"
The Create Library dialog contains the two steps:
The Codebase Info Menu
The Advanced Settings Menu
"},{"location":"user-guide/add-library/#the-codebase-info-menu","title":"The Codebase Info Menu","text":"
In our example, we will use the Create from template strategy:
Create library
Select all the settings that define how the library will be added to Git server:
Git server - the pre-configured server where the component will be hosted. Select one from the from the drop-down list. Please refer to the Manage Git Servers page to learn how to create the one.
Repository name - the relative path to the repository, such as epmd-edp/python-python-flask.
Component name - the name of the library. Must be at least two characters using the lower-case letters, numbers and inner dashes.
Description - brief and concise description that explains the purpose of the library.
Empty project - check this box to create a library with an empty repository. The empty repository option is available only for the Create from template strategy.
Specify the library language properties:
Library code language - defines the code language with its supported frameworks:
Java \u2013 selecting specific Java version available.
JavaScript - selecting JavaScript allows using the NPM tool.
Python - selecting Python allows using the Python v.3.8, FastAPI, Flask.
Groovy-pipeline - selecting Groovy-pipeline allows having the ability to customize a stages logic.
Terraform - selecting Terraform allows using the Terraform different versions via the Terraform version manager (tfenv). KubeRocketCI supports all the actions available in Terraform, thus providing the ability to modify the virtual infrastructure and launch some checks with the help of linters. For details, please refer to the Use Terraform Library in KubeRocketCI page.
Rego - this option allows using Rego code language with an Open Policy Agent (OPA) Library. For details, please refer to the Use Open Policy Agent page.
Container - this option allows using the Kaniko tool for building the container images from a Dockerfile.
Helm - this option allows using the chart testing lint (Pipeline) for Helm charts or using Helm chart as a set of other Helm charts organized according to the example.
C# - selecting C# allows using .Net v.3.1 and .Net v.6.0.
Other - selecting Other allows extending the default code languages when creating a codebase with the Clone/Import strategy.
Note
The Create strategy does not allow to customize the default code language set.
Language version/framework - defines the specific framework or language version of the library. The field depends on the selected code language.
Build Tool - allows to choose the build tool to use. A set tools and can be changed in accordance with the selected code language.
Click the Proceed button to switch to the next menu.
In the Advanced Settings menu, specify the branch options and define the Jira settings:
Advanced settings
Default branch - the name of the branch where you want the development to be performed.
Note
The default branch cannot be deleted.
Codebase versioning type - defines how will the library tag be changed once the new image version is built. There are two versioning types:
default: Using the default versioning type, in order to specify the version of the current artifacts, images, and tags in the Version Control System, a developer should navigate to the corresponding file and change the version manually.
edp: Using the edp versioning type, a developer indicates the version number from which all the artifacts will be versioned and, as a result, automatically registered in the corresponding file (e.g. pom.xml). When selecting the edp versioning type, the extra fields will appear, type the version number from which you want the artifacts to be versioned:
EDP versioning
Note
The Start Version From field should be filled out in compliance with the semantic versioning rules, e.g. 1.2.3 or 10.10.10. Please refer to the Semantic Versioning page for details.
Specify the pattern to validate a commit message - the regular expression used to indicate the pattern that is followed on the project to validate a commit message in the code review pipeline. An example of the pattern: ^[PROJECT_NAME-d{4}]:.*$.
Integrate with Jira server
Integrate with Jira server - this check box is used in case it is required to connect Jira tickets with the commits and have a respective label in the Fix Version field.
Note
To adjust the Jira integration functionality, first apply the necessary changes described on the Adjust Jira Integration page, and Adjust VCS Integration With Jira.
Jira Server - the integrated Jira server with related Jira tasks.
Specify the pattern to find a Jira ticket number in a commit message - based on this pattern, the value from KubeRocketCI will be displayed in Jira.
Mapping fields
Mapping field name - the section where the additional Jira fields are specified the names of the Jira fields that should be filled in with attributes from KubeRocketCI:
Select the name of the field in a Jira ticket. The available fields are the following: Fix Version/s, Component/s and Labels.
Click the Add button to add the mapping field name.
Enter Jira pattern for the field name:
For the Fix Version/s field, select the EDP_VERSION variable that represents an EDP upgrade version, as in 2.7.0-SNAPSHOT.Combine variables to make the value more informative. For example, the pattern EDP_VERSION-EDP_COMPONENT will be displayed as 2.7.0-SNAPSHOT-nexus-operator in Jira.
For the Component/s field select the EDP_COMPONENT variable that defines the name of the existing repository. For example, nexus-operator.
For the Labels field select the EDP_GITTAGvariable that defines a tag assigned to the commit in Git Hub. For example, build/2.7.0-SNAPSHOT.59.
Click the bin icon to remove the Jira field name.
Click the Apply button to add the library to the Components list.
After the complete adding of the library, inspect the Library Overview page to learn how you can operate applications.
"},{"location":"user-guide/add-marketplace/","title":"Add Component via Marketplace","text":""},{"location":"user-guide/add-marketplace/#add-component-via-marketplace","title":"Add Component via Marketplace","text":"
With the built-in Marketplace, users can easily create a new application by clicking several buttons. This page contains detailed guidelines on how to create a new component with the help of the Marketplace feature.
This section describes how to use quality gate in KubeRocketCI and how to customize the quality gate for the CD pipeline with the selected build version of the promoted application between stages.
"},{"location":"user-guide/add-quality-gate/#apply-new-quality-gate-to-pipelines","title":"Apply New Quality Gate to Pipelines","text":"
Quality gate pipeline is a usual Tekton pipeline but with a specific label: app.edp.epam.com/pipelinetype: deploy. To add and apply the quality gate to your pipelines, follow the steps below:
1. To use the Tekton pipeline as a quality gate pipeline, add this label to the pipelines:
2. Insert the value that is the quality gate name displayed in the quality gate drop-down list of the CD pipeline menu:
metadata:\n name: <name-of-quality-gate>\n
3. Ensure the task promote-images contains steps and logic to apply to the project. Also ensure that the last task is promote-images which parameters are mandatory:
4. Create a new pipeline with a unique name or modify your created pipeline with the command below. Please be aware that the \u2039edp-project\u203a value is the name of the EDP tenant:
Before running the quality gate, first of all, ensure that the environment has deployed the created CD pipeline and then ensure that the application is successfully deployed and ready to run the quality gate. To run quality gate, please follow the steps below:
Check the CD pipeline status. To do this, open the created CD pipeline, select Image stream version, click DEPLOY button and wait until Applications, Health and Sync statuses become green. This implies that the application is successfully deployed and ready to run the quality gate.
CD pipeline stage overview
Select the name-of-quality-gate of Quality gates from the drop-down list and click the RUN button.The execution process should be started in the Pipelines menu:
Quality gate pipeline status
"},{"location":"user-guide/add-quality-gate/#add-stage-for-quality-gate","title":"Add Stage for Quality Gate","text":"
For a better understanding of this section, please read the documentation about how to add a new stage for quality gate. The scheme below illustrates two approaches of adding quality gates:
Types of adding quality gate
The first type of adding a quality gate is about adding the specific quality gate to the specific pipeline stage.
The second type is rather optional and implies activating the Promote in pipelines option while creating a CD Pipeline to pass the quality gate in a certain sequence.
As a result, after the quality gate is successfully passed, the projected image is promoted to the next stage.
This section describes the subsequent possible actions that can be performed with the newly added or existing applications.
"},{"location":"user-guide/application/#check-and-remove-application","title":"Check and Remove Application","text":"
As soon as the application is successfully provisioned, the following will be created:
An Application Codebase type will appear in the Codebase list of the Components section.
With the Create strategy, a new project will be generated on GitHub or another integrated VCS. When Clone is chosen, the repository will be forked from the original and copied to the KubeRocketCI-integrated repository. If Import is selected, the platform connects to the chosen repository.
The added application will be listed in the Applications list allowing you to do the following:
Applications menu
Application status - displays the application status. Can be red or green depending on if the KubeRocketCI portal managed to connect to the Git Server with the specified credentials or not.
Application name (clickable) - displays the application name set during the application creation.
Open documentation - opens the application related documentation page.
Enable filtering - enables filtering by application name and namespace where this custom resource is located in.
Create new application - displays the Create new component menu.
Edit application - edit the application by selecting the options icon next to its name in the applications list, and then selecting Edit. For details see the Edit Existing Application section.
Delete application - remove application by clicking the vertical ellipsis button and then selecting Delete.
Note
The application that is used in a CD pipeline cannot be removed.
There are also options to sort the applications:
Sort the existing applications in a table by clicking the sorting icons in the table header. Sort the applications alphabetically by their name, language, build tool, framework, and CI tool. You can also sort the applications by their status: Created, Failed, or In progress.
Select a number of applications displayed per page (15, 25 or 50 rows) and navigate between pages if the number of applications exceeds the capacity of a single page:
This section describes the subsequent possible actions that can be performed with the newly added or existing autotests.
"},{"location":"user-guide/autotest/#check-and-remove-autotest","title":"Check and Remove Autotest","text":"
As soon as the autotest is successfully provisioned, the following will be created:
An Autotest Codebase type will appear in the Codebase list of the Components section.
With the Create strategy, a new project will be generated on GitHub or another integrated VCS. When Clone is chosen, the repository will be forked from the original and copied to the KubeRocketCI-integrated repository. If Import is selected, the platform connects to the chosen repository.
Info
To navigate quickly to Tekton, Version Control System, SonarQube, Nexus, and other resources, click the Overview section on the navigation bar and hit the necessary link.
The added autotest will be listed in the Autotests list allowing you to do the following:
Autotests page
Autotest status - displays the autotest status. Can be red or green depending on KubeRocketCI portal managed to connect to the Git Server with the specified credentials or not.
Autotest name (clickable) - displays the autotest name set during the autotest creation.
Open documentation - opens the autotest related documentation page.
Enable filtering - enables filtering by autotest name and namespace where this custom resource is located in.
Create new autotest - displays the Create new component menu.
Edit autotest - edit the autotest by selecting the options icon next to its name in the autotests list, and then selecting Edit. For details see the Edit Existing Autotest section.
Delete autotest - remove autotest by clicking the vertical ellipsis button and then selecting Delete.
Note
The autotest that is used in a CD pipeline cannot be removed.
There are also options to sort the autotests:
Sort the existing autotests in a table by clicking the sorting icons in the table header. Sort the autotests alphabetically by their name, language, build tool, framework, and CI tool. You can also sort the autotests by their status: Created, Failed, or In progress.
Select a number of autotests displayed per page (15, 25 or 50 rows) and navigate between pages if the number of autotests exceeds the capacity of a single page.
KubeRocketCI portal provides the ability to enable, disable or edit the Jira Integration functionality for autotests.
To edit an autotest directly from the Autotests overview page or when viewing the autotest data:
Select Edit in the options icon menu:
Edit autotest on the autotests overview page
Edit autotest when viewing the autotest data
To enable Jira integration, on the Edit Autotest page do the following:
Edit library
a. Mark the Integrate with Jira server check box and fill in the necessary fields. Please see steps d-h on the Add Autotests page.
b. Click the Apply button to apply the changes.
Note
To adjust the Jira integration functionality, first apply the necessary changes described on the Adjust Jira Integration and Adjust VCS Integration With Jira pages.
To disable Jira integration, in the Edit Autotest dialog do the following:
Clear the Integrate with Jira server check box.
Click the Apply button to apply the changes.
To create, edit and delete application branches, please refer to the Manage Branches page.
"},{"location":"user-guide/autotest/#add-autotest-as-a-quality-gate","title":"Add Autotest as a Quality Gate","text":"
In order to add an autotest as a quality gate to a newly added CD pipeline, do the following:
Create a CD pipeline with the necessary parameters. Please refer to the Add CD Pipeline section for the details.
In the Stages menu, select the Autotest quality gate type. It means the promoting process should be confirmed by the successful passing of the autotests.
In the additional fields, select the previously created autotest name and specify its branch.
After filling in all the necessary fields, click the Create button to start the provisioning of the pipeline. After the CD pipeline is added, the new namespace containing the stage name will be created in Kubernetes (in OpenShift, a new project will be created) with the following name pattern: [cluster name]-[cd pipeline name]-[stage name].
"},{"location":"user-guide/autotest/#configure-autotest-launch-at-specific-stage","title":"Configure Autotest Launch at Specific Stage","text":"
In order to configure the added autotest launch at the specific stage with necessary parameters, do the following:
Add the necessary stage to the CD pipeline. Please refer to the Add CD Pipeline documentation for the details.
Navigate to the run.json file and add the stage name and the specific parameters.
There is an ability to run the autotests locally using the IDEA (Integrated Development Environment Application, such as IntelliJ, NetBeans etc.). To launch the autotest project for the local verification, perform the following steps:
Clone the project to the local machine.
Open the project in IDEA and find the run.json file to copy out the necessary command value.
Paste the copied command value into the Command line field and run it with the necessary values and namespace.
As a result, all the launched tests will be executed.
This section provides details on the Build pipeline of the EDP CI/CD pipeline framework. Explore below the pipeline purpose, stages and possible actions to perform.
The purpose of the Build pipeline contains the following points:
Check out, test, tag and build an image from the mainstream branch after a patch set is submitted in order to inspect whether the integrated with the mainstream code fits all quality gates, can be built and tested;
Be triggered if any new patch set is submitted;
Tag a specific commit in Gerrit in case the build is successful;
Build a Docker image with an application that can be afterward deployed using the Tekton/Argo CD Deploy pipeline.
Find below the functional diagram of the Build pipeline with the default stages:
"},{"location":"user-guide/build-pipeline/#build-pipeline-for-application-and-library","title":"Build Pipeline for Application and Library","text":"
The Build pipeline is triggered automatically after the Code Review pipeline is completed and the changes are submitted.
To review the Build pipeline, take the following steps:
Open Tekton Dashboard via Overview page of the EDP Portal.
Review stages for the application and library codebases:
Init - initialization of the Code Review pipeline inputs;
Checkout - checkout of the application code;
Get-version - get the version from the pom.XML file and add the build number;
Compile - code compilation;
Tests - tests execution;
Sonar - Sonar launch that checks the whole code;
Build - artifact building and adding to Nexus;
Build-image - docker image building and adding to Docker Registry. The Build pipeline for the library has the same stages as the application except the Build-image stage, i.e. the Docker image is not building.
Push - artifact docker image pushing to Nexus and Docker Registry;
Git-tag - adding of the corresponding Git tag of the current commit to relate with the image, artifact, and build version.
After the Build pipeline runs all the stages successfully, the corresponding tag numbers will be created in Kubernetes/OpenShift and Nexus.
"},{"location":"user-guide/build-pipeline/#check-the-tag-in-kubernetesopenshift-and-nexus","title":"Check the Tag in Kubernetes/OpenShift and Nexus","text":"
After the Build pipeline is completed, check the tag name and the same with the commit revision. Simply navigate to Gerrit \u2192 Projects \u2192 List \u2192 select the project \u2192 Tags.
Note
For the Import strategy, navigate to the repository from which a codebase is imported \u2192 Tags. It is actual both for GitHub and GitLab.
Open the Kubernetes/OpenShift Overview page and click the link to Nexus and check the build of a new version.
Switch to Kubernetes \u2192 CodebaseImageStream (or OpenShift \u2192 Builds \u2192 Images) \u2192 click the image stream that will be used for deployment.
Check the corresponding tag.
"},{"location":"user-guide/build-pipeline/#configure-and-start-pipeline-manually","title":"Configure and Start Pipeline Manually","text":"
The Build pipeline can be started manually. To set the necessary stages and trigger the pipeline manually, take the following steps:
Open the Build pipeline for the created library.
Click the Build with parameters option from the left-side menu. Modify the stages by removing the whole objects massive:{\"name\". \"tests\"} where name is a key and tests is a stage name that should be executed.
Open Tekton Dashboard or Component details page and check the successful execution of all stages.
CD Pipeline (Continuous Delivery Pipeline) - an EDP business entity that describes the whole delivery process of the selected application set via the respective stages. The main idea of the CD pipeline is to promote the application build version between the stages by applying the sequential verification (i.e. the second stage will be available if the verification on the first stage is successfully completed). The CD pipeline can include the essential set of applications with its specific stages as well.
In other words, the CD pipeline allows the selected image stream (Docker container in Kubernetes terms) to pass a set of stages for the verification process (SIT - system integration testing with the automatic type of a quality gate, QA - quality assurance, UAT - user acceptance testing with the manual testing).
Note
It is possible to change the image stream for the application in the CD pipeline. Please refer to the Edit CD Pipeline section for the details.
A CI/CD pipeline helps to automate steps in a software delivery process, such as the code build initialization, automated tests running, and deploying to a staging or production environment. Automated pipelines remove manual errors, provide standardized development feedback cycle, and enable the fast product iterations. To get more information on the CI pipeline, please refer to the CI Pipeline Details chapter.
The codebase stream is used as a holder for the output of the stage, i.e. after the Docker container (or an image stream in OpenShift terms) passes the stage verification, it will be placed to the new codebase stream. Every codebase has a branch that has its own codebase stream - a Docker container that is an output of the build for the corresponding branch.
Note
For more information on the main terms used in EPAM Delivery Platform, please refer to the EDP Glossary
The Deploy pipeline is used by default on any stage of the Continuous Delivery pipeline. It addresses the following concerns:
Deploying the application(s) to the main STAGE (SIT, QA, UAT) environment in order to run autotests and to promote image build versions to the next environments afterwards.
Deploying the application(s) to a custom STAGE environment in order to run autotests and check manually that everything is ok with the application.
Deploying the latest or a stable and some particular numeric version of an image build that exists in Docker registry.
Promoting the image build versions from the main STAGE (SIT, QA, UAT) environment.
Auto deploying the application(s) version from the passed payload (using the CODEBASE_VERSION job parameter).
Find below the functional diagram of the Deploy pipeline with the default stages:
Note
The input for a CD pipeline depends on the Trigger Type for a deploy stage and can be either Manual or Auto.
CI Pipeline (Continuous Integration Pipeline) - an EDP business entity that describes the integration of changes made to a codebase into a single project. The main idea of the CI pipeline is to review the changes in the code submitted through a Version Control System (VCS) and build a new codebase version so that it can be transmitted to the Continuous Delivery Pipeline for the rest of the delivery process.
There are three codebase types in EPAM Delivery Platform:
Applications - a codebase that is developed in the Version Control System, has the full lifecycle starting from the Code Review stage to its deployment to the environment;
Libraries - this codebase is similar to the Application type, but it is not deployed and stored in the Artifactory. The library can be connected to other applications/libraries;
Autotests - a codebase that inspects the code and can be used as a quality gate for the CD pipeline stage. The autotest only has the Code Review pipeline and is launched for the stage verification.
Note
For more information on the above mentioned codebase types, please refer to the Add Application, Add Library, Add Autotests and Autotest as Quality Gate pages.
The Continuous Integration part means the following:
all components of the application development are in the same place and perform the same processes for running;
the results are published in one place and replicated into EPAM GitLab or VCS (version control system);
the repository also includes a storage tool (e.g. Nexus) for all binary artifacts that are produced by the Tekton CI server after submitting changes from Code Review tool into VCS;
The Code Review and Build pipelines are used before the code is delivered. An important part of both of them is the integration tests that are launched during the testing stage.
Many applications (SonarQube, Gerrit, etc,) used by the project need databases for their performance.
The Continuous Delivery comprises an approach allowing to produce an application in short cycles so that it can be reliably released at any time point. This part is tightly bound with the usage of the Code Review, Build, and Deploy pipelines.
The Deploy pipelines deploy the applications configuration and their specific versions, launch automated tests and control quality gates for the specified environment. As a result of the successfully completed process, the specific versions of images are promoted to the next environment. All environments are sequential and promote the build versions of applications one-by-one. The logic of each stage is described as a code of Tekton pipelines and stored in the VCS.
During the CI/CD, there are several continuous processes that run in the repository, find below the list of possible actions:
Review the code with the help of Gerrit tool;
Run the static analysis using SonarQube to control the quality of the source code and keep the historical data which helps to understand the trend and effectivity of particular teams and members;
Analyze application source code using SAST, byte code, and binaries for coding/design conditions that are indicative of security vulnerabilities;
Build the code with Tekton CI and run automated tests that are written to make sure the applied changes will not break any functionality.
Note
For the details on autotests, please refer to the Autotest, Add Autotest, and Autotest as Quality Gate pages.
The release process is divided into cycles and provides regular delivery of completed pieces of functionality while continuing the development and integration of new functionality into the product mainline.
Explore the main flow that is displayed on the diagram below:
This section describes the subsequent possible actions that can be performed with the newly added or existing clusters.
In a nutshell, cluster in EDP Portal is a Kubernetes secret that stores credentials and endpoint to connect to the another cluster. Adding new clusters allows users to deploy applications in several clusters, thus improving flexibility of your infrastructure.
The added cluster will be listed in the clusters list allowing you to do the following:
Clusters list
Cluster status - displays the cluster status. Can be red or green depending on if the KubeRocketCI portal managed to connect to the cluster host with the specified credentials or not.
Open documentation - opens the cluster related documentation page.
Add a new cluster - displays the cluster creation form.
Cluster properties - shows the specified cluster properties.
Delete cluster - remove cluster by clicking the recycle bin icon.
This section provides details on the Code Review pipeline of the EDP CI/CD framework. Explore below the pipeline purpose, stages and possible actions to perform.
The purpose of the Code Review pipeline contains the following points:
Check out and test a particular developer's change (Patch Set) in order to inspect whether the code fits all the quality gates and can be built and tested;
Be triggered if any new Patch Set appears in GitHub/GitLab/Gerrit;
Send feedback about the build process in Tekton to review the card in Gerrit;
Send feedback about Sonar violations that have been found during the Sonar stage.
Find below the functional diagram of the Code Review pipeline with the default stages:
In this section, we will introduce you to the different types of codebases and strategies for onboarding codebases onto the KubeRocketCI.
"},{"location":"user-guide/components/#component-and-codebase","title":"Component and Codebase","text":"
From a business perspective, Components represent the functional building blocks of software projects. They define the purpose and functionality of different parts of a business application, such as core applications, libraries, automated tests, and infrastructure settings. Components are about what software does and how it aligns with business goals.
From a technical implementation perspective, Codebases are the Kubernetes custom resources that manage the technical aspects of these Components. They serve as the bridge between the business logic represented by Components and the underlying Git repositories. Codebases are responsible for the technical implementation, ensuring that the Components are efficiently stored, versioned, and synchronized with the version control system. They represent the state of Components from a technical standpoint.
Components are the building blocks of software projects. They come in different types, such as Applications, Libraries, Autotests, and Infrastructure. Each component type serves a specific purpose in the development process. Applications are the deployable unit of projects, libraries contain reusable code, autotests facilitate automated testing, and infrastructure defines a project's infrastructure settings.
Codebases are Kubernetes custom resources (CR) that represent the state of the components. They are a crucial link between component's state and underlying Git repositories. In essence, each codebase corresponds to a specific component and reflects its current state within a single Git repository. This one-to-one mapping ensures that the component's state is efficiently managed and versioned.
KubeRocketCI accommodates a variety of codebase types, each serving a specific purpose in the development process. The codebase types available in KubeRocketCI are:
Application: the codebase that contains the source code and manifests of application that can be deployed to Kubernetes clusters. One can use different languages, frameworks, and build tools to develop application.
Library: the codebase that contains reusable code components that can be shared across multiple projects. They are an essential resource for efficient and consistent development.
Autotest: the codebase that facilitates the implementation of automated tests, helping ensure the quality, performance and reliability of applications.
Infrastructure: Infrastructure codebases are used to define and manage the underlying infrastructure of projects using the Infrastructure as Code approach, ensuring consistency and reproducibility.
The platform supports the following strategies to onboard codebases on the platform:
Create from template - This strategy allows to create a new codebase from a predefined template that matches application language, build tool, and framework. One can choose from a variety of templates that cover different technologies and use cases. This strategy is recommended for projects that start developing their applications from scratch or want to follow the best practices of KubeRocketCI.
Import project - This strategy allows to import an existing codebase from a Git server that is integrated with KubeRocketCI. One can select the Git server and the repository to import, and KubeRocketCI will replicate it to the platform and perform configure. This strategy is suitable for projects that already have a codebase on a Git server and want to leverage the benefits of KubeRocketCI.
Clone project \u2013 This strategy allows to clone an existing codebase from any Git repository that is accessible via HTTPS. One can provide the repository URL and KubeRocketCI will clone it to the platform and configure it. This strategy is useful for projects that want to copy a codebase from an external source and customize it for their needs.
The codebase-operator is responsible for creating and managing the codebase custom resource on the KubeRocketCI. The codebase CR defines the metadata and configuration of the codebase, such as the name, description, type, repository URL, branch, path, CD tool, etc. The codebase-operator watches for changes in the codebase CR and synchronizes them with the corresponding Git repository and KubeRocketCI components. Learn more about the codebase-operator and the custom resource (CR) API.
The Configuration tab of the KubeRocketCI portal is designed to integrate KubeRocketCI with third-party components. In this page you will get a brief overview of all the sections presented in the Configuration tab.
Here is the list of all the sections provided in the Configuration tab. Familiarize yourself with purposes of each section:
Configuration Section Description Links Configure links for quick access to required tools that will be displayed on the Overview page or in specific resource details, such as application or stage details. Additionally, this section is used to configure widgets, such as SonarQube and DependencyTrack. Nexus Integrate Nexus to store and manage your application artifacts, facilitating a Continuous Integration flow within the platform. Registry Integrate platform with a container registry to store container artifacts. Clusters Integrate platform with external clusters to enable remote cluster deployment. GitOps Onboard a specific repository used for the GitOps approach purposes. Argo CD Integrate platform with Argo CD to enable the GitOps approach. DefectDojo Connect platform with DefectDojo to manage and track security defects in applications. DependencyTrack Connect the platform with the DependencyTrack tool for monitoring and managing vulnerabilities within third-party components. SonarQube Integrate SonarQube to enable static code analysis. Git Server Connect the platform to Version Control Systems, such as GitHub, GitLab, or Gerrit for source code management. Jira Integrate Jira to track and deliver the status of your projects on a dedicated dashboard. SSO Integrate platform with identity provider to enable the Single Sign-On approach."},{"location":"user-guide/configuration-overview/#related-articles","title":"Related Articles","text":"
This page is dedicated to the GitOps section of the Configuration tab, the process of establishing the GitOps repository, outline benefits it extends to users within the platform capabilities. GitOps, short for \"Git Operations\", is a modern approach to managing and automating infrastructure and application deployments. In GitOps, the desired state of your environment is declared and stored in a Git repository. With GitOps, you can ensure that your infrastructure and applications are always in sync with your intended configurations and readily adapt to changing requirements.
The purpose of the GitOps section is to provide users with the ability to customize the state of their environments with the help of GitOps approach that enables you to store your entire deployment configuration in a Git repository, providing version control for changes, consistent collaboration, and automated deployments. Enforcing GitOps allows you to declaratively define and automate your configurations, ensuring consistency, version control, and collaboration within your team.
Once the GitOps repository is added to the platform, you can set custom parameters for the deployed Helm Chart. To redefine the parameters, follow the steps below:
In the GitOps repository, create the values.yaml file according to the <pipeline-name>/<stage-name>/<application-name>-values.yaml pattern.
In the created values.yaml file, enter the parameters with their custom values.
Navigate to the Environments section. Open the created environment, open its stage and deploy it with the Values override checkbox selected as it is shown below:
This section describes the subsequent possible actions that can be performed with the newly added or existing infrastructures.
"},{"location":"user-guide/infrastructure/#check-and-remove-inrastructure","title":"Check and Remove Inrastructure","text":"
As soon as the infrastructure is successfully provisioned, the following will be created:
An Infrastructure Codebase type will appear in the Codebase list of the Components section.
With the Create strategy, a new project will be generated on GitHub or another integrated VCS. When Clone is chosen, the repository will be forked from the original and copied to the KubeRocketCI-integrated repository. If Import is selected, the platform connects to the chosen repository.
The added infrastructure will be listed in the infrastructure list allowing you to do the following:
Components menu
Infrastructure status - displays the infrastructure status. Can be red or green depending on if the KubeRocketCI portal managed to connect to the Git Server with the specified credentials or not.
Infrastructure name (clickable) - displays the infrastructure name set during the library creation.
Open documentation - opens the infrastructure related documentation page.
Enable filtering - enables filtering by library name and namespace where this custom resource is located in.
Create new infrastructure - displays the Create new component menu.
Edit infrastructure - edit the infrastructure by selecting the options icon next to its name in the infrastructures list, and then selecting Edit. For details see the Edit Existing Infrastructure section.
Delete infrastructure - remove infrastructure by clicking the vertical ellipsis button and then selecting Delete.
There are also options to sort the infrastructures:
Sort the existing infrastructures in a table by clicking the sorting icons in the table header. Sort the infrastructures alphabetically by their name, language, build tool, framework, and CI tool. You can also sort the infrastructures by their status: Created, Failed, or In progress.
Select a number of infrastructures displayed per page (15, 25 or 50 rows) and navigate between pages if the number of items exceeds the capacity of a single page.
This section describes the subsequent possible actions that can be performed with the newly added or existing libraries.
"},{"location":"user-guide/library/#check-and-remove-library","title":"Check and Remove Library","text":"
As soon as the library is successfully provisioned, the following will be created:
A Library Codebase type will appear in the Codebase list of the Components section.
With the Create strategy, a new project will be generated on GitHub or another integrated VCS. When Clone is chosen, the repository will be forked from the original and copied to the KubeRocketCI-integrated repository. If Import is selected, the platform connects to the chosen repository.
Info
To navigate quickly to OpenShift, Tekton, Gerrit, SonarQube, Nexus, and other resources, click the Overview section on the navigation bar and hit the necessary link.
The added library will be listed in the Libraries list allowing to do the following:
Library menu
Library status - displays the library status. Can be red or green depending on if the KubeRocketCI portal managed to connect to the Git Server with the specified credentials or not.
Library name (clickable) - displays the library name set during the library creation.
Open documentation - opens the library related documentation page.
Enable filtering - enables filtering by library name and namespace where this custom resource is located in.
Create new library - displays the Create new component menu.
Edit library - edit the library by selecting the options icon next to its name in the libraries list, and then selecting Edit. For details see the Edit Existing Library section.
Delete Library - remove library by clicking the vertical ellipsis button and then selecting Delete.
Note
The library that is used in a CD pipeline cannot be removed.
There are also options to sort the libraries:
Sort the existing libraries in a table by clicking the sorting icons in the table header. Sort the libraries alphabetically by their name, language, build tool, framework, and CI tool. You can also sort the libraries by their status: Created, Failed, or In progress.
Select a number of libraries displayed per page (15, 25 or 50 rows) and navigate between pages if the number of libraries exceeds the capacity of a single page.
This page describes how to manage branches in the created component, whether it is an application, library, autotest or infrastructure.
"},{"location":"user-guide/manage-branches/#add-new-branch","title":"Add New Branch","text":"
Note
When working with libraries, pay attention when specifying the branch name: the branch name is involved in the formation of the library version, so it must comply with the Semantic Versioning rules for the library.
When adding a component, the default branch is a master branch. In order to add a new branch, follow the steps below:
Navigate to the Branches block by clicking the component name link in the Components list.
Click the + Create button:
Add branch
Click Edit YAML in the upper-right corner of the dialog to open the YAML editor and add a branch. Otherwise, fill in the required fields in the dialog:
New branch
a. Release Branch - select the Release Branch check box if you need to create a release branch.
b. Branch name - type the branch name. Pay attention that this field remains static if you create a release branch. For the Clone and Import strategies: if you want to use the existing branch, enter its name into this field.
c. From Commit Hash - paste the commit hash from which the branch will be created. For the Clone and Import strategies: Note that if the From Commit Hash field is empty, the latest commit from the branch name will be used.
d. Branch version - enter the necessary branch version for the artifact. The Release Candidate (RC) postfix is concatenated to the branch version number.
e. Default branch version - type the branch version that will be used in a master branch after the release creation. The Snapshot postfix is concatenated to the master branch version number.
f. Click the Apply button and wait until the new branch will be added to the list.
Info
Adding of a new branch is indicated in the context of the EDP versioning type.
The default component repository is cloned and changed to the new indicated version before the build, i.e. the new indicated version will not be committed to the repository; thus, the existing repository will keep the default version.
Follow a three-step process to integrate a container registry in KubeRocketCI:
In the KubeRocketCI -> Configuration -> Registry:
Registry settings
Select Registry Provider and enter the required details.
Confirm settings by clicking the Save button.
The required fields vary depending on which container registry is chosen:
AWS ECRDockerHubHarborOpenShiftNexus
AWS ECR settings
Fields Description Registry Endpoint Format for the (AWS) Elastic Container Registry endpoint: xxxxxxxxxxxx.dkr.ecr..amazonaws.com. Where xxxxxxxxxxxx is your AWS account ID and <region> is where your ECR is hosted. Registry Space The suffix project name in registry. AWS Region The geographic area where the (AWS) Elastic Container Registry repository is hosted. Authentication/IRSA Role ARN Specify the IAM role with a policy for interacting with ECR with your Kubernetes cluster.
DockerHub settings
Fields Description Registry Space The unique identifier/name of the user or company linked to your DockerHub account. User The user account id or community user account id with push permission. Password/Token Provide the Password/Token corresponding to your docker hub account. It is recommended to use Token for security purposes. Checkbox/Use the Push Account's credentials Check this to use the same account for pulling and pushing operations. If unchecked, please enter the user account ID and Password/Token for your DockerHub account or community user account ID with pull permission.
Harbor settings
Fields Description Registry Endpoint Enter Harbor registry endpoint URL, for example, registry.example.com. Registry Space The project name in registry. User Provide the robot account name with push permissions. Password/Token Provide the secret corresponding to your harbor account. Checkbox/Use the Push Account's credentials Check this to use the same account for pulling and pushing operations. Provide the account name with pull permissions.
OpenShift settings
Fields Description Registry Endpoint OpenShift service registry endpoint URL (e.g., image-registry.openshift-image-registry.svc:5000). Project The project name in registry. Password/Token Supply the password for the user who has pull authorization privileges in your OpenShift container image registry.
Nexus settings
Fields Description Registry Endpoint Nexus service registry endpoint URL (e.g., image-registry.nexus-image-registry.svc:5000). Repository Specify the Nexus repository that corresponds to your project. User Provide the username with push permissions. Password/Token Enter the confidential combination used for authenticating your access to the container registry."},{"location":"user-guide/manage-container-registries/#remove-container-registry","title":"Remove Container Registry","text":"
To remove container registry integration from KubeRocketCI, follow the steps below:
Warning
Proceed with caution, removing registry settings might disrupt your CI/CD process. All new components created after changing the registry such as Components and Environments will start working out of the box. To work with existing codebases and pipelines familiarize with the change container registry guide.
1. In the KubeRocketCI -> Configuration -> Registry.
2. Click the Reset registry button, type the confirm word and then click Confirm:
This page describes actions that can be performed to an already created environment. If no environments are created yet, navigate to the Add Environment page:
Environments page
Environment status - displays the environment status. Can be red or green depending on if the KubeRocketCI portal managed to connect to the Git Server with the specified credentials or not.
Environment name (clickable) - displays the Git Server name set during the Git Server creation.
Open documentation - opens the documentation that leads to this page.
Enable filtering - enables filtering by Git Server name and namespace where this environment is located in.
Create new environment - displays the Create new component menu.
Edit environment - edit the environment by selecting the options icon next to its name in the environment list, and then selecting Edit. For details see the Edit Existing Environment section.
Delete environment - remove environment by clicking the vertical ellipsis button and then selecting Delete.
Note
Please keep in mind that after deleting the environment, all the created resources within the environment will be deleted.
Edit the environment directly from the environment overview page or when viewing the environment data:
Select Edit in the options icon menu next to the environment name:
Edit environment when viewing the environment data
Apply the necessary changes (edit the list of applications for deploy, application branches, and promotion in the pipeline). Add new extra stages by clicking the plus sign icon and filling in the application branch and promotion in the pipeline.
Edit environment dialog
Click the Apply button to confirm the changes.
"},{"location":"user-guide/manage-environments/#add-a-new-stage","title":"Add a New Stage","text":"
In order to create a new stage for the existing environment, follow the steps below:
Navigate to the Stages block by clicking the environment name link in the environments list.
Click the Create stage button:
Add environment stage
Fill in the required fields in the dialog. Alternatively, click Edit YAML in the upper-right corner of the Create stage dialog to open the YAML editor and add a stage. Please see the Stages Menu section for details.
To view the environment stage data for the existing environment, follow the steps below:
Navigate to the Stages block by clicking the environment name link in the environments list.
Expand environment stage
Click stage name. The following blocks will be displayed:
Environment stage overview
a. Applications - displays the status of the applications related to the stage and allows deploying the applications. Applications health and sync statuses are returned from the Argo CD tool. b. Pipelines - displays all the deploy pipeline runs launched for this stage. c. Monitoring - opens the grafana window that allows for watching various metrics.
Navigate to the Applications block of the stage and select an application.
Select the image stream version from the drop-down list.
(Optional) Enable setting custom values for Helm Charts. For more details, please refer to the Manage GitOps page.
Click Deploy. The application will be deployed in the Argo CD tool as well.
Info
In case of using OpenShift internal registry, if the deployment fails with the ImagePullBackOff error, delete the pod that was created for this application.
To update application, use the Deploy button:
Update the application
To uninstall the application, click the Uninstall button:
Uninstall the application
As a result, the application will be updated or uninstalled in the Argo CD tool as well.
Note
In a nutshell, the Update button updates your image version in the Helm chart, whereas the Uninstall button deletes the Helm chart from the namespace where the Argo CD application is deployed.
There is a couple of KubeRocketCI portal capabilities that will help in monitoring and troubleshooting deployed applications, namely, terminal and logs.
To inspect the deployed application in KubeRocketCI portal, take the following steps:
Open the application logs by clicking the Show Logs button:
Show Logs button
Inspect the shown logs:
Inspect Logs
Open the application terminal by clicking the Show Terminal button:
The KubeRocketCI marketplace offers a range of Templates, predefined tools and settings for creating software. These Templates speed up development, minimize errors, and ensure consistency. A key KubeRocketCI marketplace feature is customization. Organizations can create and share their own Templates, finely tuned to their needs. Each Template serves as a tailored blueprint of tools and settings.
These tailored Templates include preset CI/CD pipelines, automating your development workflows. From initial integration to final deployment, these processes are efficiently managed. Whether for new applications or existing ones, these Templates enhance processes, save time, and ensure consistency.
To see the Marketplace section, navigate to the Marketplace tab. General look of the Marketplace section is described below:
Marketplace section (listed view)
Marketplace templates - all the components marketplace can offer;
Template properties - the item summary that shows the type, category, language, framework, build tool and maturity;
Enable/disable filters - enables users to enable/disable searching by the item name or namespace it is available in;
Change view - allows switching from the listed view to the tiled one and vice versa. See the view options for details.
There is also a possibility to switch into the tiled view instead of the listed one:
Marketplace section (tiled view)
To view the details of a marketplace item, simply click its name:
Item details
The details window shows supplemental information, such as item's author, keywords, release version and the link to the repository it is located in. The window also contains the Create from template button that allows users to create the component by the chosen template. The procedure of creating new components is described in the Add Component via Marketplace page.
"},{"location":"user-guide/opa-stages/","title":"Use Open Policy Agent","text":""},{"location":"user-guide/opa-stages/#use-open-policy-agent","title":"Use Open Policy Agent","text":"
Open Policy Agent (OPA) is a policy engine that provides:
High-level declarative policy language Rego;
API and tooling for policy execution.
EPAM Delivery Platform ensures the implemented Open Policy Agent support allowing to work with Open Policy Agent bundles that is processed by means of stages in the Code Review and Build pipelines. These pipelines are expected to be created after the Rego OPA Library is added.
In the Build pipeline, the following stages are available:
checkout stage, a standard step during which all files are checked out from a selected branch of the Git repository.
get-version optional stage, a step where library version is determined either via:
2.1. Standard EDP versioning functionality.
2.2. Manually specified version. In this case .manifest file in a root directory MUST be provided. File must contain a JSON document with revision field. Minimal example: { \"revision\": \"1.0.0\" }\".
tests stage containing a script that performs the following actions: 3.1. Runs policy tests. 3.2. Converts OPA test results into JUnit format. 3.3. Publishes JUnit-formatted results.
git-tag stage, a standard step where git branch is tagged with a version.
"},{"location":"user-guide/prepare-for-release/","title":"Prepare for Release","text":""},{"location":"user-guide/prepare-for-release/#prepare-for-release","title":"Prepare for Release","text":"
After the necessary applications are added to EDP, they can be managed via the Admin Console. To prepare for the release, create a new branch from a selected commit with a set of CI pipelines (Code Review and Build pipelines), launch the Build pipeline, and add a new CD pipeline as well.
Note
Please refer to the Add Application and Add CD Pipeline for the details on how to add an application or a CD pipeline.
Become familiar with the following preparation steps for release and a CD pipeline structure:
Create a new branch
Launch the Build pipeline
Add a new CD pipeline
Check CD pipeline structure
"},{"location":"user-guide/prepare-for-release/#create-a-new-branch","title":"Create a New Branch","text":"
Open Gerrit via the Admin Console Overview page to have this tab available in a web browser.
Being in Admin Console, open the Applications section and click an application from the list to create a new branch.
Once clicked the application name, scroll down to the Branches menu and click the Create button to open the Create New Branch dialog box, fill in the Branch Name field by typing a branch name.
Open the Gerrit tab in the web browser, navigate to Projects \u2192 List \u2192 select the application \u2192 Branches \u2192 gitweb for a necessary branch.
Select the commit that will be the last included to a new branch commit.
Copy to clipboard the commit hash.
Paste the copied hash to the From Commit Hash field and click Proceed.
Note
If the commit hash is not added to the From Commit Hash field, the new branch will be created from the head of the master branch.
"},{"location":"user-guide/prepare-for-release/#launch-the-build-pipeline","title":"Launch the Build Pipeline","text":"
After the new branches are added, open the details page of every application and click the CI link that refers to Jenkins.
Note
The adding of a new branch may take some time. As soon as the new branch is created, it will be displayed in the list of the Branches menu.
To build a new version of a corresponding Docker container (an image stream in OpenShift terms) for the new branch, start the Build pipeline. Being in Jenkins, select the new branch tab and click the link to the Build pipeline.
Navigate to the Build with Parameters option and click the Build button to launch the Build pipeline.
Warning
The predefined default parameters should not be changed when triggering the Build pipeline, otherwise, it will lead to the pipeline failure.
"},{"location":"user-guide/prepare-for-release/#add-a-new-cd-pipeline","title":"Add a New CD Pipeline","text":"
Add a new CD pipeline and indicate the new release branch using the Admin console tool. Pay attention to the Applications menu, the necessary application(s) should be selected there, as well as the necessary branch(es) from the drop-down list.
Note
For the details on how to add a CD pipeline, please refer to the Add CD Pipeline page.
As soon as the Build pipelines are successfully passed in Jenkins, the Docker Registry, which is used in EDP by default, will have the new image streams (Docker container in Kubernetes terms) version that corresponds to the current branch.
Open the Kubernetes/OpenShift page of the project via the Admin Console Overview page \u2192 go to CodebaseImageStream (in OpenShift, go to Builds \u2192 Images) \u2192 check whether the image streams are created under the specific name (the combination of the application and branch names) and the specific tags are added. Click every image stream link.
"},{"location":"user-guide/prepare-for-release/#check-cd-pipeline-structure","title":"Check CD Pipeline Structure","text":"
When the CD pipeline is added through the Admin Console, it becomes available in the CD pipelines list. Every pipeline has the details page with the additional information. To explore the CD pipeline structure, follow the steps below:
Open Admin Console and navigate to Continuous Delivery section, click the newly created CD pipeline name.
Discover the CD pipeline components:
Applications - the list of applications with the image streams and links to Jenkins for the respective branch;
Stages - a set of stages with the defined characteristics and links to Kubernetes/OpenShift project;
Note
Initially, an environment is empty and does not have any deployment unit. When deploying the subsequent stages, the artifacts of the selected versions will be deployed to the current project and the environment will display the current stage status. The project has a standard pattern: \u2039edp-name\u203a-\u2039pipeline-name\u203a-\u2039stage-name\u203a.
Deployed Versions - the deployment status of the specific application and the predefined stage.
"},{"location":"user-guide/prepare-for-release/#launch-cd-pipeline-manually","title":"Launch CD Pipeline Manually","text":"
Follow the steps below to deploy the QA and UAT application stages:
As soon as the Build pipelines for both applications are successfully passed, the new version of the Docker container will appear, thus allowing to launch the CD pipeline. Simply navigate to Continuous Delivery and click the pipeline name to open it in Jenkins.
Click the QA stage link.
Deploy the QA stage by clicking the Build Now option.
After the initialization step starts, in case another menu is opened, the Pause for Input option will appear. Select the application version in the drop-down list and click Proceed. The pipeline passes the following stages:
Init - initialization of the Jenkins pipeline outputs with the stages that are the Groovy scripts that execute the current code;
Deploy - the deployment of the selected versions of the docker container and third-party services. As soon as the Deployed pipeline stage is completed, the respective environment will be deployed.
Approve - the verification stage that enables to Proceed or Abort this stage;
Promote-images - the creation of the new image streams for the current versions with the pattern combination: [pipeline name]-[stage name]-[application name]-[verified];
After all the stages are passed, the new image streams will be created in the Kubernetes/OpenShift with the new names.
Deploy the UAT stage, which takes the versions that were verified during the QA stage, by clicking the Build Now option, and select the necessary application versions. The launch process is the same as for all the deploy pipelines.
To get the status of the pipeline deployment, open the CD pipeline details page and check the Deployed versions state.
"},{"location":"user-guide/prepare-for-release/#cd-pipeline-as-a-team-environment","title":"CD Pipeline as a Team Environment","text":"
Admin Console allows creating a CD pipeline with a part of the application set as a team environment. To do this, perform the following steps;
Open the Continuous Delivery section \u2192 click the Create button \u2192 enter the pipeline name (e.g. team-a) \u2192 select ONE application and choose the master branch for it \u2192 add one DEV stage.
As soon as the CD pipeline is added to the CD pipelines list, its details page will display the links to Jenkins and Kubernetes/OpenShift.
Open Jenkins and deploy the DEV stage by clicking the Build Now option.
Kubernetes/OpenShift keeps an independent environment that allows checking the new versions, thus speeding up the developing process when working with several microservices.
As a result, the team will have the same abilities to verify the code changes when developing and during the release.
The Links section is designed to store all the component references in one place. Additional feature is to display these references directly in the Overview page of the KubeRocketCI portal. Some of the links are also located in the application details and stage details pages. Integrating some of the tools will also make these links clickable.
Navigate to KubeRocketCI -> Configuration -> Links and click the + Create Link button:
Links section
In the appeared window, insert the link name, URL, and SVG icon in base 64 format. Click the checkbox if you want your link to be displayed on the overview page and click Apply:
Create reference menu
If the Show on Overview Page option is selected, the image will be displayed on the Overview page among the other links:
"},{"location":"user-guide/terraform-stages/","title":"CI Pipelines for Terraform","text":""},{"location":"user-guide/terraform-stages/#ci-pipelines-for-terraform","title":"CI Pipelines for Terraform","text":"
EPAM Delivery Platform ensures the implemented Terraform support by adding a separate component type called Infrastructure. The Infrastructure codebase type allows to work with Terraform code that is processed by means of stages in the Code-Review and Build pipelines.
"},{"location":"user-guide/terraform-stages/#pipeline-stages-for-terraform","title":"Pipeline Stages for Terraform","text":"
Under the hood, Infrastructure codebase type, namely Terraform, looks quite similar to other codebase types. The distinguishing characterstic of the Infrastructure codebase type is that there is a stage called terraform-check in both of Code Review and Build pipelines. This stage runs the pre-commit activities which in their turn run the following commands and tools:
Terraform fmt - the first step of the stage is basically the terraform fmt command. The terraform fmt command automatically updates the formatting of Terraform configuration files to follow the standard conventions and make the code more readable and consistent.
Lock provider versions - locks the versions of the Terraform providers used in the project. This ensures that the project uses specific versions of the providers and prevents unexpected changes from impacting the infrastructure due to newer provider versions.
Terraform validate - checks the syntax and validity of the Terraform configuration files. It scans the configuration files for all possible issues.
Terraform docs - generates human-readable documentation for the Terraform project.
Tflint - additional validation step using the tflint linter to provide more in-depth checks in addition to what the terraform validate command does.
Checkov - runs the checkov command against the Terraform codebase to identify any security misconfigurations or compliance issues.
Tfsec - another security-focused validation step using the tfsec command. Tfsec is a security scanner for Terraform templates that detects potential security issues and insecure configurations in the Terraform code.
Note
The commands and their attributes are displayed in the .pre-commit-config.yaml file.
"}]}
\ No newline at end of file
+{"config":{"lang":["en"],"separator":"[\\s\\u200b\\-_,:!=\\[\\]()\"`/]+|\\.(?!\\d)|&[lg]t;|(?!\\b)(?=[A-Z][a-z])","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Home","text":""},{"location":"#welcome-to-the-epam-delivery-platform","title":"Welcome to the EPAM Delivery Platform","text":""},{"location":"compliance/","title":"Compliance","text":""},{"location":"compliance/#compliance","title":"Compliance","text":"
The integrity of your deployments is our paramount commitment. We are devoted to strengthening our Kubernetes platform to comply with the most stringent security standards. Trust is the bedrock of our relationships, and we manifest this commitment by undergoing rigorous third-party audits to ensure compliance. We pledge unwavering support as you manage and deploy solutions within your environment, emphasizing security and reliability. Examine our compliance with various frameworks, laws, and regulations to understand our dedication to upholding robust security standards for the solutions you manage and deploy.
"},{"location":"faq/","title":"FAQ","text":""},{"location":"faq/#faq","title":"FAQ","text":""},{"location":"faq/#how-do-i-set-parallel-reconciliation-for-a-number-of-codebase-branches","title":"How Do I Set Parallel Reconciliation for a Number of Codebase Branches?","text":"
Set the CODEBASE_BRANCH_MAX_CONCURRENT_RECONCILES Env variable in codebase-operator by updating Deployment template. For example:
"},{"location":"faq/#how-to-change-the-lifespan-of-an-access-token-that-is-used-for-edp-portal-and-oidc-login-plugin","title":"How To Change the Lifespan of an Access Token That Is Used for EDP Portal and 'oidc-login' Plugin?","text":"
Change the Access Token Lifespan: go to your Keycloak and select Openshift realm > Realm settings > Tokens > Access Token Lifespan > set a new value to the field and save this change.
By default, \"Access Token Lifespan\" value is 5 minutes.
Consult EDP Glossary section for definitions mentioned on this page and EDP Toolset to have a full list of tools used with the Platform. The below table contains a full list of features provided by EDP.
Features Description Cloud Agnostic EDP runs on Kubernetes cluster, so any Public Cloud Provider which provides Kubernetes can be used. Kubernetes clusters deployed on-premises work as well CI/CD for Microservices EDP is initially designed to support CI/CD for Microservices running as containerized applications inside Kubernetes Cluster. EDP also supports CI for:- Terraform Modules, - Open Policy Rules,- Workflows for Java (8,11,17), JavaScript (React, Vue, Angular, Express, Antora), C# (.NET 6.0), Python (FastAPI, Flask, 3.8), Go (Beego, Operator SDK) Version Control System (VCS) EDP installs Gerrit as a default Source Code Management (SCM) tool. EDP also supports GitHub and GitLab integration Branching Strategy EDP supports Trunk-based development as well as GitHub/GitLab flow. EDP creates two Pipelines per each codebase branch: Code Review and Build Repository Structure EDP provides separate Git repository per each Codebase and doesn't work with Monorepo. However, EDP does support customization and runs helm-lint, dockerfile-lint steps using Monorepo approach. Artifacts Versioning EDP supports two approaches for Artifacts versioning: - default (BRANCH-[TECH_STACK_VERSION]-BUILD_ID)- EDP (MAJOR.MINOR.PATCH-BUILD_ID), which is SemVer.Custom versioning can be created by implementing get-version stage Application Library EDP provides baseline codebase templates for Microservices, Libraries, within create strategy while onboarding new Codebase Stages Library Each EDP Pipeline consists of pre-defined steps (stages). CI Pipelines EDP provides CI Pipelines for first-class citizens: - Applications (Microservices) based on Java (8,11,17), JavaScript (React, Vue, Angular, Express, Antora, Next.js), C# (.NET 3.1, .NET 6.0), Python (FastAPI, Flask, 3.8), Go (Beego, Gin, Operator SDK), Helm (Charts, Pipeline)- Libraries based on Java (8,11,17), JavaScript (React, Vue, Angular, Express), Python (FastAPI, Flask, 3.8), Groovy Pipeline (Codenarc), HCL (Terraform), Rego (OPA), Container (Docker), Helm (Charts, Pipeline), C#(.NET 3.1, .NET 6.0) - Autotests based on Java8, Java11, Java17 CD Pipelines EDP provides capabilities to design CD Pipelines (in EDP Portal UI) for Microservices and defines logic for artifacts flow (promotion) from env to env. Artifacts promotion is performed automatically (Autotests), manually (User Approval) or combining both approaches Autotests EDP provides CI pipeline for autotest implemented in Java. Autotests can be used as Quality Gates in CD Pipelines Custom Pipeline Library EDP can be extended by introducing Custom Pipeline Library Dynamic Environments Each EDP CD Pipeline creates/destroys environment upon user requests"},{"location":"glossary/","title":"Glossary","text":""},{"location":"glossary/#glossary","title":"Glossary","text":"
Get familiar with the definitions and context for the most useful EDP terms presented in table below.
Terms Details EDP Component - an item used in CI/CD process EDP Portal UI - an EDP component that helps to manage, set up, and control the business entities. Artifactory - an EDP component that stores all the binary artifacts. NOTE: Nexus is used as a possible implementation of a repository. CI/CD Server - an EDP component that launches pipelines that perform the build, QA, and deployment code logic. NOTE: Tekton is used as a possible implementation of a CI/CD server. Code Review tool - an EDP component that collaborates with the changes in the codebase. NOTE: Gerrit is used as a possible implementation of a code review tool. Identity Server - an authentication server providing a common way to verify requests to all of the applications. NOTE: Keycloak is used as a possible implementation of an identity server. Security Realm Tenant - a realm in identity server (e.g Keycloak) where all users' accounts and their access permissions are managed. The realm is unique for the identity server instance. Static Code Analyzer - an EDP component that inspects continuously a code quality before the necessary changes appear in a master branch. NOTE: SonarQube is used as a possible implementation of a static code analyzer. VCS (Version Control System) - a replication of the Gerrit repository that displays all the changes made by developers. NOTE: GitHub and GitLab are used as the possible implementation of a repository with the version control system. EDP Business Entity - a part of the CI/CD process (the integration, delivery, and deployment of any codebase changes) Application - a codebase type that is built as the binary artifact and deployable unit with the code that is stored in VCS. As a result, the application becomes a container and can be deployed in an environment. Autotests - a codebase type that inspects a product (e.g. an application set) on a stage. Autotests are not deployed to any container and launched from the respective code stage. CD Pipeline (Continuous Delivery Pipeline) - an EDP business entity that describes the whole delivery process of the selected application set via the respective stages. The main idea of the CD pipeline is to promote the application version between the stages by applying the sequential verification (i.e. the second stage will be available if the verification on the first stage is successfully completed). NOTE: The CD pipeline can include the essential set of applications with its specific stages as well. CD Pipeline Stage - an EDP business entity that is presented as the logical gate required for the application set inspection. Every stage has one OpenShift project where the selected application set is deployed. All stages are sequential and promote applications one-by-one. Codebase - an EDP business entity that possesses a code. Codebase Branch - an EDP business entity that represents a specific version in a Git branch. Every codebase branch has a Codebase Docker Stream entity. Codebase Docker Stream - a deployable component that leads to the application build and displays that the last build was verified on the specific stage. Every CD pipeline stage accepts a set of Codebase Docker Streams (CDS) that are input and output. SAMPLE: if an application1 has a master branch, the input CDS will be named as [app name]-[pipeline name]-[stage name]-[master] and the output after the passing of the DEV stage will be as follows: [app name]-[pipeline name]-[stage name]-[dev]-[verified]. Git Server - a custom resource that is responsible for integration with Version Control System (VCS), whether it is GitHub, GitLab or Gerrit. Infrastructure - a codebase type that is used to define and manage the underlying infrastructure of projects using the Infrastructure as Code (IaC) approach, ensuring consistency and reproducibility. Library - a codebase type that is built as the binary artifact, i.e. it`s stored in the Artifactory and can be uploaded by other applications, autotests or libraries. Quality Gate - an EDP business entity that represents the minimum acceptable results after the testing. Every stage has a quality gate that should be passed to promote the application. The stage quality gate can be a manual approve from a QA specialist OR a successful autotest launch. Quality Gate Type - this value defines trigger type that promotes artifacts (images) to the next environment in CD Pipeline. There are manual and automatic types of quality gates. The manual type means that the promoting process should be confirmed in Tekton. The automatic type promotes the images automatically in case there are no errors in the Allure Report. NOTE: If any of the test types is not passed, the CD pipeline will fail. Trigger Type - a value that defines a trigger type used for the CD pipeline triggering. There are manual and automatic types of triggering. The manual type means that the CD pipeline should be triggered manually. The automatic type triggers the CD pipeline automatically as soon as the Codebase Docker Stream was changed. Automated Tests - different types of automated tests that can be run on the environment for a specific stage. Build Pipeline - a Tekton pipeline that builds a corresponding codebase branch in the Codebase. Build Stage - a stage that takes place after the code has been submitted/merged to the repository of the main branch (the pull request from the feature branch is merged to the main one, the Patch set is submitted in Gerrit). Code Review Pipeline - a Tekton pipeline that inspects the code candidate in the Code Review tool. Code Review Stage - a stage where code is reviewed before it goes to the main branch repository of the version control system (the commit to the feature branch is pushed, the Patch set is created in Gerrit). Deploy Pipeline - a Tekton pipeline that is responsible for the CD Pipeline Stage deployment with the full set of applications and autotests. Deployment Stage - a part of the Continuous Delivery where artifacts are being deployed to environments. EDP CI Pipelines - an orchestrator for stages that is responsible for the common technical events, e.g. initialization, in Tekton pipeline. Environment - a part of the stage where the built and packed into an image application are deployed for further testing. It`s possible to deploy several applications to several environments (Team and Integration environments) within one stage. Team Environment - an environment type that can be deployed at any time by the manual trigger of the Deploy pipeline where team or developers can check out their applications. NOTE: The promotion from such kind of environment is prohibited and developed only for the local testing. OpenShift / Kubernetes (K8S) ConfigMap - a resource that stores configuration data and processes the strings that do not contain sensitive information. Docker Container - is a lightweight, standalone, and executable package. Docker Registry - a store for the Docker Container that is created for the application after the Build pipeline performance. OpenShift Web Console - a web console that enables to view, manage, and change OpenShift / K8S resources using browser. Operator Framework - a deployable unit in OpenShift that is responsible for one or a set of resources and performs its life circle (adding, displaying, and provisioning). Path - a route component that helps to find a specified path (e.g. /api) at once and skip the other. Pod - the smallest deployable unit of the large microservice application that is responsible for the application launch. The pod is presented as the one launched Docker container. When the Docker container is collected, it will be kept in Docker Registry and then saved as Pod in the OpenShift project. NOTE: The Deployment Config is responsible for the Pod push, restart, and stop processes. PV (Persistent Volume) - a cluster resource that captures the details of the storage implementation and has an independent lifecycle of any individual pod. PVC (Persistent Volume Claim) - a user request for storage that can request specific size and access mode. PV resources are consumed by PVCs. Route - a resource in OpenShift that allows getting the external access to the pushed application. Secret - an object that stores and manages all the sensitive information (e.g. passwords, tokens, and SSH keys). Service - an external connection point with Pod that is responsible for the network. A specific Service is connected to a specific Pod using labels and redirects all the requests to Pod as well. Site - a route component (link name) that is created from the indicated application name and applies automatically the project name and a wildcard DNS record."},{"location":"overview/","title":"Overview","text":""},{"location":"overview/#overview","title":"Overview","text":"
EPAM Delivery Platform (EDP) is an open-source cloud-agnostic SaaS/PaaS solution for software development, licensed under Apache License 2.0. It provides a pre-defined set of CI/CD patterns and tools, which allow a user to start product development quickly with established code review, release, versioning, branching, build processes. These processes include static code analysis, security checks, linters, validators, dynamic feature environments provisioning. EDP consolidates the top Open-Source CI/CD tools by running them on Kubernetes/OpenShift, which enables web/app development either in isolated (on-prem) or cloud environments.
EPAM Delivery Platform, which is also called \"The Rocket\", is a platform that allows shortening the time that is passed before an active development can be started from several months to several hours.
EDP consists of the following:
The platform based on managed infrastructure and container orchestration
Security covering authentication, authorization, and SSO for platform services
Development and testing toolset
Well-established engineering process and EPAM practices (EngX) reflected in CI/CD pipelines, and delivery analytics
EPAM Delivery Platform (EDP) is suitable for all aspects of delivery starting from development including the capability to deploy production environment. EDP architecture is represented on a diagram below.
Architecture
EDP consists of four cross-cutting concerns:
Infrastructure as a Service;
GitOps approach;
Container orchestration and centralized services;
Security.
On the top of these indicated concerns, EDP adds several blocks that include:
EDP CI/CD Components. EDP component enables a feature in CI/CD or an instance artifacts storage and distribution (Nexus or Artifactory), static code analysis (Sonar), etc.;
EDP Artifacts. This element represents an artifact that is being delivered through EDP and presented as a code.
Artifact samples: frontend, backend, mobile, applications, functional and non-functional autotests, workloads for 3rd party components that can be deployed together with applications.
EDP development and production environments that share the same logic. Environments wrap a set of artifacts with a specific version, and allow performing SDLC routines in order to be sure of the artifacts quality;
Pipelines. Pipelines cover CI/CD process, production rollout and updates. They also connect three elements indicated above via automation allowing SDLC routines to be non-human;
The EDP IaaS layer supports most popular public clouds AWS, Azure and GCP keeping the capability to be deployed on private/hybrid clouds based on OpenStack. EDP containers are based on Docker technology, orchestrated by Kubernetes compatible solutions.
There are two main options for Kubernetes provided by EDP:
Managed Kubernetes in Public Clouds to avoid installation and management of Kubernetes cluster, and get all benefits of scaling, reliability of this solution;
OpenShift that is a Platform as a Service on the top of Kubernetes from Red Hat. OpenShift is the default option for on-premise installation and it can be considered whether the solution built on the top of EDP should be cloud-agnostic or require enterprise support;
There is no limitation to run EDP on vanilla Kubernetes.
Build Community around technology solutions EDP is built on
"},{"location":"roadmap/#deliver-operators-on-operatorhub","title":"Deliver Operators on OperatorHub","text":"
OperatorHub is a defacto leading solution which consolidates Kubernetes Community around Operators. EDP follows the best practices of delivering Operators in a quick and reliable way. We want to improve Deployment and Management experience for our Customers by publishing all EDP operators on this HUB.
Another artifact aggregator which is used by EDP - ArtifactHub, that holds description for both components: stable and under-development.
OperatorHub. Keycloak Operator
EDP Keycloak Operator is now available from OperatorHub both for Upstream (Kubernetes) and OpenShift deployments.
Multiple instances of EDP are run in a single Kubernetes cluster. One way to achieve this is to use Multitenancy. Initially, Kiosk was selected as tools that provides this capability. An alternative option that EDP Team took into consideration is Capsule. Another tool which goes far beyond multitenancy is vcluster going a good candidate for e2e testing scenarios where one needs simple lightweight kubernetes cluster in CI pipelines.
EDP Release 3.5.3
The EPAM Delivery Platform (EDP) has added Capsule as a general tenant management solution for Kubernetes. Capsule is an open-source operator that enables you to create and manage multiple tenants on a shared Kubernetes cluster, while ensuring resource isolation, security, and governance.
EDP Release 3.5.3
Vcluster is actively used in EDP for e2e testing purposes.
EDP provides basic Application Templates for a number of technology stacks (Java, .Net, NPM, Python) and Helm is used as a deployment tool. The goal is to extend this library and provide: Application Templates which are built on pre-defined architecture patterns (e.g., Microservice, API Gateway, Circuit Breaker, CQRS, Event Driven) and Deployment Approaches: Canary, Blue/Green. This requires additional tools installation on cluster as well.
"},{"location":"roadmap/#policy-enforcement-for-kubernetes","title":"Policy Enforcement for Kubernetes","text":"
Running workload in Kubernetes calls for extra effort from Cluster Administrators to ensure those workloads do follow best practices or specific requirements defined on organization level. Those requirements can be formalized in policies and integrated into: CI Pipelines and Kubernetes Cluster (through Admission Controller approach) - to guarantee proper resource management during development and runtime phases. EDP uses Open Policy Agent (from version 2.8.0), since it supports compliance check for more use-cases: Kubernetes Workloads, Terraform and Java code, HTTP APIs and many others. Kyverno is another option being checked in scope of this activity.
EDP should provide secrets management as a part of platform. There are multiple tools providing secrets management capabilities. The aim is to be aligned with GitOps and Operator Pattern approaches so HashiCorp Vault, Banzaicloud Bank Vaults, Bitnami Sealed Secrets are currently used for internal projects and some of them should be made publicly available - as a part of EDP Deployment.
EDP Release 2.12.x
External Secret Operator is a recommended secret management tool for the EDP components.
Conventional Commits and Conventional Changelog are two approaches to be used as part of release process. Today EDP provides only capabilities to manage Release Branches. This activity should address this gap by formalizing and implementing Release Process as a part of EDP. Topics to be covered: Versioning, Tagging, Artifacts Promotion.
EDP has deprecated Jenkins in favour of Tekton. Jenkins is no longer available since EDP v3.4.4.
EDP Release 2.12.x
Argo CD is suggested as a solution providing the Continuous Delivery capabilities.
EDP Release 3.0
Tekton is used as a CI/CD pipelines orchestration tool on the platform. Review edp-tekton GitHub repository that keeps all the logic behind this solution on the EDP (Pipelines, Tasks, TriggerTemplates, Interceptors, etc). Get acquainted with the series of publications on our Medium Page.
EDP has a number of base roles which are used across EDP. In some cases it is necessary to provide more granular permissions for specific users. It is possible to do this using Kubernetes Native approach.
EDP has a number of components which need to report their statuses: Build/Code Review/Deploy Pipelines, changes in Environments, updates with artifacts. The goal for this activity is to onboard Kubernetes Native approach which provides Notification capabilities with different sources/channels integration (e.g. Email, Slack, MS Teams). Some of these tools are Argo Events, Botkube.
Persistent layer, which is based on edp-db (PostgreSQL) and reconciler component should be retired in favour of Kubernetes Custom Resource (CR). The latest features in EDP are implemented using CR approach.
EDP Release 3.0
Reconciler component is deprecated and is no longer supported. All the EDP components are migrated to Kubernetes Custom Resources (CR).
"},{"location":"roadmap/#iii-building-blocks","title":"III. Building Blocks","text":"
Goals:
Introduce best practices from Microservice Reference Architecture deployment and observability using Kubernetes Native Tools
Enable integration with the Centralized Test Reporting Frameworks
Onboard SAST/DAST tool as a part of CI pipelines and Non-Functional Testing activities
EDP Release 2.12.x
SAST is introduced as a mandatory part of the CI Pipelines. The list of currently supported SAST scanners.
"},{"location":"roadmap/#infrastructure-as-code","title":"Infrastructure as Code","text":"
EDP Target tool for Infrastructure as Code (IaC) is Terraform. EDP sees two CI/CD scenarios while working with IaC: Module Development and Live Environment Deployment. Today, EDP provides basic capabilities (CI Pipelines) for Terraform Module Development. At the same time, currently EDP doesn't provide Deployment pipelines for Live Environments and the feature is under development. Terragrunt is an option to use in Live Environment deployment. Another Kubernetes Native approach to provision infrastructure components is Crossplane.
One of the challenges for Application running in Kubernetes is to manage database schema. There are a number of tools which provides such capabilities, e.g. Liquibase, Flyway. Both tools provide versioning control for database schemas. There are different approaches on how to run migration scripts in Kubernetes: in init container, as separate Job or as a separate CD stage. Purpose of this activity is to provide database schema management solution in Kubernetes as a part of EDP. EDP Team investigates SchemaHero tool and use-cases which suits Kubernetes native approach for database schema migrations.
Open Policy Agent is introduced in version 2.8.0. EDP now supports CI for Rego Language, so you can develop your own policies. The next goal is to provide pipeline steps for running compliance policies check for Terraform, Java, Helm Chart as a part of CI process.
Velero is used as a cluster backup tool and is deployed as a part of Platform. Currently, Multitenancy/On-premise support for backup capabilities is in process.
Kong is one of tools which is planned to use as an API Gateway solution provider. Another possible candidate for investigation is Ambassador API Gateway
EDP Platform runs on the latest OKD versions: 4.9 and 4.10. Creating the IAM Roles for Service Account is a recommended way to work with AWS Resources from the OKD cluster.
Improve U\u0425 for different user types to address their concerns in the delivery model
Introduce user management capabilities
Enrich with traceability metrics for products
EDP Release 2.12.x
EDP Team has introduced a new UI component called EDP Headlamp, which will replace the EDP Admin Console in future releases. EDP Headlamp is based on the Kinvolk Headlamp UI Client.
EDP Release 3.0
EDP Headlamp is used as a Control Plane UI on the platform.
EDP Release 3.4
Since EDP v3.4.0, Headlamp UI has been renamed to EDP Portal.
EDP uses Keycloak as an Identity and Access provider. EDP roles/groups are managed inside the Keycloak realm, then these changes are propagated across the EDP Tools. We plan to provide this functionality in EDP Portal using the Kubernetes-native approach (Custom Resources).
The CD Pipeline section in EDP Portal provides basic information, such as environments, artifact versions deployed per each environment, and direct links to the namespaces. One option is to enrich this panel with metrics from the Prometheus, custom resources, or events. Another option is to use the existing dashboards and expose EDP metrics to them, for example, plugin for Lens or OpenShift UI Console.
"},{"location":"roadmap/#split-jira-and-commit-validation-sections","title":"Split Jira and Commit Validation Sections","text":"
Commit Validate step was designed to be aligned with Jira Integration and cannot be used as single feature. Target state is to ensure features CommitMessage Validation and Jira Integration both can be used independently. We also want to add support for Conventional Commits.
EDP Release 3.2.0
EDP Portal has separate sections for Jira Integration and CommitMessage Validation step.
"},{"location":"roadmap/#v-documentation-as-code","title":"V. Documentation as Code","text":"
Goals:
Transparent documentation and clear development guidelines for EDP customization.
Components that provide Documentation as Code feature should be integrated into EDP.
EDP Release 3.4.0
Antora was introduced as framework that provides Documentation as Code capabilities.
Consolidate documentation in a single repository edp-install, use mkdocs tool to generate docs and GitHub Pages as a hosting solution.
"},{"location":"supported-versions/","title":"Supported Versions and Compatibility","text":""},{"location":"supported-versions/#supported-versions-and-compatibility","title":"Supported Versions and Compatibility","text":"
At the EPAM Delivery Platform, our commitment to providing a robust and reliable service involves supporting the latest innovations while ensuring stability and security. To maintain this balance, we focus our active support on our platform's three most recent versions. This approach allows us to dedicate our resources to delivering cutting-edge features, enhancing performance, and fortifying security measures while ensuring a consistent and optimized user experience across the platform.
By concentrating our support on the last three versions, we prioritize staying current with evolving technology landscapes. This enables us to swiftly adapt to advancements in Kubernetes and OpenShift environments, incorporating the latest enhancements, fixes, and optimizations into our platform.
This support model not only fosters innovation but also enables us to deliver a secure, high-performing, and dependable EPAM Delivery Platform that meets the dynamic needs of our users and exceeds expectations for reliability and functionality.
Get acquainted with the list of the latest releases and component versions on which the platform is tested and verified:
Professional Services
You can leverage our professional services to upgrade your platform to the latest version or perform migration from Unsupported to Supported versions.
EDP Release Version Release Date EKS Version OpenShift Version 3.8 Mar 12, 2024 1.26 4.12 3.7 Dec 15, 2023 1.26 4.12 3.6 Nov 03, 2023 1.26 4.12 3.5 Sep 21, 2023 1.26 4.12 3.4 Aug 18, 2023 1.26 4.12 3.3 May 25, 2023 1.26 4.12 3.2 Mar 26, 2023 1.23 4.10 3.1 Jan 24, 2023 1.23 4.10 3.0 Dec 19, 2022 1.23 4.10"},{"location":"developer-guide/","title":"Overview","text":""},{"location":"developer-guide/#overview","title":"Overview","text":"
The EPAM Delivery Platform (EDP) Developer Guide serves as a comprehensive technical resource specifically designed for developers. It offers detailed insights into expanding the functionalities of EDP. This section focuses on explaining the development approach and fundamental architectural blueprints that form the basis of the platform's ecosystem.
Within these pages, you'll find architectural diagrams, component schemas, and deployment strategies essential for grasping the structural elements of EDP. These technical illustrations serve as references, providing a detailed understanding of component interactions and deployment methodologies. Understanding the architecture of EDP and integrating third-party solutions into its established framework enables the creation of efficient, scalable, and customizable solutions within the EPAM Delivery Platform.
The diagram below illustrates how GitHub repositories and Docker registries are interconnected within the EDP ecosystem.
Core componentsCore componentscodebase-operatorcodebase-operatorcd-pipeline-operatorcd-pipeline-operatorEDP Portal(edp-headlamp)EDP Portal...nexus-operatornexus-operatorsonar-operatorsonar-operatorkeycloak-operatorkeycloak-operatoredp-tektonedp-tektonedp-installedp-installClick the IconsText is not SVG - cannot display
As a publicly available product, the EPAM Delivery Platform relies on various channels to share information, gather feedback, and distribute new releases effectively. This section outlines the diverse channels through which users can engage with our platform and stay informed about the latest developments and enhancements.
Our product is presented on AWS and Civo marketplaces. It's essential to ensure that the product information on these platforms is up-to-date and accurately reflects the latest version of our software:
Our platform components, optional enhancements, add-ons, and deployment resources are hosted on GitHub repositories. Explore the following repositories to access the source code of components.
To maintain an active presence on social media channels and share valuable content about our software releases, we continuously publish materials across the following media:
SolutionsHub
Medium
YouTube
"},{"location":"developer-guide/annotations-and-labels/","title":"Annotations and Labels","text":""},{"location":"developer-guide/annotations-and-labels/#annotations-and-labels","title":"Annotations and Labels","text":"
EPAM Delivery Platform uses labels to interact with various resources in a Kubernetes cluster. This guide details the resources, annotations, and labels used by the platform to streamline operations, enhance monitoring, and enforce governance.
The table below contains all the labels used in EDP:
Label Key Target Resources Possible Values Description app.edp.epam.com/secret-type Secrets jira, nexus, sonar, defectdojo, dependency-track,repository Identifies the type of the secret. app.edp.epam.com/integration-secret Secrets true Indicates if the secret is used for integration. app.edp.epam.com/codebase PipelineRun <codebase_name> Identifies the codebase associated with the PipelineRun. app.edp.epam.com/codebasebranch PipelineRun <codebase_name>-<branch_name> Identifies the codebase branch associated with the PipelineRun. app.edp.epam.com/pipeline PipelineRun, Taskrun <environment_name> Used by the EDP Portal to display autotests status(on Deploy environment) app.edp.epam.com/pipelinetype PipelineRun, Taskrun autotestRunner, build, review, deploy Identifies the type of the Pipeline. app.edp.epam.com/parentPipelineRun PipelineRun <cd-pipeline-autotest-runner-name> Used by the EDP Portal to display autotests status(on Deploy environment) app.edp.epam.com/stage PipelineRun, Taskrun <stage_name> Used by the EDP Portal to display autotests status(on Deploy environment) app.edp.epam.com/branch PipelineRun <branch_name> Identifies the branch associated with the PipelineRun. app.edp.epam.com/codebaseType Codebase system,application Identify the type of the codebase. app.edp.epam.com/systemType Codebase gitops Identify system repositories. app.edp.epam.com/gitServer Ingress <gitServer_name> Identifies the ingress associated with the GitServer. app.edp.epam.com/cdpipeline PipelineRun, Taskrun <cdpipeline> Identify cd pipeline associated with the PipelineRun app.edp.epam.com/cdstage PipelineRun, Taskrun <cd_stage_name> Identify cd stage associated with the PipelineRun"},{"location":"developer-guide/annotations-and-labels/#labels-usage-in-secrets","title":"Labels Usage in Secrets","text":"
The table below shows what labels are used by specific secrets:
The list of all the tasks associated with the demo codebase is presented below:
Task Name Labels init-autotest app.edp.epam.com/pipeline: mypipe app.edp.epam.com/pipelinetype: autotestRunner app.edp.epam.com/stage: dev run-autotest app.edp.epam.com/branch: master app.edp.epam.com/codebase: autotests app.edp.epam.com/parentPipelineRun: mypipe-dev-<hash> app.edp.epam.com/pipeline: mypipe app.edp.epam.com/stage: dev wait-for-autotests app.edp.epam.com/pipeline: mypipe app.edp.epam.com/pipelinetype: autotestRunner app.edp.epam.com/stage: dev promote-images app.edp.epam.com/pipeline: mypipe app.edp.epam.com/pipelinetype: autotestRunner app.edp.epam.com/stage: dev"},{"location":"developer-guide/autotest-coverage/","title":"Quality Control","text":""},{"location":"developer-guide/autotest-coverage/#quality-control","title":"Quality Control","text":"
In EPAM Delivery Platform, we guarantee the quality of the product not only by using the most advanced tools and best practices but also by covering the whole product functionality with our dedicated automated tests.
Autotests are significant part of our verification flow. Continuous improvement of the verification mechanisms quality is performed to provide users with the most stable version of the platform.
The autotest coverage status is presented on the scheme below:
In our testing flow, each release is verified by the following tests:
Test Group Description What's Covered API Tests Tekton Gerrit, GitHub, and GitLab API long regression Codebase provisioning, reviewing and building pipelines, adding new branches, deploying applications (in a custom namespace), Jira integration, and rechecking for review pipeline. UI Tests Tekton Gerrit, GitHub, and GitLab UI long regression Codebase provisioning, reviewing and building pipelines, adding new branches, deploying applications (in a custom namespace), Jira integration, and rechecking for review pipeline. Short Tests Tekton Gerrit , GitHub, and GitLab API short regression Codebase provisioning, reviewing and building pipelines, deploying applications (in a custom namespace), rechecking for review pipeline Smoke Tekton Gerrit Smoke Codebase provisioning, reviewing and building pipelines, deploying applications."},{"location":"developer-guide/autotest-coverage/#related-articles","title":"Related Articles","text":"
EDP Project Rules. Working Process
Operator Development
"},{"location":"developer-guide/aws-deployment-diagram/","title":"EDP Deployment on AWS","text":""},{"location":"developer-guide/aws-deployment-diagram/#edp-deployment-on-aws","title":"EDP Deployment on AWS","text":"
This document describes the EPAM Delivery Platform (EDP) deployment architecture on AWS. It utilizes various AWS services such as Amazon Elastic Kubernetes Service (EKS), Amazon EC2, Amazon Route 53, and others to build and deploy software in a repeatable, automated way.
The EDP deployment architecture consists of two AWS accounts: Shared and Explorer. The Shared account hosts shared services, while the Explorer account runs the development team workload and EDP services. Both accounts have an AWS EKS cluster deployed in multiple Availability Zones (AZs). The EKS cluster runs the EDP Services, development team workload, and shared services in the case of the Shared account.
AWS Elastic Kubernetes Service (EKS): A managed Kubernetes service used to run the EDP Services, development team workload, and shared services. EKS provides easy deployment and management of Kubernetes clusters.
Amazon EC2: Instances running within private subnets that serve as nodes for the EKS cluster. Autoscaling Groups are used to deploy these instances, allowing for scalability based on demand.
Amazon Route 53: A DNS web service manages external and internal DNS records for the EDP deployment. It enables easy access to resources using user-friendly domain names.
AWS Application Load Balancer (ALB): Used for managing ingress traffic into the EDP deployment. Depending on requirements, ALBs can be configured as internal or external load balancers.
AWS WAF: Web Application Firewall service used to protect external ALBs from common web exploits by filtering malicious requests.
AWS Certificate Manager (ACM): A service that provisions manages, and deploys SSL/TLS certificates for use with AWS services. ACM is used to manage SSL certificates for secure communication within the EDP deployment.
AWS Elastic Container Registry (ECR): A fully-managed Docker container registry that stores and manages Docker images. ECR provides a secure and scalable solution for storing container images used in the EDP deployment.
AWS Systems Manager Parameter Store: Used to securely store and manage secrets required by various components of the EDP deployment. Parameter Store protects sensitive information such as API keys, database credentials, and other secrets.
"},{"location":"developer-guide/aws-deployment-diagram/#high-availability-and-fault-tolerance","title":"High Availability and Fault Tolerance","text":"
The EKS cluster is deployed across multiple AZs to ensure high availability and fault tolerance. This allows for automatic failover in case of an AZ outage or instance failure. Autoscaling Groups automatically adjust the number of EC2 instances based on demand, ensuring scalability while maintaining availability.
The EPAM Delivery Platform (EDP) deployment architecture on AWS follows best practices and patterns from the Well-Architected Framework. By leveraging AWS services such as EKS, EC2, Route 53, ALB, WAF, ACM, and Parameter Store, the EDP provides a robust and scalable CI/CD system that enables developers to deploy and manage infrastructure and applications quickly. The architecture ensures high availability, fault tolerance, reliability, performance efficiency, security, and cost optimization for the EDP deployment.
"},{"location":"developer-guide/aws-reference-architecture/","title":"EDP Reference Architecture on AWS","text":""},{"location":"developer-guide/aws-reference-architecture/#edp-reference-architecture-on-aws","title":"EDP Reference Architecture on AWS","text":"
The reference architecture of the EPAM Delivery Platform (EDP) on AWS is designed to provide a robust and scalable CI/CD system for developing and deploying software in a repeatable and automated manner. The architecture leverages AWS Managed Services to enable developers to quickly deploy and manage infrastructure and applications. EDP recommends to follow the best practices and patterns from the Well-Architected Framework, the AWS Architecture Center, and EKS Best Practices Guide.
The AWS Cloud comprises three accounts: Production, Shared, and Development.
Note
AWS Account management is out of scope for this document.
Each account serves specific purposes:
The Production account is used to host production workloads. The Production account serves as the final destination for deploying business applications. It maintains a separate ECR registry to store Docker images for production-level applications. The environment is designed to be highly resilient and scalable, leveraging the EPAM Delivery Platform's CI/CD pipeline to ensure consistent and automated deployments. With proper access control and separation from development environments, the Production account provides a stable and secure environment for running mission-critical applications.
The Development account is dedicated to development workload and lower environments. This account hosts the EDP itself, running on AWS EKS. It provides developers an isolated environment to build, test, and deploy their applications in lower environments, ensuring separation from production workloads. Developers can connect to the AWS Cloud using a VPN, enforcing secure access.
The Shared holds shared services that are accessible to all accounts within the organization. These services include SonarQube, Nexus, and Keycloak, which are deployed in Kubernetes Clusters managed by AWS Elastic Kubernetes Service (EKS). The shared services leverage AWS RDS, AWS EFS, and AWS ALB/NLB. The deployment of the shared services is automated using Kubernetes cluster-addons approach with GitOps and Argo CD.
EPAM Delivery Platform Reference Architecture on AWS
"},{"location":"developer-guide/aws-reference-architecture/#infrastructure-as-code","title":"Infrastructure as Code","text":"
Infrastructure as Code (IaC) is a key principle in the EPAM Delivery Platform architecture. Terraform is the IaC tool to provision and manage all services in each account. AWS S3 and AWS DynamoDB serve as the backend for Terraform state, ensuring consistency and reliability in the deployment process. This approach enables the architecture to be version-controlled and allows for easy replication and reproducibility of environments.
The architecture utilizes AWS Elastic Container Registry (ECR) as a Docker Registry for container image management. ECR offers a secure, scalable, and reliable solution for storing and managing container images. It integrates seamlessly with other AWS services and provides a highly available and durable storage solution for containers in the CI/CD pipeline.
"},{"location":"developer-guide/aws-reference-architecture/#iam-roles-for-service-accounts-irsa","title":"IAM Roles for Service Accounts (IRSA)","text":"
The EPAM Delivery Platform implements IAM Roles for Service Accounts (IRSA) to provide secure access to AWS services from Kubernetes Clusters. This feature enables fine-grained access control with individual Kubernetes pods assuming specific IAM roles for authenticated access to AWS resources. IRSA eliminates the need for managing and distributing access keys within the cluster, significantly enhancing security and reducing operational complexity.
The architecture uses the AWS Certificate Manager (ACM) to secure communication between services to provide SSL certificates. ACM eliminates the need to manually manage SSL/TLS certificates, automating the renewal and deployment process. The EDP ensures secure and encrypted traffic within its environment by leveraging ACM.
The architecture's external Application Load Balancer (ALB) endpoint is protected by the AWS Web Application Firewall (WAF). WAF protects against common web exploits and ensures the security and availability of the applications hosted within the EDP. It offers regular rule updates and easy integration with other AWS services.
"},{"location":"developer-guide/aws-reference-architecture/#parameter-store-and-secrets-manager","title":"Parameter Store and Secrets Manager","text":"
The architecture leverages the AWS Systems Manager Parameter Store and Secrets Manager to securely store and manage all secrets and parameters utilized within the EKS clusters\u2014parameter Store stores general configuration information, such as database connection strings and API keys. In contrast, Secrets Manager securely stores sensitive information, such as passwords and access tokens. By centralizing secrets management, the architecture ensures proper access control and reduces the risk of unauthorized access.
"},{"location":"developer-guide/aws-reference-architecture/#observability-and-monitoring","title":"Observability and Monitoring","text":"
For observability and monitoring, the EDP leverages a suite of AWS Managed Services designed to provide comprehensive insights into the performance and health of applications and infrastructure:
AWS CloudWatch is utilized for monitoring and observability, offering detailed insights into application and infrastructure performance. It enables real-time monitoring of logs, metrics, and events, facilitating proactive issue resolution and performance optimization.
AWS OpenSearch Service (successor to Amazon Elasticsearch Service) provides powerful search and analytics capabilities. It allows for the analysis of log data and metrics, supporting enhanced application monitoring and user experience optimization.
AWS Managed Grafana offers a scalable, secure, and fully managed Grafana service, enabling developers to create and share dashboards for visualizing real-time data.
AWS Prometheus Service, a managed Prometheus-compatible monitoring service, is used for monitoring Kubernetes and container environments. It supports powerful queries and provides detailed insights into container and microservices architectures.
The reference architecture of the EPAM Delivery Platform on AWS provides a comprehensive and scalable environment for building and deploying software applications. With a strong focus on automation, security, and best practices, this architecture enables developers to leverage the full potential of AWS services while following industry-standard DevOps practices.
"},{"location":"developer-guide/edp-workflow/","title":"EDP Project Rules. Working Process","text":""},{"location":"developer-guide/edp-workflow/#edp-project-rules-working-process","title":"EDP Project Rules. Working Process","text":"
This page contains the details on the project rules and working process for EDP team and contributors. Explore the main points about working with Gerrit, following the main commit flow, as well as the details about commit types and message below.
Before starting the development, please check the project rules:
It is highly recommended to become familiar with the Gerrit flow. For details, please refer to the Gerrit official documentation and pay attention to the main points:
a. Voting in Gerrit.
b. Resolution of Merge Conflict.
c. Comments resolution.
d. One Jira task should have one Merge Request (MR). If there are many changes within one MR, add the next patch set to the open MR by selecting the Amend commit check box.
Only the Assignee is responsible for the MR merge and Jira task status.
With EDP, the main workflow is based on the getting a Jira task and creating a Merge Request according to the rules described below.
Workflow
Get Jira task \u2192 implement, verify by yourself the results \u2192 create Merge Request (MR) \u2192 send for review \u2192 resolve comments/add changes, ask colleagues for the final review \u2192 track the MR merge \u2192 verify by yourself the results \u2192 change the status in the Jira ticket to CODE COMPLETE or RESOLVED \u2192 share necessary links with a QA specialist in the QA Verification channel \u2192 QA specialist closes the Jira task after his verification \u2192 Jira task should be CLOSED.
Commit Flow
Get a task in the Jira/GitHub dashboard. Please be aware of the following points:
JiraGitHub
a. Every task has a reporter who can provide more details in case something is not clear.
b. The responsible person for the task and code implementation is the assignee who tracks the following:
Actual Jira task status.
Time logging.
Add comments, attach necessary files.
In comments, add link that refers to the merged MR (optional, if not related to many repositories).
Code review and the final merge.
MS Teams chats - ping other colleagues, answer questions, etc.
Verification by a QA specialist.
Bug fixing.
c. Pay attention to the task Status that differs in different entities, the workflow will help to see the whole task processing:
View Jira workflow
d. There are several entities that are used on the EDP project: Story, Improvement, Task, Bug.
a. Every task has a reporter who can provide more details in case something is not clear.
b. The responsible person for the task and code implementation is the assignee who tracks the following:
Actual GitHub task status.
Add comments, attach necessary files.
In comments, add link that refers to the merged MR (optional, if not related to many repositories).
Code review and the final merge.
MS Teams chats - ping other colleagues, answer questions, etc.
Verification by a QA specialist.
Bug fixing.
c. If the task is created on your own, make sure it is populated completely. See an example below:
GitHub issue
Implement feature, improvement, fix and check the results on your own. If it is impossible to check the results of your work before the merge, verify all later.
Create a Merge Request, for details, please refer to the Code Review Process.
When committing, use the pattern: commit type: Commit message (#GitHub ticket number).
a. commit type:
feat: (new feature for the user, not a new feature for build script)
fix: (bug fix for the user, not a fix to a build script)
docs: (changes to the documentation)
style: (formatting, missing semicolons, etc; no production code change)
refactor: (refactoring production code, eg. renaming a variable)
test: (adding missing tests, refactoring tests; no production code change)
chore: (updating grunt tasks etc; no production code change)
!: (added to other commit types to mark breaking changes) For example:
feat!: Add ingress links column into Applications table on stage page (#77)\n\nBREAKING CHANGE: Ingress links column has been added into the Applications table on the stage details page\n
b. Commit message:
brief, for example:
fix: Remove secretKey duplication from registry secrets (#63)
or
descriptive, for example:
feat: Provide the ability to configure hadolint check (#88)\n\n*Add configuration files .hadolint.yaml and .hadolint.yml to stash\n
Note
It is mandatory to start a commit message from a capital letter.
c. GitHub tickets are typically identified using a number preceded by the # sign and enclosed in parentheses.
Note
Make sure there is a descriptive commit message for a breaking change Merge Request. For example:
feat!: Add ingress links column into Applications table on stage page (#77)
BREAKING CHANGE: Ingress links column has been added into the Applications table on the stage details page
Note
If a Merge Request contains both new functionality and breaking changes, make sure the functionality description is placed before the breaking changes. For example:
feat!: Update Gerrit to improve access
Implement Developers group creation process
Align group permissions
BREAKING CHANGES: Update Gerrit config according to groups
This section provides a comprehensive overview of the EDP deployment approach on a Kubernetes cluster. EDP is designed and functions based on a set of key guiding principles:
Operator Pattern Approach: Approach is used for deployment and configuration, ensuring that the platform aligns with Kubernetes native methodologies (see schema below).
Loosely Coupling: EDP comprises several loosely coupled operators responsible for different platform parts. These operators can be deployed independently, enabling the most straightforward platform customization and delivery approach.
Kubernetes Operator
The following deployment diagram illustrates the platform's core components, which provide the minimum functional capabilities required for the platform operation: build, push, deploy, and run applications. The platform relies on several mandatory dependencies:
Ingress: An ingress controller responsible for routing traffic to the platform.
Tekton Stack: Includes Tekton pipelines, triggers, dashboard, chains, etc.
ArgoCD: Responsible for GitOps deployment.
EPAM Delivery Platform Deployment Diagram
Codebase Operator: Responsible for managing git repositories, versioning, and branching. It also implements Jira integration controller.
CD Pipeline Operator: Manages Continuous Delivery (CD) pipelines and CD stages (which is an abstraction of Kubernetes Namespace). Operator acts as the bridge between the artifact and deployment tools, like Argo CD. It defines the CD pipeline structure, artifacts promotion logic and triggers the pipeline execution.
Tekton Pipelines: Manages Tekton pipelines and processes events (EventListener, Interceptor) from Version Control Systems. The pipelines are integrated with external tools like SonarQube, Nexus, etc.
EDP Portal: This is the User Interface (UI) component, built on top of Headlamp.
Business applications are deployed on the platform using the CD Pipeline Operator and Argo CD. By default, the CD Pipeline Operator uses Argo CD as a deployment tool. However, it can be replaced with any other tool, like FluxCD, Spinnaker, etc. The target environment for the application deployment is a Kubernetes cluster where EDP is deployed, but it can be any other Kubernetes cluster.
This page is intended for developers with the aim to share details on how to set up the local environment and start coding in Go language for EPAM Delivery Platform.
Set up your environment by following the steps below.
"},{"location":"developer-guide/local-development/#set-up-your-ide","title":"Set Up Your IDE","text":"
We recommend using GoLand and enabling the Kubernetes plugin. Before installing plugins, make sure to save your work because IDE may require restarting.
"},{"location":"developer-guide/local-development/#set-up-your-operator","title":"Set Up Your Operator","text":"
To set up the cloned operator, follow the three steps below:
Configure Go Build Option. Open folder in GoLand, click the button and select the Go Build option:
Add configuration
Fill in the variables in Configuration tab:
In the Files field, indicate the path to the main.go file;
In the Working directory field, indicate the path to the operator;
In the Environment field, specify the namespace to watch by setting WATCH_NAMESPACE variable. It should equal default but it can be any other if required by the cluster specifications.
In the Environment field, also specify the platform type by setting PLATFORM_TYPE. It should equal either kubernetes or openshift.
Build config
Check cluster connectivity and variables. Local development implies working within local Kubernetes clusters. Kind (Kubernetes in Docker) is recommended so set this or another environment first before running code.
Before making commit and sending pull request, take care of precautionary measures to avoid crashing some other parts of the code.
"},{"location":"developer-guide/local-development/#testing-and-linting","title":"Testing and Linting","text":"
Testing and linting must be used before every single commit with no exceptions. The instructions for the commands below are written here.
It is mandatory to run test and lint to make sure the code passes the tests and meets acceptance criteria. Most operators are covered by tests so just run them by issuing the commands \"make test\" and \"make lint\":
make test\n
The command \"make test\" should give the output similar to the following:
\"make test\" command
make lint\n
The command \"make lint\" should give the output similar to the following:
\"make lint\" command
"},{"location":"developer-guide/local-development/#observe-auto-generated-docs-api-and-manifests","title":"Observe Auto-Generated Docs, API and Manifests","text":"
The commands below are especially essential when making changes to API. The code is unsatisfactory if these commands fail.
Generate documentation in the .MD file format so the developer can read it:
make api-docs\n
The command \"make api-docs\" should give the output similar to the following:
\"make api-docs\" command with the file contents
There are also manifests within the operator that generate zz_generated.deepcopy.go file in /api/v1 directory. This file is necessary for the platform to work but it's time-consuming to fill it by yourself so there is a mechanism that does it automatically. Update it using the following command and check if it looks properly:
make generate\n
The command \"make generate\" should give the output similar to the following:
\"make generate\" command
Refresh custom resource definitions for Kubernetes, thus allowing the cluster to know what resources it deals with.
make manifests\n
The command \"make manifests\" should give the output similar to the following:
\"make manifests\" command
At the end of the procedure, you can push your code confidently to your branch and create a pull request.
"},{"location":"developer-guide/mk-docs-development/","title":"Working With Documentation","text":""},{"location":"developer-guide/mk-docs-development/#working-with-documentation","title":"Working With Documentation","text":"
This section defines necessary steps to start developing the EDP documentation in the MkDocs Framework. The framework presents a static site generator with documentation written in Markdown. All the docs are configured with a YAML configuration file.
Note
For more details on the framework, please refer to the MkDocs official website.
There are two options for working with MkDocs:
Work with MkDocs if Docker is installed
Work with MkDocs if Docker is not installed
Please see below the detailed description of each options and choose the one that suits you.
"},{"location":"developer-guide/mk-docs-development/#mkdocs-with-docker","title":"MkDocs With Docker","text":"
Prerequisites:
Docker is installed.
make utility is installed.
Git is installed. Please refer to the Git downloads.
To work with MkDocs, take the following steps:
Clone the edp-install repository to your local folder.
Run the following command:
make docs
Enter the localhost:8000 address in the browser and check that documentation pages are available.
Open the file editor, navigate to edp-install->docs and make necessary changes. Check all the changes at localhost:8000.
Create a merge request with changes.
"},{"location":"developer-guide/mk-docs-development/#mkdocs-without-docker","title":"MkDocs Without Docker","text":"
Prerequisites:
Git is installed. Please refer to the Git downloads.
Python 3.9.5 is installed.
To work with MkDocs without Docker, take the following steps:
Clone the edp-install repository to your local folder.
Run the following command:
pip install -r hack/mkdocs/requirements.txt\n
Run the local development command:
mkdocs serve --dev-addr 0.0.0.0:8000\n
Note
This command may not work on Windows, so a quick solution is:
python -m mkdocs serve --dev-addr 0.0.0.0:8000\n
Enter the localhost:8000 address in the browser and check that documentation pages are available.
Open the file editor, navigate to edp-install->docs and make necessary changes. Check all the changes at localhost:8000.
The EPAM Delivery Platform\u2019s (EDP) Reference Architecture serves as a blueprint for software delivery, outlining the best practices, tools, and technologies leveraged by the platform to ensure efficient and high-quality software development. It provides a comprehensive guide to navigate the complexities of software delivery, from code to deployment.
EDP operates on Kubernetes, a leading open-source system for automating deployment, scaling, and management of containerized applications. It consolidates a variety of open-source tools, ensuring a flexible and adaptable system that can seamlessly run on any public cloud or on-premises infrastructure. This versatility allows for a wide range of deployment options, catering to diverse business needs and operational requirements.
The EPAM Delivery Platform (EDP) is built on a set of key principles that guide its design and functionality:
Managed Infrastructure and Container Orchestration: EDP is based on a platform that leverages managed infrastructure and container orchestration, primarily through Kubernetes or OpenShift.
Security: EDP places a high emphasis on security, covering aspects such as authentication, authorization, and Single Sign-On (SSO) for platform services.
Development and Testing Toolset: EDP provides a comprehensive set of tools for development and testing, ensuring a robust and reliable software delivery process.
Well-Established Engineering Process: EDP reflects EPAM\u2019s well-established engineering practices (EngX) in its CI/CD pipelines and delivery analytics.
Open-Source and Cloud-Agnostic: As an open-source, cloud-agnostic solution, EDP can be run on any preferred Kubernetes or OpenShift clusters.
DevSecOps Excellence: EDP empowers DevSecOps by making security a mandatory quality gate.
Automated Testing: EDP ensures seamless and predictable regression testing through automated test analysis.
EDP encompasses a comprehensive CI/CD ecosystem integrating essential tools such as the Tekton and Argo CD, augmented by additional functionalities. Within this robust framework, EDP seamlessly integrates SonarQube for continuous code quality assessment, enabling thorough analysis and ensuring adherence to coding standards. Additionally, incorporating Static Application Security Testing (SAST) toolset fortifies platform's security posture by proactively identifying vulnerabilities within the codebase. EDP leverages dedicated artifact storage solutions to manage and version application artifacts securely, ensuring streamlined deployment processes and traceability throughout the software development lifecycle. See the reference architecture diagram below:
EPAM Delivery Platform Reference Architecture
Developers access the platform by authenticating with their corporate credentials. The platform utilizes OpenID Connect (OIDC) for authentication and authorization across all tools and Kubernetes clusters. Using OIDC, EDP establishes a unified and secure authentication mechanism, ensuring seamless access control and user authentication for all integrated tools. This standardized approach upholds strict security protocols, ensuring consistency in authentication and authorization policies across the platform ecosystem. To integrate existing Identity Providers (IdPs), Keycloak serves as an identity broker on the platform. EDP offers the keycloak-operator to streamline Keycloak integration within the platform.
Developers engage with the platform via the EDP Portal, an intuitive interface offering a comprehensive overview of the platform\u2019s capabilities. This centralized hub facilitates seamless navigation and access to various platform tools and components. Within the EDP Portal, developers can generate new components (codebases). The platform integrates with version control systems, optimizing source code management, fostering collaboration, and streamlining code review processes. To create new codebases, developers utilize Application Templates, ensuring a standardized approach to application development. The platform accommodates a range of application templates such as Java, Node.js, .NET, Python, and more. Additionally, developers can design custom templates via the EDP Marketplace to cater to their specific requirements.
Tekton is a potent, adaptable, and cloud-native framework designed for crafting CI/CD systems. It offers a collection of shared, reusable components that empower developers to construct, test, and deploy applications across various cloud providers or on-premises systems. As a foundational element within the EDP CI/CD ecosystem, Tekton seamlessly integrates with other tools and services, providing a robust and adaptable framework for constructing CI/CD pipelines. Tekton Pipelines allow developers to efficiently build, test, and deploy applications, while Tekton Triggers initiate pipelines based on specific events.
The codebase operator is a crucial part of the platform ecosystem. It manages codebases, their creation, deletion, and scaffolding, as well as their associated resources. It provides versioning, branching, and release capabilities and enables seamless integration with Git servers and Jira.
The platform has various cloud-agnostic tools that offer different functionalities, such as artifact storage, static security analysis, and code quality assessment. These tools are accessible through pipelines and codebase controllers. Additionally, the platform supports integration with managed services from cloud providers to deliver its core functionality\u2014for instance, AWS Parameter Store stores secrets and AWS ECR - container images. AzureDevops Artifacts is an option to store artifacts leveraging Azure Cloud capabilities. SonarCloud, a cloud-based version of SonarQube, can be integrated to conduct static code analysis.
The CD Pipeline Operator oversees CD pipelines and their related resources. It offers a collection of shared, reusable components for constructing CD pipelines. Integrated with Tekton and Argo CD, the CD Pipeline Operator harnesses their capabilities, ensuring a robust and dependable software delivery process. With a Kubernetes API interface, the CD Pipeline Operator facilitates the management of CD pipelines. It enables artifact promotion logic and the triggering of CD pipelines based on specific events, further enhancing the efficiency and adaptability of the software delivery workflow.
Argo CD is a pivotal deployment tool adopted within the platform, embracing the GitOps delivery approach. It serves as the foundation for deploying both operational and business workloads. EDP recommends running a dedicated Argo CD instance to manage operational workloads, employing the Kubernetes add-ons approach for streamlined management.
Production workloads operate in isolation within dedicated Kubernetes clusters to uphold stringent standards and ensure the utmost security and resource allocation. This approach guarantees the highest isolation and operational integrity levels for critical production systems, aligning with industry best practices. EDP strongly recommends utilizing a pull model for production deployment. In this model, production deployment is initiated by the Argo CD instance explicitly deployed for the production environment.
The Platform is meticulously engineered to uphold best practices in workload distribution across various environments, including development, testing (manual/automation), user acceptance (UAT), staging, and production. While lower environments like development and testing may feasibly share clusters for workload efficiency, EDP strongly advocates and enforces the necessity of segregating production workloads into dedicated clusters. This segregation ensures the highest isolation, security, and resource allocation levels for mission-critical production systems, adhering to industry standards and ensuring optimal operational integrity.
EDP harnesses the robust capabilities of Kubernetes in conjunction with a suite of powerful tools tailored for monitoring, logging, and tracing. It integrates the Prometheus stack within ecosystem, leveraging its metrics collection, storage, and querying capabilities to enable comprehensive monitoring of system performance and health. EDP runs OpenSearch for centralized logging, enabling efficient log aggregation, analysis, and management across the platform. Incorporating OpenTelemetry enables standardized and seamless observability data collection, facilitating deep insights into platform behavior and performance. Additionally, it allows for connection with external aggregators and tools that support the OpenTelemetry protocol (OTLP).
Platform and Tools
EDP integrates with GitLab, GitHub, and Gerrit for version control. These systems are foundational components enabling efficient source code management, collaboration, and code review processes.
Platform ensures robust security measures by leveraging OpenID Connect (OIDC) for authentication and authorization across all platform tools and Kubernetes clusters. By employing OIDC, EDP establishes a unified and secure authentication mechanism, enabling seamless access control and user authentication for all tools integrated into the platform. This standardized approach ensures stringent security protocols, maintaining authentication consistency and authorization policies across the platform ecosystem.
This document provides an in-depth overview of the Continuous Integration and Continuous Delivery (CI/CD) pipeline reference architecture implemented within the EPAM Delivery Platform (EDP). The pipeline is designed to facilitate efficient and automated software deployment across diverse environments, leveraging a suite of tools and methodologies for enhanced reliability, scalability, and security.
The CI/CD pipeline within EDP orchestrates the software delivery process, encompassing several sequential stages to ensure robustness and reliability.
EPAM Delivery Platform Reference CI/CD Pipeline
The CI/CD Pipeline follows a modular and scalable architecture that leverages various tools to ensure the reliability and efficiency of the software delivery process. The architecture can be divided into stages, each responsible for specific tasks. Explore the key components involved in the pipeline and their functionalities:
Source Code: The pipeline starts with the source code, representing the application's codebase. Developers commit their changes to the source code repository, triggering the pipeline.
Validate Commit Message: The commit message validation component checks the format and content of the commit message. It ensures the commit message follows the correct format and includes a valid Tracking Issue key. It helps maintain a standardized commit message format throughout the application development.
Build: The Build component compiles the source code, runs unit tests, and generates the application artifact. It consumes the artifact from the Artifact Repository (Nexus), ensuring consistent and reliable builds.
SAST with SonarQube: The Static Analysis Security Testing (SAST) component utilizes SonarQube to analyze the source code for potential security vulnerabilities, code smells, and quality issues. This step helps identify and address security or code quality issues early in development.
SCA: The Software Composition Analysis (SCA) component performs dependency analysis using cdxgen, Dependency-Track, Semgrep, and DefectDojo. It checks for known vulnerabilities or license compliance issues in the application's dependencies. By identifying and resolving these issues, it ensures the security and stability of the software.
Publish: The Publish component publishes the application artifact to the Artifact Repository. It posts Docker images to the Docker Registry and stores binary artifacts in the Nexus Repository. This process ensures that the artifacts are securely stored and easily accessed for future deployments.
Deploy: The Deploy component uses Argo CD or Tekton to deploy applications to target environments in Kubernetes, leveraging Helm charts to ensure seamless deployment. Deploy to Test/Quality Assurance/Performance Environments: The final stages of the pipeline involve deploying the application to different environments for testing and quality assurance purposes. The results of the tests are consolidated and reported to the Report Portal, facilitating efficient test reporting and analysis.
The overall architecture of the CI/CD Pipeline ensures a streamlined and automated software delivery process, from source code to deployment. It provides developers with the necessary tools and processes to ensure their applications' quality, security, and scalability. Furthermore, Tekton Chains enhances supply chain security by signing and generating in-toto metadata that verifies the integrity of artifacts and the CI/CD Pipeline.
Note
The tools mentioned in this document are just examples and can be replaced with other tools that offer similar functionality. For instance, instead of Harbor for the Docker Registry, it is possible to use AWS ECR. Consider using Azure Artifacts or JFrog Artifactory instead of Nexus for the artifact repository. Instead of setting up an self-managed instance of SonarQube, leverage SonarCloud, the cloud-based version of SonarQube, as an alternative. The CI/CD Pipeline architecture is flexible and adaptable, allowing the use of different tools based on specific project requirements and platform preferences.
The codebase operator for the EPAM Delivery Platform gathers anonymous data through telemetry. This data provides a clear picture of how the platform is being used and empowers the development team to make informed decisions and strategic enhancements to meet evolving operational needs. The anonymous data collected also plays an essential role in adopting a Software Development Life Cycle (SDLC) process strategically.
The codebase-operator collects the following data:
The version of the platform
The number of codebases created and their parameters: language (for example, Java, NodeJS, etc.), framework (for example, FastAPI, Flask, etc.), build tool (for example, Maven, Gradle, etc.), strategy (for example, Clone, Create, Import), and Type (for example, library, application, etc.)
The number of CD pipelines created and their parameters: deployment type (for example, Auto, Manual), and the number of stages
The number of Git providers connected to the platform and their types (for example, GitHub, GitLab, Gerrit)
Where Jira is enabled or not
The type of the Docker registry connected to the platform (for example, Docker Hub, Harbor, ECR)
The codebase-operator collects the data every 24 hours and sends it to the EDP Telemetry Service. The first data points are collected 24 hours after the codebase-operator is deployed to allow users to opt-out of telemetry.
The codebase-operator collects telemetry data by default. To disable telemetry, set the TELEMETRY_ENABLED environment variable to false in the codebase-operator's deployment configuration. To achieve this, run the following command:
The EDP Operator guide is intended for DevOps and provides information on EDP installation, configuration and customization, as well as the platform support. Inspect the documentation to adjust the EPAM Delivery Platform according to your business needs:
The Installation section provides the prerequisites for EDP installation, including Kubernetes or OpenShift cluster setup, Keycloak, DefectDojo, Kiosk, and Ingress-nginx setup as well as the subsequent deployment of EPAM Delivery Platform.
The Configuration section indicates the options to set the project, backup, Tekton and logging.
The Integration section comprises the AWS, Jira, and Logsight integration options.
The Tutorials section provides information on working with various aspects, for example, using cert-manager in OpenShift, deploying AWS EKS cluster, deploying OKD 4.9 cluster, deploying OKD 4.10 cluster and upgrading Keycloak v.17.0.x-legacy to v.19.0.x on Kubernetes.
"},{"location":"operator-guide/add-ons-overview/","title":"Install via Add-Ons","text":""},{"location":"operator-guide/add-ons-overview/#install-via-add-ons","title":"Install via Add-Ons","text":"
This page describes the entity of Cluster Add-Ons for EPAM Delivery Platform, as well as their purpose, benefits and usage.
"},{"location":"operator-guide/add-ons-overview/#what-are-add-ons","title":"What Are Add-Ons","text":"
EDP Add-Ons is basically a Kubernetes-based structure that enables users to quickly install additional components for the platform using Argo CD applications.
Add-Ons have been introduced into EDP starting from version 3.4.0. They empower users to seamlessly incorporate the platform with various additional components, such as SonarQube, Nexus, Keycloak, Jira, and more. This eliminates the need for manual installations, as outlined in the Install EDP page.
In a nutshell, Add-Ons represent separate Helm Charts that imply to be installed by one click using the Argo CD tool.
All the Add-Ons are stored in our public GitHub repository adhering to the GitOps approach. Apart from default Helm and Git files, it contains both custom resources called Applications for Argo CD and application source code. The repository follows the GitOps approach to enable Add-Ons with the capability to rollback changes when needed. The repository structure is the following:
add-ons - the directory that contains Helm charts of the applications that can be integrated with EDP using Add-Ons.
chart - the directory that contains Helm charts with application templates that will be used to create custom resources called Applications for Argo CD.
To enable EDP Add-Ons, it is necessary to have the configured Argo CD, and connect and synchronize the forked repository. To do this, follow the guidelines below:
Fork the Add-Ons repository to your personal account.
Provide the parameter values for the values.yaml files of the desired Add-Ons you are going to install.
Navigate to Argo CD -> Settings -> Repositories. Connect your forked repository where you have the values.yaml files changed by clicking the + Connect repo button:
Connect the forked repository
In the appeared window, fill in the following fields and click the Connect button:
Name - select the namespace where the project is going to be deployed;
Choose your connection method - choose Via SSH;
Type - choose Helm;
Repository URL - enter the URL of your forked repository.
Repository parameters
As soon as the repository is connected, the new item in the repository list will appear:
Connected repository
Navigate to Argo CD -> Applications. Click the + New app button:
Adding Argo CD application
Fill in the required fields:
Application Name - addons-demo;
Project name - select the namespace where the project is going to be deployed;
Sync policy - select Manual;
Repository URL - enter the URL of your forked repository;
Revision - Head;
Path - select chart;
Cluster URL - enter the URL of your cluster;
Namespace - enter the namespace which must be equal to the Project name field.
As soon as the repository is synchronized, the list of applications that can be installed by Add-Ons will be shown:
Name Description Default Argo CD A GitOps continuous delivery tool that helps automate the deployment, configuration, and lifecycle management of applications in Kubernetes clusters. false AWS EFS CSI Driver A Container Storage Interface (CSI) driver that enables the dynamic provisioning of Amazon Elastic File System (EFS) volumes in Kubernetes clusters. true Cert Manager A native Kubernetes certificate management controller that automates the issuance and renewal of TLS certificates. true DefectDojo A security vulnerability management tool that allows tracking and managing security findings in applications. true DependencyTrack A Software Composition Analysis (SCA) platform that helps identify and manage open-source dependencies and their associated vulnerabilities. true EDP An internal platform created by EPAM to enhance software delivery processes using DevOps principles and tools. false Extensions OIDC EDP Helm chart to provision OIDC clients for different Add-Ons using EDP Keycloak Operator. true External Secrets A Kubernetes Operator that fetches secrets from external secret management systems and injects them as Kubernetes Secrets. true Fluent Bit A lightweight and efficient log processor and forwarder that collects and routes logs from various sources in Kubernetes clusters. false Harbor A cloud-native container image registry that provides support for vulnerability scanning, policy-based image replication, and more. true Nginx ingress An Ingress controller that provides external access to services running within a Kubernetes cluster using Nginx as the underlying server. true Jaeger Operator An operator for deploying and managing Jaeger, an end-to-end distributed tracing system, in Kubernetes clusters. true Keycloak An open-source Identity and Access Management (IAM) solution that enables authentication, authorization, and user management in Kubernetes clusters. true Keycloak PostgreSQL A PostgreSQL database operator that simplifies the deployment and management of PostgreSQL instances in Kubernetes clusters. false MinIO Operator An operator that simplifies the deployment and management of MinIO, a high-performance object storage server compatible with Amazon S3, in Kubernetes clusters. true OpenSearch A community-driven, open-source search and analytics engine that provides scalable and distributed search capabilities for Kubernetes clusters. true OpenTelemetry Operator An operator for automating the deployment and management of OpenTelemetry, a set of observability tools for capturing, analyzing, and exporting telemetry data. true PostgreSQL Operator An operator for running and managing PostgreSQL databases in Kubernetes clusters with high availability and scalability. true Prometheus Operator An operator that simplifies the deployment and management of Prometheus, a monitoring and alerting toolkit, in Kubernetes clusters. true Redis Operator An operator for managing Redis, an in-memory data structure store, in Kubernetes clusters, providing high availability and horizontal scalability. true StorageClass A Kubernetes resource that provides a way to define different classes of storage with different performance characteristics for persistent volumes. true Tekton A flexible and cloud-native framework for building, testing, and deploying applications using Kubernetes-native workflows. true Vault An open-source secrets management solution that provides secure storage, encryption, and access control for sensitive data in Kubernetes clusters. true"},{"location":"operator-guide/advanced-installation-overview/","title":"Overview","text":""},{"location":"operator-guide/advanced-installation-overview/#advanced-installation-overview","title":"Advanced Installation Overview","text":"
This page serves as a brief overview of all the advanced components within EDP. While these third-party tools are not mandatory, they significantly enhance the platform's capabilities, enabling the creation of a robust CI/CD environment.
Although we have dedicated instructions for all of these third-party tools, for those who installed EDP using cluster add-ons, we recommend installing them via add-ons correspondingly.
OpenShift cluster uses Routes to provide access to pods from external resources.\u00a0\u21a9
These tools need to be installed in advance before deploying EDP.\u00a0\u21a9\u21a9
"},{"location":"operator-guide/argocd-integration/","title":"Argo CD Integration","text":""},{"location":"operator-guide/argocd-integration/#argo-cd-integration","title":"Argo CD Integration","text":"
KubeRocketCI uses Argo CD as a part of the Continues Delivery/Continues Deployment implementation. Argo CD follows the best GitOps practices, uses Kubernetes native approach for the Deployment Management, has rich UI and required RBAC capabilities.
"},{"location":"operator-guide/argocd-integration/#argo-cd-deployment-approach-in-kuberocketci","title":"Argo CD Deployment Approach in KubeRocketCI","text":"
Argo CD can be installed using two different approaches:
Cluster-wide scope with the cluster-admin access
Namespaced scope with the single namespace access
Both approaches can be deployed with High Availability (HA) or Non High Availability (non HA) installation manifests.
KubeRocketCI uses the HA deployment with the cluster-admin permissions, to minimize cluster resources consumption by sharing single Argo CD instance across multiple EDP Tenants. Please follow the installation instructions to deploy Argo CD.
"},{"location":"operator-guide/argocd-integration/#argo-cd-integration_1","title":"Argo CD Integration","text":"
See a diagram below for the details:
Argo CD Diagram
Argo CD is deployed in a separate argocd namespace.
Argo CD uses a cluster-admin role for managing cluster-scope resources.
The control-plane application is created using the App of Apps approach, and its code is managed by the control-plane members.
The control-plane is used to onboard new Argo CD Tenants (Argo CD Projects - AppProject).
The EDP Tenant Member manages Argo CD Applications using kind: Application in the edpTenant namespace.
The App Of Apps approach is used to manage the EDP Tenants. Inspect the edp-grub repository structure that is used to provide the EDP Tenants for the Argo CD Projects:
edp-grub\n\u251c\u2500\u2500 LICENSE\n\u251c\u2500\u2500 README.md\n\u251c\u2500\u2500 apps ### All Argo CD Applications are stored here\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 grub-argocd.yaml # Application that provisions Argo CD Resources - Argo Projects (EDP Tenants)\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 grub-keycloak.yaml # Application that provisions Keycloak Resources - Argo CD Groups (EDP Tenants)\n\u251c\u2500\u2500 apps-configs\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 grub\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 argocd ### Argo CD resources definition\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 edp.yaml\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 keycloak ### Keycloak resources definition\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 edp.yaml\n\u251c\u2500\u2500 bootstrap\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 root.yaml ### Root application in App of Apps, which provision Applications from /apps\n\u2514\u2500\u2500 examples ### Examples\n \u2514\u2500\u2500 tenant\n \u2514\u2500\u2500 edp-petclinic.yaml\n
The Root Application must be created under the control-plane scope.
"},{"location":"operator-guide/argocd-integration/#argo-cd-configuration","title":"Argo CD Configuration","text":"
Now that Argo CD is integrated, it is time to configure it properly. To configure Argo CD for KubeRocketCI, follow the steps below:
Modify the argocd-cmd-params-cm ConfigMap in the argocd namespace and add the application.namespaces parameter to the subsection data:
Add a credential template for GitHub, GitLab, Gerrit integrations. The credential template must be created for each Git server.
GitHub/GitLabGerrit
Generate an SSH key pair and add a public key to GitLab or GitHub account.
Warning
Use an additional GitHub/GitLab User to access a repository. For example: - GitHub, add a User to a repository with a \"Read\" role. - GitLab, add a User to a repository with a \"Guest\" role.
Create an Argo CD Project (EDP Tenant), for example, with the edp name:
AppProject
apiVersion: argoproj.io/v1alpha1\nkind: AppProject\nmetadata:\n name: edp\n namespace: argocd\n # Finalizer that ensures that project is not deleted until it is not referenced by any application\n finalizers:\n - resources-finalizer.argocd.argoproj.io\nspec:\n destinations:\n # by default edp work with 'edp-*' namespace\n - namespace: 'edp-*'\n # allow to deploy to specific server (local in our case)\n name: in-cluster\n # Deny all cluster-scoped resources from being created, except for Namespace\n clusterResourceWhitelist:\n - group: ''\n kind: Namespace\n # Allow all namespaced-scoped resources to be created, except for ResourceQuota, LimitRange, NetworkPolicy\n namespaceResourceBlacklist:\n - group: ''\n kind: ResourceQuota\n - group: ''\n kind: LimitRange\n - group: ''\n kind: NetworkPolicy\n # we are ok to create any resources inside namespace\n namespaceResourceWhitelist:\n - group: '*'\n kind: '*'\n # enable access only for specific git server. The example below 'edp' - it is namespace where EDP deployed\n sourceRepos:\n - ssh://git@github.com/*\n # enable capability to deploy objects from namespaces\n sourceNamespaces:\n - edp\n
Check that your new Repository, Known Hosts, and AppProject are added to the Argo CD UI.
Generate Argo CD project token for deploy integration:
Check that your new Application is added to the Argo CD UI under the edp Project scope.
"},{"location":"operator-guide/argocd-integration/#deploy-argo-cd-application-to-remote-cluster-optional","title":"Deploy Argo CD Application to Remote Cluster (Optional)","text":"
KubeRocketCI also supports deploying Argo CD applications to a remote cluster. To deploy applications to remote clusters, follow the steps below:
Create ServiceAccountClusterRoleBinding and Secret for that ServiceAccount.
Receive the bearer token:
BEAR_TOKEN=$(kubectl get secret <serviceaccount-secret-name> -o jsonpath='{.data.token}' | base64 --decode)\n
Update an Argo CD Project (EDP Tenant), with the edp name:
AppProject
apiVersion: argoproj.io/v1alpha1\nkind: AppProject\nmetadata:\n name: edp\nspec:\n destinations:\n # Add block that allow deploy in remote cluster\n # by default edp work with 'edp-*' namespace\n - namespace: 'edp-*'\n # allow to deploy to specific server (remote in our case)\n name: edp-remote-cluster\n
Add a remote cluster in the KubeRocketCI portal. Please refer to the Add Cluster page for details.
"},{"location":"operator-guide/artifacts-verification/","title":"Verification of EDP Artifacts","text":""},{"location":"operator-guide/artifacts-verification/#verification-of-edp-artifacts","title":"Verification of EDP Artifacts","text":"
This documentation outlines platform SLSA integration and guides verifying image authenticity and provenance.
Supply Chain Levels of Software Assurance (SLSA) is a framework for assessing and enhancing software supply chain security. Software Supply Chain Security is a critical aspect of modern software development and deployment. Supply Chain Levels of Software Assurance (SLSA) provides a framework for assessing and enhancing the security of your software supply chain.
EPAM Delivery Platform's container images are signed using cosign with the cosign.pub key for signing and transparency. You can verify a container image's signature by executing the cosign verify command.
To confirm the authenticity of the image, run the cosign verify command. See the example below:
Verification for epamedp/codebase-operator:2.20.0:
Verification for index.docker.io/epamedp/codebase-operator:2.20.0\nThe following checks were performed on each of these signatures:\n - The cosign claims were validated\n - The claims were present in the transparency log\n - The signatures were integrated into the transparency log when the certificate was valid\n - The signatures were verified against the specified public key\n[\n {\n \"critical\": {\n \"identity\": {\n \"docker-reference\": \"index.docker.io/epamedp/codebase-operator\"\n },\n \"image\": {\n \"docker-manifest-digest\": \"sha256:36585a13b5b5ff5a15138e9d16cc74eb3aac4560b77be15161d3b3db25b89e1d\"\n },\n \"type\": \"cosign container image signature\"\n },\n \"optional\": null\n }\n]\n
"},{"location":"operator-guide/artifacts-verification/#verify-container-image-with-slsa-attestations","title":"Verify Container Image With SLSA Attestations","text":"
An SLSA Level 3 provenance is verified using. The following command will verify the signature of an attestation and how it was issued. It will contain the payloadType, payload, and signature.
Run the cosign verify-attestation command using the cosign.pub:
Verification for epamedp/codebase-operator:2.20.0:
Verification for epamedp/codebase-operator:2.20.0\nThe following checks were performed on each of these signatures:\n - The cosign claims were validated\n - The claims were present in the transparency log\n - The signatures were integrated into the transparency log when the certificate was valid\n - The signatures were verified against the specified public key\n{\n \"payloadType\": \"application/vnd.in-toto+json\",\n \"payload\": \"eyJfdHlwZSI6Imh0dHBzOi8vaW4tdG90by5pby9TdGF0ZW1lbnQvdjAuMSIsInByZWRpY2F0ZVR5cGUiOiJodHRwczovL3Nsc2EuZGV2L3Byb3ZlbmFuY2UvdjAuMiIsInN1YmplY3QiOlt7Im5hbWUiOiJpbmRleC5kb2NrZXIuaW8vZXBhbWVkcC9jb2RlYmFzZS1vcGVyYXRvciIsImRpZ2VzdCI6eyJzaGEyNTYiOiIzNjU4NWExM2I1YjVmZjVhMTUxMzhlOWQxNmNjNzRlYjNhYWM0NTYwYjc3YmUxNTE2MWQzYjNkYjI1Yjg5ZTFkIn19XSwicHJlZGljYXRlIjp7ImJ1aWxkZXIiOnsiaWQiOiJodHRwczovL3Rla3Rvbi5kZXYvY2hhaW5zL3YyIn0sImJ1aWxkVHlwZSI6InRla3Rvbi5kZXYvdjFiZXRhMS9UYXNrUnVuIiwiaW52b2NhdGlvbiI6eyJjb25maWdTb3VyY2UiOnt9LCJwYXJhbWV0ZXJzIjp7IkJVSUxERVJfSU1BR0UiOiJnY3IuaW8va2FuaWtvLXByb2plY3QvZXhlY3V0b3I6djEuMTIuMS1kZWJ1ZyIsIkNPTlRFWFQiOiIuLyIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlIiwiSU1BR0UiOiJlcGFtZWRwL2NvZGViYXNlLW9wZXJhdG9yOjIuMjAuMCIsIklNQUdFX1RBUiI6ImNvZGViYXNlLW9wZXJhdG9yXzIuMjAuMCJ9LCJlbnZpcm9ubWVudCI6eyJhbm5vdGF0aW9ucyI6eyJtZXRhLmhlbG0uc2gvcmVsZWFzZS1uYW1lIjoiZWRwLWN1c3RvbS1waXBlbGluZXMiLCJtZXRhLmhlbG0uc2gvcmVsZWFzZS1uYW1lc3BhY2UiOiJlZHAtZGVsaXZlcnkiLCJwaXBlbGluZS50ZWt0b24uZGV2L2FmZmluaXR5LWFzc2lzdGFudCI6ImFmZmluaXR5LWFzc2lzdGFudC1iZjRkNzRkMWM0IiwicGlwZWxpbmUudGVrdG9uLmRldi9yZWxlYXNlIjoiMjI5OWIxNSIsInRla3Rvbi5kZXYvY2F0ZWdvcmllcyI6IkltYWdlIEJ1aWxkIiwidGVrdG9uLmRldi9kaXNwbGF5TmFtZSI6IkJ1aWxkIGFuZCB1cGxvYWQgY29udGFpbmVyIGltYWdlIHVzaW5nIEthbmlrbyIsInRla3Rvbi5kZXYvcGlwZWxpbmVzLm1pblZlcnNpb24iOiIwLjE3LjAiLCJ0ZWt0b24uZGV2L3BsYXRmb3JtcyI6ImxpbnV4L2FtZDY0IiwidGVrdG9uLmRldi90YWdzIjoiaW1hZ2UtYnVpbGQifSwibGFiZWxzIjp7ImFwcC5rdWJlcm5ldGVzLmlvL21hbmFnZWQtYnkiOiJIZWxtIiwiYXBwLmt1YmVybmV0ZXMuaW8vdmVyc2lvbiI6IjAuOC4wIiwiaGVsbS5zaC9jaGFydCI6ImVkcC1jdXN0b20tcGlwZWxpbmVzLTAuOC4wIiwiazhzbGVucy1lZGl0LXJlc291cmNlLXZlcnNpb24iOiJ2MSIsInRla3Rvbi5kZXYvbWVtYmVyT2YiOiJ0YXNrcyIsInRla3Rvbi5kZXYvcGlwZWxpbmUiOiJnZXJyaXQtb3BlcmF0b3JzLWFwcC1yZWxlYXNlLWVkcCIsInRla3Rvbi5kZXYvcGlwZWxpbmVSdW4iOiJlZHAtY29kZWJhc2Utb3BlcmF0b3ItcmVsZWFzZSIsInRla3Rvbi5kZXYvcGlwZWxpbmVUYXNrIjoia2FuaWtvLWJ1aWxkIiwidGVrdG9uLmRldi90YXNrIjoia2FuaWtvLXJlbGVhc2UifX19LCJidWlsZENvbmZpZyI6eyJzdGVwcyI6W3siZW50cnlQb2ludCI6Ii9rYW5pa28vZXhlY3V0b3IgXFxcbiAgLS1kb2NrZXJmaWxlPS93b3Jrc3BhY2Uvc291cmNlL0RvY2tlcmZpbGUgXFxcbiAgLS1jb250ZXh0PS93b3Jrc3BhY2Uvc291cmNlLy4vIFxcXG4gIC0tZGVzdGluYXRpb249ZXBhbWVkcC9jb2RlYmFzZS1vcGVyYXRvcjoyLjIwLjAgXFxcbiAgLS1kaWdlc3QtZmlsZT0vdGVrdG9uL3Jlc3VsdHMvSU1BR0VfRElHRVNUIFxcXG4gIC0tdGFyLXBhdGg9Y29kZWJhc2Utb3BlcmF0b3JfMi4yMC4wLnRhciBcXFxuIiwiYXJndW1lbnRzIjpudWxsLCJlbnZpcm9ubWVudCI6eyJjb250YWluZXIiOiJidWlsZC1hbmQtcHVzaCIsImltYWdlIjoib2NpOi8vZ2NyLmlvL2thbmlrby1wcm9qZWN0L2V4ZWN1dG9yQHNoYTI1NjphN2VhOWY2OWQ3N2Q3ZTdhMGVhODIxZjE1MDY5YmU0NTQyMGE1MzZmODFhYjU3ODdhOTg4NjU5ZTQ4YzI1Mzc3In0sImFubm90YXRpb25zIjpudWxsfSx7ImVudHJ5UG9pbnQiOiJzZXQgLWVcbmltYWdlPVwiZXBhbWVkcC9jb2RlYmFzZS1vcGVyYXRvcjoyLjIwLjBcIlxuZWNobyAtbiBcIiR7aW1hZ2V9XCIgfCB0ZWUgXCIvdGVrdG9uL3Jlc3VsdHMvSU1BR0VfVVJMXCJcbiIsImFyZ3VtZW50cyI6bnVsbCwiZW52aXJvbm1lbnQiOnsiY29udGFpbmVyIjoid3JpdGUtdXJsIiwiaW1hZ2UiOiJvY2k6Ly9kb2NrZXIuaW8vbGlicmFyeS9hbHBpbmVAc2hhMjU2OjcxNDRmN2JhYjNkNGMyNjQ4ZDdlNTk0MDlmMTVlYzUyYTE4MDA2YTEyOGM3MzNmY2ZmMjBkM2E0YTU0YmE0NGEifSwiYW5ub3RhdGlvbnMiOm51bGx9XX0sIm1ldGFkYXRhIjp7ImJ1aWxkU3RhcnRlZE9uIjoiMjAyMy0xMS0wM1QxMzozMDo1NVoiLCJidWlsZEZpbmlzaGVkT24iOiIyMDIzLTExLTAzVDEzOjMxOjE1WiIsImNvbXBsZXRlbmVzcyI6eyJwYXJhbWV0ZXJzIjpmYWxzZSwiZW52aXJvbm1lbnQiOmZhbHNlLCJtYXRlcmlhbHMiOmZhbHNlfSwicmVwcm9kdWNpYmxlIjpmYWxzZX0sIm1hdGVyaWFscyI6W3sidXJpIjoib2NpOi8vZ2NyLmlvL2thbmlrby1wcm9qZWN0L2V4ZWN1dG9yIiwiZGlnZXN0Ijp7InNoYTI1NiI6ImE3ZWE5ZjY5ZDc3ZDdlN2EwZWE4MjFmMTUwNjliZTQ1NDIwYTUzNmY4MWFiNTc4N2E5ODg2NTllNDhjMjUzNzcifX0seyJ1cmkiOiJvY2k6Ly9kb2NrZXIuaW8vbGlicmFyeS9hbHBpbmUiLCJkaWdlc3QiOnsic2hhMjU2IjoiNzE0NGY3YmFiM2Q0YzI2NDhkN2U1OTQwOWYxNWVjNTJhMTgwMDZhMTI4YzczM2ZjZmYyMGQzYTRhNTRiYTQ0YSJ9fV19fQ==\",\n \"signatures\": [\n {\n \"keyid\": \"SHA256:7E2nAQnycq4vfPlzmLZGzpK/Vr6oXKqqGokDyrBSLck\",\n \"sig\": \"MEUCIAZLrA/wTkqmnCZXh85R9Y/Ue5f8wuGgjLMYdoFw9GRLAiEA/sE598EX5fppqbry+xvE+aap8+qHPioOin8t6Ttzx3k=\"\n }\n ]\n}\n
For more details about attestation, please refer to the official cosign documentation page.
Within each release component, you will discover a Rekor UUID, which serves to validate the flow of the release pipeline. Execute the following command to obtain comprehensive information about the release pipeline of codebase-operator with UUID:
By signing all our artifacts, we assure you that they are trustworthy. This guide is indispensable for developers and administrators to enhance their software's reliability and meet modern security standards. The adoption of SLSA will bring you confidence while using the platform.
"},{"location":"operator-guide/aws-marketplace-install/","title":"Install via AWS","text":""},{"location":"operator-guide/aws-marketplace-install/#install-via-aws-marketplace","title":"Install via AWS Marketplace","text":"
This documentation provides the detailed instructions on how to install the EPAM Delivery Platform via the AWS Marketplace.
To initiate the installation process, navigate to our dedicated AWS Marketplace page and commence the deployment of EPAM Delivery Platform.
Disclaimer
EDP is aligned with industry standards for storing and managing sensitive data, ensuring optimal security. However, the use of custom solutions introduces uncertainties, thus the responsibility for the safety of your data is totally covered by platform administrator.
A basic understanding of AWS services and navigation is preferred to facilitate smoother setup and deployment processes. If you are new to AWS, please refer to the AWS Documentation for detailed information on the services and their usage.
Understanding of Kubernetes: Knowledge of Kubernetes concepts and architecture is recommended for effective management and operation of clusters.
Please familiarize yourself with the Prerequisites page before deploying the product. To perform a minimal installation, ensure that you meet the following requirements:
The AWS Elastic Kubernetes Service (EKS) cluster is available for deployment. For detailed instructions on creating a new cluster, please consult the AWS EKS Cluster Creation Guide. Additionally, you can refer to our EKS Deployment Guide for step-by-step instructions tailored to your specific requirements.
The domain name is available and associated with the ingress object in cluster.
Cluster administrator access.
The Tekton resources are deployed.
Access to the cluster via Service Account token is available.
(Optional) To open EDP Portal, navigate to the http://localhost:59480.
(Optional) To get admin token to sign in to EDP Portal:
kubectl get secrets -o jsonpath=\"{.items[?(@.metadata.annotations['kubernetes\\.io/service-account\\.name']=='edp-admin')].data.token}\" -n edp|base64 --decode\n
As a result, you will get access to EPAM Delivery Platform components via EDP Portal UI. Navigate to our Use Cases to try out EDP functionality. Visit other subsections of the Operator Guide to figure out how to configure EDP and integrate it with various tools.
This article outlines how the EPAM Delivery Platform (EDP) leverages Capsule capabilities to enable isolation for both the core platform components and the business applications workload.
EPAM Delivery Platform uses Capsule to ensure resource isolation. It is crucial to define constraints through the Capsule tenant approach. This approach serves two primary objectives: limiting the resources allocated to the EDP components and regulating the resources utilized by each deployed environment.
To ensure isolation for the core platform components, create the edp namespace under the Capsule tenant. Use the template provided in this instruction to create the Capsule tenant specifically for the core components.
The following scheme outlines the general steps involved in configuring Capsule for seamless integration with EDP. This process ensures efficient resource isolation, allowing for the deployment and management of both EDP core platform components and business application workloads. Follow the sequential flow of the scheme to successfully integrate Capsule with the EPAM Delivery Platform:
Capsule Installation - This initial step involves setting up Capsule on your environment.
Tenant Configuration - Once Capsule is installed, the next critical step is configuring the Capsule tenant. This involves defining specific parameters and constraints to regulate the allocation of resources to EDP components.
Impersonation - Impersonation plays a role in managing user identities and permissions within the Capsule environment. This step ensures secure and controlled access to resources.
Create EDP Namespace - The creation of a dedicated namespace under Capsule is crucial for isolating and managing the core components of EDP. This step establishes the environment where EDP will be deployed.
Deploy EDP - The final step involves deploying the EPAM Delivery Platform within the configured Capsule environment.
Define the namespace where EDP will be installed in Capsule values:
values.yaml
manager:\n options:\n # -- Boolean, enforces the Tenant owner, during Namespace creation, to name it using the selected Tenant name as prefix, separated by a dash\n forceTenantPrefix: true\n # enable capsule for EDP tenant and cd-pipeline-operator\n # NOTE: Capsule cannot manage cluster system namespaces\n capsuleUserGroups:\n - capsule.clastix.io\n # enable for cd-pipeline-operator https://github.com/epam/edp-cd-pipeline-operator/blob/release/2.17/deploy-templates/values.yaml#L10\n - system:serviceaccounts:edp # (1)!\n - masters # (2)!\n # uncomment if Argo CD manage main EDP tenant\n #- system:serviceaccounts:argocd\n # uncomment if edp-oidc-admins group manage main EDP tenant https://epam.github.io/edp-install/operator-guide/edp-access-model\n #- edp-oidc-admins\n
Namespace where EDP will be installed.
Group that manages the main EDP tenant.
To install the Capsule tool, use the Cluster Add-Ons approach. For more details, please refer to the Capsule official page.
After installing Capsule, the next crucial step is configuration. Follow the guidelines provided below to configure Capsule and ensure seamless integration with your system:
Group that manages the main EDP tenant. Must be declared in Capsule configuration.
The following example includes additional specifications that can be used to manage the EDP tenant:
Tenant configuration example
apiVersion: capsule.clastix.io/v1beta2\nkind: Tenant\nmetadata:\n name: edp-tenant\nspec:\n ingressOptions:\n allowWildcardHostnames: false\n allowedHostnames:\n allowedRegex: ^.*example.com$ # DNSwildcard for EDP usage\n hostnameCollisionScope: Tenant\n limitRanges:\n items:\n - limits:\n # The default limits apply to each container unless otherwise specified by default\n - default:\n cpu: 768m\n memory: 768Mi\n # The default requests apply to each container unless otherwise specified by default\n defaultRequest:\n cpu: 256m\n memory: 512Mi\n type: Container\n - limits:\n # In case Tekton pipelines need to use volume workspaces. If use emptydir please set it to 0.\n - max:\n storage: 3Gi\n min:\n storage: 3Gi\n type: PersistentVolumeClaim\n # Since EDP uses one namespace, the namespace quota is set to 1\n namespaceOptions:\n quota: 1\n networkPolicies:\n items:\n - ingress:\n - from:\n - namespaceSelector:\n matchLabels:\n capsule.clastix.io/tenant: edp-tenant\n - podSelector: {}\n - ipBlock:\n cidr: 172.32.0.0/16\n podSelector: {}\n policyTypes:\n - Ingress\n # Default EDP admins group to make admin users tenant owners\n owners:\n - clusterRoles:\n - admin\n - capsule-namespace-deleter\n kind: Group\n name: system:masters\n #\n # Uncomment if Argo CD manage main EDP tenant\n #- clusterRoles:\n # - admin\n # - capsule-namespace-deleter\n # kind: ServiceAccount\n # name: system:serviceaccount:argocd:argocd-application-controller\n #\n # Uncomment if edp-oidc-admins group manage main EDP tenant\n #- clusterRoles:\n # - admin\n # - capsule-namespace-deleter\n # kind: Group\n # name: sandbox-oidc-cluster-admins\n resourceQuotas:\n items:\n # The maximum CPU and Memory capacity for the EDP tenant\n - hard:\n limits.cpu: '2'\n limits.memory: 2Gi\n # The maximum number of pods that can be deployed within a namespace\n - hard:\n pods: '15'\n scope: Tenant\n serviceOptions:\n # Enable the capabilities to create ClusterIP service types only\n allowedServices:\n externalName: false\n loadBalancer: false\n nodePort: false\n
To install the Capsule tenant, use the Cluster Add-Ons approach.
Create namespace for the EDP tenant:
Log in as a system:masters member and create a namespace for platform deployment under the Capsule tenant using the following command:
kubectl create namespace edp\n
To ensure that the edp namespace is successfully created under the Capsule tenant, you can verify the status of the Capsule tenant using the following command:
As a result of following these instructions, Capsule policies are used to manage the EDP core components and deployable environments. By adhering to these guidelines, you should successfully install EDP with Capsule enabled as the tenancyEngine.
"},{"location":"operator-guide/configure-keycloak-oidc-eks/","title":"EKS OIDC With Keycloak","text":""},{"location":"operator-guide/configure-keycloak-oidc-eks/#eks-oidc-with-keycloak","title":"EKS OIDC With Keycloak","text":"
This article provides the instruction of configuring Keycloak as OIDC Identity Provider for EKS. The example is written on Terraform (HCL).
To follow the instruction, check the following prerequisites:
terraform 0.14.10
hashicorp/aws = 4.8.0
mrparkers/keycloak >= 3.0.0
hashicorp/kubernetes ~> 2.9.0
kubectl = 1.22
kubelogin >= v1.25.1
Ensure that Keycloak has network availability for AWS (not in a private network).
Note
To connect OIDC with a cluster, install and configure the kubelogin plugin. For Windows, it is recommended to download the kubelogin as a binary and add it to your PATH.
The solution includes three types of the resources - AWS (EKS), Keycloak, Kubernetes. The left part of Keycloak resources remain unchanged after creation, thus allowing us to associate a claim for a user group membership. Other resources can be created, deleted or changed if needed. The most crucial from Kubernetes permissions are Kubernetes RoleBindings and ClusterRoles/Roles. Roles present a set of permissions, in turn RoleBindings map Kubernetes Role to representative Keycloak groups, so a group member can have just appropriate permissions.
resource \"keycloak_openid_client_scope\" \"openid_client_scope\" {\n realm_id = <realm_id>\n name = \"groups\"\n description = \"When requested, this scope will map a user's group memberships to a claim\"\n include_in_token_scope = true\n consent_screen_text = false\n}\n
Add scope to the client by selecting all default client scope:
The resource creation takes around 20-30 minutes. The resource doesn't support updating, so each change will lead to deletion of the old instance and creation of a new instance instead.
When creating the Keycloak group, ClusterRole, and ClusterRoleBinding, a user receives cluster admin permissions. There is also an option to provide admin permissions just to a particular namespace or another resources set in another namespace. For details, please refer to the Mixing Kubernetes Roles page.
Before testing, ensure that a user is a member of the correct Keycloak group. To add a user to a Keycloak group:
Open Keycloak
Choose realm
Open user screen with search field
Find a user and open the configuration
Open Groups tab
In Available Groups, choose an appropriate group
Click the Join button
The group should appear in the Group Membership list
Follow the steps below to test the configuration:
Run kubectl command, it is important to specify the correct kubeconfig:
KUBECONFIG=<path_to_oidc_kubeconfig> kubectl get ingresses -n <namespace_name>\n
After the first run and redirection to the Keycloak login page, log in using credentials (login:password) or using SSO Provider. In case of the successful login, you will receive the following notification that can be closed:
OIDC Successful Login
As the result, a respective response from the Kubernetes will appear in the console in case a user is configured correctly and is a member of the correct group and Roles/RoleBindings.
If something is not set up correctly, the following output error will be displayed:
Error from server (Forbidden): ingresses.networking.k8s.io is forbidden:\nUser \"https://<keycloak_url>/auth/realms/<realm>#<keycloak_user_id>\"\ncannot list resource \"ingresses\" in API group \"networking.k8s.io\" in the namespace \"<namespace_name>\"\n
To update the session, clear cache. The default location for the login cache:
rm -rf ~/.kube/cache\n
"},{"location":"operator-guide/configure-keycloak-oidc-eks/#access-cluster-via-lens","title":"Access Cluster via Lens","text":"
To access the Kubernetes cluster via Lens, follow the steps below to configure it:
Add a new kubeconfig to the location where Lens has access. The default location of the kubeconfig is ~/.kube/config but it can be changed by navigating to File -> Preferences -> Kubernetes -> Kubeconfig Syncs;
(Optional) Using Windows, it is recommended to reboot the system after adding a new kubeconfig;
Authenticate on the Keycloak login page to be able to access the cluster.
Note
Lens does not add namespaces of the project automatically, so it is necessary to add them manually, simply go to Settings -> Namespaces and add the namespaces of a project.
In dynamic projects, changes to the container registry may be necessary. This section provides instructions for switching the container registry.
Warning
Exercise caution: Removing registry settings may disrupt your CI/CD process. New components created after changing the registry, including Components and Environments, will seamlessly function. However, existing 'Components' require additional steps, as outlined below.
To remove container registry integration from the EDP, follow the steps below:
1. In the EDP Portal main menu, navigate to EDP -> Configuration -> Registry.
2. Click the Reset registry button, type the confirm word and then click Confirm:
Registry settings
"},{"location":"operator-guide/container-registries/#update-registry-for-the-existing-components-and-environments","title":"Update Registry for the Existing Components and Environments","text":"
The EPAM Delivery Platform uses CodebaseImageStream custom resource to define Container Registry settings for the codebases. To update the registry for the existing codebases, follow the steps below:
List all the existing CodebaseImageStream CR(s) and copy their <name> and <codebase name> fields:
kubectl get codebaseimagestream -n edp\n
Patch the CodebaseImageStream CR(s) using the commands for the registry you switched to:
If necessary, update the registry credentials for the existing CD pipelines by copying the regcred secret from the edp namespace to all the namespaces managed by the platform. To get the list of the namespaces, run the following command:
kubectl get stages -n edp -o jsonpath='{range .items[*]}{.spec.namespace}{\"\\n\"}{end}'\n
"},{"location":"operator-guide/container-registry-harbor-integration-tekton-ci/","title":"Harbor Integration","text":""},{"location":"operator-guide/container-registry-harbor-integration-tekton-ci/#integrate-harbor-with-edp-pipelines","title":"Integrate Harbor With EDP Pipelines","text":"
Harbor serves as a tool for storing images and artifacts. This documentation contains instructions on how to create a project in Harbor and set up a robot account for interacting with the registry from CI pipelines.
Harbor integration with Tekton enables the centralized storage of container images within the cluster, eliminating the need for external services. By leveraging Harbor as the container registry, users can manage and store their automation results and reports in one place.
Creating two accounts with different permissions to push (read/write) and pull (read-only) project images.
"},{"location":"operator-guide/container-registry-harbor-integration-tekton-ci/#create-new-project","title":"Create New Project","text":"
The process of creating new projects is the following:
Log in to the Harbor console using your credentials.
Navigate to the Projects menu, click the New Project button:
Projects menu
On the New Project menu, enter a project name that matches your EDP namespace in the Project Name field. Keep other fields as default and click OK to continue:
New Project menu
"},{"location":"operator-guide/container-registry-harbor-integration-tekton-ci/#set-up-robot-account","title":"Set Up Robot Account","text":"
To make EDP and Harbor project interact with each other, set up a robot account:
Navigate to your newly created project, select Robot Accounts menu and choose New Robot Account:
Create Robot Account menu
In the pop-up window, fill in the fields as follows:
Name - edp-push;
Expiration time - set the value which is aligned with your organization policy;
Description - read/write permissions;
Permissions - Pull Repository and Push Repository.
To proceed, click the ADD button:
Robot Accounts menu
In the appeared window, copy the robot account credentials or click the Export to file button to save the secret and account name locally:
New credentials for Robot Account
Provision the kaniko-docker-config secrets using kubectl, EDP Portal or with the externalSecrets operator:
It is highly recommended to delete all the resources created via EDP Portal UI first. It can be:
Applications;
Libraries;
Autotests;
Infrastructures;
CD Pipelines.
We recommend deleting them via EDP Portal UI respectively, although it is also possible to delete all the EDP Portal resources using the kubectl delete command.
Delete application namespaces. They should be called according to the edp-<cd-pipeline>-<stage-name> pattern.
Uninstall EDP the same way it was installed.
Run the script that deletes the rest of the custom resources:
The script will prompt user to specify the namespace where EDP was deployed in and choose if the namespace is going to be deleted. This script will delete EDP custom resources in the namespace specified by user.
In Keycloak, delete the edp-main realm, also delete client which is supposed to be called by the edp-main pattern in the openshift realm.
This instruction offers a comprehensive guide on deploying an Amazon Elastic Kubernetes Service (EKS) cluster, ensuring a scalable and secure Kubernetes environment on AWS. For those looking to optimize their EKS cluster configurations, it is highly recommended to consult the AWS EKS Best Practices guide. This resource covers a wide range of topics crucial for the successful deployment and operation of your EKS clusters, including:
Security: Best practices for securing your EKS clusters, including IAM roles, network policies, and secrets management.
Networking: Guidance on setting up VPCs, subnets, and load balancers to ensure efficient and secure network traffic.
Monitoring and Logging: Strategies for implementing comprehensive monitoring and logging solutions using AWS CloudWatch and other tools to maintain visibility into cluster performance and operational health.
Performance: Tips for optimizing cluster performance through the proper selection of EC2 instances, efficient load balancing, and autoscaling configurations.
Cost Optimization: Techniques for managing and reducing costs associated with running EKS clusters, including instance selection and resource allocation strategies.
By adhering to these best practices, developers and system administrators can ensure that their AWS EKS clusters are robust, secure, and cost-effective, facilitating a smooth and efficient CI/CD pipeline for software development.
Our approach to deploying the AWS EKS Cluster is based on the widely-used terraform-aws-eks module from the Terraform AWS Modules community. This module facilitates the creation of AWS Elastic Kubernetes Service (EKS) resources with best practices in mind. We encourage users to review the module's documentation to fully understand its capabilities and how it aligns with the requirements of your specific deployment scenario.
Before the EKS cluster deployment and configuration, make sure to check the prerequisites. Install the required tools listed below:
Git
Terraform
AWS CLI
tfenv
To check the correct tools installation, run the following commands:
Before initiating the deployment, it is crucial to consult the AWS Service Limits documentation. Please review and adjust these limits as necessary to ensure your deployment proceeds smoothly without hitting service constraints.
"},{"location":"operator-guide/deploy-aws-eks/#aws-iam-roles","title":"AWS IAM Roles","text":"
This step covers the EKSDeployerRole AWS IAM role creation. To create the role, take the following steps:
Navigate to the IAM module directory:
cd ../iam\n
Set up the backend for store Terraform states remotely and support state locking and consistency checking via DynamoDB. Insert the missing fields in the iam/providers.tf file:
Fill in the input variables for Terraform run in the iam/template.tfvars file. Refer to the iam/example.tfvars as an example. Please find the detailed description of the variables in the iam/variables.tf file:
Create the AWS VPC Subnets for instances and AWS ALB
Create the AWS VPC Routing
To accomplish the tasks outlined above, follow these steps:
Navigate to the VPC module directory:
cd ../vpc\n
Set up the backend for store Terraform states remotely and support state locking and consistency checking via DynamoDB. Insert the missing fields in the file vpc/providers.tf:
Fill in the input variables for Terraform run in the vpc/template.tfvars file. Use the vpc/example.tfvars as an example. Please find the detailed description of the variables in the vpc/variables.tf file:
"},{"location":"operator-guide/deploy-aws-eks/#deploy-and-preconfigure-aws-eks","title":"Deploy and Preconfigure AWS EKS","text":"
This step will cover the following topics:
Create the EKS Cluster
Create the AWS ASGs for the EKS Cluster
Create the AWS ALB
(Optional) Create the AWS IAM role Kaniko to use AWS ECR
To accomplish the tasks outlined above, follow these steps:
Navigate to the EKS module directory:
cd ../eks\n
Set up the backend for store Terraform states remotely and support state locking and consistency checking via DynamoDB. Insert the missing fields in the eks/providers.tf file:
Fill in the input variables for Terraform run in the eks/template.tfvars file. Use the eks/example.tfvars as an example. Please find the detailed description of the variables in the eks/variables.tf file:
Once AWS EKS Cluster is successfully deployed, you can navigate to our EDP addons to install and manage cluster applications using the GitOps approach.
"},{"location":"operator-guide/deploy-aws-eks/#argo-cd-configuration-optional","title":"Argo CD Configuration (Optional)","text":"
This section covers configuring Argo CD for further integrating with an external EKS cluster. This integration necessitates creating two AWS IAM roles:
AWSIRSA_Test_ArgoCDMaster AWS IAM role - for setting up IRSA annotations for the Argo CD application;
EDPArgoCDClusterAdmin AWS IAM role - for working with external EKS clusters and further adding them (please refer to the Add Cluster page for details).
"},{"location":"operator-guide/deploy-aws-eks/#argo-cd-iam-role-for-shared-eks-cluster","title":"Argo CD IAM Role for Shared EKS Cluster","text":"
This step covers the AWSIRSA_Test_ArgoCDMaster AWS IAM role creation procedure. To create the role, take the following steps:
Navigate to the Argo CD module directory:
cd ../argo-cd\n
Set up the backend for store Terraform states remotely and support state locking and consistency checking via DynamoDB. Insert the missing fields in the argo-cd/providers.tf file:
Fill in the input variables for Terraform run in the argo-cd/template.tfvars file. Refer to the argo-cd/example.tfvars as an example. Please find the detailed description of the variables in the argo-cd/variables.tf file:
Once AWSIRSA_Test_ArgoCDMaster AWS IAM Role is successfully created, you can navigate to our EDP addons to set up IRSA annotations for the Argo CD application:
"},{"location":"operator-guide/deploy-aws-eks/#argo-cd-iam-role-for-external-eks-cluster","title":"Argo CD IAM Role for External EKS Cluster","text":"
This step covers the EDPArgoCDClusterAdmin AWS IAM role creation procedure. To create the role, take the following steps:
Navigate to the Argo CD module directory:
cd ../argo-cd\n
Set up the backend for store Terraform states remotely and support state locking and consistency checking via DynamoDB. Insert the missing fields in the argo-cd/providers.tf file:
Fill in the input variables for Terraform run in the argo-cd/template.tfvars file. Refer to the argo-cd/example.tfvars as an example. Please find the detailed description of the variables in the argo-cd/variables.tf file:
This instruction provides detailed information on the OKD 4.10 cluster deployment in the AWS Cloud and contains the additional setup necessary for the managed infrastructure.
A full description of the cluster deployment can be found in the official documentation.
Create the AWS IAM user with the required permissions. Make sure the AWS account is active, and the user doesn't have a permission boundary. Remove any Service Control Policy (SCP) restrictions from the AWS account.
Generate a key pair for cluster node SSH access. Please perform the steps below:
Generate the SSH key. Specify the path and file name, such as ~/.ssh/id_ed25519, of the new SSH key. If there is an existing key pair, ensure that the public key is in the ~/.ssh directory.
Before deploying the OKD cluster, please perform the steps below:
Download the OKD installer.
Extract the installation program:
tar -xvf openshift-install-linux.tar.gz\n
Download the installation pull secret for any private registry. This pull secret allows to authenticate with the services that are provided by the authorities, including Quay.io, serving the container images for OKD components. For example, here is a pull secret for Docker Hub:
To specify more details about the OKD cluster platform or to modify the values of the required parameters, customize the install-config.yaml file for the AWS. Please see below an example of the customized file:
If the cloud provider account configured on the host does not have sufficient permissions to deploy the cluster, the installation process stops, and the missing permissions are displayed.
When the cluster deployment is completed, directions for accessing the cluster are displayed in the terminal, including a link to the web console and credentials for the kubeadmin user. The kubeconfig for the cluster will be located in okd-deployment/auth/kubeconfig.
Example output
...\nINFO Install complete!\nINFO To access the cluster as the system:admin user when using 'oc', run 'export KUBECONFIG=/home/myuser/install_dir/auth/kubeconfig'\nINFO Access the OpenShift web-console here: https://console-openshift-console.apps.mycluster.example.com\nINFO Login to the console with the user: \"kubeadmin\", and password: \"4vYBz-Ee6gm-ymBZj-Wt5AL\"\nINFO Time elapsed: 36m22s:\n
Warning
The Ignition config files contain certificates that expire after 24 hours, which are then renewed at that time. Do not turn off the cluster for this time, or you will have to update the certificates manually. See OpenShift Container Platform documentation for more information.
"},{"location":"operator-guide/deploy-okd-4.10/#log-into-the-cluster","title":"Log Into the Cluster","text":"
"},{"location":"operator-guide/deploy-okd-4.10/#manage-okd-cluster-without-the-inbound-rules","title":"Manage OKD Cluster Without the Inbound Rules","text":"
In order to manage the OKD cluster without the 0.0.0.0/0 inbound rules, please perform the steps below:
Create a Security Group with a list of your external IPs:
This instruction provides detailed information on the OKD 4.9 cluster deployment in the AWS Cloud and contains the additional setup necessary for the managed infrastructure.
A full description of the cluster deployment can be found in the official documentation.
Create the AWS IAM user with the required permissions. Make sure the AWS account is active, and the user doesn't have a permission boundary. Remove any Service Control Policy (SCP) restrictions from the AWS account.
Generate a key pair for cluster node SSH access. Please perform the steps below:
Generate the SSH key. Specify the path and file name, such as ~/.ssh/id_ed25519, of the new SSH key. If there is an existing key pair, ensure that the public key is in the ~/.ssh directory.
Add the SSH private key identity to the SSH agent for a local user if it has not already been added.
eval \"$(ssh-agent -s)\"\n
Add the SSH private key to the ssh-agent:
ssh-add <path>/<file_name>\n
"},{"location":"operator-guide/deploy-okd/#prepare-for-the-deployment-process","title":"Prepare for the Deployment Process","text":"
Before deploying the OKD cluster, please perform the steps below:
Download the OKD installer.
Extract the installation program:
tar -xvf openshift-install-linux.tar.gz\n
Download the installation pull secret for any private registry.
This pull secret allows to authenticate with the services that are provided by the included authorities, including Quay.io serving container images for OKD components. For example, here is a pull secret for Docker Hub:
To specify more details about the OKD cluster platform or to modify the values of the required parameters, customize the install-config.yaml file for AWS. Please see an example of the customized file below:
If the cloud provider account configured on the host does not have sufficient permissions to deploy the cluster, the installation process stops, and the missing permissions are displayed.
When the cluster deployment is completed, directions for accessing the cluster are displayed in the terminal, including a link to the web console and credentials for the kubeadmin user. The kubeconfig for the cluster will be located in okd-deployment/auth/kubeconfig.
Example output
...\nINFO Install complete!\nINFO To access the cluster as the system:admin user when using 'oc', run 'export KUBECONFIG=/home/myuser/install_dir/auth/kubeconfig'\nINFO Access the OpenShift web-console here: https://console-openshift-console.apps.mycluster.example.com\nINFO Login to the console with the user: \"kubeadmin\", and password: \"4vYBz-Ee6gm-ymBZj-Wt5AL\"\nINFO Time elapsed: 36m22s:\n
Warning
The Ignition config files contain certificates that expire after 24 hours, which are then renewed at that time. Do not turn off the cluster for this time, or you will have to update the certificates manually. See OpenShift Container Platform documentation for more information.
"},{"location":"operator-guide/deploy-okd/#log-into-the-cluster","title":"Log Into the Cluster","text":"
The Amazon Elastic Block Store (Amazon EBS) Container Storage Interface (CSI) driver allows Amazon Elastic Kubernetes Service (Amazon EKS) clusters to manage the lifecycle of Amazon EBS volumes for Kubernetes Persistent Volumes.
An existing AWS Identity and Access Management (IAM) OpenID Connect (OIDC) provider for your cluster. To determine whether you already have an OIDC provider or to create a new one, see Creating an IAM OIDC provider for your cluster.
To add an Amazon EBS CSI add-on, please follow the steps below:
Check your cluster details (the random value in the cluster name will be required in the next step):
kubectl cluster-info\n
Create Kubernetes IAM Trust Policy for Amazon EBS CSI Driver. Replace AWS_ACCOUNT_ID with your account ID, AWS_REGION with your AWS Region, and EXAMPLED539D4633E53DE1B71EXAMPLE with the value that was returned in the previous step. Save this Trust Policy into a file aws-ebs-csi-driver-trust-policy.json.
To get the notion of the IAM Role creation, please refer to the official documentation.
Create the IAM role, for example:
aws iam create-role \\\n --role-name AmazonEKS_EBS_CSI_DriverRole \\\n --assume-role-policy-document file://\"aws-ebs-csi-driver-trust-policy.json\"\n
Attach the required AWS Managed Policy AmazonEBSCSIDriverPolicy to the role with the following command:
aws iam attach-role-policy \\\n --policy-arn arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy \\\n --role-name AmazonEKS_EBS_CSI_DriverRole\n
Add the Amazon EBS CSI add-on using the AWS CLI. Replace my-cluster with the name of your cluster, AWS_ACCOUNT_ID with your account ID, and AmazonEKS_EBS_CSI_DriverRole with the name of the role that was created earlier:
When the plugin is deployed, it creates the ebs-csi-controller-sa service account. The service account is bound to a Kubernetes ClusterRole with the required Kubernetes permissions. The ebs-csi-controller-sa service account should already be annotated with arn:aws:iam::AWS_ACCOUNT_ID:role/AmazonEKS_EBS_CSI_DriverRole. To check the annotation, please run:
kubectl get sa ebs-csi-controller-sa -n kube-system -o=jsonpath='{.metadata.annotations}'\n
In case pods have errors, restart the ebs-csi-controller deployment:
EDP uses two different methods to regulate access to resources, each tailored to specific scenarios:
The initial method involves roles and groups in Keycloak and is used for SonarQube and partly for Nexus.
The second method of resource access control in EDP involves EDP custom resources. This approach requires modifying custom resources that outline the required access privileges for every user or group and is used to govern access to Gerrit, Nexus, EDP Portal, EKS Cluster and Argo CD.
Info
These two approaches are not interchangeable, as each has its unique capabilities.
The Keycloak realm of edp has two realm roles with a composite types named administrator and developer:
The administrator realm role is designed for users who need administrative access to the tools used in the project. This realm role contains the sonar-administrators role. Users who are assigned the administrator realm role will be granted these two roles automatically.
The developer realm role, on the other hand, is designed for users who need access to the development tools used in the project. This realm role also contains the sonar-developers role. Users who are assigned the developer realm role will be granted these two roles automatically.
These realm roles have been defined to make it easier to assign groups of rights to users.
The table below shows the realm roles and the composite types they relate to.
Realm Role Name Regular Role Composite role administrator developer sonar-administrators sonar-developers"},{"location":"operator-guide/edp-access-model/#realm-groups","title":"Realm Groups","text":"
EDP uses two different realms for group management, edp and openshift:
The edp realm contains two groups that are specifically used for controlling access to Argo CD. These groups are named ArgoCDAdmins and ArgoCD-edp-users.
The openshift realm contains five groups that are used for access control in both the EDP Portal and EKS cluster. These groups are named edp-oidc-admins, edp-oidc-builders, edp-oidc-deployers,edp-oidc-developers and edp-oidc-viewers.
Realm Group Name Realm Name ArgoCDAdmins edpArgoCD-edp-usersedpedp-oidc-admins openshift edp-oidc-builders openshift edp-oidc-deployers openshift edp-oidc-developers openshift edp-oidc-viewers openshift"},{"location":"operator-guide/edp-access-model/#sonarqube","title":"SonarQube","text":"
In the case of SonarQube, there are two ways to manage access: via Keycloak and via EDP approach. This sections describes both of the approaches.
"},{"location":"operator-guide/edp-access-model/#manage-access-via-keycloak","title":"Manage Access via Keycloak","text":"
SonarQube access is managed using Keycloak roles in the edp realm. The sonar-developers and sonar-administrators realm roles are the two available roles that determine user access levels. To grant access, the corresponding role must be added to the user in Keycloak.
For example, a user who needs developer access to SonarQube should be assigned the sonar-developers or developer composite role in Keycloak.
"},{"location":"operator-guide/edp-access-model/#edp-approach-for-managing-access","title":"EDP Approach for Managing Access","text":"
EDP provides its own SonarQube Permission Template, which is used to manage user access and permissions for SonarQube projects.
The template is stored in the custom SonarQube resource of the operator, an example of a custom resource can be found below.
The SonarQube Permission Template contains three groups: non-interactive-users, sonar-administrators and sonar-developers:
non-interactive-users are users who do not require direct access to the SonarQube project but need to be informed about the project's status and progress. This group has read-only access to the project, which means that they can view the project's data and metrics but cannot modify or interact with it in any way.
sonar-administrators are users who have full control over the SonarQube project. They have the ability to create, modify, and delete projects, as well as manage user access and permissions. This group also has the ability to configure SonarQube settings and perform other administrative tasks.
sonar-developers are users who are actively working on the SonarQube project. They have read and write access to the project, which means that they can modify the project's data and metrics. This group also has the ability to configure project-specific settings and perform other development tasks.
These groups are designed to provide different levels of access to the SonarQube project, depending on the user's role and responsibilities.
Info
If a user has no group, it will have the sonar-users group by default. This group does not have any permissions in the edp-default Permission Template.
The permissions that are attached to each of the groups are described below in the table:
Group Name Permissions non-interactive-users user sonar-administrators admin, user sonar-developers codeviewer, issueadmin, securityhotspotadmin, user sonar-users -"},{"location":"operator-guide/edp-access-model/#nexus","title":"Nexus","text":"
Users authenticate to Nexus using their Keycloak credentials.
During the authentication process, the OAuth2-Proxy receives the user's role from Keycloak.
Info
Only users with either the administrator or developer role in Keycloak can access Nexus.
Nexus has four distinct roles available, including edp-admin, edp-viewer, nx-admin and nx-anonymous. To grant the user access to one or more of these roles, an entry must be added to the custom Nexus resource.
For instance, in the context of the custom Nexus resource, the user \"user_1@example.com\" has been assigned the \"nx-admin\" role. An example can be found below:
The user should use their credentials from Keycloak when authenticating to Gerrit.
After logging into Gerrit, the user is not automatically attached to any groups. To add a user to a group, the GerritGroupMember custom resource must be created. This custom resource specifies the user's email address and the name of the group to which they should be added.
The ConfigMap below is an example of the GerritGroupMember resource:
After the GerritGroupMember resource is created, the user will have the permissions and access levels associated with that group.
"},{"location":"operator-guide/edp-access-model/#edp-portal-and-eks-cluster","title":"EDP Portal and EKS Cluster","text":"
Both Portal and EKS Cluster use Keycloak groups for controlling access. Users need to be added to the required group in Keycloak to get access. The groups that are used for access control are in the openshift realm.
Note
The openshift realm is used because a Keycloak client for OIDC is in this realm.
Independent group: provides the minimum required permission set.
Extension group: extends the rights of an independent group.
For example, the edp-oidc-viewers group can be extended with rights from the edp-oidc-builders group.
Group Name Independent Group Extension Group edp-oidc-adminsedp-oidc-developersedp-oidc-viewersedp-oidc-buildersedp-oidc-deployers Name Action List View Getting of all namespaced resources Build Starting a PipelineRun from EDP Portal UI Deploy Deploying a new version of application via Argo CD Application Group Name View Build Deploy Full Namespace Access edp-oidc-adminsedp-oidc-developersedp-oidc-viewersedp-oidc-buildersedp-oidc-deployers"},{"location":"operator-guide/edp-access-model/#cluster-rbac-resources","title":"Cluster RBAC Resources","text":"
The edp namespace has five role bindings that provide the necessary permissions for the Keycloak groups described above.
Role Binding Name Role Name Groups tenant-admin cluster-admin edp-oidc-admins tenant-builder tenant-builder edp-oidc-builders tenant-deployer tenant-deployer edp-oidc-deployers tenant-developer tenant-developer edp-oidc-developers tenant-viewer view edp-oidc-viewers , edp-oidc-developers
Note
EDP provides an aggregate ClusterRole with permissions to view custom EDP resources. ClusterRole is named edp-aggregate-view-edp
Info
The tenant-admin RoleBinding will be created in a created namespace by cd-pipeline-operator. tenant-admin RoleBinding assign the admin role to edp-oidc-admins and edp-oidc-developers groups.
"},{"location":"operator-guide/edp-access-model/#grant-user-access-to-the-created-namespaces","title":"Grant User Access to the Created Namespaces","text":"
To provide users with admin or developer privileges for project namespaces, they need to be added to the edp-oidc-admins and edp-oidc-developers groups in Keycloak.
In Argo CD, groups are specified when creating an AppProject to restrict access to deployed applications. To gain access to deployed applications within a project, the user must be added to their corresponding Argo CD group in Keycloak. This ensures that only authorized users can access and modify applications within the project.
Info
By default, only the ArgoCDAdmins group is automatically created in Keycloak.
EDP installation area on a diagram is described by following link;
Once the above step is executed, edp-cd-pipeline-operator service account will be linked to kiosk-edit ClusterRole to get an ability for leveraging Kiosk specific resources (e.g. Space);
Newly created stage in edp installation of EDP generates new Kiosk Space resource that is linked to edp Kiosk Account;
According to Kiosk doc the Space resource creates namespace with RoleBinding that contains relation between service account which is linked to Kiosk Account and kiosk-space-admin ClusterRole. As cd-pipeline-operator ServiceAccount is linked to Account, it has admin permissions in all generated by him namespaces.
This page is a detailed guide on integrating Keycloak with the edp-keycloak-operator to serve as an identity provider for AWS Elastic Kubernetes Service (EKS). It provides step-by-step instructions for creating necessary realms, users, roles, and client configurations for a seamless Keycloak-EKS collaboration. Additionally, it includes guidelines on installing the edp-keycloak-operator using Helm charts.
"},{"location":"operator-guide/eks-oidc-integration/#connect-keycloak-operator-to-keycloak","title":"Connect Keycloak Operator to Keycloak","text":"
The next stage after installing Keycloak is to integrate it with the Keycloak operator. It can be implemented with the following steps:
Create the keycloak secret that will contain username and password to perform the integration. Set your own password. The username must be orchestrator:
As a result, Keycloak is integrated with the AWS Elastic Kubernetes Service. This integration enables users to log in to the EKS cluster effortlessly using their kubeconfig files while managing permissions through Keycloak.
"},{"location":"operator-guide/enable-irsa/","title":"Associate IAM Roles With Service Accounts","text":""},{"location":"operator-guide/enable-irsa/#associate-iam-roles-with-service-accounts","title":"Associate IAM Roles With Service Accounts","text":"
This page contains accurate information on how to associate an IAM role with the service account (IRSA) in EPAM Delivery Platform.
Get acquainted with the AWS Official Documentation on the subject before proceeding.
"},{"location":"operator-guide/enable-irsa/#common-configuration-of-iam-roles-with-service-accounts","title":"Common Configuration of IAM Roles With Service Accounts","text":"
To successfully associate the IAM role with the service account, follow the steps below:
Create an IAM role that will further be associated with the service account. This role must have the following trust policy:
Deploy the amazon-eks-pod-identity-webhook v0.2.0.
Note
The amazon-eks-pod-identity-webhook functionality is provided out of the box in EKS v1.21 and higher. This does not apply if the cluster has been upgraded from older versions. Therefore, skip step 2 and continue from step 3 in this documentation.
2.1. Provide the stable(ed8c41f) version of the Docker image in the deploy/deployment-base.yaml file.
2.2. Provide ${CA_BUNDLE}_in the_deploy/mutatingwebhook.yaml file:
secret_name=$(kubectl -n default get sa default -o jsonpath='{.secrets[0].name}') \\\n CA_BUNDLE=$(kubectl -n default get secret/$secret_name -o jsonpath='{.data.ca\\.crt}' | tr -d '\\n')\n
2.3. Deploy the Webhook:
kubectl apply -f deploy/\n
2.4. Approve the csr:
csr_name=$(kubectl get csr -o jsonpath='{.items[?(@.spec.username==\"system:serviceaccount:default:pod-identity-webhook\")].metadata.name}')\n kubectl certificate approve $csr_name\n
Annotate the created service account with the IAM role:
External Secrets Operator (ESO) can be integrated with EDP.
There are multiple Secrets Providers that can be used within ESO. EDP is integrated with two major providers:
Kubernetes Secrets
AWS Systems Manager Parameter Store
EDP uses various secrets to integrate various applications. Below is a list of secrets that are used in the EPAM Delivery Platform and their description. All the secrets are encoded in Base64 format.
Secret Name Fields Description Used by keycloak usernamepassword Username and password with specific rights for EDP tenant in Keycloak keycloak-operator ci-defectdojo tokenurl DefectDojo tokenDefectDojo URL edp-tekton kaniko-docker-config .dockerconfigjson Serialized JSON that follows docker config patterns edp-tekton regcred .dockerconfigjson Serialized JSON that follows docker config patterns cd-pipeline-operator ci-github id_rsatokensecretString Private key from github repo API tokenRandom string edp-tekton ci-gitlab id_rsatokensecretString Private key from gitlab repo API tokenRandom string edp-tekton ci-jira usernamepassword Jira username Jira password edp-codebase-operator ci-sonarqube tokenurl SonarQube tokenSonarQube URL edp-tekton ci-nexus usernamepasswordurl Nexus usernameNexus passwordNexus URL edp-tekton ci-dependency-track tokenurl Dependency-Track tokenDependency-Track URL edp-tekton oauth2-proxy-cookie-secret cookie-secret Secret key for oauth2-proxy edp-install keycloak-client-headlamp-secret clientSecret Secret key for keycloak client keycloak-operator ci-argocd tokenurl Argo CD tokenArgo CD URL edp-tekton"},{"location":"operator-guide/external-secrets-operator-integration/#edp-core-secrets","title":"EDP Core Secrets","text":"
The list below represents the baseline required for full operation within EDP:
kaniko-docker-config: Used for pushing docker images to a specific registry.
ci-sonarqube: Used in the CI process for SonarQube integration.
ci-nexus: Used for pushing artifacts to the Nexus storage.
These secrets are mandatory for Tekton pipelines to work properly.
All secrets are stored in Kubernetes in pre-defined namespaces. EDP suggests using the following approach for secrets management:
EDP_NAMESPACE-vault, where EDP_NAMESPACE is a name of the namespace where EDP is deployed, such as edp-vault. This namespace is used by EDP platform. Access to secrets in the edp-vault is permitted only for EDP Administrators.
EDP_NAMESPACE-cicd-vault, where EDP_NAMESPACE is a name of the namespace where EDP is deployed, such as edp-cicd-vault. Development team uses access to secrets in the edp-cicd-vaultfor microservices development.
See a diagram below for more details:
In order to install EDP, a list of passwords must be created. Secrets are provided automatically when using ESO.
Each secret must be defined by the ExternalSecret object. A code example below creates the keycloak secret in the edp namespace based on a secret with the same name in the edp-vault namespace:
apiVersion: external-secrets.io/v1beta1\nkind: ExternalSecret\nmetadata:\n name: keycloak\n namespace: edp\nspec:\n refreshInterval: 1h\n secretStoreRef:\n kind: SecretStore\n name: edp-vault\n # target:\n # name: secret-to-be-created # name of the k8s Secret to be created. metadata.name used if not defined\n data:\n - secretKey: username # key to be created\n remoteRef:\n key: keycloak # remote secret name\n property: username # value will be fetched from this field\n - secretKey: password # key to be created\n remoteRef:\n key: keycloak # remote secret name\n property: password # value will be fetched from this field\n
Apply the same approach for enabling secrets management in the namespaces used for microservices development, such as sit and qa on the diagram above.
"},{"location":"operator-guide/external-secrets-operator-integration/#aws-systems-manager-parameter-store","title":"AWS Systems Manager Parameter Store","text":"
AWS SSM Parameter Store can be used as a Secret Provider for ESO. For EDP, it is recommended to use the IAM Roles For Service Accounts approach (see a diagram below).
"},{"location":"operator-guide/external-secrets-operator-integration/#aws-parameter-store-in-edp-scenario","title":"AWS Parameter Store in EDP Scenario","text":"
In order to install EDP, a list of passwords must be created. Follow the steps below, to get secrets from the SSM:
In the AWS, create an AWS IAM policy and an IAM role used by ServiceAccount in SecretStore. The IAM role must have permissions to get values from the SSM Parameter Store.
a. Create an IAM policy that allows to get values from the Parameter Store with the edp/ path. Use your AWS Region and AWS Account Id:
b. Create an AWS IAM role with trust relationships (defined below) and attach the IAM policy. Put your string for Federated value (see more on IRSA enablement for EKS Cluster) and AWS region.
Create a secret in the AWS Parameter Store with the name /edp/my-json-secret. This secret is represented as a parameter of type string within the AWS Parameter Store:
"},{"location":"operator-guide/github-debug-webhooks/","title":"Debug GitHub Webhooks in Jenkins","text":""},{"location":"operator-guide/github-debug-webhooks/#debug-github-webhooks-in-jenkins","title":"Debug GitHub Webhooks in Jenkins","text":"
A webhook enables third-party services like GitHub to send real-time updates to an application. Updates are triggered by an event or an action by the webhook provider (for example, a push to a repository, a Pull Request creation), and pushed to the application via HTTP requests, namely, Jenkins. The GitHub Jenkins job provisioner creates a webhook in the GitHub repository during the Create release pipeline once the Integrate GitHub/GitLab in Jenkins is enabled and the GitHub Webhook Configuration is completed.
The Jenkins setup in EDP uses the following plugins responsible for listening on GitHub webhooks:
GitHub plugin is configured to listen on Push events.
GitHub Pull Request Builder is configured to listen on Pull Request events.
In case of any issues with webhooks, try the following solutions:
Check that the firewalls are configured to accept the incoming traffic from the IP address range that is described in the GitHub documentation.
Check that GitHub Personal Access Token is correct and has sufficient scope permissions.
Check that the job has run at least once before using the hook (once an application is created in EDP, the build job should be run automatically in Jenkins).
Check that both Push and issue comment and Pull Request webhooks are created on the GitHub side (unlike GitLab, GitHub does not need separate webhooks for each branch):
Go to the GitHub repository -> Settings -> Webhooks.
Webhooks settings
Click each webhook and check if the event delivery is successful:
The URL payload must be https://jenkins-the-host.com/github-webhook/ for the GitHub plugin and https://jenkins-the-host.com/ghprbhook/ for the GitHub Pull Request Builder.
The content type must be application/json for Push events and application/x-www-form-urlencoded for Pull Request events.
The html_url in the Payload request must match the repository URL and be without .git at the end of the URL.
Check that the X-Hub-Signature secret is verified. It is provided by the Jenkins GitHub plugin for Push events and by the GitHub Pull Request Builder plugin for Pull Request events. The Secret field is optional. Nevertheless, if incorrect, it can prevent webhook events.
For the GitHub plugin (Push events):
Go to Jenkins -> Manage Jenkins -> Configure System, and find the GitHub plugin section.
Select Advanced -> Shared secrets to add the secret via the Jenkins Credentials Provider.
For the GitHub Pull Request Builder (Pull Request events):
Go to Jenkins -> Manage Jenkins -> Configure System, and find the GitHub Pull Request Builder plugin section.
Check Shared secret that can be added manually.
Redeliver events by clicking the Redeliver button and check the Response body.
Manage webhook
Note
Use Postman to debug webhooks. Add all headers to Postman from the webhook Request -> Headers field and send the payload (Request body) using the appropriate content type.
Jan 17, 2022 8:51:14 AM INFO org.jenkinsci.plugins.github.webhook.subscriber.PingGHEventSubscriber onEvent\nPING webhook received from repo <https://github.com/user-profile/user-repo>!\n
Jan 17, 2022 8:17:53 AM FINE org.jenkinsci.plugins.ghprb.GhprbRootAction\nGot payload event: ping\n
Check that the repo pushing to Jenkins, the GitHub project URL in the project configuration, and the repos in the pipeline Job must be lined up.
Enable the GitHub hook trigger for GITScm polling for the Build job.
GitHub hook trigger
Enable the GitHub Pull Request Builder for the Code Review job.
GitHub pull request builder
Filter through Jenkins log by using Jenkins custom log recorder:
Go to Manage Jenkins -> System log -> Add new log recorder.
The Push events for the GitHub:
Logger Log Level org.jenkinsci.plugins.github.webhook.subscriber.DefaultPushGHEventSubscriber ALL com.cloudbees.jenkins.GitHubPushTrigger ALL com.cloudbees.jenkins.GitHubWebHook ALL org.jenkinsci.plugins.github.webhook.WebhookManager ALL org.jenkinsci.plugins.github.webhook.subscriber.PingGHEventSubscriber ALL
The Pull Request events for the GitHub Pull Request Builder:
Logger Log Level org.jenkinsci.plugins.ghprb.GhprbRootAction ALL org.jenkinsci.plugins.ghprb.GhprbTrigger ALL org.jenkinsci.plugins.ghprb.GhprbPullRequest ALL org.jenkinsci.plugins.ghprb.GhprbRepository ALL
Note
Below is an example of using the Pipeline script with webhooks for the GitHub plugin implemented in the EDP pipelines:
"},{"location":"operator-guide/gitlab-debug-webhooks/","title":"Debug GitLab Webhooks in Jenkins","text":""},{"location":"operator-guide/gitlab-debug-webhooks/#debug-gitlab-webhooks-in-jenkins","title":"Debug GitLab Webhooks in Jenkins","text":"
A webhook enables third-party services like GitLab to send real-time updates to the application. Updates are triggered by an event or action by the webhook provider (for example, a push to a repository, a Merge Request creation), and pushed to the application via the HTTP requests, namely, Jenkins. The GitLab Jenkins job provisioner creates a webhook in the GitLab repository during the Create release pipeline once the Integrate GitHub/GitLab in Jenkins is enabled and the GitLab Integration is completed.
The Jenkins setup in EDP uses the GitLab plugin responsible for listening on GitLab webhook Push and Merge Request events.
In case of any issues with webhooks, try the following solutions:
Check that the firewalls are configured to accept incoming traffic from the IP address range that is described in the GitLab documentation.
Check that GitLab Personal Access Token is correct and has the api scope. If you have used the Project Access Token, make sure that the role is Owner or Maintainer, and it has the api scope.
Check that the job has run at least once before using the hook (once an application is created in EDP, the build job should be run automatically in Jenkins).
Check that both Push Events, Note Events and Merge Requests Events, Note Events webhooks are created on the GitLab side for each branch (unlike GitHub, GitLab must have separate webhooks for each branch).
Go to the GitLab repository -> Settings -> Webhooks:
Webhooks list
Click Edit next to each webhook and check if the event delivery is successful. If the webhook is sent, the Recent Deliveries list becomes available. Click View details.
Webhooks settings
The URL payload must be similar to the job URL on Jenkins. For example: https://jenkins-server.com/project/project-name/MAIN-Build-job is for the Push events. https://jenkins-server.com/project/project-name/MAIN-Code-review-job is for the Merge Request events.
The content type must be application/json for both events.
The \"web_url\" in the Request body must match the repository URL.
Project \"web_url\", \"path_with_namespace\", \"homepage\" links must be without .git at the end of the URL.
Verify the Secret token (X-Gitlab-Token). This token comes from the Jenkins job due to the Jenkins GitLab Plugin and is created by our Job Provisioner:
Go to the Jenkins job and select Configure.
Select Advanced under the Build Triggers and check the Secret token.
Secret token is optional and can be empty. Nevertheless, if incorrect, it can prevent webhook events.
Redeliver events by clicking the Resend Request button and check the Response body.
Note
Use Postman to debug webhooks. Add all headers to Postman from the webhook Request Headers field and send the payload (Request body) using the appropriate content type.
Jan 17, 2022 11:26:34 AM INFO com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic\nWebHook call ed with url: /project/project-name/MAIN-Build-job\nJan 17, 2022 11:26:34 AM INFO com.dabsquared.gitlabjenkins.trigger.handler.AbstractWebHookTriggerHandler handle\nproject-name/MAIN-Build-job triggered for push.\n
Jan 17, 2022 11:14:58 AM INFO com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic\nWebHook called with url: /project/project-name/MAIN-Code-review-job\n
Check that the repository pushing to Jenkins and the repository(ies) in the pipeline Job are lined up. GitLab Connection must be defined in the job settings.
Check that the settings in the Build Triggers for the Build job are as follows:
Build triggers build pipeline
Check that the settings in the Build Triggers for the Code Review job are as follows:
Build triggers code review pipeline
Filter through Jenkins log by using Jenkins custom log recorder:
Go to Manage Jenkins -> System Log -> Add new log recorder.
The Push and Merge Request events for the GitLab:
Logger Log Level com.dabsquared.gitlabjenkins.webhook.GitLabWebHook ALL com.dabsquared.gitlabjenkins.trigger.handler.AbstractWebHookTriggerHandler ALL com.dabsquared.gitlabjenkins.trigger.handler.merge.MergeRequestHookTriggerHandlerImpl ALL com.dabsquared.gitlabjenkins.util.CommitStatusUpdater ALL
"},{"location":"operator-guide/harbor-oidc/","title":"OIDC in Harbor","text":""},{"location":"operator-guide/harbor-oidc/#harbor-oidc-configuration","title":"Harbor OIDC Configuration","text":"
This page provides instructions for configuring OIDC authorization for Harbor. This enables the use of Single Sign-On (SSO) for authorization in Harbor and allows centralized control over user access and rights through a single configuration point.
Create the KeycloakClient custom resource by applying the HarborKeycloakClient.yaml file in the edp namespace. This custom resource will use the keycloak-client-harbor-secret to include the harbor client. After the download, you will receive the created harbor client, and the password that is actually the value of the Kubernetes secret from the step 1:
This page provides the instructions of configuring the OIDC authorization for EDP Portal UI, thus allowing using SSO for authorization in Portal and controlling user access and rights from one configuration point.
group = edp-oidc-admins, edp-oidc-builders, edp-oidc-deployers, edp-oidc-developers, edp-oidc-viewers (Should be created manually in the realm from point 1)
Note
The values indicated above are the result of the Keycloak configuration as an OIDC identity provider. To receive them, follow the instructions on the Keycloak OIDC EKS Configuration page.
"},{"location":"operator-guide/import-strategy-tekton/","title":"Integrate GitHub/GitLab in Tekton","text":""},{"location":"operator-guide/import-strategy-tekton/#integrate-githubgitlab-in-tekton","title":"Integrate GitHub/GitLab in Tekton","text":"
This page describes how to integrate EDP with GitLab or GitHub Version Control System.
To start from, it is required to add both Secret with SSH key, API token, and GitServer resources by taking the steps below.
Generate an SSH key pair and add a public key to GitLab or GitHub account.
ssh-keygen -t ed25519 -C \"email@example.com\"\n
Generate access token for GitLab or GitHub account with read/write access to the API. Both personal and project access tokens are applicable.
GitHubGitLab
To create access token in GitHub, follow the steps below:
Log in to GitHub.
Click the profile account and navigate to Settings -> Developer Settings.
Select Personal access tokens (classic) and generate a new token with the following parameters:
Repo permission
Note
The access below is required for the GitHub Pull Request Builder plugin to get Pull Request commits, their status, and author info.
Admin:repo permission Admin:org permission User permission
Warning
Make sure to save a new personal access token because it won`t be displayed later.
To create access token in GitLab, follow the steps below:
Log in to GitLab.
In the top-right corner, click the avatar and select Settings.
On the User Settings menu, select Access Tokens.
Choose a name and an optional expiry date for the token.
In the Scopes block, select the api scope for the token.
Personal access tokens
Click the Create personal access token button.
Note
Make sure to save the access token as there will not be any ability to access it once again.
In case you want to create a project access token instead of a personal one, take the following steps:
Log in to GitLab and navigate to the project.
On the User Settings menu, select Access Tokens.
Choose a name and an optional expiry date for the token.
Choose a role: Owner or Maintainer.
In the Scopes block, select the api scope for the token.
Project access tokens
Click the Create project access token button.
Create a secret in the edp namespace for the Git account with the id_rsa, username, and token fields. Take the following template as an example (use ci-gitlab instead of ci-github for GitLab):
EDP Portalkubectl
Navigate to EDP Portal -> EDP -> Configuration -> Git Servers. Fill in the required fields:
Project access tokens
Create a manifest file called secret.yaml with the following content filled in:
Argo CD enablement for EDP consists of two major steps:
Argo CD installation
Argo CD integration with EDP (SSO enablement, codebase onboarding, etc.)
Argo CD can be installed in several ways, please follow the official documentation for more details. It is also possible to install Argo CD using the edp-cluster-add-ons.
"},{"location":"operator-guide/install-argocd/#install-with-helm","title":"Install With Helm","text":"
Follow the steps below to install Argo CD using Helm:
For the OpenShift users:
When using the OpenShift platform, apply the SecurityContextConstraints resource. Change the namespace in the users section if required.
Check out the values.yaml file sample of the Argo CD customization, which is based on the HA mode without autoscaling:
View: kubernetes-values.yaml
redis-ha:\n enabled: true\n\ncontroller:\n enableStatefulSet: true\n\nserver:\n replicas: 2\n extraArgs:\n - \"--insecure\"\n env:\n - name: ARGOCD_API_SERVER_REPLICAS\n value: '2'\n ingress:\n enabled: true\n hosts:\n - \"argocd.<Values.global.dnsWildCard>\"\n\n rbacConfig:\n # users may be still be able to login,\n # but will see no apps, projects, etc...\n policy.default: ''\n scopes: '[groups]'\n policy.csv: |\n # default global admins\n g, ArgoCDAdmins, role:admin\n\nrepoServer:\n replicas: 2\n\n# Deploy without sso\ndex:\n enabled: false\n\n# Disabled for multitenancy env with single instance deployment\napplicationSet:\n enabled: false\n
View: openshift-values.yaml
redis-ha:\n enabled: true\n\ncontroller:\n enableStatefulSet: true\n\nserver:\n replicas: 2\n extraArgs:\n - \"--insecure\"\n env:\n - name: ARGOCD_API_SERVER_REPLICAS\n value: '2'\n route:\n enabled: true\n hostname: \"argocd.<.Values.global.dnsWildCard>\"\n termination_type: edge\n termination_policy: Redirect\n\n rbacConfig:\n # users may be still be able to login,\n # but will see no apps, projects, etc...\n policy.default: ''\n scopes: '[groups]'\n policy.csv: |\n # default global admins\n g, ArgoCDAdmins, role:admin\n\nrepoServer:\n replicas: 2\n\n# Deploy without sso\ndex:\n enabled: false\n\n# Disabled for multitenancy env with single instance deployment\napplicationSet:\n enabled: false\n
Please refer to the DefectDojo Helm Chart and Deploy DefectDojo into the Kubernetes cluster sections for details.
To install DefectDojo, follow the steps below:
Check that a security namespace is created. If not, run the following command to create it:
kubectl create namespace defectdojo\n
For the OpenShift users:
When using the OpenShift platform, install the SecurityContextConstraints resource. In case of using a custom namespace for defectdojo, change the namespace in the users section.
Check out the values.yaml file sample of the DefectDojo customization:
View: values.yaml
tag: 2.22.4\nfullnameOverride: defectdojo\nhost: defectdojo.<ROOT_DOMAIN>\nsite_url: https://defectdojo.<ROOT_DOMAIN>\nalternativeHosts:\n - defectdojo-django.defectdojo\n\ninitializer:\n # should be false after initial installation was performed\n run: true\ndjango:\n ingress:\n enabled: true # change to 'false' for OpenShift\n activateTLS: false\n uwsgi:\n livenessProbe:\n # Enable liveness checks on uwsgi container. Those values are use on nginx readiness checks as well.\n # default value is 120, so in our case 20 is just fine\n initialDelaySeconds: 20\n
Go to EDP Portal -> EDP -> Configuration -> DefectDojo and see the Managed by External Secret message.
More details about the External Secrets Operator integration procedure can be found in the External Secrets Operator Integration page.
After following the instructions provided, you should be able to integrate your DefectDojo with the EPAM Delivery Platform using one of the few available scenarios.
Inspect the main steps to install EPAM Delivery Platform. Please check the Prerequisites Overview page before starting the installation. Also to authenticate each of the release artifacts, please refer to the Verification of EDP Artifacts guide. There are two recommended ways to deploy EPAM Delivery Platform:
Using Helm (see below);
Using Argo CD GitOps approach;
Using AWS Marketplace.
Note
The installation process below is given for a Kubernetes cluster. The steps that differ for an OpenShift cluster are indicated in the notes.
Disclaimer
EDP is aligned with industry standards for storing and managing sensitive data, ensuring optimal security. However, the use of custom solutions introduces uncertainties, thus the responsibility for the safety of your data is totally covered by platform administrator.
EDP manages secrets via External Secret Operator to integrate with a multitude of utilities. For insights into the secrets in use and their utilization, refer to the provided External Secrets Operator Integration.
Create an edp namespace or a Kiosk space depending on whether Kiosk is used or not.
Without Kiosk, create a namespace:
kubectl create namespace edp\n
Note
For an OpenShift cluster, run the oc command instead of the kubectl one.
Kiosk is mandatory for EDP v.2.8.x. It is not implemented for the previous versions, and is optional for EDP since v.2.9.x.
(Optional) Deploy and configure Keycloak to enable Single Sign-On approach. To see the details on how to configure Keycloak correctly, please refer to the Install Keycloak page.
helm search repo epamedp/edp-install\nNAME CHART VERSION APP VERSION DESCRIPTION\nepamedp/edp-install 3.8.1 3.8.1 A Helm chart for EDP Install\n
Note
It is highly recommended to use the latest released version.
EDP can be integrated with the following version control systems:
Gerrit
GitHub (by default)
GitLab
This integration implies in what system the development of the application will be or is already being carried out. The global.gitProviders flag in the edp-install controls this integration:
Global VCS configuration (can be multimple values):
Internal Gerrit server can be deployed as a result of EDP deployment when the Gerrit is selected. For more details on how to integrate EDP with GitLab or GitHub instead of Gerrit, please refer to the Integrate GitHub/GitLab in Tekton page.
(Optional) Integrate platform with SonarQube:
External SonarQube - any SonarQube that is installed separately from EDP. For example, SonarQube that is installed using edp-cluster-add-ons or another public SonarQube server. For more details on how EDP recommends to configure SonarQube to work with the platform, please refer to the SonarQube Integration page.
Internal SonarQube - SonarQube that is installed along with EDP.values.yaml
...\nsonar-operator:\n enabled: true\n...\n
(Optional) Integrate platform with Nexus:
External Nexus - any Nexus that is installed separately from EDP. For example, Nexus that installed using edp-cluster-add-ons or another public Nexus server. For more details on how EDP recommends to configure Nexus to work with the platform, please refer to the Nexus Sonatype Integration page.
Internal Nexus - Nexus that is installed along with EDP.values.yaml
...\nnexus-operator:\n enabled: true\n...\n
(Optional) Configure Container Registry for image storage.
Since EDP v3.4.0, we enabled users to configure Harbor registry instead of AWS ECR and Openshift-registry. We recommend installing Harbor using our edp-cluster-add-ons although you can install it any other way. To integrate EDP with Harbor, see Harbor integration page.
To enable Harbor as a registry storage, use the values below:
global:\n # -- platform type that can be either \"kubernetes\" or \"openshift\"\n platform: \"kubernetes\"\n # DNS wildcard for routing in the Kubernetes cluster;\n dnsWildCard: \"example.com\"\n # -- Administrators of your tenant\n # -- Can be gerrit, github or gitlab. By default: github\n gitProviders:\n - github\n dockerRegistry:\n # -- Docker Registry endpoint\n url: \"<AWS_ACCOUNT_ID>.dkr.ecr.<AWS_REGION>.amazonaws.com\"\n type: \"ecr\"\n\nsso:\n enabled: false\n # Keycloak address with which the platform will be integrated\n keycloakUrl: \"https://keycloak.example.com\"\n admins:\n - \"stub_user_one@example.com\"\n developers:\n - \"stub_user_one@example.com\"\n - \"stub_user_two@example.com\"\n\n# AWS Region, e.g. \"eu-central-1\"\nawsRegion:\n\nedp-tekton:\n # Tekton Kaniko configuration section\n kaniko:\n # -- AWS IAM role to be used for kaniko pod service account (IRSA). Format: arn:aws:iam::<AWS_ACCOUNT_ID>:role/<AWS_IAM_ROLE_NAME>\n roleArn:\n gitServers:\n github:\n gitProvider: github\n host: github.com\n webhook:\n skipWebhookSSLVerification: false\n eventListener:\n enabled: true\n resources:\n requests:\n memory: \"64Mi\"\n cpu: \"50m\"\n limits:\n memory: \"128Mi\"\n cpu: \"500m\"\n ingress:\n enabled: true\n\nedp-headlamp:\n config:\n oidc:\n enabled: false\n
Note
Set global.platform=openshift while deploying EDP in OpenShift.
Info
The full installation with integration between tools will take at least 10 minutes.
To check if the installation is successful, run the command below:
helm status edp -n edp\n
You can also check ingress endpoints to get EDP Portal endpoint to enter EDP Portal UI:
kubectl describe ingress -n edp\n
Once EDP is successfully installed, you can navigate to our Use Cases to try out EDP functionality.
The HARBOR_ADMIN_PASSWORD is the initial password of Harbor admin. The secretKey is the secret key that is used for encryption. Must be 16 characters long. The REGISTRY_PASSWD is Harbor registry password. The REGISTRY_HTPASSWD is login and password in htpasswd string format. This value is the string in the password file generated by the htpasswd command where the username is harbor_registry_user and the encryption type is bcrypt. See the example below:
# we use Harbor secret to consolidate all the Harbor secrets\nexistingSecretAdminPassword: harbor\nexistingSecretAdminPasswordKey: HARBOR_ADMIN_PASSWORD\nexistingSecretSecretKey: harbor\n\ncore:\n # The XSRF key. Will be generated automatically if it isn't specified\n xsrfKey: \"\"\njobservice:\n # Secret is used when job service communicates with other components.\n # If a secret key is not specified, Helm will generate one.\n # Must be a string of 16 chars.\n secret: \"\"\nregistry:\n # Secret is used to secure the upload state from client\n # and registry storage backend.\n # If a secret key is not specified, Helm will generate one.\n # Must be a string of 16 chars.\n secret: \"\"\n credentials:\n username: harbor_registry_user\n existingSecret: harbor\nfullnameOverride: harbor\n# If Harbor is deployed behind the proxy, set it as the URL of proxy\nexternalURL: https://core.harbor.domain\nipFamily:\n ipv6:\n enabled: false\nexpose:\n tls:\n enabled: false\n ingress:\n hosts:\n core: core.harbor.domain\n notary: notary.harbor.domain\nupdateStrategy:\n type: Recreate\npersistence:\n persistentVolumeClaim:\n registry:\n size: 30Gi\n jobservice:\n jobLog:\n size: 1Gi\n database:\n size: 2Gi\n redis:\n size: 1Gi\n trivy:\n size: 5Gi\ndatabase:\n internal:\n # The initial superuser password for internal database\n password: \"changeit\"\n
To check if the installation is successful, run the command below:
helm status <harbor-release> -n harbor\n
You can also check ingress endpoints to get Harbor endpoint to enter Harbor UI:
Kubectl version 1.23.0 is installed. Please refer to the Kubernetes official website for details.
Helm version 3.10.0+ is installed. Please refer to the Helm page on GitHub for details.
Info
EDP team is using a Keycloakx helm chart from the codecentric repository, but other repositories can be used as well (e.g. Bitnami). Before installing Keycloak, it is necessary to install a PostgreSQL database.
Info
It is also possible to install Keycloak using the cluster add-ons. For details, please refer to the Install via Add-Ons page.
Install PostgreSQL v15.2.0 using bitnami/postgresql Helm chart v12.1.15:
Info
The PostgreSQL can be deployed in production ready mode. For example, it may include multiple replicas, persistent storage, autoscaling, and monitoring. For details, please refer to the official Chart documentation.
Install Keycloak 20.0.3 using codecentric/keycloakx Helm chart:
Info
Keycloak can be deployed in production ready mode. For example, it may include multiple replicas, persistent storage, autoscaling, and monitoring. For details, please refer to the official Chart documentation.
"},{"location":"operator-guide/install-kiosk/","title":"Set Up Kiosk","text":""},{"location":"operator-guide/install-kiosk/#set-up-kiosk","title":"Set Up Kiosk","text":"
Kiosk is a multi-tenancy extension for managing tenants and namespaces in a shared Kubernetes cluster. Within EDP, Kiosk is used to separate resources and enables the following options (see more details):
Access to the EDP tenants in a Kubernetes cluster;
Multi-tenancy access at the service account level for application deploy.
Inspect the main steps to set up Kiosk for the proceeding EDP installation.
Note
Kiosk deploy is mandatory for EDP v.2.8. In earlier versions, Kiosk is not implemented. Since EDP v.2.9.0, integration with Kiosk is an optional feature. You may not want to use it, so just skip those steps and disable in Helm parameters during EDP deploy.
To provide access to the EDP tenant, generate kubeconfig with Service Account edp permission. The edp account created earlier is located in the security namespace.
It is possible to use Amazon Simple Storage Service Amazon S3 as an object storage for Loki. To configure access, please refer to the IRSA for Loki documentation.
In case of using cluster scheduling and amazon-eks-pod-identity-webhook, it is necessary to restart the Loki pod after the cluster is up and running. Please refer to the Schedule Pods Restart documentation.
Configure custom bucket policy to delete the old data.
Check that edp namespace is created. If not, run the following command to create it:
kubectl create namespace edp\n
For the OpenShift users:
When using the OpenShift platform, install the SecurityContextConstraints resources. In case of using a custom namespace for the reportportal, change the namespace in the users section.
When using the OpenShift platform, install the SecurityContextConstraints resource. In case of using a custom namespace for the reportportal, change the namespace in the users section.
apiVersion: v1\nkind: Service\nmetadata:\n labels:\n app: reportportal\n component: gateway\n name: gateway\n namespace: report-portal\nspec:\n ports:\n # use 8081 to allow for usage of the dashboard which is on port 8080\n - name: http\n port: 8081\n protocol: TCP\n targetPort: 8081\n selector:\n component: gateway\n sessionAffinity: None\n type: ClusterIP\n
Note
For user access: default/1q2w3e For admin access: superadmin/erebus Please refer to the ReportPortal.io page for details.
Note
It is also possible to install ReportPortal via cluster add-ons. For details, please refer to the Install via Add-Ons page.
Kubectl version 1.24.0 or higher is installed. Please refer to the Kubernetes official website for details.
For Openshift/OKD, the latest version of the oc utility is required. Please refer to the OKD page on GitHub for details.
Created AWS ECR repository for Kaniko cache. By default, the Kaniko cache repository name is kaniko-cache and this parameter is located in our Tekton common-library.
"},{"location":"operator-guide/install-tekton/#installation-on-kubernetes-cluster","title":"Installation on Kubernetes Cluster","text":"
To install Tekton resources, follow the steps below:
Info
Please refer to the Install Tekton Pipelines and Install and set up Tekton Triggers sections for details.
Install Tekton pipelines v0.53.4 using the release file:
Note
Tekton Pipeline resources are used for managing and running EDP Tekton Pipelines and Tasks. Please refer to the EDP Tekton Pipelines and EDP Tekton Tasks pages for details.
Install Tekton Triggers v0.25.3 using the release file:
Note
Tekton Trigger resources are used for managing and running EDP Tekton EventListeners, Triggers, TriggerBindings and TriggerTemplates. Please refer to the EDP Tekton Triggers page for details.
"},{"location":"operator-guide/install-tekton/#installation-on-okd-cluster","title":"Installation on OKD cluster","text":"
To install Tekton resources, follow the steps below:
Info
Please refer to the Install Tekton Operator documentation for details.
Note
Tekton Operator also deploys Pipelines as Code CI that requires OpenShift v4.11 (based on Kubernetes v1.24) or higher. This feature is optional and its deployments can be scaled to zero replicas.
Install Tekton Operator v0.67.0 using the release file:
Velero is an open source tool to safely back up, recover, and migrate Kubernetes clusters and persistent volumes. It works both on premises and in a public cloud. Velero consists of a server process running as a deployment in your Kubernetes cluster and a command-line interface (CLI) with which DevOps teams and platform operators configure scheduled backups, trigger ad-hoc backups, perform restores, and more.
In case of using cluster scheduling and amazon-eks-pod-identity-webhook, it is necessary to restart the Velero pod after the cluster is up and running. Please refer to the Schedule Pods Restart documentation.
Install the client side (velero cli) according to the official documentation.
"},{"location":"operator-guide/install-via-civo/","title":"Install via Civo","text":""},{"location":"operator-guide/install-via-civo/#install-edp-via-civo","title":"Install EDP via Civo","text":"
This documentation provides the detailed instructions on how to install the EPAM Delivery Platform via Civo Marketplace. As a prerequisite, ensure to sign up in Civo.
The first step of the installation procedure is to launch the cluster. Please refer to the official instructions that describe this process in detail. To succeed, follow the steps below:
Log in to the personal account.
Create a new Kubernetes cluster with the parameters below. Please refer to the official guidelines for more details:
Name: demo
How many nodes: 1
Select size: Type: Standard, Size: Medium
Network: Default
Firewall: Create a new firewall with the 443 and 6443 ports opened
The cluster deployment takes around two minutes. After cluster deployment, additional 5 minutes are required for both Argo CD and Tekton stacks to get deployed.
As soon as cluster is deployed, ensure all the marketplace applications are installed, too:
Check applications
Download and apply the kubeconfig file:
Download kubeconfig
Ensure all the pods are up and running in both the Tekton and Argo CD namespaces after 5 minutes of waiting. Restart deployments if the pods are failed to deploy:
kubectl get ns\nkubectl get pods -n tekton-pipelines\nkubectl get pods -n argocd\n
As soon as the cluster is deployed, it is time to install the EDP application.
In the Civo portal, navigate to Marketplace -> CI/CD:
Civo Marketplace
Select EDP and choose which Version Control Systems you would prefer to integrate it with and click the Install Apps button:
Add EDP
Wait till the EDP app appears in the Installed applications list:
EDP installed
Wait till all the pods are up and running. Use the kubectl get pods command to check the status of the pods:
kubectl get pods -n edp\n
EDP pods
As soon as all the pods are deployed. Navigate to the Cluster Information tab and copy the DNS name:
Getting DNS
In the new browser tab, access the EDP Portal UI by typing the URL according to the https://edp-headlamp-edp.<DNS_name> format.
Accept the security warning and click the service access token link to open the instructions on how to get a token to log in to the EDP Portal UI.
As soon as the token is created, paste it in the ID token field and click the Authenticate button.
Click the notification in the bottom left corner to open the Cluster Settings menu:
Click notification
In the Cluster Settings menu, enter edp in both default and allowed namespaces and click the Back button:
Note
Don't forget to click the + button to add the allowed namespace.
Cluster Settings menu
Congratulations! You have just installed the EPAM Delivery Platform on the Civo cluster. Now you are ready to proceed with integrating EDP with all the necessary third-party tools. Navigate to the Integrate SonarQube page to proceed with onboarding EDP.
"},{"location":"operator-guide/install-via-helmfile/","title":"Install via Helmfile","text":""},{"location":"operator-guide/install-via-helmfile/#install-via-helmfile","title":"Install via Helmfile","text":"
This article provides the instruction on how to deploy EDP and components in Kubernetes using Helmfile that is intended for deploying Helm charts. Helmfile templates are available in GitHub repository.
Important
The Helmfile installation method for EPAM Delivery Platform (EDP) is currently not actively maintained. We strongly recommend exploring alternative installation options for the most up-to-date and well-supported deployment experience. You may consider using the Add-Ons approach or opting for installation via the AWS Marketplace to ensure a reliable and secure deployment of EDP.
The envs/common.yaml file contains the specification for environments pattern, list of helm repositories from which it is necessary to fetch the helm charts and additional Helm parameters.
The envs/platform.yaml file contains global parameters that are used in various Helmfiles.
The releases/envs/ contains symbol links to environments files.
The releases/*.yaml file contains description of parameters that is used when deploying a Helm chart.
The helmfile.yaml file defines components to be installed by defining a path to Helm releases files.
The envs/ci.yaml file contains stub parameters for CI linter.
The test/lint-ci.sh script for running CI linter with debug loglevel and stub parameters.
The resources/*.yaml file contains additional resources for the OpenShift platform.
Before applying the Helmfile, please fill in the global parameters in the envs/platform.yaml (check the examples in the envs/ci.yaml) and releases/*.yaml files for every Helm deploy.
Pay attention to the following recommendations while working with the Helmfile:
To launch Lint, run the test/lint-ci.sh script.
Display the difference between the deployed and environment state (helm diff):
To deploy the components according to the label, use the selector to target a subset of releases when running the Helmfile. It can be useful for large Helmfiles with the releases that are logically grouped together. For example, to display the difference only for the nginx-ingress file, use the following command:
Keycloak requires a database deployment, so it has two charts: releases/keycloak.yaml and releases/postgresql-keycloak.yaml.
To install Keycloak, follow the steps below:
Create a security namespace:
Note
For the OpenShift users: This namespace is also indicated as users in the following custom SecurityContextConstraints resources: resources/keycloak-scc.yaml and resources/postgresql-keycloak-scc.yaml. Change the namespace name when using a custom namespace.
For EDP, it is required to have Keycloak access to perform the integration. Create a secret with the user and password provisioned in the step 2 of the Keycloak Configuration section.
Before Argo CD deployment, install the following tools:
Keycloak
EDP
To install Argo CD, follow the steps below:
Install Argo CD:
For the OpenShift users:
When using a custom namespace for Argo CD, the `argocd` namespace is also indicated as `users` in the `resources/argocd-scc.yaml` custom `SecurityContextConstraints` resource. Change it there as well.\n
Update the argocd-secret secret in the Argo CD namespace by providing the correct Keycloak client secret (oidc.keycloak.clientSecret) with the value from the keycloak-client-argocd-secret secret in EDP namespace. Then restart the deployment:
Before DefectDojo deployment,first make sure to have the Keycloak configuration.
Info
It is also possible to install DefectDojo via Helm Chart. For details, please refer to the Install DefectDojo page.
To install DefectDojo via Helmfile, follow the steps below:
Create a DefectDojo namespace:
For the OpenShift users:
This namespace is also indicated as users in the resources/defectdojo-scc.yaml custom SecurityContextConstraints resource. Change it when using a custom namespace. Also, change the namespace in the resources/defectdojo-route.yaml file.
kubectl create namespace defectdojo\n
Modify the host in resources/defectdojo-route.yaml (only for OpenShift).
In the envs/platform.yaml file, set the dnsWildCard and edpName parameters.
For the OpenShift users:
The namespace is also indicated as users in the following custom SecurityContextConstraints resources: resources/report-portal-elasticsearch-scc.yaml and resources/report-portal-third-party-resources-scc.yaml. Change the namespace name when using a custom namespace.
To install ReportPortal via Helmfile, follow the steps below:
For the OpenShift users:
The namespace is also indicated as users in the resources/report-portal-reportportal-scc.yaml custom SecurityContextConstraints resource. Change it when using a custom namespace.
Change the namespace in the following files: resources/report-portal-gateway/gateway-config-cm, resources/report-portal-gateway/gateway-deployment, resources/report-portal-gateway/gateway-route, and resources/report-portal-gateway/gateway-service.
Modify the host in resources/report-portal-gateway/gateway-route
This documentation provides a concise introduction to the EPAM Delivery Platform installation options. EPAM Delivery Platform is a flexible tool that can be installed using different methods. Each of them comprises with its own benefits:
Quick Start Guide: This option is ideal for users looking to quickly deploy EDP with minimal prerequisites. Watch our video tutorial for a guided installation experience.
Install via Add-Ons: Recommended for advanced EDP users, this installation streamlines the setup of supported integrations and follows the GitOps approach. Familiarity with Argo CD is recommended.
Install via Helm Charts: While more complex, this method offers the highest level of flexibility, allowing for customization to suit specific needs. It requires a good understanding of EDP.
Install via AWS Marketplace: Optimal for users leveraging AWS infrastructure, offering a minimal setup for testing EDP functionality.
Install via Civo: Preferred for users deploying EDP in a Civo cluster. Follow our step-by-step video tutorial for onboarding EDP to a new Civo cluster.
"},{"location":"operator-guide/jira-gerrit-integration/","title":"Adjust VCS Integration With Jira","text":""},{"location":"operator-guide/jira-gerrit-integration/#adjust-vcs-integration-with-jira","title":"Adjust VCS Integration With Jira","text":"
In order to adjust the Version Control System integration with Jira Server, first make sure you have the following prerequisites:
VCS Server
Jira
Crucible
When checked the prerequisites, follow the steps below to proceed with the integration:
Integrate every project in VCS Server with every project in Crucible by creating a corresponding request in EPAM Support Portal. Add the repositories links and fill in the Keep Informed field as this request must be approved.
Request example
Provide additional details to the support team. If the VCS is Gerrit, inspect the sample below of its integration:
2.1 Create a new \"crucible-\" user in Gerrit with SSH key and add a new user to the \"Non-Interactive Users\" Gerrit group;
2.2 Create a new group in Gerrit \"crucible-watcher-group\" and add the \"crucible-\" user;
2.3 Provide access to All-Projects for the \"crucible-watcher-group\" group:
Gerrit All-Projects configuration
Gerrit All-Projects configuration
To link commits with Jira ticket, being in Gerrit, enter a Jira ticket ID in a commit message using the specific format:
[PROJECT-CODE-1234]: commit message
where PROJECT-CODE is a specific code of a project, 1234 is an ID number, and a commit message.
As a result, all Gerrit commits will be displayed on Crucible:
This documentation guide provides step-by-step instructions for enabling the Jira integration option in the EDP Portal UI for EPAM Delivery Platform. Jira integration allows including useful metadata in Jira tickets.
Integrating Jira can provide a number of benefits, such as increased visibility and traceability, automatic linking code changes to relevant Jira issues, streamlining the management and tracking of development progress.
By linking CI pipelines to Jira issues, teams can get a better understanding of the status of their work and how it relates to the overall development process. This can help to improve communication and collaboration, and ultimately lead to faster and more efficient delivery of software.
Enabling Jira integration allows for the automatic population of three fields in Jira tickets: Fix Versions, Components, and Labels. Each of these fields provides distinct benefits:
Fix Versions: helps track progress against release schedules;
Components: allows grouping related issues together;
Labels: enables identification of specific types of work.
Teams can utilize these fields to enhance their work prioritization, identify dependencies, improve collaboration, and ultimately achieve faster software delivery.
The value of the credentialName property is the name of the Secret, which is indicated in the first point above.
"},{"location":"operator-guide/jira-integration/#enable-jira-using-helm-chart","title":"Enable Jira Using Helm Chart","text":"
There is also a possibility to set up Jira integration when deploying EPAM Delivery Platform. To follow this approach, please familiarize yourself with the following parameters of the values.yaml file in the EDP installer. Enabling the jira.integration parameter creates the following custom resources:
EDPComponent;
JiraServer;
External Secrets Operator (in case it is used).
To set up Jira integration along with EDP, follow the steps below:
Create the ci-jira secret in the edp namespace as it's described above.
Deploy the platform with the jira.integration parameter set to true in the values.yaml file.
To use Jira integration, you need to set up your codebases accordingly.
When creating a codebase, navigate to the Advanced Settings tab. Select the Integrate with Jira server check box and fill in the required fields:
Advanced settings
There are four predefined variables with the respective values that can be specified singly or as a combination. These variables show different data depending on which versioning type is currently used:
If the EDP versioning type is used:
EDP_COMPONENT \u2013 returns application-name;
EDP_VERSION \u2013 returns 0.0.0-SNAPSHOT or 0.0.0-RC;
EDP_SEM_VERSION \u2013 returns 0.0.0;
EDP_GITTAG \u2013 returns build/0.0.0-SNAPSHOT.2 or build/0.0.0-RC.2.
If the default versioning type is used:
EDP_COMPONENT \u2013 returns application-name;
EDP_VERSION \u2013 returns the date when the application was tagged. (Example: 20231023-131217);
EDP_SEM_VERSION \u2013 returns the date when the application was tagged. (Example: 20231023-131217);
EDP_GITTAG \u2013 returns the date when the application was tagged. (Example: 20231023-131217).
Note
There are no character restrictions when combining the variables. You can concatenate them using the dash sign. Combination samples: EDP_SEM_VERSION-EDP_COMPONENT; EDP_COMPONENT-hello-world/EDP_VERSION; etc.
If the Jira integration is set up correctly, you will start seeing additional metadata in the tickets:
Supplemental information
If metadata is not visible in a Jira ticket, check the status field of the JiraIssueMetadata Custom Resources in the edp namespace. The codebase operator deletes this resource after successful processing, but in case of an error, the 'JiraIssueMetadata' resource may still exist within the namespace.
"},{"location":"operator-guide/kaniko-irsa/","title":"IAM Roles for Kaniko Service Accounts","text":""},{"location":"operator-guide/kaniko-irsa/#iam-roles-for-kaniko-service-accounts","title":"IAM Roles for Kaniko Service Accounts","text":"
Note
The information below is relevant in case ECR is used as Docker container registry. Make sure that IRSA is enabled and amazon-eks-pod-identity-webhook is deployed according to the Associate IAM Roles With Service Accounts documentation.
The \"build-image-kaniko\" stage manages ECR through IRSA that should be available on the cluster. Follow the steps below to create a required role:
Create AWS IAM Policy \"AWSIRSA\u2039CLUSTER_NAME\u203a\u2039EDP_NAMESPACE\u203aKaniko_policy\":
Attach the \"AWSIRSA\u2039CLUSTER_NAME\u203a\u2039EDP_NAMESPACE\u203aKaniko_policy\" policy to the \"AWSIRSA\u2039CLUSTER_NAME\u203a\u2039EDP_NAMESPACE\u203aKaniko\" role.
Define the resulted arn role value into the kaniko.roleArn parameter in values.yaml during the EDP installation.
"},{"location":"operator-guide/kibana-ilm-rollover/","title":"Aggregate Application Logs Using EFK Stack","text":""},{"location":"operator-guide/kibana-ilm-rollover/#aggregate-application-logs-using-efk-stack","title":"Aggregate Application Logs Using EFK Stack","text":"
This documentation describes the advantages of EFK stack over the traditional ELK stack, explains the value that this stack brings to EDP and instructs how to set up the EFK stack to integrate the advanced logging system with your application.
The ELK (Elasticsearch, Logstash and Kibana) stack gives the ability to aggregate logs from all the managed systems and applications, analyze these logs and create visualizations for application and infrastructure monitoring, faster troubleshooting, security analytics and more.
Here is a brief description of the ELK stack default components:
Beats family - The logs shipping tool that conveys logs from the source locations, such as Filebeat, Metricbeat, Packetbeat, etc. Beats can work instead of Logstash or along with it.
Logstash - The log processing framework for log collecting, processing, storing and searching activities.
Elasticsearch - The distributed search and analytics engine based on Lucene Java library.
Kibana - The visualization engine that queries the data from Elasticsearch.
We use FEK (also called EFK) (Fluent Bit, Elasticsearch, Kibana) stack in Kubernetes instead of ELK because this stack provides us with the support for Logsight for Stage Verification and Incident Detection. In addition to it, Fluent Bit has a smaller memory fingerprint than Logstash. Fluent Bit has the Inputs, Parsers, Filters and Outputs plugins similarly to Logstash.
FEK Stack
"},{"location":"operator-guide/kibana-ilm-rollover/#automate-elasticsearch-index-rollover-with-ilm","title":"Automate Elasticsearch Index Rollover With ILM","text":"
In this guide, index rollover with the Index Lifecycle Management ILM is automated in the FEK stack.
The resources can be created via API using curl, Postman, Kibana Dev Tools console or via GUI. They are going to be created them using Kibana Dev Tools.
Go to Management \u2192 Dev Tools in the Kibana dashboard:
Dev Tools
Create index lifecycle policy with the index rollover:
Note
This policy can also be created in GUI in Management \u2192 Stack Management \u2192 Index Lifecycle Policies.
Index Lifecycle has several phases: Hot, Warm, Cold, Frozen, Delete. Indices also have different priorities in each phase. The warmer the phase, the higher the priority is supposed to be, e.g., 100 for the hot phase, 50 for the warm phase, and 0 for the cold phase.
In this Use Case, only the Hot and Delete phases are configured. So an index will be created, rolled over to a new index when 1gb in size or 1day in time and deleted in 7 days. The rollover may not happen exactly at 1GB because it depends on how often Kibana checks the index size. Kibana usually checks the index size every 10 minutes but this can be changed by setting the indices.lifecycle.poll_interval monitoring timer.
index.lifecycle.rollover_alias is required when using a policy containing the rollover action and specifies which alias to rollover on behalf of this index. The intention here is that the rollover alias is also defined on the index.
number_of_shards is the quantity of the primary shards. Elasticsearch index is really just a logical grouping of one or more physical shards, where each shard is actually a self-contained index. By distributing the documents in an index across multiple shards and distributing those shards across multiple nodes, Elasticsearch can ensure redundancy, which both protects against hardware failures and increases query capacity as nodes are added to a cluster. As the cluster grows (or shrinks), Elasticsearch automatically migrates shards to re-balance the cluster. Please refer to the official documentation here.
number_of_replicas is the number of replica shards. A replica shard is a copy of a primary shard. Elasticsearch will never assign a replica to the same node as the primary shard, so make sure you have more than one node in your Elasticsearch cluster if you need to use replica shards. The Elasticsearch cluster details and the quantity of nodes can be checked with:
GET _cluster/health\n
Since we use one node, the number_of_shards is 1 and number_of_replicas is 0. If you put more replicas within one node, your index will get yellow status in Kibana, yet still be working.
Create an empty index with write permissions:
Note
This index can also be created in GUI in Management \u2192 Stack Management \u2192 Index Management \u2192 Indices.
The code above will create an index in the{index_name}-{current_date}-{rollover_index_increment} format. For example: fluent-bit-kube-2023.03.17-000001.
Please refer to the official documentation on the index rollover with Date Math here.
Note
It is also possible to use index pattern below if the date math format does not seem applicable:
Index
PUT fluent-bit-kube-000001\n{\n \"aliases\": {\n \"fluent-bit-kube\": {\n \"is_write_index\": true\n }\n }\n}\n
Check the status of the created index:
GET fluent-bit-kube*-000001/_ilm/explain\n
Configure Fluent Bit. Play attention to the Elasticsearch Output plugin configuration.
The important fields in the [OUTPUT] section are Index fluent-bit-kube since we should use the index with the same name as Rollover Alias in Kibana and Logstash_Format Off as we use the Rollover index pattern in Kibana that increments by 1.
ConfigMap example with Configuration Variables for HTTP_User and HTTP_Passwd:
ConfigMap fluent-bit
data:\n fluent-bit.conf: |\n [SERVICE]\n Daemon Off\n Flush 10\n Log_Level info\n Parsers_File parsers.conf\n Parsers_File custom_parsers.conf\n HTTP_Server On\n HTTP_Listen 0.0.0.0\n HTTP_Port 2020\n Health_Check On\n\n [INPUT]\n Name tail\n Tag kube.*\n Path /var/log/containers/*.log\n Parser docker\n Mem_Buf_Limit 5MB\n Skip_Long_Lines Off\n Refresh_Interval 10\n [INPUT]\n Name systemd\n Tag host.*\n Systemd_Filter _SYSTEMD_UNIT=kubelet.service\n Read_From_Tail On\n Strip_Underscores On\n\n [FILTER]\n Name kubernetes\n Match kube.*\n Kube_Tag_Prefix kube.var.log.containers.\n Kube_URL https://kubernetes.default.svc:443\n Kube_CA_File /var/run/secrets/kubernetes.io/serviceaccount/ca.crt\n Kube_Token_File /var/run/secrets/kubernetes.io/serviceaccount/token\n Merge_Log Off\n Merge_Log_Key log_processed\n K8S-Logging.Parser On\n K8S-Logging.Exclude On\n [FILTER]\n Name nest\n Match kube.*\n Operation lift\n Nested_under kubernetes\n Add_prefix kubernetes.\n [FILTER]\n Name modify\n Match kube.*\n Copy kubernetes.container_name tags.container\n Copy log message\n Copy kubernetes.container_image tags.image\n Copy kubernetes.namespace_name tags.namespace\n [FILTER]\n Name nest\n Match kube.*\n Operation nest\n Wildcard tags.*\n Nested_under tags\n Remove_prefix tags.\n\n [OUTPUT]\n Name es\n Match kube.*\n Index fluent-bit-kube\n Host elasticsearch-master\n Port 9200\n HTTP_User ${ES_USER}\n HTTP_Passwd ${ES_PASSWORD}\n Logstash_Format Off\n Time_Key @timestamp\n Type flb_type\n Replace_Dots On\n Retry_Limit False\n Trace_Error Off\n
Create index pattern (Data View starting from Kibana v8.0):
Go to Management \u2192 Stack Management \u2192 Kibana \u2192 Index patterns and create an index with the fluent-bit-kube-* pattern:
Index Pattern
Check logs in Kibana. Navigate to Analytics \u2192 Discover:
Logs in Kibana
Note
In addition, in the top-right corner of the Discover window, there is a button called Inspect. Clicking on it will reveal the query that Kibana is sending to Elasticsearch. These queries can be used in Dev Tools.
Monitor the created indices:
GET _cat/indices/fluent-bit-kube-*\n
Note
Physically, the indices are located on the elasticsearch Kubernetes pod in /usr/share/elasticsearch/data/nodes/0/indices. It is recommended to backup indices only via Snapshots.
We've configured the index rollover process. Now the index will be rolled over to a new one once it reaches the indicated size or time in the policy, and old indices will be removed according to the policy as well.
When you create an empty index that corresponds to the pattern indicated in the index template, the index template attaches rollover_alias with the fluent-bit-kube name, policy and other configured data. Then the Fluent Bit Elasticsearch output plugin sends logs to the Index fluent-bit-kube rollover alias. The index rollover process is managed by ILM that increments our indices united by the rollover_alias and distributes the log data to the latest index.
"},{"location":"operator-guide/kibana-ilm-rollover/#ilm-without-rollover-policy","title":"ILM Without Rollover Policy","text":"
It is also possible to manage index lifecycle without rollover indicated in the policy. If this is the case, this section will explain how to refactor the index to make it look that way: fluent-bit-kube-2023.03.18.
Note
The main drawback of this method is that the indices can be managed only by their creation date.
To manage index lifecycle without rollover policy, follow the steps below:
Create a Policy without rollover but with indices deletion:
Change the Fluent Bit [OUTPUT] config to this one:
ConfigMap fluent-bit
[OUTPUT]\n Name es\n Match kube.*\n Host elasticsearch-master\n Port 9200\n HTTP_User ${ES_USER}\n HTTP_Passwd ${ES_PASSWORD}\n Logstash_Format On\n Logstash_Prefix fluent-bit-kube\n Logstash_DateFormat %Y.%m.%d\n Time_Key @timestamp\n Type flb_type\n Replace_Dots On\n Retry_Limit False\n Trace_Error On\n
Restart Fluent Bit pods.
Fluent Bit will be producing a new index every day with the new date in its name like in the fluent-bit-kube-2023.03.18 name. Index deleting will be performed according to the policy.
"},{"location":"operator-guide/kibana-ilm-rollover/#tips-on-fluent-bit-debugging","title":"Tips on Fluent Bit Debugging","text":"
If you experience a lot of difficulties when dealing with Fluent Bit, this section may help you.
Fluent Bit has docker images labelled -debug, e.g., cr.fluentbit.io/fluent/fluent-bit:2.0.9-debug.
Change that image in the Kubernetes Fluent Bit DaemonSet and add the Trace_Error On parameter to the [OUTPUT] section in the Fluent Bit configmap:
[OUTPUT]\n Trace_Error On\n
After adding the parameter above, you will start seeing more informative logs that will probably help you find out the reason of the problem.
"},{"location":"operator-guide/kubernetes-cluster-settings/","title":"Set Up Kubernetes","text":""},{"location":"operator-guide/kubernetes-cluster-settings/#set-up-kubernetes","title":"Set Up Kubernetes","text":"
Make sure the cluster meets the following conditions:
Kubernetes cluster is installed with minimum 2 worker nodes with total capacity 8 Cores and 32Gb RAM.
Machine with kubectl is installed with a cluster-admin access to the Kubernetes cluster.
Ingress controller is installed in a cluster, for example ingress-nginx.
Ingress controller is configured with the disabled HTTP/2 protocol and header size of 64k support.
Find below an example of the Config Map for the NGINX Ingress controller:
Load balancer (if any exists in front of the Ingress controller) is configured with session stickiness, disabled HTTP/2 protocol and header size of 32k support.
Cluster nodes and pods have access to the cluster via external URLs. For instance, add in AWS the VPC NAT gateway elastic IP to the cluster external load balancers security group).
Keycloak instance is installed. To get accurate information on how to install Keycloak, please refer to the Install Keycloak instruction.
Helm 3.10 or higher is installed on the installation machine with the help of the Installing Helm instruction.
Storage classes are used with the Retain Reclaim Policy and Delete Reclaim Policy.
We recommended using our storage class as default storage class.
Info
By default, EDP uses the default Storage Class in a cluster. The EDP development team recommends using the following Storage Classes. See an example below.
Storage class templates with the Retain and Delete Reclaim Policies:
In order to understand if a microservice or a component is ready for the deployment, EDP suggests analyzing logs via Logsight to decide if the deployment is risky or not.
Please find more about Logsight in the official documentation:
Logsight key features and workflow
Log analysis
Stage verification
"},{"location":"operator-guide/logsight-integration/#logsight-as-a-quality-gate","title":"Logsight as a Quality Gate","text":"
Integration with Logsight allows enhancing and optimizing software releases by creating an additional quality gate.
Logsight can be configured in two ways:
SAAS - online system; for this solution a connection string is required.
Self-deployment - local installation.
To work with Logsight, a new Deployment Risk stage must be added to the pipeline. On this stage, the logs are analyzed with the help of Logsight mechanisms.
On the verification screen of Logsight, continuous verification of the application deployment can be monitored, and tests can be compared for detecting test flakiness.
For example, two versions of a microservice can be compared in order to detect critical differences. Risk score will be calculated for the state reached by version A and version B. Afterwards, the deployment risk will be calculated based on individual risk scores.
If the deployment failure risk is greater than a predefined threshold, the verification gate blocks the deployment from going to the target environment. In such case, the Deployment Risk stage of the pipeline is not passed, and additional attention is required. The exact log messages can be displayed in the Logsight verification screen, to help debug the problem.
"},{"location":"operator-guide/logsight-integration/#use-logsight-for-edp-development","title":"Use Logsight for EDP Development","text":"
Please find below the detailed description of Logsight integration with EDP.
Logsight provides a deployment approach using Helm charts. Please find below the stack of components that must be deployed:
logsight\u00a0- the core component.
logsight-backend\u00a0- the backend that provides all necessary APIs and user management.
logsight-frontend\u00a0- the frontend that provides the user interface.
logsight-result-api\u00a0- responsible for obtaining results, for example, during the verification.
Below is a diagram of interaction when integrating the components:
Logsight Structure
"},{"location":"operator-guide/logsight-integration/#configure-fluentbit-for-sending-log-data","title":"Configure FluentBit for Sending Log Data","text":"
Logsight is integrated with the EDP logging stack. The integration is based on top of the EFK (ElasticSearch-FluentBit-Kibana) stack. It is necessary to deploy a stack with the security support, namely, enable the certificate support.
A FluentBit config indicates the namespace from which the logs will be received for further analysis. Below is an example of the FluentBit config for getting logs from the edp-delivery-edp-delivery-sit namespace:
View: fluent-bit.conf
[INPUT]\n Name tail\n Tag kube.sit.*\n Path /var/log/containers/*edp-delivery-edp-delivery-sit*.log\n Parser docker\n Mem_Buf_Limit 5MB\n Skip_Long_Lines Off\n Refresh_Interval 10\n\n[FILTER]\n Name kubernetes\n Match kube.sit.*\n Kube_URL https://kubernetes.default.svc:443\n Kube_CA_File /var/run/secrets/kubernetes.io/serviceaccount/ca.crt\n Kube_Token_File /var/run/secrets/kubernetes.io/serviceaccount/token\n Kube_Tag_Prefix kube.sit.var.log.containers.\n Merge_Log Off\n K8S-Logging.Parser On\n K8S-Logging.Exclude On\n\n[FILTER]\n Name nest\n Match kube.sit.*\n Operation lift\n Nested_under kubernetes\n Add_prefix kubernetes.\n\n[FILTER]\n Name modify\n Match kube.sit.*\n Copy kubernetes.container_name tags.container\n Copy log message\n Copy kubernetes.container_image tags.image\n Copy kubernetes.namespace_name tags.namespace\n\n[FILTER]\n Name nest\n Match kube.sit.*\n Operation nest\n Wildcard kubernetes.*\n Nested_under kubernetes\n Remove_prefix kubernetes.\n\n[OUTPUT]\n Name es\n Match kube.sit.*\n Host elasticsearch-master\n Port 9200\n HTTP_User elastic\n HTTP_Passwd *****\n Logstash_Format On\n Logstash_Prefix sit\n Time_Key @timestamp\n Type flb_type\n Replace_Dots On\n Retry_Limit False\n\n[OUTPUT]\n Match kube.sit.*\n Name http\n Host logsight-backend\n Port 8080\n http_User logsight@example.com\n http_Passwd *****\n uri /api/v1/logs/singles\n Format json\n json_date_format iso8601\n json_date_key timestamp\n
A deployment-risk stage is added to the EDP CD pipeline.
Deployment Risk
If the deployment risk is above 70%, the red state of the pipeline is expected.
EDP consists of a set of containerized components. For the convenience of tracking the risk deployment trend for each component, this data is stored as Jenkins artifacts.
If the deployment risk is higher than the threshold of 70%, the EDP promotion of artifacts for the next environments does not pass. The deployment risk report can be analyzed in order to avoid the potential problems with updating the components.
To study the report in detail, use the link from the Jenkins pipeline to the Logsight verification screen:
Logsight Insights Logsight Insights
In this example, logs from different versions of the gerrit-operator were analyzed. As can be seen from the report, a large number of new messages appeared in the logs, and the output frequency of other notifications has also changed, which led to the high deployment risk.
The environment on which the analysis is performed can exist for different time periods. Logsight only processes the minimum total number of logs since the creating of the environment.
"},{"location":"operator-guide/loki-irsa/","title":"IAM Roles for Loki Service Accounts","text":""},{"location":"operator-guide/loki-irsa/#iam-roles-for-loki-service-accounts","title":"IAM Roles for Loki Service Accounts","text":"
Note
Make sure that IRSA is enabled and amazon-eks-pod-identity-webhook is deployed according to the Associate IAM Roles With Service Accounts documentation.
It is possible to use Amazon Simple Storage Service Amazon S3 as object storage for Loki. In this case Loki requires access to AWS resources. Follow the steps below to create a required role:
Create AWS IAM Policy \"AWSIRSA\u2039CLUSTER_NAME\u203a\u2039LOKI_NAMESPACE\u203aLoki_policy\":
Attach the \"AWSIRSA\u2039CLUSTER_NAME\u203a\u2039LOKI_NAMESPACE\u203aLoki_policy\" policy to the \"AWSIRSA\u2039CLUSTER_NAME\u203a\u2039LOKI_NAMESPACE\u203aLoki\" role.
Make sure that Amazon S3 bucket with name loki-\u2039CLUSTER_NAME\u203a exists.
Provide key value eks.amazonaws.com/role-arn: \"arn:aws:iam:::role/AWSIRSA\u2039CLUSTER_NAME\u203a\u2039LOKI_NAMESPACE\u203aLoki\" into the serviceAccount.annotations parameter in values.yaml during the Loki Installation.
"},{"location":"operator-guide/manage-custom-certificate/#enable-the-spi-truststore-of-keycloak","title":"Enable the SPI Truststore of Keycloak","text":"
To import custom certificates to Keycloak, follow the steps below:
Generate the cacerts local keystore and import the certificate there using the keytool tool:
Add the certificate by mounting the custom-ca-certificates secret to the operator pod as a volume.
Example of specifying custom certificates for the keycloak-operator:
...\nkeycloak-operator:\n enabled: true\n\n # -- Additional volumes to be added to the pod\n extraVolumes:\n - name: custom-ca\n secret:\n defaultMode: 420\n secretName: custom-ca-certificates\n\n # -- Additional volumeMounts to be added to the container\n extraVolumeMounts:\n - name: custom-ca\n mountPath: /etc/ssl/certs/CA.crt\n readOnly: true\n subPath: CA.crt\n...\n
Note
Before moving ahead, be aware that starting from version 3.3.0, our development team has officially deprecated the Jenkins deploy scenario. This means that as of version 3.3.0 and in all subsequent versions (3.3.x and above), the Jenkins deploy scenario is no longer supported or actively maintained. For users running versions 3.3.x and below, the Jenkins deploy scenario remains available. However, we encourage you to plan for the transition to a supported deployment method to ensure continued compatibility and access to the latest features and enhancements. To perform migration, please familiarize yourself with the Migrate CI Pipelines From Jenkins to Tekton. For those who still use EDP v3.3.x and below, the information below remains valid and applicable.
For Sonar, Jenkins and Gerrit, change the flag in the caCerts.enabled field to true. Also, change the name of the secret in the caCerts.secret field to custom-ca-certificates.
Example of specifying custom certificates for Gerrit via the gerrit-operator helm chart values:
...\ngerrit-operator:\n enabled: true\n gerrit:\n caCerts:\n # -- Flag for enabling additional CA certificates\n enabled: true\n # -- Change init CA certificates container image\n image: adoptopenjdk/openjdk11:alpine\n # -- Name of the secret containing additional CA certificates\n secret: custom-ca-certificates\n...\n
"},{"location":"operator-guide/manage-custom-certificate/#integrate-custom-certificates-into-jenkins-agents","title":"Integrate Custom Certificates Into Jenkins Agents","text":"
This section describes how to add custom certificates to Jenkins agents to use them from Java applications.
Info
For example, curl doesn't use keystore files specified in this part of the documentation.
EDP Jenkins agents keep keystore files in two places:
/etc/ssl/certs/java folder with the cacerts file;
/opt/java/openjdk/lib/security folder with the blocked.certs, cacerts, default.policy and public_suffix_list.dat files.
Copy the files in /etc/ssl/certs/java and /opt/java/openjdk/lib/security directories from Jenkins agent pod to the local tmp folder. There is a copy_certs.sh script below that can manage this. It copies the files in /etc/ssl/certs/java and /opt/java/openjdk/lib/security directories from Jenkins agent pod to the local tmp folder and imports the custom certificate into the keystore files, after which it creates the jenkins-agent-opt-java-openjdk-lib-security-cacerts and jenkins-agent-etc-ssl-certs-java-cacerts secrets from updated keystore files in EDP namespace. Also, the jenkins-agent-opt-java-openjdk-lib-security-cacerts secret contains three additional files: blocked.certs, default.policy and public_suffix_list.dat which managed by the copy_certs.sh script as well. Expand the drop-down button below to see the contents of the copy_certs.sh script.
View: copy_certs.sh
# Fill in the variables `ns` and `ca_file`\nns=\"edp-project\"\nca_file=\"/tmp/CA.crt\"\n\nimages=$(kubectl get -n \"${ns}\" cm jenkins-slaves -ojson | jq -r \".data[]\" | grep image\\> | sed 's/\\s*<.*>\\(.*\\)<.*>/\\1/')\n\nimage=$(for i in ${images[@]}; do echo $i; done | grep maven-java8)\npod_name=$(echo \"${image}\" | tr '.:/' '-')\n\noverrides=\"{\\\"apiVersion\\\":\\\"v1\\\",\\\"kind\\\":\\\"Pod\\\",\\\"metadata\\\":{\\\"name\\\":\\\"${pod_name}\\\", \\\"namespace\\\": \\\"${ns}\\\"},\n\\\"spec\\\":{\\\"containers\\\":[{\\\"name\\\":\\\"${pod_name}\\\",\\\"image\\\":\\\"${image}\\\",\n\\\"command\\\":[\\\"sh\\\",\\\"-c\\\",\\\"while true;do sleep 30;done;\\\"]}]}}\"\n\nkubectl run -n \"${ns}\" \"${pod_name}\" --image \"${image}\" --overrides=\"${overrides}\"\n\nkubectl wait --for=condition=ready pod \"${pod_name}\" -n \"${ns}\"\n\ncacerts_location=$(kubectl exec -n \"${ns}\" \"${pod_name}\" \\\n -- find / -name cacerts -exec ls -la \"{}\" \\; 2>/dev/null | grep -v ^l | awk '{print $9}')\n\nfor cacerts in ${cacerts_location[@]}; do echo $(dirname \"${cacerts}\"); kubectl exec -n \"${ns}\" \"${pod_name}\" -- ls $(dirname \"${cacerts}\"); done\n\nfor cacerts in ${cacerts_location[@]}; do \\\n echo $(dirname \"${cacerts}\"); \\\n mkdir -p \"/tmp$(dirname \"${cacerts}\")\"; \\\n from_files=''; \\\n for file in $(kubectl exec -n \"${ns}\" \"${pod_name}\" -- ls $(dirname \"${cacerts}\")); do \\\n kubectl exec -n \"${ns}\" \"${pod_name}\" -- cat \"$(dirname \"${cacerts}\")/${file}\" > \"/tmp$(dirname \"${cacerts}\")/${file}\"; \\\n from_files=\"${from_files} --from-file=/tmp$(dirname \"${cacerts}\")/${file}\"\n done ; \\\n keytool -import -storepass changeit -alias kubernetes -file ${ca_file} -noprompt -keystore \"/tmp${cacerts}\"; \\\n kubectl -n \"${ns}\" create secret generic \"jenkins-agent${cacerts//\\//-}\" $from_files \\\ndone\n\nkubectl delete -n \"${ns}\" pod \"${pod_name}\" --force --grace-period=0\n
Before using the copy_certs.sh script, keep in mind the following:
assign actual values to the variables ns and ca_file;
the script collects all the images from the jenkins-slaves ConfigMap and uses the image of the maven-java8 agent as the base image of the temporary pod to get the keystore files;
custom certificate is imported using the keytool application;
the jenkins-agent-opt-java-openjdk-lib-security-cacerts and jenkins-agent-etc-ssl-certs-java-cacerts secrets will be created in the EDP namespace.
Run the copy_certs.sh script from the previous point after the requirements are met.
Update manually the jenkins-slaves ConfigMap.
Add this block with the mount of secrets to the <volumes></volumes> block of each Jenkins agent:
"},{"location":"operator-guide/migrate-ci-pipelines-from-jenkins-to-tekton/","title":"Migrate CI Pipelines From Jenkins to Tekton","text":""},{"location":"operator-guide/migrate-ci-pipelines-from-jenkins-to-tekton/#migrate-ci-pipelines-from-jenkins-to-tekton","title":"Migrate CI Pipelines From Jenkins to Tekton","text":"
To migrate the CI pipelines for a codebase from Jenkins to Tekton, follow the steps below:
Migrate CI Pipelines From Jenkins to Tekton
Deploy a Custom EDP Scenario With Tekton and Jenkins CI Tools
Disable Jenkins Triggers
Manage Tekton Triggers the Codebase(s)
Switch CI Tool for Codebase(s)
"},{"location":"operator-guide/migrate-ci-pipelines-from-jenkins-to-tekton/#deploy-a-custom-edp-scenario-with-tekton-and-jenkins-ci-tools","title":"Deploy a Custom EDP Scenario With Tekton and Jenkins CI Tools","text":"
Make sure that Tekton stack is deployed according to the documentation. Enable Tekton as an EDP subcomponent:
The sample above shows the usage of Gerrit VCS where the <codebase_name> value is your codebase name.
If using GitHub or GitLab, additionally remove the webhook from the relevant repository.
If webhooks generation for new codebase(s) is not required, correct the code above so that it creates a webhook in the job-provisioner.
To recreate the pipeline in Jenkins, trigger the job-provisioner.
Check that the new pipeline is created without triggering Gerrit events.
"},{"location":"operator-guide/migrate-ci-pipelines-from-jenkins-to-tekton/#manage-tekton-triggers-the-codebases","title":"Manage Tekton Triggers the Codebase(s)","text":"
By default, each Gerrit project inherits configuration from the All-Projects repository.
To exclude triggering in Jenkins and Tekton CI tools simultaneously, edit the configuration in the All-Projects repository or in the project which inherits rights from your project.
Edit the webhooks.config file in the refs/meta/config and remove all context from this configuration.
Warning
The clearance of the webhooks.config file will disable the pipeline trigger in Tekton.
To use Tekton pipelines, add the configuration to the corresponding Gerrit project (webhooks.config file in the refs/meta/config):
"},{"location":"operator-guide/migrate-ci-pipelines-from-jenkins-to-tekton/#switch-ci-tool-for-codebases","title":"Switch CI Tool for Codebase(s)","text":"
Go to the codebase Custom Resource and change the spec.ciTool field from jenkins to tekton.
To configure the multitenant logging, it is necessary to deploy the following components:
Grafana
Loki
Logging-operator
In Grafana, every tenant represents an organization, i.e. it is necessary to create an organization for every namespace in the cluster. To get more details regarding the architecture of the Logging Operator, please review the Diagram 1.
Logging operator scheme
Note
It is necessary to deploy Loki with the auth_enabled: true flag with the aim to ensure that the logs are separated for each tenant. For the authentication, Loki requires the HTTP header X-Scope-OrgID.
"},{"location":"operator-guide/multitenant-logging/#review-project-logs-in-grafana","title":"Review Project Logs in Grafana","text":"
To find the project logs, navigate to Grafana and follow the steps below:
Note
Grafana is a common service for different customers where each customer works in its own separated Grafana Organization and doesn't have any access to another project.
Choose the organization by clicking the Current Organization drop-down list. If a user is assigned to several organizations, switch easily by using the Switch button.
Current organization
Navigate to the left-side menu and click the Explore button to see the Log Browser:
Grafana explore
Click the Log Browser button to see the labels that can be used to filter logs (e.g., hostname, namespace, application name, pod, etc.):
Note
Enable the correct data source, select the relevant logging data from the top left-side corner, and pay attention that the data source name always follows the \u2039project_name\u203a-logging pattern.
Log browser
Filter out logs by clicking the Show logs button or write the query and click the Run query button.
Review the results with the quantity of logs per time, see the example below:
Logs example
Expand the logs to get detailed information about the object entry:
Expand logs
Use the following buttons to include or remove the labels from the query:
EDP provides the ability to deploy services to namespaces. By default, EDP creates these namespaces automatically. This chapter describes the alternative way of namespace creation and management.
Namespaces are typically created by the platform when running CD Pipelines. The operator creates them according to the specific format: edp-<application-name>-<stage-name>. The cd-pipeline-operator should have the permissions to automatically create namespaces when deploying applications and delete them when uninstalling applications.
Occasionally, there are cases when automatic creation of namespaces is not allowed. For example, due to security reasons of the project, EDP user may need to disable this setting. This option is manipulated by the manageNamespace parameter which is located in the values.yaml file. The manageNamespace parameter is set to true by default, but it can be changed to false. As an aftermath, after setting the manageNamespace parameter users are supposed to face the problem that they can not deploy their application in EDP Portal UI because of permission restrictions:
Namespace creation error
The error message shown above says that user needs to create the namespace in the edp-<application-name>-<stage-name> format first before creating stages. In addition to it, the cd-pipeline-operator must be granted with the administrator permissions to have the ability to manage this namespace. To create namespace manually, follow the steps below:
Create the namespace by running the command below:
The edp-<pipelineName>-<stageName> format for namespaces is set by default but is not mandatory. You can set your custom namespace when creating an Environment.
Create the administrator RoleBinding resource by applying the file below with the kubectl apply -f grant_admin_permissions.yaml command:
The manageNamespace parameter also defines the resources that will be created depending on the cluster deployed whether it is OpenShift or Kubernetes. This scheme displays the nesting of operator input parameters:
CD Pipeline Operator Input Parameter Scheme
Note
When deploying application on the OpenShift cluster, the registry-view RoleBinding is created in the main namespace.
This documentation guide provides comprehensive instructions for integrating Nexus with the EPAM Delivery Platform.
Info
In EDP release 3.5, we have changed the deployment strategy for the nexus-operator component, now it is not installed by default. The nexusURL parameter management has been transferred from the values.yaml file to Kubernetes secrets.
To ensure strong authentication and accurate access control, creating a Nexus Sonatype service account with the name ci.user is crucial. This user serves as a unique identifier, facilitating connection with the EDP ecosystem.
To create the Nexus ci.userand define repository parameters follow the steps below:
Open the Nexus UI and navigate to Server administration and configuration -> Security -> User. Click the Create local user button to create a new user:
Nexus user settings
Type the ci-user username, define an expiration period, and click the Generate button to create the token:
Nexus create user
EDP relies on a predetermined repository naming convention all repository names are predefined. Navigate to Server administration and configuration -> Repository -> Repositories in Nexus. You can only create a repository with the required language.
Nexus repository list
JavaJavaScriptDotnetPython
a) Click Create a repository by selecting \"maven2(proxy)\" and set the name as \"edp-maven-proxy\". Enter the remote storage URL as \"https://repo1.maven.org/maven2/\". Save the configuration.
b) Click Create a repository by selecting \"maven2(hosted)\" and set the name as \"edp-maven-snapshot\". Change the Version policy to \"snapshot\". Save the configuration.
c) Click Create a repository by selecting \"maven2(hosted)\" and set the name as \"edp-maven-releases\". Change the Version policy to \"release\". Save the configuration.
d) Click Create a repository by selecting \"maven2(group)\" and set the name as \"edp-maven-group\". Change the Version policy to \"release\". Add repository to group. Save the configuration.
a) Click Create a repository by selecting \"npm(proxy)\" and set the name as \"edp-npm-proxy\". Enter the remote storage URL as \"https://registry.npmjs.org\". Save the configuration.
b) Click Create a repository by selecting \"npm(hosted)\" and set the name as \"edp-npm-snapshot\". Save the configuration.
c) Click Create a repository by selecting \"npm(hosted)\" and set the name as \"edp-npm-releases\". Save the configuration.
d) Click Create a repository by selecting \"npm(hosted)\" and set the name as \"edp-npm-hosted\". Save the configuration.
e) Click Create a repository by selecting \"npm(group)\" and set the name as \"edp-npm-group\". Add repository to group. Save the configuration.
a) Click Create a repository by selecting \"nuget(proxy)\" and set the name as \"edp-dotnet-proxy\". Select Protocol version NuGet V3. Enter the remote storage URL as \"https://api.nuget.org/v3/index.json\". Save the configuration.
b) Click Create a repository by selecting \"nuget(hosted)\" and set the name as \"edp-dotnet-snapshot\". Save the configuration.
c) Click Create a repository by selecting \"nuget(hosted)\" and set the name as \"edp-dotnet-releases\". Save the configuration.
d) Click Create a repository by selecting \"nuget(hosted)\" and set the name as \"edp-dotnet-hosted\". Save the configuration.
e) Click Create a repository by selecting \"nuget(group)\" and set the name as \"edp-dotnet-group\". Add repository to group. Save the configuration.
a) Click Create a repository by selecting \"pypi(proxy)\" and set the name as \"edp-python-proxy\". Enter the remote storage URL as \"https://pypi.org\". Save the configuration.
b) Click Create a repository by selecting \"pypi(hosted)\" and set the name as \"edp-python-snapshot\". Save the configuration.
c) Click Create a repository by selecting \"pypi(hosted)\" and set the name as \"edp-python-releases\". Save the configuration.
d) Click Create a repository by selecting \"pypi(group)\" and set the name as \"edp-python-group\". Add repository to group. Save the configuration.
Provision secrets using manifest, EDP Portal or with the externalSecrets operator
EDP PortalManifestExternal Secrets Operator
Go to EDP Portal -> EDP -> Configuration -> Nexus. Update or fill in the URL, nexus-user-id, nexus-user-password and click the Save button:
"},{"location":"operator-guide/notification-msteams/","title":"MS Teams Notification","text":""},{"location":"operator-guide/notification-msteams/#microsoft-teams-notification","title":"Microsoft Teams Notification","text":"
This section describes how to set up and add notification status to Tekton pipelines by sending pipeline status to the Microsoft Teams channel.
To create a link to Incoming Webhook for the Microsoft Teams channel, follow the steps below:
1. Open the channel which will be receiving notifications and click the \u2022\u2022\u2022 button from the upper-right corner. Select Connectors in the dropdown menu: Microsoft Teams menu
2. In the search field, type Incoming Webhook and click Configure: Connectors
3. Provide a name and upload an image for the webhook if necessary. Click Create: Connectors setup
4. Copy and save the unique WebHookURL presented in the dialog. Click Done: WebHookURL
5. Create a secret with the within the edp namespace.
OAuth2-Proxy is a versatile tool that serves as a reverse proxy, utilizing the OAuth 2.0 protocol with various providers like Google, GitHub, and Keycloak to provide both authentication and authorization. This guide instructs readers on how to protect their applications' endpoints using OAuth2-Proxy. By following these steps, users can strengthen their endpoints' security without modifying their current application code. In the context of EDP, it has integration with the Keycloak OIDC provider, enabling it to link with any component that lacks built-in authentication.
Note
OAuth2-Proxy is disabled by default when installing EDP.
"},{"location":"operator-guide/openshift-cluster-settings/","title":"Set Up OpenShift","text":""},{"location":"operator-guide/openshift-cluster-settings/#set-up-openshift","title":"Set Up OpenShift","text":"
Make sure the cluster meets the following conditions:
OpenShift cluster is installed with minimum 2 worker nodes with total capacity 8 Cores and 32Gb RAM.
Load balancer (if any exists in front of OpenShift router or ingress controller) is configured with session stickiness, disabled HTTP/2 protocol and header size of 64k support.
Find below an example of the Config Map for the NGINX Ingress Controller:
Cluster nodes and pods have access to the cluster via external URLs. For instance, add in AWS the VPC NAT gateway elastic IP to the cluster external load balancers security group).
Keycloak instance is installed. To get accurate information on how to install Keycloak, please refer to the Install Keycloak instruction.
The installation machine with oc is installed with the cluster-admin access to the OpenShift cluster.
Helm 3.10 is installed on the installation machine with the help of the Installing Helm instruction.
Storage classes are used with the Retain Reclaim Policy and Delete Reclaim Policy.
We recommended using our storage class as default storage class.
Info
By default, EDP uses the default Storage Class in a cluster. The EDP development team recommends using the following Storage Classes. See an example below.
Storage class templates with the Retain and Delete Reclaim Policies:
"},{"location":"operator-guide/overview-devsecops/","title":"Secure Delivery","text":""},{"location":"operator-guide/overview-devsecops/#secure-delivery-on-the-platform","title":"Secure Delivery on the Platform","text":"
The EPAM Delivery Platform emphasizes the importance of incorporating security practices into the software development lifecycle through the DevSecOps approach. By integrating a diverse range of open-source and enterprise security tools tailored to specific functionalities, organizations can ensure efficient and secure software development. These tools, combined with fundamental DevSecOps principles such as collaboration, continuous security, and automation, contribute to the identification and remediation of vulnerabilities early in the process, minimizes risks, and fosters a security-first culture across the organization.
The EPAM Delivery Platform enabling seamless integration with various security tools and vulnerability management systems, enhancing the security of source code and ensuring compliance.
The below table categorizes various open-source and enterprise security tools based on their specific functionalities. It provides a comprehensive view of the available options for each security aspect. This classification facilitates informed decision-making when selecting and integrating security tools into a development pipeline, ensuring an efficient and robust security stance. EDP supports the integration of both open-source and enterprise security tools, providing a flexible and versatile solution for security automation. See table below for more details.
DefectDojo is a comprehensive vulnerability management and security orchestration platform facilitating the handling of uploaded security reports. Examine the prerequisites and fundamental instructions for installing DefectDojo on Kubernetes or OpenShift platforms.
Dependency Track is an intelligent Software Composition Analysis (SCA) platform that provides a comprehensive solution for managing vulnerabilities in third-party and open-source components.
Gitleaks is a versatile SAST tool used to scan Git repositories for hardcoded secrets, such as passwords and API keys, to prevent potential data leaks and unauthorized access.
Trivy is a simple and comprehensive vulnerability scanner for containers and other artifacts, providing insight into potential security issues across multiple ecosystems.
Grype is a fast and reliable vulnerability scanner for container images and filesystems, maintaining an up-to-date vulnerability database for efficient and accurate scanning.
Tfsec is an effective Infrastructure as Code (IaC) security scanner, tailored specifically for reviewing Terraform templates. It helps identify potential security issues related to misconfigurations and non-compliant practices, enabling developers to address vulnerabilities and ensure secure infrastructure deployment.
Checkov is a robust static code analysis tool designed for IaC security, supporting various IaC frameworks such as Terraform, CloudFormation, and Kubernetes. It assists in detecting and mitigating security and compliance misconfigurations, promoting best practices and adherence to industry standards across the infrastructure.
Cdxgen is a lightweight and efficient tool for generating Software Bill of Materials (SBOM) using CycloneDX, a standard format for managing component inventory. It helps organizations maintain an up-to-date record of all software components, their versions, and related vulnerabilities, streamlining monitoring and compliance within the software supply chain.
Semgrep CLI is a versatile and user-friendly command-line interface for the Semgrep security scanner, enabling developers to perform Static Application Security Testing (SAST) for various programming languages. It focuses on detecting and preventing potential security vulnerabilities, code quality issues, and custom anti-patterns, ensuring secure and efficient code development.
Clair is an open-source container security tool that is designed to help you assess the security of container images and identify vulnerabilities within them. It is particularly useful for organizations using container orchestration platforms such as Kubernetes.
OpenVAS is an open-source network vulnerability scanner and security management tool. It is designed to identify and assess security vulnerabilities in computer systems, networks, and applications. OpenVAS provides a comprehensive set of features for vulnerability scanning, assessment, and management.
TruffleHog is an open-source Python tool designed for finding and identifying potentially sensitive and secret information in the source code and commit history of Git repositories. It's particularly useful for locating unintentional disclosures of confidential data, such as API keys, passwords, and other credentials, that might have been inadvertently committed to a code repository.
Git-secrets is an open-source tool that helps prevent the accidental committing of secrets, sensitive information, and other types of confidential data into Git repositories. It is designed to enforce security best practices and reduce the risk of unintentional data exposure by scanning Git repositories for predefined secret patterns.
ELK Stack (Fluent Bit, Elasticsearch, Kibana) stack is used in Kubernetes instead of ELK because this stack provides us with the support for Logsight for Stage Verification and Incident Detection. In addition to it, Fluent Bit has a smaller memory fingerprint than Logstash. Fluent Bit has the Inputs, Parsers, Filters and Outputs plugins similarly to Logstash.
Loki is a log aggregation system and log processing system designed for cloud-native environments. It is part of the CNCF (Cloud Native Computing Foundation) and is often used alongside other CNCF projects like Prometheus for monitoring and observability.
OpenSearch is the flexible, scalable, open-source way to build solutions for data-intensive applications. Explore, enrich, and visualize your data with built-in performance, developer-friendly tools, and powerful integrations for machine learning, data processing, and more.
OWASP Dependency-Check is a software composition analysis tool that helps identify and report known security vulnerabilities in project dependencies. It is particularly valuable for developers and organizations looking to secure their applications by identifying and addressing vulnerabilities in the libraries and components they use.
OWASP Zed Attack Proxy (ZAP) is an security testing tool for finding vulnerabilities in web applications during the development and testing phases. ZAP is designed to help developers and security professionals identify and address security issues and potential vulnerabilities in web applications. It provides automated and manual testing capabilities, as well as a wide range of features for security testing.
The EDP leverages the multi-tenancy approach to deliver a business-centric solution for managing containerized applications. The essence of this approach lies in using the additional tools for efficient resource allocation in a Kubernetes cluster. This approach grants tenants a considerable level of autonomy without risking the overall system's security and stability. It allows different users or teams to share the resources of a single Kubernetes cluster while keeping their workloads isolated. The resulting benefits include cost reduction, increased efficiency, improved scalability, and enhanced system resilience.
The EDP project inherently can work with Capsule and Kiosk, two tools that enable managing multi-tenancy. While Kiosk empowers the creation of isolated environments within a Kubernetes cluster, Capsule extends these capabilities further by imposing restrictions on resource usage. Through effective use of these tools, the EDP project offers a robust multi-tenancy model that ensures optimal resource utilization and secure separation of responsibilities.
EPAM Delivery Platform provides the implemented Static Application Security Testing support allowing to work with the Semgrep security scanner and the DefectDojo vulnerability management system to check the source code for known vulnerabilities.
This page describes the supported package registry providers and provides detailed instruction on how to adjust configurations to work properly with these package registry providers.
Currently, KubeRocketCI Tekton pipelines support the following package registries:
Nexus;
GitLab;
GitHub;
Azure DevOps.
The table below displays the supported registries and the languages they correspond to:
Language Framework Build Tool Proxy Registry Snapshots/Releases Registry Java Java 8Java 11Java 17 Maven NexusGitlabGitHubAzure DevOps NexusGitlabGitHubAzure DevOps Python Python 3.8FastAPIFlask Python NexusGitlabAzure DevOps NexusGitlabAzure DevOps C# .Net 3.1.Net 6.0 .Net No proxy is used for this language. NexusGitlabGitHubAzure DevOps JavaScript ReactVueAngularExpressNext.jsAntora NPM NexusGitlabGitHubAzure DevOps NexusGitlabGitHubAzure DevOps"},{"location":"operator-guide/package-registry/#proxy-package-registry-configuration","title":"Proxy Package Registry Configuration","text":"
By default, KubeRocketCI uses Nexus as the proxy registry for storing and caching application dependencies. This setting is fixed and cannot be modified.
The edp-tekton Helm Chart allows to override the default settings for package registries through tekton.configs part of its values.yaml file.
To provide necessary credentials for accessing the package registries, the user should create the package-registries-auth-secret secret and set the tekton.packageRegistriesSecret.enabled value to true to mount the secret into the pipeline.
To replace the default name of the secret, the user should set the tekton.packageRegistriesSecret.name parameter to the desired value:
CI_USERNAME and CI_PASSWORD - these environment variables are used for authentication to Nexus.
CI_AZURE_DEVOPS_USERNAME and CI_AZURE_DEVOPS_PASSWORD - these environment variables are used for authentication to Azure DevOps registry.
Secrets:
CI_AZURE_DEVOPS_USERNAME and CI_AZURE_DEVOPS_PASSWORD - these environment variables are taken from the package-registries-auth-secret secret.
Example: custom-maven-settings.yaml
apiVersion: v1\nkind: ConfigMap\nmetadata:\n name: new-custom-maven-settings\ndata:\n settings.xml: |\n <settings xmlns=\"http://maven.apache.org/SETTINGS/1.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd\">\n <localRepository>/workspace/source/cache</localRepository>\n\n <pluginGroups>\n <pluginGroup>org.sonarsource.scanner.maven</pluginGroup>\n </pluginGroups>\n <servers>\n <!-- The \"nexus\" server is defined to provide credentials required by the mirror. -->\n <server>\n <id>nexus</id>\n <username>${env.CI_USERNAME}</username>\n <password>${env.CI_PASSWORD}</password>\n </server>\n <!-- The \"azure-devops-registry\" server is defined to provide credentials required by the Azure DevOps registry.\n Username and password are used for authentication.\n More documentation: https://learn.microsoft.com/en-us/azure/devops/artifacts/get-started-maven?view=azure-devops -->\n <server>\n <id>azure-devops-registry</id>\n <username>${env.CI_AZURE_DEVOPS_USERNAME}</username>\n <password>${env.CI_AZURE_DEVOPS_PASSWORD}</password>\n </server>\n </servers>\n\n <mirrors>\n <mirror>\n <!--This sends everything else to /public -->\n <id>nexus</id>\n <mirrorOf>*</mirrorOf>\n <url>http://nexus.nexus:8081/repository/edp-maven-group</url>\n </mirror>\n </mirrors>\n\n <profiles>\n <profile>\n <id>sonar</id>\n <activation>\n <activeByDefault>true</activeByDefault>\n </activation>\n <properties>\n <sonar.login>\n ${env.SONAR_TOKEN}\n </sonar.login>\n <sonar.host.url>\n ${env.SONAR_HOST_URL}\n </sonar.host.url>\n </properties>\n </profile>\n <!-- Azure DevOps registry profile for managing artifacts within Azure DevOps. -->\n <profile>\n <id>azure-devops-registry</id>\n <properties>\n <altSnapshotDeploymentRepository>azure-devops-registry::default::https://pkgs.dev.azure.com/<ORGANIZATION_NAME>/<PROJECT_NAME>/_packaging/<FEED_NAME>/maven/v1</altSnapshotDeploymentRepository>\n <altReleaseDeploymentRepository>azure-devops-registry::default::https://pkgs.dev.azure.com/<ORGANIZATION_NAME>/<PROJECT_NAME>/_packaging/<FEED_NAME>/maven/v1</altReleaseDeploymentRepository>\n </properties>\n </profile>\n </profiles>\n <!-- Specify the active profile here. If you want to push packages to nexus (default), gitlab registry, github registry,\n or Azure DevOps registry, change the activeProfile id to the required profile id. -->\n <activeProfiles>\n <activeProfile>azure-devops-registry</activeProfile>\n </activeProfiles>\n </settings>\n
A new custom configuration map should contain the .npmrc-ci, .npmrc-publish-snapshots and .npmrc-publish-releases files, which override the default npm configuration.
For example, the following configuration map contains the .npmrc-ci, .npmrc-publish-snapshots and .npmrc-publish-releases files with the following settings:
'upBase64' (\"${CI_USERNAME}:${CI_PASSWORD}\" string in base64) - this environment variable is used for authentication to Nexus.
CI_AZURE_DEVOPS_USERNAME and CI_AZURE_DEVOPS_PASSWORD_IN_BASE64 - these environment variables are used for authentication to Azure DevOps registry.
Secrets:
CI_AZURE_DEVOPS_USERNAME and CI_AZURE_DEVOPS_PASSWORD_IN_BASE64 - these environment variables are taken from the package-registries-auth-secret secret.
For customizing python settings, a new configuration map can be prepared to replace the default pythonConfigMap. This custom configuration map should contain the PIP_TRUSTED_HOST, PIP_INDEX, PIP_INDEX_URL, REPOSITORY_URL_SNAPSHOTS and REPOSITORY_URL_RELEASES environment variables, which overrides the default python configuration.
For example, the following configuration map contains the following settings:
"},{"location":"operator-guide/report-portal-integration-tekton/","title":"Integration With Tekton","text":""},{"location":"operator-guide/report-portal-integration-tekton/#integration-with-tekton","title":"Integration With Tekton","text":"
ReportPortal integration with Tekton allows managing all automation results and reports in one place, visualizing metrics and analytics, team collaborating to associate statistics results.
For integration, take the following steps:
Log in to the ReportPortal console and navigate to the User Profile menu:
ReportPortal profile
Copy the Access token and use it as a value while creating a kubernetes secret for the ReportPortal credentials:
In the Configuration examples section of the ReportPortal User Profile menu, copy the following REQUIRED fields: rp.endpoint, rp.launch and rp.project. Insert these fields to the pytest.ini file in root directory of your project:
In root directory of the project create/update requirements.txt file and fill with following. it's mandatory to install report-portal python library (version may vary):
pytest-reportportal == 5.1.2\n
Create a custom Tekton task:
View: Custom Tekton task
apiVersion: tekton.dev/v1beta1\nkind: Task\nmetadata:\n labels:\n app.kubernetes.io/version: '0.1'\n name: pytest-reportportal\n namespace: edp\nspec:\n description: |-\n This task can be used to run pytest integrated with report portal.\n params:\n - default: .\n description: The path where package.json of the project is defined.\n name: PATH_CONTEXT\n type: string\n - name: EXTRA_COMMANDS\n type: string\n - default: python:3.8-alpine3.16\n description: The python image you want to use.\n name: BASE_IMAGE\n type: string\n - default: rp-credentials\n description: name of the secret holding the rp token\n name: rp-secret\n type: string\n steps:\n - env:\n - name: HOME\n value: $(workspaces.source.path)\n - name: RP_UUID\n valueFrom:\n secretKeyRef:\n key: rp_uuid\n name: $(params.rp-secret)\n image: $(params.BASE_IMAGE)\n name: pytest\n resources: {}\n script: >\n #!/usr/bin/env sh\n set -e\n export PATH=$PATH:$HOME/.local/bin\n $(params.EXTRA_COMMANDS)\n # tests are being run from ./test directory in the project\n pytest ./tests --reportportal\n workingDir: $(workspaces.source.path)/$(params.PATH_CONTEXT)\n workspaces:\n - name: source\n
Add this task ref to your Tekton pipeline after tasks:
Navigate to Client Scopes > Create client scope and create a new scope with the SAML protocol type.
Navigate to Client Scopes > your_scope_name > Mappers > Configure a new mapper > select the User Attribute mapper type. Add three mappers for the email, first name, and last name by typing lastName, firstName, and email in the User Attribute field:
Name is a display name in Keycloak.
User Attribute is a user property for mapping.
SAML Attribute Name is an attribute used for requesting information in the ReportPortal configuration.
SAML Attribute NameFormat: Basic.
Aggregate attribute values: Off.
User mapper sample Scope mappers
Navigate to Clients > Create client and fill in the following fields:
Client type: SAML.
Client ID: report.portal.sp.id.
Warning
The report.portal.sp.id Client ID is a constant value.
Navigate to Client > your_client > Settings and add https://<report-portal-url\\>/* to the Valid redirect URIs.
Navigate to Client > your_client > Keys and disable Client signature required.
Client keys
Navigate to Client > your_client > Client scopes and add the scope created on step 3 with the default Assigned type.
"},{"location":"operator-guide/restore-edp-with-velero/","title":"Restore EDP Tenant With Velero","text":""},{"location":"operator-guide/restore-edp-with-velero/#restore-edp-tenant-with-velero","title":"Restore EDP Tenant With Velero","text":"
You can use the Velero tool to restore a EDP tenant. Explore the main steps for backup and restoring below.
Delete all related entities in Keycloak: realm and clients from master/openshift realms. Navigate to the entities list in the Keycloak, select the necessary ones, and click the deletion icon on the entity overview page. If there are customized configs in Keycloak, save them before making backup.
Remove keycloak realm
To restore EDP, install and configure the Velero tool. Please refer to the Install Velero documentation for details.
Remove all locks for operators. Delete all config maps that have \u2039OPERATOR_NAME\u203a-operator-lock names. Then restart all pods with operators, or simply run the following command:
kubectl -n edp delete cm $(kubectl -n edp get cm | grep 'operator-lock' | awk '{print $1}')\n
Recreate the admin password and delete the Jenkins pod. Or change the script to update the admin password in Jenkins every time when the pod is updated.
This documentation serves as a detailed guide on configuring access rights within SonarQube projects. It is primarily aimed at ensuring that only authorized users can view and interact with the projects hosted on the SonarQube platform. The guide is structured to assist both new and existing SonarQube projects in managing their visibility settings effectively.
Upon logging into SonarQube through the OpenID Connect mechanism, users are automatically assigned to the sonar-users group, granting them access to all projects. However, this document outlines methods to customize these default settings to enhance security and privacy. It is divided into two main sections: one focusing on restricting access for the new projects and the other on configuring access for the existing projects.
"},{"location":"operator-guide/sonarqube-visibility/#restrict-access-for-new-projects","title":"Restrict Access for New Projects","text":"
In its default configuration, SonarQube does not restrict access to newly created projects, making them accessible to all instance users. To modify this behavior and set new projects to private by default, follow these instructions:
Open the SonarQube UI in the browser.
Navigate to the Administration tab:
Nexus user settings
Note
Ensure you have admin rights to see the Administration section.
Click the Projects button and select Management:
Nexus user settings
On the project management page, click pencil icon at the top-right corner::
Nexus user settings
Select Private and click Change Default Visibility:
Nexus user settings
"},{"location":"operator-guide/sonarqube-visibility/#configure-access-for-existing-projects","title":"Configure Access for Existing Projects","text":"
To make all the current projects private, follow the steps below:
In the Projects tab, enter the project you want to make private.
In the project page, click the Prject Settings button and select Permissions:
Nexus user settings
In the project permissions page, select Private:
Nexus user settings
Repeat the procedure for all of the projects you want to make private.
This documentation guide provides comprehensive instructions for integrating SonarQube with the EPAM Delivery Platform.
Info
In EDP release 3.5, we have changed the deployment strategy for the sonarqube-operator component, now it is not installed by default. The sonarURL parameter management has been transferred from the values.yaml file to Kubernetes secrets.
To establish robust authentication and precise access control, generating a SonarQube token is essential. This token is a distinct identifier, enabling effortless integration between SonarQube and EDP. To generate the SonarQube token, proceed with the following steps:
Open the SonarQube UI and navigate to Administration -> Security -> User. Create a new user or select an existing one. Click the Options List icon to create a token:
SonarQube user settings
Type the ci-user username, define an expiration period, and click the Generate button to create the token:
SonarQube create token
Click the Copy button to copy the generated <Sonarqube-token>:
SonarQube token
Provision secrets using Manifest, EDP Portal or with the externalSecrets operator:
EDP PortalManifestExternal Secrets Operator
Go to EDP Portal -> EDP -> Configuration -> SonarQube. Update or fill in the URL and Token fields and click the Save button:
"},{"location":"operator-guide/ssl-automation-okd/","title":"Use Cert-Manager in OpenShift","text":""},{"location":"operator-guide/ssl-automation-okd/#use-cert-manager-in-openshift","title":"Use Cert-Manager in OpenShift","text":"
The following material covers Let's Encrypt certificate automation with cert-manager using AWS Route53.
The cert-manager is a Kubernetes/OpenShift operator that allows to issue and automatically renew SSL certificates. In this tutorial, the steps to secure DNS Name will be demonstrated.
Below is an instruction on how to automatically issue and install wildcard certificates on OpenShift Ingress Controller and API Server covering all cluster Routes. To secure separate OpenShift Routes, please refer to the OpenShift Route Support project for cert-manager.
Install the cert-manager operator via OpenShift OperatorHub that uses Operator Lifecycle Manager (OLM):
Go to the OpenShift Admin Console \u2192 OperatorHub, search for the cert-manager, and click Install:
Cert-Manager Installation
Modify the ClusterServiceVersion OLM resource, by selecting the Update approval \u2192 Manual. If selecting Update approval \u2192 Automatic after the automatic operator update, the parameters in the ClusterServiceVersion will be reset to default.
Note
Installing an operator with Manual approval causes all operators installed in namespace openshift-operators to function as manual approval strategy. In case the Manual approval is chosen, review the manual installation plan and approve it.
Cert-Manager Installation
Navigate to Operators \u2192 Installed Operators and check the operator status to be Succeeded:
Cert-Manager Installation
In case of errors, troubleshoot the Operator issues:
"},{"location":"operator-guide/ssl-automation-okd/#create-aws-role-for-route53","title":"Create AWS Role for Route53","text":"
The cert-manager should be configured to validate Wildcard certificates using the DNS-based method.
Check the DNS Hosted zone ID in AWS Route53 for your domain.
Hosted Zone ID
Create Route53 Permissions policy in AWS for cert-manager to be able to create DNS TXT records for the certificate validation. In this example, cert-manager permissions are given for a particular DNS zone only. Replace Hosted zone ID XXXXXXXX in the \"Resource\": \"arn:aws:route53:::hostedzone/XXXXXXXXXXXX\".
Create an AWS Role with Custom trust policy for the cert-manager service account to use the AWS IRSA feature and then attach the created policy. Replace the following:
${aws-account-id} with the AWS account ID of the EKS cluster.
${aws-region} with the region where the EKS cluster is located.
${eks-hash} with the hash in the EKS API URL; this will be a random 32 character hex string, for example, 45DABD88EEE3A227AF0FA468BE4EF0B5.
${namespace} with the namespace where cert-manager is running.
${service-account-name} with the name of the ServiceAccount object created by cert-manager.
By default, it is \"system:serviceaccount:openshift-operators:cert-manager\" if cert-manager is installed via OperatorHub.
Attach the created Permission policy for Route53 to the Role.
Modify the cert-managerDeployment with the correct file system permissions fsGroup: 1001, so that the ServiceAccount token can be read.
Note
In case the ServiceAccount token cannot be read and the operator is installed using the OperatorHub, add fsGroup: 1001 via OpenShift ClusterServiceVersion OLM resource. It should be a cert-manager controller spec. These actions are not required for OpenShift v4.10.
If you have separate public and private DNS zones for the same domain (split-horizon DNS), modify the cert-managerDeployment in order to validate DNS TXT records via public recursive nameservers.
Note
Otherwise, you will be getting an error during a record validation:
Waiting for DNS-01 challenge propagation: NS ns-123.awsdns-00.net.:53 returned REFUSED for _acme-challenge.\n
To avoid the error, add --dns01-recursive-nameservers-only --dns01-recursive-nameservers=8.8.8.8:53,1.1.1.1:53 as ARGs to the cert-manager controller Deployment.
The Deployment must be modified via OpenShift ClusterServiceVersion OLM resource if the operator was installed using the OperatorHub. The OpenShift ClusterServiceVersion OLM resource includes several Deployments, and the ARGs must be modified only for the cert-manager controller.
Save the resource. After that, OLM will try to reload the resource automatically and save it to the YAML file. If OLM resets the config file, double-check the entered values.
Create the ClusterIssuer resource for Let's Encrypt Staging and Prod environments that signs a Certificate using cert-manager.
Note
Let's Encrypt has a limit of duplicate certificates in the Prod environment. Therefore, a ClusterIssuer has been created for Let's Encrypt Staging environment. By default, Let's Encrypt Staging certificates will not be trusted in your browser. The certificate validation cannot be tested in the Let's Encrypt Staging environment.
Change user@example.com with your contact email.
Replace hostedZoneID XXXXXXXXXXX with the DNS Hosted zone ID in AWS for your domain.
Replace the region value ${region}.
The secret under privateKeySecretRef will be created automatically by the cert-manager operator.
In two different namespaces, create a Certificate resource for the OpenShift Router (Ingress controller for OpenShift) and for the OpenShift APIServer.
OpenShift Router supports a single wildcard certificate for Ingress/Route resources in different namespaces (so called, default SSL certificate). The Ingress controller expects the certificates in a Secret to be created in the openshift-ingress namespace; the API Server, in the openshift-config namespace. The cert-manager operator will automatically create these secrets from the Certificate resource.
Replace ${DOMAIN} with your domain name. It can be checked with oc whoami --show-server. Put domain names in quotes.
The certificate for OpenShift Router in the `openshift-ingress` namespace
"},{"location":"operator-guide/ssl-automation-okd/#modify-openshift-router-and-api-server-custom-resources","title":"Modify OpenShift Router and API Server Custom Resources","text":"
Update the Custom Resource of your Router (Ingress controller). Patch the defaultCertificate object value with { \"name\": \"router-certs\" }:
"},{"location":"operator-guide/ssl-automation-okd/#move-from-lets-encrypt-staging-environment-to-prod","title":"Move From Let's Encrypt Staging Environment to Prod","text":"
Test the Staging certificate on the OpenShift Admin Console. The --insecure flag is used because Let's Encrypt Staging certificates are not trusted in browsers by default:
Please note that these actions will lead to logging your account out of the OpenShift Admin Console, since certificates will be deleted. Accept the certificate warning in the browser and log in again after that.
Otherwise, use web tools like Google Admin Toolbox:
DNS Validation
If the correct TXT value is shown (the value corresponds to the current TXT value in the DNS zone), it means that the DNS propagation is complete and Let's Encrypt is able to access the record in order to validate it and issue a trusted certificate.
Note
If the DNS validation challenge self check fails, cert-manager will retry the self check with a fixed 10-second retry interval. Challenges that do not ever complete the self check will continue retrying until the user intervenes by either retrying the Order (by deleting the Order resource) or amending the associated Certificate resource to resolve any configuration errors.
As soon as the domain ownership has been verified, any cert-manager affected validation TXT records in the AWS Route53 DNS zone will be cleaned up.
Please find below the issues that may occur and their troubleshooting:
When certificates are not issued for a long time, or a cert-manager resource is not in a Ready state, describing a resource may show the reason for the error.
Basically, the cert-manager creates the following resources during a Certificate issuance: CertificateRequest, Order, and Challenge. Investigate each of them in case of errors.
Use the cmctl tool to show the state of a Certificate and its associated resources.
Check the cert-manager controller pod logs:
oc get pod -n openshift-operators | grep 'cert-manager'\noc logs -f cert-manager-${replica_set}-${random_string} -n openshift-operators\n
Certificate error debugging: a. Decode certificate chain located in the secrets:
oc get secret router-certs -n openshift-ingress -o 'go-template={{index .data \"tls.crt\"}}' | base64 -d | while openssl x509 -noout -text; do :; done 2>/dev/null\noc get secret api-certs -n openshift-config -o 'go-template={{index .data \"tls.crt\"}}' | base64 -d | while openssl x509 -noout -text; do :; done 2>/dev/null\n
"},{"location":"operator-guide/ssl-automation-okd/#remove-obsolete-certificate-authority-data-from-kubeconfig","title":"Remove Obsolete Certificate Authority Data From Kubeconfig","text":"
After updating the certificates, the access to the cluster via Lens or CLI will be denied because of the untrusted certificate errors:
$ oc whoami\nUnable to connect to the server: x509: certificate signed by unknown authority\n
Such behavior appears because the oc tool references an old CA data in the kubeconfig file.
Note
Examine the Certificate Authority data using the following command:
This certificate has the CA:TRUE parameter, which means that this is a self-signed root CA certificate.
To fix the error, remove the old CA data from your OpenShift kubeconfig file:
sed -i \"/certificate-authority-data/d\" $KUBECONFIG\n
Since this field will be absent in the kubeconfig file, system root SSL certificate will be used to validate the cluster certificate trust chain. On Ubuntu, Let's Encrypt OpenShift cluster certificates will be validated against Internet Security Research Group root in /etc/ssl/certs/ca-certificates.crt.
The cert-manager automatically renews the certificates based on the X.509 certificate's duration and the renewBefore value. The minimum value for the spec.duration is 1 hour; for spec.renewBefore, 5 minutes. It is also required that spec.duration > spec.renewBefore.
Use the cmctl tool to manually trigger a single instant certificate renewal:
Ensure the following requirements are met first before moving ahead:
Kube prometheus stack is installed;
Tekton pipeline is installed.
"},{"location":"operator-guide/tekton-monitoring/#create-and-apply-the-additional-scrape-config","title":"Create and Apply the Additional Scrape Config","text":"
To create and apply the additional scrape config, follow the steps below:
Create the kubernetes secret file with the additional scrape config:
EPAM Delivery Platform provides Continuous Integration based on Tekton.
Tekton is an open-source Kubernetes native framework for creating CI pipelines, allowing a user to compile, build and test applications.
The edp-tekton GitHub repository provides all Tekton implementation logic on the platform. The Helm charts are used to deploy the resources inside the Kubernetes cluster. Tekton logic is decoupled into separate components:
Edp-tekton components diagram
The diagram above describes the following:
Common-library is the Helm chart of Library type which stores the common logic shareable across all Tekton pipelines. This library contains Helm templates that generate common Tekton resources.
Pipelines-library is the Helm chart of the Application type which stores the core logic for the EDP pipelines. Tekton CRs like Pipelines, Tasks, EventListeners, Triggers, TriggerTemplates, and other resources are delivered with this chart.
Custom-pipelines is the Helm chart of the Application type which implements custom logic running specifically for internal EDP development, for example, CI and Release. It also demonstrates the customization flow on the platform.
Tekton-dashboard is a multitenancy-adopted implementation of the upstream Tekton Dashboard. It is configured to share Tekton resources across a single namespace.
EDP Interceptor is the custom Tekton Interceptor which enriches the payload from the VCSs events with EDP data from the Codebase CR specification. These data are used to define the Pipeline logic.
Inspect the schema below that describes the logic behind the Tekton functionality on the platform:
Component view for the Tekton on EDP
The platform logic consists of the following:
The EventListener exposes a dedicated Pod that runs the sink logic and receives incoming events from the VCSs (Gerrit, GitHub, GitLab) through the Ingress. It contains triggers with filtering and routing rules for incoming requests.
Upon the Event Payload arrival, the EventListener runs triggers to process information or validate it via different interceptors.
The EDP Interceptor extracts information from the codebases.v2.edp.epam.com CR and injects the received data into top-level 'extensions' field of the Event Payload. The Interceptor consists of running Pod and Service.
The Tekton Cel Interceptor does simple transformations of the resulting data and prepares them for the Pipeline parameters substitution.
The TriggerTemplate creates a PipelineRun instance with the required parameters extracted from the Event Payload by Interceptors. These parameters are mandatory for Pipelines.
The PipelineRun has a mapping to the EDP Tekton Pipelines using a template approach which reduces code duplication. Each Pipeline is designed for a specific VCS (Gerrit, GitLab, GitHub), technology stack (such as Java or Python), and type (code-review, build).
A Pipeline consists of separate EDP Tekton or open-source Tasks. They are arranged in a specific order of execution in the Pipeline.
Each Task is executed as a Pod on the Kubernetes cluster. Also, Tasks can have a different number of steps that are executed as a Container in Pod.
The Kubernetes native approach allows the creation of PipelineRun either with the kubectl tool or using the EDP Portal UI.
"},{"location":"operator-guide/upgrade-edp-3.0/","title":"v2.12 to 3.0","text":""},{"location":"operator-guide/upgrade-edp-3.0/#upgrade-edp-v212-to-30","title":"Upgrade EDP v2.12 to 3.0","text":"
Important
Before starting the upgrade procedure, please make the necessary backups.
Kiosk integration is disabled by default. With EDP below v.3.0.x, define the global.kioskEnabled parameter in the values.yaml file. For details, please refer to the Set Up Kiosk page.
The gerrit-ssh-port parameter is moved from the gerrit-operator.gerrit.sshport to global.gerritSSHPort values.yaml file.
In edp-gerrit-operator, the gitServer.user value is changed from the jenkins to edp-civalues.yaml file.
This section provides the details on upgrading EDP to 3.0. Explore the actions and requirements below.
Update Custom Resource Definitions (CRDs). Run the following command to apply all necessary CRDs to the cluster:
Add proper Helm annotations and labels as indicated below. This step is necessary starting from the release v.3.0.x as custom resources are managed by Helm and removed from the Keycloak Controller logic.
To verify the installation, it is possible to test the deployment before applying it to the cluster with the following command: helm upgrade edp epamedp/edp-install -n <edp-namespace> --values values.yaml --version=3.0.x --dry-run
Update image versions for the Jenkins agents in the ConfigMap:
"},{"location":"operator-guide/upgrade-edp-3.1/","title":"v3.0 to 3.1","text":""},{"location":"operator-guide/upgrade-edp-3.1/#upgrade-edp-v30-to-31","title":"Upgrade EDP v3.0 to 3.1","text":"
Important
We suggest making a backup of the EDP environment before starting the upgrade procedure.
This section provides the details on the EDP upgrade to v3.1. Explore the actions and requirements below.
Update Custom Resource Definitions (CRDs). Run the following command to apply all necessary CRDs to the cluster:
To verify the installation, it is possible to test the deployment before applying it to the cluster with the following command: helm upgrade edp epamedp/edp-install -n <edp-namespace> --values values.yaml --version=3.1.0 --dry-run
"},{"location":"operator-guide/upgrade-edp-3.2/","title":"v3.1 to 3.2","text":""},{"location":"operator-guide/upgrade-edp-3.2/#upgrade-edp-v31-to-32","title":"Upgrade EDP v3.1 to 3.2","text":"
Important
We suggest making a backup of the EDP environment before starting the upgrade procedure.
This section provides the details on the EDP upgrade to v3.2.2. Explore the actions and requirements below.
Update Custom Resource Definitions (CRDs). Run the following command to apply all necessary CRDs to the cluster:
EDP 3.2.2 features OIDC configuration for EDP Portal. If this parameter is required, create keycloak-client-headlamp-secret as described in this article:
EDP release 3.2.2 uses the default cluster storageClass and we must check previous storageClass parameters. Align , if required, the storageClassName in EDP values.yaml to the same that were used by EDP PVC. For example:
edp-tekton:\n buildTool:\n go:\n cache:\n persistentVolume:\n # -- Specifies storageClass type. If not specified, a default storageClass for go-cache volume is used\n storageClass: ebs-sc\n\njenkins-operator:\n enabled: true\n jenkins:\n storage:\n # -- Storageclass for Jenkins data volume\n class: gp2\n\nsonar-operator:\n sonar:\n storage:\n data:\n # -- Storageclass for Sonar data volume\n class: gp2\n database:\n # -- Storageclass for database data volume\n class: gp2\n\ngerrit-operator:\n gerrit:\n storage:\n # -- Storageclass for Gerrit data volume\n class: gp2\n\nnexus-operator:\n nexus:\n storage:\n # -- Storageclass for Nexus data volume\n class: gp2\n
To upgrade EDP to the v3.2.2, run the following command:
To verify the installation, it is possible to test the deployment before applying it to the cluster with the following command: helm upgrade edp epamedp/edp-install -n <edp-namespace> --values values.yaml --version=3.2.2 --dry-run
"},{"location":"operator-guide/upgrade-edp-3.3/","title":"v3.2 to 3.3","text":""},{"location":"operator-guide/upgrade-edp-3.3/#upgrade-edp-v32-to-33","title":"Upgrade EDP v3.2 to 3.3","text":"
Important
We suggest making a backup of the EDP environment before starting the upgrade procedure.
Note
We currently disabled cache volumes for go and npm in the EDP 3.3 release.
This section provides the details on the EDP upgrade to v3.3.0. Explore the actions and requirements below.
Update Custom Resource Definitions (CRDs). Run the following command to apply all necessary CRDs to the cluster:
To verify the installation, it is possible to test the deployment before applying it to the cluster with the --dry-run tag: helm upgrade edp epamedp/edp-install -n edp --values values.yaml --version=3.3.0 --dry-run
In EDP v3.3.0, a new feature was introduced allowing manual pipeline re-triggering by sending a comment with /recheck. To enable the re-trigger feature for applications that were added before the upgrade, please proceed with the following:
4.1 For Gerrit VCS, add the following event to the webhooks.config configuration file in the All-Projects repository:
4.2 For GitHub VCS, check the Issue comments permission for each webhook in every application added before the EDP upgrade to 3.3.0.
4.3 For GitLab VCS, check the Comments permission for each webhook in every application added before the EDP upgrade to 3.3.0.
"},{"location":"operator-guide/upgrade-edp-3.4/","title":"v3.3 to 3.4","text":""},{"location":"operator-guide/upgrade-edp-3.4/#upgrade-edp-v33-to-34","title":"Upgrade EDP v3.3 to 3.4","text":"
Important
We suggest making a backup of the EDP environment before starting the upgrade procedure.
Note
Pay attention that the following components: perf-operator, edp-admin-console, edp-admin-console-operator, and edp-jenkins-operator are deprecated and should be additionally migrated in order to avoid their deletion. For migration details, please refer to the Migrate CI Pipelines From Jenkins to Tekton instruction.
This section provides the details on the EDP upgrade to v3.4.1. Explore the actions and requirements below.
Update Custom Resource Definitions (CRDs). Run the following command to apply all necessary CRDs to the cluster:
Since the values.yaml file structure has been modified, move the dockerRegistry subsection to the global section:
The dockerRegistry value has been moved to the global section:
global:\n dockerRegistry:\n # -- Define Image Registry that will to be used in Pipelines. Can be ecr (default), harbor\n type: \"ecr\"\n # -- Docker Registry endpoint\n url: \"<AWS_ACCOUNT_ID>.dkr.ecr.<AWS_REGION>.amazonaws.com\"\n
(Optional) To integrate EDP with Jira, rename the default values from epam-jira-user to jira-user for a secret name. In case Jira is already integrated, it will continue working.
(Optional) To switch to the Harbor registry, change the secret format for the external secret from kaniko-docker-config v3.3.0 to kaniko-docker-config v3.4.1:
To verify the installation, it is possible to test the deployment before applying it to the cluster with the --dry-run tag: helm upgrade edp epamedp/edp-install -n edp --values values.yaml --version=3.4.1 --dry-run
"},{"location":"operator-guide/upgrade-edp-3.5/","title":"v3.4 to 3.5","text":""},{"location":"operator-guide/upgrade-edp-3.5/#upgrade-edp-v34-to-35","title":"Upgrade EDP v3.4 to 3.5","text":"
Important
We suggest making a backup of the EDP environment before starting the upgrade procedure.
This section provides detailed instructions for upgrading EPAM Delivery Platform to version 3.5.3. Follow the steps and requirements outlined below:
Update Custom Resource Definitions (CRDs). Run the following command to apply all necessary CRDs to the cluster:
Codebase-operator v2.19.0 is not compatible with the previous versions. Please become familiar with the breaking change in Git Server Custom Resource Definition.
Familiarize yourself with the updated file structure of the values.yaml file and adjust your values.yaml file accordingly:
By default, the deployment of sub components such as edp-sonar-operator, edp-nexus-operator, edp-gerrit-operator, and keycloak-operator, have been disabled. Set them back to true in case they are needed or manually deploy external tools, such as SonarQube, Nexus, Gerrit and integrate them with the EPAM Delivery Platform.
The default Git provider has been changed from Gerrit to GitHub:
The sonarUrl and nexusUrl parameters have been deprecated. All the URLs from external components are stored in integration secrets:
global:\n # -- Optional parameter. Link to use custom sonarqube. Format: http://<service-name>.<sonarqube-namespace>:9000 or http://<ip-address>:9000\n sonarUrl: \"\"\n # -- Optional parameter. Link to use custom nexus. Format: http://<service-name>.<nexus-namespace>:8081 or http://<ip-address>:<port>\n nexusUrl: \"\"\n
Keycloak integration has been moved from the global section to the sso section. Update the parameters accordingly:
Old format:
global:\n # -- Keycloak URL\n keycloakUrl: https://keycloak.example.com\n # -- Administrators of your tenant\n admins:\n - \"stub_user_one@example.com\"\n # -- Developers of your tenant\n developers:\n - \"stub_user_one@example.com\"\n - \"stub_user_two@example.com\"\n
New format:
sso:\n enabled: true\n # -- Keycloak URL\n keycloakUrl: https://keycloak.example.com\n # -- Administrators of your tenant\n admins:\n - \"stub_user_one@example.com\"\n # -- Developers of your tenant\n developers:\n - \"stub_user_one@example.com\"\n - \"stub_user_two@example.com\"\n
(Optional) The default secret name for Jira integration has been changed from jira-user to ci-jira. Please adjust the secret name in the parameters accordingly:
To verify the installation, it is possible to test the deployment before applying it to the cluster with the --dry-run tag: helm upgrade edp epamedp/edp-install -n edp --values values.yaml --version=3.5.3 --dry-run
"},{"location":"operator-guide/upgrade-edp-3.6/","title":"v3.5 to 3.6","text":""},{"location":"operator-guide/upgrade-edp-3.6/#upgrade-edp-v35-to-36","title":"Upgrade EDP v3.5 to 3.6","text":"
Important
We suggest backing up the EDP environment before starting the upgrade procedure.
This section provides detailed instructions for upgrading the EPAM Delivery Platform to version 3.6.0. Follow the steps and requirements outlined below:
Update Custom Resource Definitions (CRDs). Run the following command to apply all the necessary CRDs to the cluster:
Familiarize yourself with the updated structure of the values.yaml file and adjust it accordingly:
2.1 A new parameter called space has been added to the DockerRegistry section. It is designed to form URLs in CodebaseImageStreams. This parameter is set the same as the EPAM Delivery Platform namespace name. Ensure you define the space parameter prior to the update.
Warning
This parameter is a significant change and must be set before the update.
2.2 Subcomponents, such as sonar-operator, nexus-operator, and keycloak-operator, have been removed since dependencies are no longer provisioned by the edp-install Helm Chart. To install and integrate shared components with EDP, please use the edp-cluster-add-ons approach or refer to the SonarQube Integration and Nexus Sonatype Integration documentation pages.
2.3 The Argo CD integration dependency has been deleted as now we implement it using edp-cluster-add-ons approach. To install and integrate Argo CD as a shared component, use the edp-cluster-add-ons approach.
2.4 The handling of secrets for stages namespaces in the cd-pipeline-operator has been updated. The parameter manageSecrets has been replaced with secretManager. If your environment previously utilized this parameter, manually modify it from manageSecrets: true to secretManager: own. Otherwise, set it to secretManager: none:
cd-pipeline-operator:\n # -- flag that indicates whether the operator should manage secrets for stages;\n # own - just copy secrets;\n # eso - secrete will be managed by External Secrets Operator(operator should be installed in the cluster);\n # none - not enable secrets management logic;\n secretManager: none\n
To upgrade EDP to the v3.6.0, run the following command:
To verify the installation, it is possible to test the deployment before applying it to the cluster with the --dry-run tag: helm upgrade edp epamedp/edp-install -n edp --values values.yaml --version=3.6.0 --dry-run
"},{"location":"operator-guide/upgrade-edp-3.7/","title":"v3.6 to 3.7","text":""},{"location":"operator-guide/upgrade-edp-3.7/#upgrade-edp-v36-to-37","title":"Upgrade EDP v3.6 to 3.7","text":"
Important
We suggest backing up the EDP environment before starting the upgrade procedure.
This section provides detailed instructions for upgrading the EPAM Delivery Platform to version 3.7.5. Follow the steps and requirements outlined below:
To upgrade EDP to the v3.7.5, run the following command:
To verify the installation, it is possible to test the deployment before applying it to the cluster with the --dry-run tag: helm upgrade edp epamedp/edp-install -n edp --values values.yaml --version=3.7.5 --dry-run
"},{"location":"operator-guide/upgrade-keycloak-19.0/","title":"v17.0 to 19.0","text":""},{"location":"operator-guide/upgrade-keycloak-19.0/#upgrade-keycloak-v170-to-190","title":"Upgrade Keycloak v17.0 to 19.0","text":"
Starting from Keycloak v.18.x.x, the Keycloak server has been moved from the Wildfly (JBoss) Application Server to Quarkus framework and is called Keycloak.X.
There are two ways to upgrade Keycloak v.17.0.x-legacy to v.19.0.x on Kubernetes, please perform the steps described in the Prerequisites section of this tutorial, and then select a suitable upgrade strategy for your environment:
Upgrade Postgres database to a minor release v.11.17
Migrate Postgres database from Postgres v.11.x to v.14.5
Before upgrading Keycloak, please perform the steps below:
Create a backup/snapshot of the Keycloak database volume. Locate the AWS volumeID and then create its snapshot on AWS:
Find the PVC name attached to the Postgres pod. It can be similar to data-keycloak-postgresql-0 if the Postgres StatefulSet name is keycloak-postgresql:
kubectl get pods keycloak-postgresql-0 -n security -o jsonpath='{.spec.volumes[*].persistentVolumeClaim.claimName}{\"\\n\"}'\n
Locate the PVvolumeName in the data-keycloak-postgresql-0 Persistent Volume Claim:
kubectl get pvc data-keycloak-postgresql-0 -n security -o jsonpath='{.spec.volumeName}{\"\\n\"}'\n
Get volumeID in the Persistent Volume:
kubectl get pv ${pv_name} -n security -o jsonpath='{.spec.awsElasticBlockStore.volumeID}{\"\\n\"}'\n
Add two additional keys: password and postgres-password, to the keycloak-postgresql secret in the Keycloak namespace.
Note
The password key must have the same value as the postgresql-password key.
The postgres-password key must have the same value as the postgresql-postgres-password key.
The latest chart for Keycloak.X does not have an option to override Postgres password and admin password keys in the secret, and it uses the Postgres defaults, therefore, a new secret scheme must be implemented:
"},{"location":"operator-guide/upgrade-keycloak-19.0/#upgrade-postgres-database-to-a-minor-release-v1117","title":"Upgrade Postgres Database to a Minor Release v.11.17","text":"
To upgrade Keycloak by upgrading Postgres Database to a minor release v.11.17, perform the steps described in the Prerequisites section of this tutorial, and then perform the following steps:
Since the Keycloak.X release, Keycloak and Postgres database charts are separated. Upgrade Keycloak, and then install the Postgres database.
Note
nameOverride: \"keycloak\" sets the name of the Keycloak pod. It must be the same Keycloak name as in the previous StatefulSet.
Change Ingress host name to the Keycloak host name.
hostname: keycloak-postgresql is the hostname of the pod with the Postgres database that is the same as Postgres StatefulSet name, for example, keycloak-postgresql.
\"/opt/keycloak/bin/kc.sh start --auto-build\" was used in the legacy Keycloak version. However, it is no longer required in the new Keycloak version since it is deprecated and used by default.
Optionally, use the following command for applying the old Keycloak theme:
bin/kc.sh start --features-disabled=admin2\n
View: keycloak-values.yaml
nameOverride: \"keycloak\"\n\nreplicas: 1\n\n# Deploy the latest verion\nimage:\n tag: \"19.0.1\"\n\n# start: create OpenShift realm which is required by EDP\nextraInitContainers: |\n - name: realm-provider\n image: busybox\n imagePullPolicy: IfNotPresent\n command:\n - sh\n args:\n - -c\n - |\n echo '{\"realm\": \"openshift\",\"enabled\": true}' > /opt/keycloak/data/import/openshift.json\n volumeMounts:\n - name: realm\n mountPath: /opt/keycloak/data/import\n\nextraVolumeMounts: |\n - name: realm\n mountPath: /opt/keycloak/data/import\n\nextraVolumes: |\n - name: realm\n emptyDir: {}\n\ncommand:\n - \"/opt/keycloak/bin/kc.sh\"\n - \"--verbose\"\n - \"start\"\n - \"--http-enabled=true\"\n - \"--http-port=8080\"\n - \"--hostname-strict=false\"\n - \"--hostname-strict-https=false\"\n - \"--spi-events-listener-jboss-logging-success-level=info\"\n - \"--spi-events-listener-jboss-logging-error-level=warn\"\n - \"--import-realm\"\n\nextraEnv: |\n - name: KC_PROXY\n value: \"passthrough\"\n - name: KEYCLOAK_ADMIN\n valueFrom:\n secretKeyRef:\n name: keycloak-admin-creds\n key: username\n - name: KEYCLOAK_ADMIN_PASSWORD\n valueFrom:\n secretKeyRef:\n name: keycloak-admin-creds\n key: password\n - name: JAVA_OPTS_APPEND\n value: >-\n -XX:+UseContainerSupport\n -XX:MaxRAMPercentage=50.0\n -Djava.awt.headless=true\n -Djgroups.dns.query={{ include \"keycloak.fullname\" . }}-headless\n\n# This block should be uncommented if you install Keycloak on Kubernetes\ningress:\n enabled: true\n annotations:\n kubernetes.io/ingress.class: nginx\n ingress.kubernetes.io/affinity: cookie\n rules:\n - host: keycloak.<ROOT_DOMAIN>\n paths:\n - path: '{{ tpl .Values.http.relativePath $ | trimSuffix \"/\" }}/'\n pathType: Prefix\n\n# This block should be uncommented if you set Keycloak to OpenShift and change the host field\n# route:\n# enabled: false\n# # Path for the Route\n# path: '/'\n# # Host name for the Route\n# host: \"keycloak.<ROOT_DOMAIN>\"\n# # TLS configuration\n# tls:\n# enabled: true\n\nresources:\n limits:\n memory: \"2048Mi\"\n requests:\n cpu: \"50m\"\n memory: \"512Mi\"\n\n# Check database readiness at startup\ndbchecker:\n enabled: true\n\ndatabase:\n vendor: postgres\n existingSecret: keycloak-postgresql\n hostname: keycloak-postgresql\n port: 5432\n username: admin\n database: keycloak\n
Upgrade the Keycloak Helm chart:
Note
The Helm chart is substituted with the new Keyacloak.X instance.
Change the namespace and the values file name if required.
If there are error messages when upgrading via Helm, make sure that StatefulSets are removed. If they are removed and the error still persists, try to add the --force flag to the Helm command:
Postgres v.11 and Postgres v.14.5 are not compatible.
Postgres image will be upgraded to a minor release v.11.17.
fullnameOverride: \"keycloak-postgresql\" sets the name of the Postgres StatefulSet. It must be the same as in the previous StatefulSet.
View: postgres-values.yaml
fullnameOverride: \"keycloak-postgresql\"\n\n# PostgreSQL read only replica parameters\nreadReplicas:\n # Number of PostgreSQL read only replicas\n replicaCount: 1\n\nglobal:\n postgresql:\n auth:\n username: admin\n existingSecret: keycloak-postgresql\n secretKeys:\n adminPasswordKey: postgres-password\n userPasswordKey: password\n database: keycloak\n\nimage:\n registry: docker.io\n repository: bitnami/postgresql\n tag: 11.17.0-debian-11-r3\n\nauth:\n existingSecret: keycloak-postgresql\n secretKeys:\n adminPasswordKey: postgres-password\n userPasswordKey: password\n\nprimary:\n persistence:\n enabled: true\n size: 3Gi\n # If the StorageClass with reclaimPolicy: Retain is used, install an additional StorageClass before installing PostgreSQL\n # (the code is given below).\n # If the default StorageClass will be used - change \"gp2-retain\" to \"gp2\"\n storageClass: \"gp2-retain\"\n
Install the Postgres database chart:
Note
Change the namespace and the values file name if required.
Log in to Keycloak and check that everything works as expected.
"},{"location":"operator-guide/upgrade-keycloak-19.0/#clean-and-analyze-database","title":"Clean and Analyze Database","text":"
Optionally, run the vacuumdb application on the database, to recover space occupied by \"dead tuples\" in the tables, analyze the contents of database tables, and collect statistics for PostgreSQL query engine to improve performance:
"},{"location":"operator-guide/upgrade-keycloak-19.0/#migrate-postgres-database-from-postgres-v11x-to-v145","title":"Migrate Postgres Database From Postgres v.11.x to v.14.5","text":"
Info
There is a Postgres database migration script at the end of this tutorial. Please read the section below before using the script.
To upgrade Keycloak by migrating Postgres database from Postgres v.11.x to v.14.5, perform the steps described in the Prerequisites section of this tutorial, and then perform the following steps:
Log in to the current Keycloak Postgres pod and create a logical backup of all roles and databases using the pg_dumpall application. If there is no access to the Postgres Superuser, backup the Keycloak database with the pg_dump application:
Note
The secret key postgresql-postgres-password is for the postgres Superuser and postgresql-password is for admin user. The admin user is indicated by default in the Postgres Helm chart. The admin user may not have enough permissions to dump all Postgres databases and roles, so the preferred option for exporting all objects is using the pg_dumpall tool with the postgres Superuser.
If the PGPASSWORD variable is not specified before using the pg_dumpall tool, you will be prompted to enter a password for each database during the export.
If the -l keycloak parameter is specified, pg_dumpall will connect to the keycloak database for dumping global objects and discovering what other databases should be dumped. By default, pg_dumpall will try to connect to postgres or template1 databases. This parameter is optional.
The pg_dumpall --clean option adds SQL commands to the dumped file for dropping databases before recreating them during import, as well as DROP commands for roles and tablespaces (pg_dump also has this option). If the --clean parameter is specified, connect to the postgres database initially during import via psql. The psql script will attempt to drop other databases immediately, and that will fail for the database you are connected to. This flag is optional, and it is not included into this tutorial.
If there is no working password for the postgres Superuser, try the admin user using the pg_dump tool to export the keycloak database without global roles:
Double-check that the contents of the dumped file is not empty. It usually contains more than 4000 lines.
Copy the file with the database dump to a local machine. Since tar may not be present in the pod and kubectl cp will not work without tar, use the following command:
Please find below the alternative commands for exporting the database to the local machine without copying the file to a pod for Postgres and admin users:
Delete all previous Keycloak resources along with the Postgres database and keycloak StatefulSets, Ingress, and custom resources via Helm, or via the tool used for their deployment.
helm list -n security\nhelm delete keycloak -n security\n
Warning
Don't delete the whole namespace. Keep the keycloak-postgresql and keycloak-admin-creds secrets.
Delete the volume in AWS, from which a snapshot has been created. Then delete the PVC:
fullnameOverride: \"keycloak-postgresql\" sets the name of the Postgres StatefulSet. It must be same as in the previous StatefulSet.
View: postgres-values.yaml
nameOverride: \"keycloak-postgresql\"\n\n# PostgreSQL read only replica parameters\nreadReplicas:\n # Number of PostgreSQL read only replicas\n replicaCount: 1\n\nglobal:\n postgresql:\n auth:\n username: admin\n existingSecret: keycloak-postgresql\n secretKeys:\n adminPasswordKey: postgres-password\n userPasswordKey: password\n database: keycloak\n\nauth:\n existingSecret: keycloak-postgresql\n secretKeys:\n adminPasswordKey: postgres-password\n userPasswordKey: password\n\nprimary:\n persistence:\n enabled: true\n size: 3Gi\n # If the StorageClass with reclaimPolicy: Retain is used, install an additional StorageClass before installing PostgreSQL\n # (the code is given below).\n # If the default StorageClass will be used - change \"gp2-retain\" to \"gp2\"\n storageClass: \"gp2-retain\"\n
Install the Postgres database:
Note
Change the namespace and the values file name if required.
Database import must be done before deploying Keycloak, because Keycloak will write its own data to the database during the start, and the import will partially fail. If that happened, scale down the keycloak StatefulSet, and try to drop the Keycloak database in the Postgres pod:
If there still are some conflicting objects like roles, drop them via the DROP ROLE command.
If the previous steps do not help, downscale the Keycloak and Postgres StatefulSets and delete the attached PVC (save the volumeID before removing), and delete the volume on AWS if using gp2-retain. In case of using gp2, the volume will be deleted automatically after removing PVC. After that, redeploy the Postgres database, so that the new PVC is automatically created.
Import the SQL dump file to the Postgres database cluster:
Info
Since the databases were exported in the sql format, the psql tool will be used to restore (reload) them. pg_restore does not support this plain-text format.
If the entire Postgres database cluster was migrated with the postgres Superuser using pg_dumpall, use the import command without indicating the database:
If the database was migrated with the admin user using pg_dump, the postgres Superuser still can be used to restore it, but, in this case, a database must be indicated:
Warning
If the database name was not indicated during the import for the file dumped with pg_dump, the psql tool will import this database to a default Postgres database called postgres.
If the postgres Superuser is not accessible in the Postgres pod, run the command under the admin or any other user that has the database permissions. In this case, indicate the database as well:
After a successful import, delete the dump file from the pod for security reasons:
kubectl exec -n security ${postgresql_pod} \"--\" sh -c \"rm /tmp/keycloak_wildfly_db_dump.sql\"\n
Note
Please find below the alternative commands for importing the database from the local machine to the pod without storing the backup on a pod for postgres or admin users:
nameOverride: \"keycloak\" sets the name of the Keycloak pod. It must be the same Keycloak name as in the previous StatefulSet.
Change Ingress host name to the Keycloak host name.
hostname: keycloak-postgresql is the hostname of the pod with the Postgres database that is the same as Postgres StatefulSet name, for example, keycloak-postgresql.
\"/opt/keycloak/bin/kc.sh start --auto-build\" was used in the legacy Keycloak version. However, it is no longer required in the new Keycloak version since it is deprecated and used by default.
Optionally, use the following command for applying the old Keycloak theme:
bin/kc.sh start --features-disabled=admin2\n
Info
Automatic database migration will start after the Keycloak installation.
View: keycloak-values.yaml
nameOverride: \"keycloak\"\n\nreplicas: 1\n\n# Deploy the latest verion\nimage:\n tag: \"19.0.1\"\n\n# start: create OpenShift realm which is required by EDP\nextraInitContainers: |\n - name: realm-provider\n image: busybox\n imagePullPolicy: IfNotPresent\n command:\n - sh\n args:\n - -c\n - |\n echo '{\"realm\": \"openshift\",\"enabled\": true}' > /opt/keycloak/data/import/openshift.json\n volumeMounts:\n - name: realm\n mountPath: /opt/keycloak/data/import\n\nextraVolumeMounts: |\n - name: realm\n mountPath: /opt/keycloak/data/import\n\nextraVolumes: |\n - name: realm\n emptyDir: {}\n\ncommand:\n - \"/opt/keycloak/bin/kc.sh\"\n - \"--verbose\"\n - \"start\"\n - \"--http-enabled=true\"\n - \"--http-port=8080\"\n - \"--hostname-strict=false\"\n - \"--hostname-strict-https=false\"\n - \"--spi-events-listener-jboss-logging-success-level=info\"\n - \"--spi-events-listener-jboss-logging-error-level=warn\"\n - \"--import-realm\"\n\nextraEnv: |\n - name: KC_PROXY\n value: \"passthrough\"\n - name: KEYCLOAK_ADMIN\n valueFrom:\n secretKeyRef:\n name: keycloak-admin-creds\n key: username\n - name: KEYCLOAK_ADMIN_PASSWORD\n valueFrom:\n secretKeyRef:\n name: keycloak-admin-creds\n key: password\n - name: JAVA_OPTS_APPEND\n value: >-\n -XX:+UseContainerSupport\n -XX:MaxRAMPercentage=50.0\n -Djava.awt.headless=true\n -Djgroups.dns.query={{ include \"keycloak.fullname\" . }}-headless\n\n# This block should be uncommented if you install Keycloak on Kubernetes\ningress:\n enabled: true\n annotations:\n kubernetes.io/ingress.class: nginx\n ingress.kubernetes.io/affinity: cookie\n rules:\n - host: keycloak.<ROOT_DOMAIN>\n paths:\n - path: '{{ tpl .Values.http.relativePath $ | trimSuffix \"/\" }}/'\n pathType: Prefix\n\n# This block should be uncommented if you set Keycloak to OpenShift and change the host field\n# route:\n# enabled: false\n# # Path for the Route\n# path: '/'\n# # Host name for the Route\n# host: \"keycloak.<ROOT_DOMAIN>\"\n# # TLS configuration\n# tls:\n# enabled: true\n\nresources:\n limits:\n memory: \"2048Mi\"\n requests:\n cpu: \"50m\"\n memory: \"512Mi\"\n\n# Check database readiness at startup\ndbchecker:\n enabled: true\n\ndatabase:\n vendor: postgres\n existingSecret: keycloak-postgresql\n hostname: keycloak-postgresql\n port: 5432\n username: admin\n database: keycloak\n
Deploy Keycloak:
Note
Change the namespace and the values file name if required.
Log in to Keycloak and check if everything has been imported correctly.
"},{"location":"operator-guide/upgrade-keycloak-19.0/#clean-and-analyze-database_1","title":"Clean and Analyze Database","text":"
Optionally, run the vacuumdb application on the database, to analyze the contents of database tables and collect statistics for the Postgres query optimizer:
Please read the Migrate Postgres Database From Postgres v.11.x to v.14.5 section of this tutorial before using the script.
Note
The kubectl tool is required for using this script.
This script will likely work for any other Postgres database besides Keycloak after some adjustments. It queries the pg_dump, pg_dumpall, psql, and vacuumdb commands under the hood.
The following script can be used for exporting and importing Postgres databases as well as optimizing them with the vacuumdb application. Please examine the code and make the adjustments if required.
By default, the following command exports Keycloak Postgres databases from a Kubernetes pod to a local machine:
./script.sh\n
After running the command, please follow the prompt.
To import a database backup to a newly created Postgres Kubernetes pod, pass a database dump sql file to the script:
./script.sh path-to/db_dump.sql\n
The -h flag prints help, and -c|-v runs the vacuumdb garbage collector and analyzer.
View: keycloak_db_migration.sh
#!/bin/bash\n\n# set -x\n\ndb_migration_help(){\n echo \"Keycloak Postgres database migration\"\n echo\n echo \"Usage:\"\n echo \"------------------------------------------\"\n echo \"Export Keycloak Postgres database from pod\"\n echo \"Run without parameters:\"\n echo \" $0\"\n echo \"------------------------------------------\"\n echo \"Import Keycloak Postgres database to pod\"\n echo \"Pass filename to script:\"\n echo \" $0 path/to/db_dump.sql\"\n echo \"------------------------------------------\"\n echo \"Additional options: \"\n echo \" $0 [OPTIONS...]\"\n echo \"Options:\"\n echo \"h Print Help.\"\n echo \"c|v Run garbage collector and analyzer.\"\n}\n\nkeycloak_ns(){\n printf '%s\\n' 'Enter keycloak namespace: '\n read -r keycloak_namespace\n\n if [ -z \"${keycloak_namespace}\" ]; then\n echo \"Don't skip namespace\"\n exit 1\n fi\n}\n\npostgres_pod(){\n printf '%s\\n' 'Enter postgres pod name: '\n read -r postgres_pod_name\n\n if [ -z \"${postgres_pod_name}\" ]; then\n echo \"Don't skip pod name\"\n exit 1\n fi\n}\n\npostgres_user(){\n printf '%s\\n' 'Enter postgres username: '\n printf '%s' \"Skip to use [postgres] superuser: \"\n read -r postgres_username\n\n if [ -z \"${postgres_username}\" ]; then\n postgres_username='postgres'\n fi\n}\n\npgdb_host_info(){\n database_name='keycloak'\n db_host='localhost'\n db_port='5432'\n}\n\npostgresql_admin_pass(){\n postgresql_password='POSTGRES_PASSWORD'\n postgresql_admin_password=\"$(kubectl exec -n \"${keycloak_namespace}\" \"${postgres_pod_name}\" \"--\" \\\n sh -c \"printenv ${postgresql_password}\")\"\n}\n\npostgresql_su_pass(){\n postgresql_postgres_password='POSTGRES_POSTGRES_PASSWORD'\n postgresql_superuser_password=\"$(kubectl exec -n \"${keycloak_namespace}\" \"${postgres_pod_name}\" \"--\" \\\n sh -c \"printenv ${postgresql_postgres_password}\")\"\n\n if [ -z \"${postgresql_superuser_password}\" ]; then\n echo \"SuperUser password variable does not exist. Using user password instead...\"\n postgresql_admin_pass\n postgresql_superuser_password=\"${postgresql_admin_password}\"\n fi\n}\n\nkeycloak_pgdb_export(){\n current_cluster=\"$(kubectl config current-context | tr -dc '[:alnum:]-')\"\n exported_db_name=\"keycloak_db_dump_${current_cluster}_${keycloak_namespace}_${postgres_username}_$(date +\"%Y%m%d%H%M\").sql\"\n\n if [ \"${postgres_username}\" == 'postgres' ]; then\n # call a function to get a pass for postgres user\n postgresql_su_pass\n kubectl exec -n \"${keycloak_namespace}\" \"${postgres_pod_name}\" \"--\" \\\n sh -c \"PGPASSWORD='\"${postgresql_superuser_password}\"' pg_dumpall -h \"${db_host}\" -p \"${db_port}\" -U \"${postgres_username}\"\" > \"${exported_db_name}\"\n else\n # call a function to get a pass for admin user\n postgresql_admin_pass\n kubectl exec -n \"${keycloak_namespace}\" \"${postgres_pod_name}\" \"--\" \\\n sh -c \"PGPASSWORD='\"${postgresql_admin_password}\"' pg_dump -h \"${db_host}\" -p \"${db_port}\" -U \"${postgres_username}\" -d \"${database_name}\"\" > \"${exported_db_name}\"\n fi\n\n separate_lines=\"---------------\"\n\n if [ ! -s \"${exported_db_name}\" ]; then\n rm -f \"${exported_db_name}\"\n echo \"${separate_lines}\"\n echo \"Something went wrong. The database dump file is empty and was not saved.\"\n else\n echo \"${separate_lines}\"\n grep 'Dumped' \"${exported_db_name}\" | sort -u\n echo \"Database has been exported to $(pwd)/${exported_db_name}\"\n fi\n}\n\nkeycloak_pgdb_import(){\n echo \"Preparing Import\"\n echo \"----------------\"\n\n if [ ! -f \"$1\" ]; then\n echo \"The file $1 does not exist.\"\n exit 1\n fi\n\n keycloak_ns\n postgres_pod\n postgres_user\n pgdb_host_info\n\n if [ \"${postgres_username}\" == 'postgres' ]; then\n # restore full backup with all databases and roles as superuser or a single database\n postgresql_su_pass\n if [ -n \"$(cat \"$1\" | grep 'CREATE ROLE')\" ]; then\n cat \"$1\" | kubectl exec -i -n \"${keycloak_namespace}\" \"${postgres_pod_name}\" \"--\" \\\n sh -c \"cat | PGPASSWORD='\"${postgresql_superuser_password}\"' psql -h \"${db_host}\" -p \"${db_port}\" -U \"${postgres_username}\"\"\n else\n cat \"$1\" | kubectl exec -i -n \"${keycloak_namespace}\" \"${postgres_pod_name}\" \"--\" \\\n sh -c \"cat | PGPASSWORD='\"${postgresql_superuser_password}\"' psql -h \"${db_host}\" -p \"${db_port}\" -U \"${postgres_username}\" -d \"${database_name}\"\"\n fi\n else\n # restore a single database\n postgresql_admin_pass\n cat \"$1\" | kubectl exec -i -n \"${keycloak_namespace}\" \"${postgres_pod_name}\" \"--\" \\\n sh -c \"cat | PGPASSWORD='\"${postgresql_admin_password}\"' psql -h \"${db_host}\" -p \"${db_port}\" -U \"${postgres_username}\" -d \"${database_name}\"\"\n fi\n}\n\nvacuum_pgdb(){\n echo \"Preparing garbage collector and analyzer\"\n echo \"----------------------------------------\"\n\n keycloak_ns\n postgres_pod\n postgres_user\n pgdb_host_info\n\n if [ \"${postgres_username}\" == 'postgres' ]; then\n postgresql_su_pass\n kubectl exec -n \"${keycloak_namespace}\" \"${postgres_pod_name}\" \"--\" \\\n sh -c \"PGPASSWORD='\"${postgresql_superuser_password}\"' vacuumdb --analyze --all -h \"${db_host}\" -p \"${db_port}\" -U \"${postgres_username}\"\"\n else\n postgresql_admin_pass\n kubectl exec -n \"${keycloak_namespace}\" \"${postgres_pod_name}\" \"--\" \\\n sh -c \"PGPASSWORD='\"${postgresql_admin_password}\"' vacuumdb --analyze -h \"${db_host}\" -p \"${db_port}\" -U \"${postgres_username}\" -d \"${database_name}\"\"\n fi\n}\n\nwhile [ \"$#\" -eq 1 ]; do\n case \"$1\" in\n -h | --help)\n db_migration_help\n exit 0\n ;;\n -c | --clean | -v | --vacuum)\n vacuum_pgdb\n exit 0\n ;;\n --)\n break\n ;;\n -*)\n echo \"Invalid option '$1'. Use -h|--help to see the valid options\" >&2\n exit 1\n ;;\n *)\n keycloak_pgdb_import \"$1\"\n exit 0\n ;;\n esac\n shift\ndone\n\nif [ \"$#\" -gt 1 ]; then\n echo \"Please pass a single file to the script\"\n exit 1\nfi\n\necho \"Preparing Export\"\necho \"----------------\"\nkeycloak_ns\npostgres_pod\npostgres_user\npgdb_host_info\nkeycloak_pgdb_export\n
The Version Control Systems (VCS) section is dedicated to delivering comprehensive information on VCS within the EPAM Delivery Platform. This section comprises detailed descriptions of all the deployment strategies, along with valuable recommendations for their optimal usage, and the list of supported VCS, facilitating seamless integration with EDP.
EDP offers the following strategies to work with repositories:
Create from template \u2013 creates a project on the pattern in accordance with an application language, a build tool, and a framework selected while creating application. This strategy is recommended for projects that start developing their applications from scratch.
Note
Under the hood, all the built-in application frameworks, build tools and frameworks are stored in our public GitHub repository.
Import project - enables working with the repository located in the added Git server. This scenario is preferred when the users already have an application stored in their own pre-configured repository and intends to continue working with their repository while also utilizing EDP simultaneously.
Note
In order to use the Import project strategy, make sure to adjust it with the Integrate GitHub/GitLab in Tekton page. The Import project strategy is not applicable for Gerrit. Also, it is impossible to choose the Empty project field when using the Import project strategy while creating appication since it is implied that you already have a ready-to-work application in your own repository, whereas the \"Empty project\" option creates a repository but doesn't put anything in it.
Clone project \u2013 clones the indicated repository into EPAM Delivery Platform. In this scenario, the application repository is forked from the original application repository to EDP. Since EDP doesn't support multiple VCS integration for now, this strategy is recommended when the user has several applications located in several repositories.
"},{"location":"operator-guide/velero-irsa/","title":"IAM Roles for Velero Service Accounts","text":""},{"location":"operator-guide/velero-irsa/#iam-roles-for-velero-service-accounts","title":"IAM Roles for Velero Service Accounts","text":"
Note
Make sure that IRSA is enabled and amazon-eks-pod-identity-webhook is deployed according to the Associate IAM Roles With Service Accounts documentation.
Velero AWS plugin requires access to AWS resources. Follow the steps below to create a required role:
Create AWS IAM Policy \"AWSIRSA\u2039CLUSTER_NAME\u203a\u2039VELERO_NAMESPACE\u203aVelero_policy\":
Attach the \"AWSIRSA\u2039CLUSTER_NAME\u203a\u2039VELERO_NAMESPACE\u203aVelero_policy\" policy to the \"AWSIRSA\u2039CLUSTER_NAME\u203a\u2039VELERO_NAMESPACE\u203aVelero\" role.
Make sure that Amazon S3 bucket with name velero-\u2039CLUSTER_NAME\u203a exists.
Provide key value eks.amazonaws.com/role-arn: \"arn:aws:iam:::role/AWSIRSA\u2039CLUSTER_NAME\u203a\u2039VELERO_NAMESPACE\u203aVelero\" into the serviceAccount.server.annotations parameter in values.yaml during the Velero Installation.
"},{"location":"operator-guide/waf-tf-configuration/","title":"Configure AWS WAF With Terraform","text":""},{"location":"operator-guide/waf-tf-configuration/#configure-aws-waf-with-terraform","title":"Configure AWS WAF With Terraform","text":"
This page contains accurate information on how to configure AWS WAF using Terraform with the aim to have a secured traffic exposure and to prevent the Host Header vulnerabilities.
Prerequisites (mostly the left part of the scheme) - AWS ALB, Compute Resources (EC2, EKS, etc.).
WAF configuration (the right part of the scheme).
The WAF ACL resource is the main resource used for the configuration; The default web ACL option is Block.
Overview WAF Solution
The ACL includes three managed AWS rules that secure the exposed traffic:
AWS-AWSManagedRulesCommonRuleSet
AWS-AWSManagedRulesLinuxRuleSet
AWS-AWSManagedRulesKnownBadInputsRuleSet
AWS provides a lot of rules such as baseline and use-case specific rules, for details, please refer to the Baseline rule groups.
There is the PreventHostInjections rule that prevents the Host Header vulnerabilities. This rule includes one statement that declares that the Host Header should match Regex Pattern Set, thus only in this case it will be passed.
The Regex Pattern Set is another resource that helps to organize regexes, in fact, is a set of regexes. All regexes added to the single set are matched by the OR statement, i.e. when exposing several URLs, it is necessary to add this statement to the set and refer to it in the rule.
To create the Regex Pattern Set, inspect the following code:
resource \"aws_wafv2_regex_pattern_set\" \"common\" {\n name = \"Common\"\n scope = \"REGIONAL\"\n\n regular_expression {\n regex_string = \"^.*(some-url).*((.edp-epam)+)\\\\.com$\"\n }\n\n # Add here additional regular expressions for other endpoints, they are merging with OR operator, e.g.\n\n /*\n regular_expression {\n regex_string = \"^.*(keycloak).*((.edp-epam)+)\\\\.com$\"\n }\n */\n\n tags = var.tags\n}\n
It includes 'regex_string', for example: url - some-url.edp-epam.com, In addition, it is possible to add other links to the same resource using the regular_expression element.
There is the Terraform code for the aws_wafv2_web_acl resource:
As mentioned previously, ACL includes three managed AWS rules (group rules), for visibility, enabling sampling, and CloudWatch in the config. The 'PreventHostInjections' custom rule refers to the created pattern set and declares the Host Header, as well as sets the 'Action' if matched to 'Allow'.
AWS ALB can be created in the scope of this Terraform code or created previously. When creating ALB to expose links, the ALB should have a security group that allows some external traffic.
When ALB is associated with the WAF ACL, direct the traffic to the ALB by the Route53 CNAME record:
module \"some_url_exposure\" {\n source = \"terraform-aws-modules/route53/aws//modules/records\"\n version = \"2.0.0\"\n\n zone_name = \"edp-epam.com\"\n\n records = [\n {\n name = \"some-url\"\n type = \"CNAME\"\n ttl = 300\n records = [aws_lb.<aws_alb_for_waf>.dns_name]\n }\n ]\n}\n
In the sample above, the module is used, but it is also possible to use a Terraform resource.
Welcome to the Troubleshooting Guide for the EPAM Delivery Platform. Here, we offer essential information to assist you with the challenges you may encounter while using the platform. This guide is designed to address common issues and answer frequently asked questions, aiming to streamline your troubleshooting process and enhance your experience. Whether you're dealing with deployment setbacks, authentication hurdles, or configuration complexities, you'll find helpful insights and solutions here.
In EDP, all software components, such as applications, libraries, Terraform infrastructures, and automated tests, are termed as codebases. EDP provides flexible methods for scaffolding these components.
This guide will lead you through creating a Go application using the Gin framework. The EDP Marketplace will be utilized to streamline the application creation process.
Having created the Go application, proceed to build it by performing the following actions:
In the component details page, expand the application and click the Go to the Source Code button:
Application details
In the opened Source Code, create new branch called test.
In the SonarCloud organization page, copy the value of the SonarCloud organization name:
Organization key
In the test branch in GitHub, open the sonar-project.properties file and include the sonar.language=go, sonar.scanner.force-deprecated-java-version=true, and sonar.organization parameters where sonar.organization is equal to the value copied in the previous step, resulting in the following configuration:
This step is necessary due to SonarCloud's discontinuation of support for Java 11, which is utilized in the sonarqube-scanner image. This solution is designed specifically for the EDP 3.7.x and lower versions. Users of EDP 3.8.x and higher versions can skip this step.
In the component details page, click the Trigger build pipeline run button:
Triggering pipeline run
Enable port-forwarding for the edp-tekton-dashboard service (in case ingress is not deployed):
To observe the build pipeline status, click the tree diagram icon in the Diagram column:
Tree diagram window
Once the build is failed, click the failed stage name to open the Tekton pipeline run:
Failure details
The initial pipeline is expected to fail, primarily due to SonarCloud intricacies. It is imperative to set a Quality Gate in SonarCloud after the initial pipeline run and subsequently re-trigger the build pipeline. After the pipeline failure, a new project is expected to appear in the organization.
In the SonarCloud organization, select the newly appeared project and click the Set New Code Definition button:
New code definition
In the New Code page, set the Previous version option and click Save:
New Code page
In EDP Portal, trigger build pipeline run one more time and wait until the pipeline run is finished.
Build pipelines are designed to generate an executable image of an application. Once built, the image can be run in a target environment.
Now that you have successfully built an application, the next step involves creating an environment for deployment. To deploy the application, it is necessary to install and integrate Argo CD. To deploy the application, we need to install and integrate Argo CD. To do this, navigate to the Integrate Argo CD page.
Now, proceed to deploy our first application. This page provides comprehensive instructions on creating an environment and deploying the application within it.
As a prerequisite, create a GitOps repository in your GitHub account. EDP Portal adheres to the GitOps approach when working with environments. In a GitOps repository, values are saved to redefine the default behavior (parameters) of deployment for each environment. The creation of a GitOps repository involves the following two steps:
In EDP Portal, navigate to EDP -> Configuration -> Deployment -> GitOps:
In the Environments list, click the Environment name:
Environments list
In the Environment details page, click the stage name to enter the stage details:
Environment details
Once you enter the stage details, proceed to deploy the application:
Select an application;
Select the Image stream version;
Click the Deploy button.
Deploying application
Congratulations! You have passed the Quick Start guide! We hope you enjoyed this journey.
Now that you have a good understanding of how EDP works, you can further enhance its capabilities by integrating it with Nexus. Additionally, explore other functionalities detailed in our Use Cases section. If you're eager to unlock the full potential of EDP, navigate to the Operator Guide to fine-tune your EDP for optimal performance!
EPAM Delivery Platform employs Argo CD as a Continuous Deployment tool for its purposes. This page provides guidance on the installation procedure for Argo CD.
The next step is to integrate Argo CD with EDP. Proceed with the instructions below:
Navigate to the directory that stores the ed25519 key created before during the GitHub integration. For details, please refer to the Integrate GitHub page.
Copy the SSH private key to the Argo CD namespace. Remember to fill in the ACCOUNT_NAME variable:
EDP utilizes container registries for storing and distributing application images. This page provides instructions on integrating your platform with DockerHub.
To integrate EPAM Delivery Platform with DockerHub, complete the guidelines below:
Log in to your DockerHub account.
In the DockerHub main page, click your user icon at the top right corner and select Account Settings.
In the Account Settings page, select the Security tab and click New Access Token.
Enter the token description, select the Read, Write, Delete permission and click Generate.
Copy the generated token:
DockerHub token
In EDP Portal, navigate to EDP -> Configuration -> Registry and click the Add Registry button.
In the Registry Provider field, select DockerHub. Define the following values and click Save:
Registry Endpoint: https://docker.io
Registry Space: DockerHub account name
User: DockerHub account name
Password/Token: Your generated access token
Use the Push Account's credentials: check
DockerHub integration
Note
In the DockerHub context, the Registry Space field is equivalent to the account/organization name.
With all integrations in place, let us move forward with creating applications. Please proceed to the Create Application page for further instructions.
To initiate work in the EPAM Delivery Platform, integration with a Version Control System (VCS) is essential. This integration facilitates the use of create, clone, and import strategies for handling source code. This tutorial focuses on the create strategy, wherein an application is directly created in the integrated VCS solution for subsequent work. Here, you will find instructions on how to integrate EDP with GitHub.
Note
Prior to moving forward, ensure you possess an active GitHub account and have successfully deployed EDP.
To integrate EDP with GitHub, follow the steps below:
Generate an SSH key pair:
ssh-keygen -t ed25519 -C \"email@example.com\"\n
Add the created SSH key (the public part) to the GitHub account:
In the GitHub main page, click your user icon. Navigate to Settings -> SSH and GPG keys and click New SSH key.
Create the quick_start key. Insert your ed25519.pub key data and click Add SSH key:
Repo permission
Generate an access token for the GitHub account with read/write access to the API:
Log in to GitHub.
Click the profile account and navigate to Settings -> Developer Settings.
Select Personal access tokens (classic) and generate a new token with the following parameters:
Repo permission
Note
The following (Admin:repo, Admin:org, and User) access is necessary for the GitHub Pull Request Builder plugin to retrieve Pull Request commits, their status, and author information.
Admin:repo permission Admin:org permission User permission
Save a new personal access token.
In EDP Portal, navigate to EDP -> Configuration -> Git Servers. Define the following values and click Save:
Git provider: select GitHub
Host: github.com
User: Git
SSH port: 22
HTTPS port: 443
Private SSH key: your generated SSH private key
Access token: your account token generated in GitHub
Git Server configuration
Ensure the Git server has a green status. To store container images, integrate EDP with a container registry by navigating to the Integrate DockerHub page.
It is mandatory for EDP to have SonarQube integrated with the platform as all the pipelines include the sonar step.
SonarQube is a robust tool employed in build and code review pipelines to elevate code quality by detecting and reporting issues, along with offering improvement recommendations. SonarCloud, the SaaS solution provided by SonarQube, serves this purpose.
This guide will lead you through the configuration process of SonarCloud for your project.
Note
An alternative option is to use an independent SonarQube instance.
To integrate SonarCloud with the platform, follow the steps below:
Sign up in the SonarCloud with your GitHub account.
Once you are logged in with GitHub, import an organization from GitHub:
Import organization
Note
It is crucial to have the organization created in SonarCloud. If you were signed up in SonarCloud using a GitHub account, SonarCloud will suggest you creating an organization with name that is equivalent to your GitHub account name.
In the Create an organization menu, choose the free plan and click Create organization:
Choose plan
In your account menu, select the Security tab and generate token:
Generate token
In EDP Portal, navigate to EDP -> Configuration -> Code Quality. Define the following values and click Save:
URL: https://sonarcloud.io
Token: account token generated in SonarCloud
SonarQube integration
After completing the SonarQube integration, proceed to integrate the platform with GitHub. Navigate to the Integrate GitHub page for further instructions.
This page serves as the starting point for the quick start guide, where we will install Tekton as a prerequisite and then proceed to install the EPAM Delivery Platform itself.
In the login menu, paste the generated token in the ID token field and click the Authenticate button.
Upon logging in, specify the namespace for EDP Portal where EDP is deployed by clicking the cluster settings link in the bottom left corner of the UI:
Specify namespaces
In the Cluster Settings page, define the following for fields:
Default namespace: edp
Allowed namespaces: edp
Cluster Settings menu
Note
Remember to click the + icon when adding the allowed namespace.
After completing these steps, you will get access to EPAM Delivery Platform components through the EDP Portal UI. You can now proceed with the integration steps, starting with the SonarQube integration.
This page serves as an introductory part of the Quick Start guide. It outlines the core steps and reasons to perform them.
The purpose of this guide is to swiftly demonstrate the key functionalities of the EPAM Delivery Platform (EDP). After completing this guide, users will have a clear understanding of EDP\u2019s capabilities. This guide is designed for those who wish to quickly explore EDP.
Before deploying EDP, ensure to deploy a local Kubernetes cluster. We recommend allocating 4 CPUs and 8 GB of RAM to it.
Alternatively, use any cloud provider that offers Kubernetes service with sufficient CPU and RAM capacity. For instance, we encourage you to check out our video tutorial, where we demonstrate the installation of EDP via the Civo Marketplace. In this case you will be able to skip the installation part of the guide and proceed with adjusting integrations.
The very first step of the guide is to prepare the cluster environment for the EDP setup process by installing the Tekton tool. Immediately after this we will be able to install EDP.
All the guidelines are described in the Platform Installation page. Alternatively, watch our video tutorial that clearly demonstrates this process.
The Use Cases section provides useful recommendations of how to operate with the EPAM Delivery Platform tools and manage the custom resources. Get acquainted with the description of technical scenarios and solutions.
Scaffold And Deploy FastAPI Application
Rapidly create, customize, and deploy FastAPI applications using a scaffolding tool and standardized processes, streamlining development and enhancing code quality for quicker and reliable feature releases.
Scaffold Now
Bring Your Own Framework
Facilitate the onboarding of custom tools and frameworks into the EPAM Delivery Platform by integrating custom Tekton libraries, empowering the modification of pipelines and tasks for tailored workflows.
Summon the Kraken
Secrets Management For Application Deployment
Ensure secure handling of sensitive data by leveraging an external secret store within the EPAM Delivery Platform, allowing secure transmission and usage of confidential information across namespaces, facilitating secure connections to databases during development and deployment, tailored for Developers.
Run Securely
Autotest As the Quality Gate
Implement autotests as a quality gate within the Continuous Deployment pipeline, verifying application stability and functionality, allowing reliable versions to be promoted while enabling quick creation of applications, streamlined testing, and seamless deployment updates for Developers and Quality Assurance specialists.
Set Quality Gate
"},{"location":"use-cases/application-scaffolding/","title":"Scaffold and Deploy FastAPI Application","text":""},{"location":"use-cases/application-scaffolding/#scaffold-and-deploy-fastapi-application","title":"Scaffold and Deploy FastAPI Application","text":""},{"location":"use-cases/application-scaffolding/#overview","title":"Overview","text":"
This use case describes the creation and deployment of a FastAPI application to enable a developer to quickly generate a functional code structure for a FastAPI web application (with basic read functionality), customize it to meet specific requirements, and deploy it to a development environment. By using a scaffolding tool and a standardized process for code review, testing and deployment, developers can reduce the time and effort required to build and deploy a new application while improving the quality and reliability of the resulting code. Ultimately, the goal is to enable the development team to release new features and applications more quickly and efficiently while maintaining high code quality and reliability.
To scaffold and deploy FastAPI Application, follow the steps below.
"},{"location":"use-cases/application-scaffolding/#scaffold-the-new-fastapi-application","title":"Scaffold the New FastAPI Application","text":"
Open EDP Portal URL. Use the Sign-In option.
Logging screen
Ensure Namespace value in the User Settings tab points to the namespace with the EDP installation.
Settings button
Create the new Codebase with the Application type using the Create strategy. To do this, open EDP tab.
Cluster overview
Select the Components Section under the EDP tab and push the create + button.
Components tab
Select the Application Codebase type because we are going to deliver our application as a container and deploy it inside the Kubernetes cluster. Choose the Create strategy to scaffold our application from the template provided by the EDP and press the Proceed button.
Step codebase info
On the Application Info tab, define the following values and press the Proceed button:
Application name: fastapi-demo
Default branch: main
Application code language: Python
Language version/framework: FastAPI
Build tool: Python
Application info
On the Advances Settings tab, define the below values and push the Apply button:
CI tool: Tekton
Codebase versioning type: edp
Start version from: 0.0.1 and SNAPSHOT
Advanced settings
Check the application status. It should be green:
Application status
"},{"location":"use-cases/application-scaffolding/#deploy-the-application-to-the-development-environment","title":"Deploy the Application to the Development Environment","text":"
This section describes the application deployment approach from the latest branch commit. The general steps are:
Build the initial version (generated from the template) of the application from the last commit of the main branch.
Create a CD Pipeline to establish continuous delivery to the development environment.
Deploy the initial version to the development env.
To succeed with the steps above, follow the instructions below:
Build Container from the latest branch commit. To build the initial version of the application's main branch, go to the fastapi-demo application -> branches -> main and select the Build menu.
Application building
Build pipeline for the fastapi-demo application starts.
Pipeline building
Track Pipeline's status by accessing Tekton Dashboard by clicking the fastapi-demo-main-build-lb57m application link.
Console logs
Ensure that Build Pipeline was successfully completed.
Create CD Pipeline. To enable application deployment create a CD Pipeline with a single environment - Development (with the name dev).
Go to EDP Portal -> EDP -> CD Pipelines tab and push the + button to create pipeline. In the Create CD Pipeline dialog, define the below values:
Pipeline tab:
Pipeline name: mypipe
Deployment type: Container, since we are going to deploy containers
Pipeline tab with parameters
Applications tab. Add fastapi-demo application, select main branch, and leave Promote in pipeline unchecked:
Applications tab with parameters
Stages tab. Add the dev stage with the values below:
Stage name: dev
Description: Development Environment
Trigger type: Manual. We plan to deploy applications to this environment manually
Quality gate type: Manual
Step name: approve
Push the Apply button
Stages tab with parameters
Deploy the initial version of the application to the development environment:
Open CD Pipeline with the name mypipe.
Select the dev stage from the Stages tab.
In the Image stream version select version 0.0.1-SNAPSHOT.1 and push the Deploy button.
CD Pipeline deploy
"},{"location":"use-cases/application-scaffolding/#check-the-application-status","title":"Check the Application Status","text":"
To ensure the application is deployed successfully, follow the steps below:
Ensure application status is Healthy and Synced, and the Deployed version points to 0.0.1-SNAPSHOT.1:
Pipeline health status
Check that the selected version of the container is deployed on the dev environment. ${EDP_ENV} - is the EDP namespace name:
# Check the deployment status of fastapi-demo application\n$ kubectl get deployments -n ${EDP_ENV}-mypipe-dev\nNAME READY UP-TO-DATE AVAILABLE AGE\nfastapi-demo-dl1ft 1/1 1 1 30m\n\n# Check the image version of fastapi-demo application\n$ kubectl get pods -o jsonpath=\"{.items[*].spec.containers[*].image}\" -n ${EDP_ENV}-mypipe-dev\n012345678901.dkr.ecr.eu-central-1.amazonaws.com/${EDP_ENV}/fastapi-demo:0.0.1-SNAPSHOT.1\n
"},{"location":"use-cases/application-scaffolding/#deliver-new-code","title":"Deliver New Code","text":"
This section describes the Code Review process for a new code. We need to deploy a new version of our fastapi-demo application that deploys Ingress object to expose API outside the Kubernetes cluster.
Perform the below steps to merge new code (Pull Request) that passes the Code Review flow. For the steps below, we use Gerrit UI but the same actions can be performed using the command line and git tool:
Login to Gerrit UI, select fastapi-demo project, and create a change request.
Browse Gerrit Repositories and select fastapi-demo project.
Browse Gerrit repositories
In the Commands section of the project, push the Create Change button.
Create Change request
In the Create Change dialog, provide the branch main and the Description (commit message):
Enable ingress for application\n\nCloses: #xyz\n
Push the Create button.
Create Change
Push the Edit button of the merge request and add deployment-templates/values.yaml for modification.
Update values.yaml file
Review the deployment-templates/values.yaml file and change the ingress.enabled flag from false to true. Then push the SAVE & PUBLISH button. As soon as you get Verified +1 from CI, you are ready for review: Push the Mark as Active button.
Review Change
You can always check your pipelines status from:
Gerrit UI.
Pipeline Status Gerrit
EDP Portal.
Pipeline Status EDP Portal
With no Code Review Pipeline issues, set Code-Review +2 for the patchset and push the Submit button. Then, your code is merged to the main branch, triggering the Build Pipeline. The build Pipeline produces the new version of artifact: 0.0.1-SNAPSHOT.2, which is available for the deployment.
Gerrit Code Review screen
Deliver the New Version to the Environment. Before the new version deployment, check the ingress object in dev namespace:
$ kubectl get ingress -n ${EDP_ENV}-mypipe-dev\nNo resources found in ${EDP_ENV}-mypipe-dev namespace.\n
No ingress object exists as expected.
Deploy the new version 0.0.1-SNAPSHOT.2 which has the ingress object in place. Since we use Manual deployment approach, we perform version upgrade by hand.
Go to the CD Pipelines section of the EDP Portal, select mypipe pipeline and choose dev stage.
In the Image stream version select the new version 0.0.1-SNAPSHOT.2 and push the Update button.
Check that the new version is deployed: application status is Healthy and Synced, and the Deployed version points to 0.0.1-SNAPSHOT.2.
CD Pipeline Deploy New Version
Check that the new version with Ingress is deployed:
# Check the version of the deployed image\nkubectl get pods -o jsonpath=\"{.items[*].spec.containers[*].image}\" -n ${EDP_ENV}-mypipe-dev\n012345678901.dkr.ecr.eu-central-1.amazonaws.com/edp-delivery-tekton-dev/fastapi-demo:0.0.1-SNAPSHOT.2\n\n# Check Ingress object\nkubectl get ingress -n ${EDP_ENV}-mypipe-dev\nNAME CLASS HOSTS ADDRESS PORTS AGE\nfastapi-demo-ko1zs <none> fastapi-demo-ko1zs-example.com 12.123.123.123 80 115s\n\n# Check application external URL\ncurl https://your-hostname-appeared-in-hosts-column-above.example.com/\n{\"Hello\":\"World\"}\n
"},{"location":"use-cases/autotest-as-quality-gate/","title":"Autotest as a Quality Gate","text":""},{"location":"use-cases/autotest-as-quality-gate/#autotest-as-a-quality-gate","title":"Autotest as a Quality Gate","text":"
This use case describes the flow of adding an autotest as a quality gate to a newly created CD pipeline with a selected build version of an application to be promoted. The purpose of autotests is to check if application meets predefined criteria for stability and functionality, ensuring that only reliable versions are promoted. The promotion feature allows users to implement complicated testing, thus improving application stability.
To implement autotests as Quality Gates, follow the steps below:
Ensure the namespace is specified in the cluster settings. Click the Settings icon in the top right corner and select Cluster settings:
Cluster settings
Enter the name of the default namespace, then enter your default namespace in the Allowed namespaces field and click the + button. You can also add other namespaces to the Allowed namespaces:
Specify namespace
Create several applications using the Create strategy. Navigate to the EDP tab, choose Components, click the + button:
Add component
Select Application and Create from template:
Create new component menu
Note
Please refer to the Add Application section for details.
On the Codebase info tab, define the following values and press the Proceed button:
Git server: gerrit
Git repo relative path: js-application
Component name: js-application
Description: js application
Application code language: JavaScript
Language version/Provider: Vue
Build tool: NPM
Codebase info tab
On the Advanced settings tab, define the below values and push the Apply button:
Default branch: main
Codebase versioning type: default
Advanced settings tab
Repeat the procedure twice to create the go-application and python-application applications. These applications will have the following parameters:
go-application:
Git server: gerrit
Git repo relative path: go-application
Component name: go-application
Description: go application
Application code language: Go
Language version/Provider: Gin
Build tool: Go
Default branch: main
Codebase versioning type: default
python-application:
Git server: gerrit
Git repo relative path: python-application
Component name: python-application
Description: python application
Application code language: Python
Language version/Provider: FastAPI
Build tool: Python
Default branch: main
Codebase versioning type: default
In the Components tab, click one of the applications name to enter the application menu:
Components list
Click the three dots (⋮) button, select Build:
Application menu
Click the down arrow (v) to observe and wait for the application to be built:
Application building
Click the application run name to watch the building logs in Tekton:
Tekton pipeline run
Wait till the build is successful:
Successful build
Repeat steps 8-12 for the rest of the applications.
The steps below instruct how to create autotests in EDP:
Create a couple of autotests using the Create strategy. Navigate to the EDP tab, choose Components, click on the + button. Select Autotest and Clone project:
Add autotest
Note
Please refer to the Add Autotest section for details.
On the Codebase info tab, define the following values and press the Proceed button:
"},{"location":"use-cases/autotest-as-quality-gate/#create-cd-pipeline","title":"Create CD Pipeline","text":"
Now that applications and autotests are created, create pipeline for them by following the steps below:
Navigate to the CD Pipelines tab and click the + button:
CD pipelines tab
On the Pipeline tab, in the Pipeline name field, enter demo-pipeline:
Pipeline tab
On the Applications tab, add all the three applications, specify the main branch for all for them and check Promote in pipeline for Go and JavaScript applications:
Applications tab
On the Stages tab, click the Add stage button to open the Create stage menu:
Stages tab
In the Create stage menu, specify the following parameters and click Apply:
Cluster: In cluster
Stage name: dev
Description: dev
Trigger type: manual
Quality gate type: Autotests
Step name: dev
Autotest: demo-autotest-gradle
Autotest branch: main
Create stage menu
After the dev stage is added, click Apply:
Create stage menu
After the pipeline is created, click its name to open the pipeline details page:
Enter pipeline
In the pipeline details page, click the Create button to create a new stage:
Create a new stage
In the Create stage menu, specify the following parameters:
After the CD pipeline is created, deploy applications and run autotests by following the steps below:
Click the dev stage name to expand its details, specify image versions for each of the applications in the Image stream version field and click Deploy:
Deploy applications
Once applications are built, scroll down to Quality Gates and click Promote:
Promote in pipeline
Once promotion procedure is finished, the promoted applications will become available in the Sit stage. You will be able to select image stream versions for the promoted applications. The non-promoted application will stay grey in the stage and won't be allowed to get deployed:
"},{"location":"use-cases/external-secrets/","title":"Secured Secrets Management for Application Deployment","text":""},{"location":"use-cases/external-secrets/#secured-secrets-management-for-application-deployment","title":"Secured Secrets Management for Application Deployment","text":"
This Use Case demonstrates how to securely manage sensitive data, such as passwords, API keys, and other credentials, that are consumed by application during development or runtime in production. The approach involves storing sensitive data in an external secret store that is located in a \"vault\" namespace (but can be Vault, AWS Secret Store or any other provider). The process implies transmitting confidential information from the vault namespace to the deployed namespace for the purpose of establishing a connection to a database.
To begin, you will need an application first. Here are the steps to create it:
Open EDP Portal URL. Use the Sign-In option:
Logging screen
In the top right corner, enter the Cluster settings and ensure that both Default namespace and Allowed namespace are set:
Cluster settings
Create the new Codebase with the Application type using the Create strategy. To do this, click the EDP tab:
Cluster overview
Select the Components section under the EDP tab and push the + button:
Components tab
Select the Application Codebase type because we are going to deliver our application as a container and deploy it inside the Kubernetes cluster. Select the Create strategy to use predefined template:
Step codebase info
On the Application Info tab, define the following values and press the Proceed button:
Application name: es-usage
Default branch: master
Application code language: Java
Language version/framework: Java 17
Build tool: Maven
Step application info
On the Advanced Settings tab, define the below values and push the Apply button:
CI tool: Tekton
Codebase versioning type: default
Step application info
Check the application status. It should be green:
Application status
"},{"location":"use-cases/external-secrets/#create-cd-pipeline","title":"Create CD Pipeline","text":"
This section outlines the process of establishing a CD pipeline within EDP Portal. There are two fundamental steps in this procedure:
Build the application from the last commit of the master branch;
Create a CD Pipeline to establish continuous delivery to the SIT environment.
To succeed with the steps above, follow the instructions below:
Create CD Pipeline. To enable application deployment, create a CD Pipeline with a single environment - System Integration Testing (SIT for short). Select the CD Pipelines section under the EDP tab and push the + button:
CD-Pipeline tab
On the Pipeline tab, define the following values and press the Proceed button:
Pipeline name: deploy
Deployment type: Container
Pipeline tab
On the Applications tab, add es-usage application, select master branch, leave Promote in pipeline unchecked and press the Proceed button:
Pipeline tab
On the Stage tab, add the sit stage with the values below and push the Apply button:
Stage name: sit
Description: System integration testing
Trigger type: Manual. We plan to deploy applications to this environment manually
Quality gate type: Manual
Step name: approve
Stage tab
"},{"location":"use-cases/external-secrets/#configure-rbac-for-external-secret-store","title":"Configure RBAC for External Secret Store","text":"
Note
In this scenario, three namespaces are used: demo, which is the namespace where EDP is deployed, demo-vault, which is the vault where developers store secrets, anddemo-deploy-sit, which is the namespace used for deploying the application. The target namespace name for deploying application is formed with the pattern: edp-<cd_pipeline_name>-<stage_name>.
To make the system to function properly, it is imperative to create the following resources:
"},{"location":"use-cases/tekton-custom-pipelines/","title":"Deploy Application With Custom Build Tool/Framework","text":""},{"location":"use-cases/tekton-custom-pipelines/#deploy-application-with-custom-build-toolframework","title":"Deploy Application With Custom Build Tool/Framework","text":"
This Use Case describes the procedure of adding custom Tekton libraries that include pipelines with tasks. In addition to it, the process of modifying custom pipelines and tasks is enlightened as well.
This case is based on our predefined repository and application. Your case may be different.
To create and then modify a custom Tekton library, please follow the steps below:
"},{"location":"use-cases/tekton-custom-pipelines/#add-custom-application-to-edp","title":"Add Custom Application to EDP","text":"
Open EDP Portal URL. Use the Sign-In option:
Logging screen
In the top right corner, enter the Cluster settings and ensure that both Default namespace and Allowed namespace are set:
Cluster settings
Create the new Codebase with the Application type using the Clone strategy. To do this, click the EDP tab:
Cluster overview
Select the Components section under the EDP tab and push the create + button:
Components tab
Select the Application codebase type because is meant to be delivered as a container and deployed inside the Kubernetes cluster. Choose the Clone strategy and this example repository:
Step codebase info
In the Application Info tab, define the following values and click the Proceed button:
Application name: tekton-hello-world
Default branch: master
Application code language: Other
Language version/framework: go
Build tool: shell
Application info
Note
These application details are required to match the Pipeline name gerrit-shell-go-app-build-default.
The PipelineRun name is formed with the help of TriggerTemplates in pipelines-library so the Pipeline name should correspond to the following structure:
As an example, let's assume that we need to add the helm-lint pipeline task to the review pipeline. To implement this, insert the code below to the gerrit-review.yaml file underneath the hello task:
The helm-lint task references to the default pipeline-library Helm chart which is applied to the cluster during EDP installation.
The runAfter parameter shows that this Pipeline task will be run after the hello pipeline task.
Build Helm dependencies in the custom chart:
helm dependency update .\n
Ensure that the chart is valid and all the indentations are fine:
helm lint .\n
To validate if the values are substituted in the templates correctly, render the templated YAML files with the values using the following command. It generates and displays all the manifest files with the substituted values:
helm template .\n
Install the custom chart with the command below. You can also use the --dry-run flag to simulate the chart installation and catch possible errors:
Since we applied the Tekton library to the Kubernetes cluster in the previous step, let's test the review and build pipelines for our tekton-hello-world application.
Perform the below steps to merge new code (Merge Request) that passes the Code Review flow. For the steps below, we use Gerrit UI but the same actions can be performed using the command line and Git tool:
Log into Gerrit UI, select tekton-hello-world project, and create a change request.
Browse Gerrit Repositories and select tekton-hello-world project:
Browse Gerrit repositories
Clone the tekton-hello-world repository to make the necessary changes or click the Create Change button in the Commands section of the project to make changes via Gerrit GUI:
Create Change request
In the Create Change dialog, provide the branch master, write some text in the Description (commit message) and click the Create button:
Create Change
Click the Edit button of the merge request and add deployment-templates/values.yaml to modify it and change the ingress.enabled flag from false to true:
Update values.yaml file Update values.yaml file
Check the Review Pipeline status. The helm-lint pipeline task should be displayed there:
Review Change
Review the deployment-templates/values.yaml file and push the SAVE & PUBLISH button. As soon as you get Verified +1 from CI bot, the change is ready for review. Click the Mark as Active and Code-review buttons:
Review Change
Click the Submit button. Then, your code is merged to the main branch, triggering the Build Pipeline.
Review Change
Note
If the build is added and configured, push steps in the pipeline, it will produce a new version of artifact, which will be available for the deployment in EDP Portal.
Check the pipelines in the Tekton dashboard:
Tekton custom pipelines Tekton custom pipelines
What happens under the hood: 1) Gerrit sends a payload during Merge Request event to the Tekton EventListener; 2) EventListener catches it with the help of Interceptor; 3) TriggerTemplate creates a PipelineRun.
The KubeRocketCI (a.k.a. EPAM Delivery Platform) portal user guide is intended for developers and provides details on working with the KubeRocketCI portal, different codebase types, and the KubeRocketCI CI/CD flow.
The KubeRocketCI portal is a central management tool in the KubeRocketCI ecosystem that provides the ability to define pipelines, project resources and new technologies in a simple way. Using the KubeRocketCI portal enables to manage business entities:
Create such codebase types as Applications, Libraries, Autotests and Infrastructures;
Create/Update CD Pipelines;
Add external Git servers and Clusters.
Below is the Overview page of the KubeRocketCI portal:
Overview page
Application widgets \u2013 shows the information on codebases created in the default and allowed namespaces, reflecting the overall amount of entities and their statuses.
Top bar panel \u2013 contains documentation link, notifications, KubeRocketCI portal settings, and cluster settings, such as default and allowed namespaces.
Quick links \u2013 displays the corresponding links to the major adjusted toolset.
Pipeline runs \u2013 displays all the pipeline runs initiated in both the default and allowed namespaces.
KubeRocketCI portal is a complete tool allowing to manage and control the codebases (applications, autotests, libraries and infrastructures) added to the environment as well as to create a CD pipeline.
Inspect the main features available in the KubeRocketCI portal by following the corresponding link:
KubeRocketCI portal allows you to create an application, clone an existing repository with the application to your Version Control System (VCS), or using an external repository and importing an application to the environment. When an application is created or cloned, the system automatically generates a corresponding repository within the integrated Version Control System. You can create an Application in YAML or via the two-step menu in the dialog.
To add an application, navigate to the Components section on the navigation bar and click + Create component:
Create new application
Once clicked, the Create new component dialog will appear, then select Application and choose one of the strategies:
Application info
Create from template \u2013 creates a project on the pattern in accordance with an application language, a build tool, and a framework. This strategy is recommended for projects that start developing their applications from scratch.
Import project - allows using existing VCS repository to integrate with KubeRocketCI. While importing the existing repository, select the Git server from the drop-down list and define the relative path to the repository, such as epmd-edp/python-python-flask.
Note
In order to use the Import project strategy, make sure to adjust it with the Integrate GitLab/GitHub in Tekton page.
Clone project \u2013 clones the indicated repository into KubeRocketCI. While cloning the existing repository, it is required to fill in the Repository URL field and specify the credentials if needed:
Clone application
"},{"location":"user-guide/add-application/#create-application-in-yaml","title":"Create Application in YAML","text":"
Click Edit YAML in the upper-right corner of the Create Application dialog to open the YAML editor and create the Application.
Edit YAML
To edit YAML in the minimal editor, turn on the Use minimal editor toggle in the upper-right corner of the Create Application dialog.
To save the changes, select the Save & Apply button.
"},{"location":"user-guide/add-application/#create-application-via-ui","title":"Create Application via UI","text":"
The Create Application dialog contains two steps:
The Codebase Info Menu
The Advanced Settings Menu
"},{"location":"user-guide/add-application/#codebase-info-menu","title":"Codebase Info Menu","text":"
Follow the instructions below to fill in the fields of the Codebase Info menu:
In our example, we will use the Create from template strategy:
Create application
Select all the settings that define how the application will be added to Git server:
Git server - the pre-configured server where the component will be hosted. Select one from the from the drop-down list. Please refer to the Manage Git Servers page to learn how to create the one.
Repository name - the relative path to the repository, such as epmd-edp/python-python-flask.
Component name - the name of the application. Must be at least two characters using the lower-case letters, numbers and inner dashes.
Description - brief and concise description that explains the purpose of the application.
Empty project - check this box to create a application with an empty repository. The empty repository option is available only for the Create from template strategy.
Specify the application language properties:
Application Code Language - defines the code language with its supported frameworks:
Java \u2013 selecting specific Java version (8,11,17 are available).
JavaScript - selecting JavaScript allows using React, Vue, Angular, Express, Next.js and Antora frameworks.
Python - selecting Python allows using the Python v.3.8, FastAPI, Flask frameworks.
Go - selecting Go allows using the Beego, Gin and Operator SDK frameworks.
C# - selecting C# allows using the .Net v.3.1 and .Net v.6.0 frameworks.
Helm - selecting Helm allows using the Helm framework.
Other - selecting Other allows extending the default code languages when creating a codebase with the clone/import strategy.
Note
The Create from template strategy does not allow to customize the default code language set.
Language version/framework - defines the specific framework or language version of the application. The field depends on the selected code language.
Select Build Tool - allows to choose the build tool to use. A set tools and can be changed in accordance with the selected code language.
Java - selecting Java allows using the Gradle or Maven tool.
JavaScript - selecting JavaScript allows using the NPM tool.
C# - selecting C# allows using the .Net tool.
Python - selecting Python allows using Python tool.
Go - selecting Go allows using Go tool.
Helm - selecting Helm allows using Helm tool.
Note
The Select Build Tool field disposes of the default tools and can be changed in accordance with the selected code language.
Note
Tekton pipelines offer built-in support for Java Maven Multi-Module projects. These pipelines are capable of recognizing Java deployable modules based on the information in the pom.xml file and performing relevant deployment actions. It's important to note that although the Dockerfile is typically located in the root directory, Kaniko, the tool used for building container images, uses the targets folder within the deployable module's context. For a clear illustration of a Multi-Module project structure, please refer to this example on GitHub, which showcases a commonly used structure for Java Maven Multi-Module projects.
In the Advanced Settings menu, specify the branch options and define the Jira settings:
Advanced settings
Default branch - the name of the branch where you want the development to be performed.
Note
The default branch cannot be deleted.
Codebase versioning type - defines how will the application tag be changed once the new image version is built. There are two versioning types:
default: Using the default versioning type, in order to specify the version of the current artifacts, images, and tags in the Version Control System, a developer should navigate to the corresponding file and change the version manually.
edp: Using the edp versioning type, a developer indicates the version number from which all the artifacts will be versioned and, as a result, automatically registered in the corresponding file (e.g. pom.xml). When selecting the edp versioning type, the extra fields will appear, type the version number from which you want the artifacts to be versioned:
Edp versioning
Note
The Start Version From field should be filled out in compliance with the semantic versioning rules, e.g. 1.2.3 or 10.10.10. Please refer to the Semantic Versioning page for details.
Specify the pattern to validate a commit message - the regular expression used to indicate the pattern that is followed on the project to validate a commit message in the code review pipeline. An example of the pattern: ^[PROJECT_NAME-d{4}]:.*$.
JIRA integration
Integrate with Jira server - this check box is used in case it is required to connect Jira tickets with the commits and have a respective label in the Fix Version field.
Note
To adjust the Jira integration functionality, first apply the necessary changes described on the Adjust Jira Integration page, and Adjust VCS Integration With Jira.
Jira Server - the integrated Jira server with related Jira tasks.
Specify the pattern to find a Jira ticket number in a commit message - based on this pattern, the value from KubeRocketCI will be displayed in Jira.
Mapping fields
Mapping field name - the section where the additional Jira fields are specified the names of the Jira fields that should be filled in with attributes from KubeRocketCI:
Select the name of the field in a Jira ticket. The available fields are the following: Fix Version/s, Component/s and Labels.
Click the Add button to add the mapping field name.
Enter Jira pattern for the field name:
For the Fix Version/s field, select the EDP_VERSION variable that represents an EDP upgrade version, as in 2.7.0-SNAPSHOT.Combine variables to make the value more informative. For example, the pattern EDP_VERSION-EDP_COMPONENT will be displayed as 2.7.0-SNAPSHOT-nexus-operator in Jira.
For the Component/s field select the EDP_COMPONENT variable that defines the name of the existing repository. For example, nexus-operator.
For the Labels field select the EDP_GITTAGvariable that defines a tag assigned to the commit in Git Hub. For example, build/2.7.0-SNAPSHOT.59.
Click the bin icon to remove the Jira field name.
Click the Apply button to add the application to the Components list.
Note
After the complete adding of the application, inspect the Manage Applications page to learn how you can operate applications.
KubeRocketCI portal allows you to clone an existing repository with the autotest to your Version Control System (VCS), or using an external repository and adding an autotest for further running in stages or using them as quality gates for applications. When an autotest is cloned, the system automatically generates a corresponding repository within the integrated VCS. You can create an autotest in YAML or via the two-step menu in the dialog.
Info
Please refer to the Add Application section for the details on how to add an application codebase type. For the details on how to use autotests as quality gates, please refer to the Stages Menu section of the Add Environment documentation.
To add an autotest, navigate to the Components section on the navigation bar and click + Create component:
Create new autotest
Once clicked, the Create new component dialog will appear, then select Autotest and choose one of the strategies:
Create new autotest
Clone project \u2013 clones the indicated repository into KubeRocketCI. While cloning the existing repository, it is required to fill in the Repository URL field and specify the credentials if needed.
Import project - allows using existing VCS repository to integrate with KubeRocketCI. While importing the existing repository, select the Git server from the drop-down list and define the relative path to the repository, such as /epmd-edp/examples/basic/edp-auto-tests-simple-example.
Note
In order to use the Import project strategy, make sure to adjust it with the Integrate GitLab/GitHub With Tekton page.
"},{"location":"user-guide/add-autotest/#create-autotest-in-yaml","title":"Create Autotest in YAML","text":"
Click Edit YAML in the upper-right corner of the Create Autotest dialog to open the YAML editor and create an autotest:
Edit YAML
To edit YAML in the minimal editor, turn on the Use minimal editor toggle in the upper-right corner of the Create Autotest dialog.
To save the changes, select the Save & Apply button.
"},{"location":"user-guide/add-autotest/#create-autotest-via-ui","title":"Create Autotest via UI","text":"
The Create Autotest dialog contains the two steps:
The Codebase Info Menu
The Advanced Settings Menu
"},{"location":"user-guide/add-autotest/#the-codebase-info-menu","title":"The Codebase Info Menu","text":"
In our case, we will use the Clone strategy:
Clone autotest
Select all the settings that define how the autotest will be added to Git server:
Git server - the pre-configured server where the component will be hosted. Select one from the from the drop-down list. Please refer to the Manage Git Servers page to learn how to create the one.
Repository name - the relative path to the repository, such as /epmd-edp/examples/basic/edp-auto-tests-simple-example.
Component name - the name of the autotest. Must be at least two characters using the lower-case letters, numbers and inner dashes.
Description - brief and concise description that explains the purpose of the autotest.
Specify the autotest language properties:
Autotest code language - defines the code language with its supported frameworks. Selecting Other allows extending the default code languages and get the necessary build tool.
Language version/framework - defines the specific framework or language version of the autotest. The field depends on the selected code language. Specify Java 8, Java 11 or Java 17 to be used.
Build Tool - allows to choose the build tool to use. In case of autotests, Gradle and Maven are available.
Autotest report framework - all the autotest reports will be created in the Allure framework by default.
Click the Proceed button to switch to the next menu.
In the Advanced Settings menu, specify the branch options and define the Jira settings:
Advanced settings
Default branch - the name of the branch where you want the development to be performed.
Note
The default branch cannot be deleted.
Codebase versioning type - defines how will the autotest tag be changed once the new image version is built. There are two versioning types:
default: Using the default versioning type, in order to specify the version of the current artifacts, images, and tags in the Version Control System, a developer should navigate to the corresponding file and change the version manually.
edp: Using the edp versioning type, a developer indicates the version number from which all the artifacts will be versioned and, as a result, automatically registered in the corresponding file (e.g. pom.xml). When selecting the edp versioning type, the extra fields will appear, type the version number from which you want the artifacts to be versioned:
Edp versioning
Type the version number from which you want the artifacts to be versioned.
Note
The Start Version From field must be filled out in compliance with the semantic versioning rules, e.g. 1.2.3 or 10.10.10. Please refer to the Semantic Versioning page for details.
Specify the pattern to validate a commit message - the regular expression used to indicate the pattern that is followed on the project to validate a commit message in the code review pipeline. An example of the pattern: ^[PROJECT_NAME-d{4}]:.*$.
Jira integration
Integrate with Jira server - this check box is used in case it is required to connect Jira tickets with the commits and have a respective label in the Fix Version field.
Note
To adjust the Jira integration functionality, first apply the necessary changes described on the Adjust Jira Integration page, and Adjust VCS Integration With Jira.
Jira Server - the integrated Jira server with related Jira tasks.
Specify the pattern to find a Jira ticket number in a commit message - based on this pattern, the value from KubeRocketCI will be displayed in Jira.
Mapping field name
Mapping field name - the section where the additional Jira fields are specified the names of the Jira fields that should be filled in with attributes from KubeRocketCI:
Select the name of the field in a Jira ticket. The available fields are the following: Fix Version/s, Component/s and Labels.
Click the Add button to add the mapping field name.
Enter Jira pattern for the field name:
For the Fix Version/s field, select the EDP_VERSION variable that represents an KubeRocketCI upgrade version, as in 2.7.0-SNAPSHOT.Combine variables to make the value more informative. For example, the pattern EDP_VERSION-EDP_COMPONENT will be displayed as 2.7.0-SNAPSHOT-nexus-operator in Jira.
For the Component/s field select the EDP_COMPONENT variable that defines the name of the existing repository. For example, nexus-operator.
For the Labels field select the EDP_GITTAGvariable that defines a tag assigned to the commit in Git Hub. For example, build/2.7.0-SNAPSHOT.59.
Click the bin icon to remove the Jira field name.
After the complete adding of the autotest, inspect the Autotest Overview page to learn how you can operate applications.
Portal provides the ability to deploy an environment on your own and specify the essential components.
Navigate to the Environments section on the navigation bar and click Create (the plus sign icon on the right side of the screen). Once clicked, the Create CD Pipeline dialog will appear.
The creation of the environment becomes available as soon as an application is created including its provisioning in a branch and the necessary entities for the environment. You can create the environment in YAML or via the three-step menu in the dialog.
"},{"location":"user-guide/add-cd-pipeline/#create-environment-in-yaml","title":"Create Environment in YAML","text":"
Click Edit YAML in the upper-right corner of the Create CD Pipeline dialog to open the YAML editor and create the environment.
Edit YAML
To edit YAML in the minimal editor, turn on the Use minimal editor toggle in the upper-right corner of the Create CD Pipeline dialog.
To save the changes, select the Save & Apply button.
"},{"location":"user-guide/add-cd-pipeline/#create-environment-in-the-dialog","title":"Create Environment in the Dialog","text":"
The Create CD Pipeline dialog contains the three steps:
Before proceeding, ensure to familiarize yourself with the Manage GitOps page as it might be required to add a GitOps repository first before creating an environment:
Add GitOps repository
To create an environment, follow the steps below:
Navigate to the Environments tab and click the + Create Environment button:
Environments menu
The Pipeline tab of the Create CD Pipeline menu is presented below:
Create CD pipeline
Enter the Environment name that will be displayed in the Environments list.
Click the Proceed button to move onto the Applications tab.
Type the name of the pipeline in the Pipeline Name field by entering at least two characters and by using the lower-case letters, numbers and inner dashes.
Note
The namespace created by the environment has the following pattern combination: [kuberocketci namespace]-[environment name]-[stage name]. Please be aware that the namespace length should not exceed 63 symbols.
Select the deployment type from the drop-down list:
Container - the pipeline will be deployed in a Docker container;
Custom - this mode allows to deploy non-container applications and customize the Init stage of environment.
Click the Proceed button to switch to the next menu.
The Pipeline tab of the Create CD Pipeline menu is presented below:
Environment applications
Select the necessary application from the Mapping field name drop-down menu and click Add.
Specify the application parameters:
Branch - Select the application branch from the drop-down menu.
Promote in pipeline - Select the this check box in order to transfer the application from one to another stage by the specified codebase Docker branch. If the Promote in pipeline check box is not selected, the same codebase Docker stream will be deployed regardless of the stage, i.e. the codebase Docker stream input, which was selected for the pipeline, will always be used.
Note
If there is another deployed environment stage with the respective codebase Docker stream (= image stream as an OpenShift term), the pattern combination will be as follows: [pipeline name]-[stage name]-[application name]-[verified].
Click the Proceed button to switch to the next menu.
On the Stages menu, click the Add Stage button and fill in the necessary fields in the Adding Stage window :
CD stages
Adding stage
Set the proper cluster options:
Cluster - Choose the cluster to deploy the stage in;
Stage name - Enter the stage name;
Namespace - Specify the Kubernetes namespace where the resources will be deployed in. By default, this field is pre-populated automatically but keep in mind that the namespace name must be no longer than 63 symbols;
Description - Enter the description for this stage;
Trigger type - Select the trigger type. The key benefit of the automatic deploy feature is to keep environments up-to-date. The available trigger types are Manual and Auto. When the Auto trigger type is chosen, the environment will initiate automatically once the image is built. Manual implies that user has to perform deploy manually by clicking the Deploy button in the environment menu. Please refer to the Architecture Scheme of CD Pipeline Operator page for additional details.
Note
Automatic deploy will start working only after the first manual deploy.
Pipeline template - Choose a predefined blueprint outlining the deployment process for your application. While you have the option to incorporate custom deployment templates by generating a resource of the PipelineTemplate category, you can also opt for one of the preexisting options: with autotests or without.
Select the quality gate options:
Quality gate type - Select the quality gate type:
Manual - means that the promoting process should be confirmed in Tekton manually;
Autotests - means that the promoting process should be confirmed by the successful passing of the autotests.;
Step name - Type the step name, which will be displayed in Tekton, for every quality gate;
Autotest - Select the previously created autotest name;
Autotest branch - Specify a branch for the autotest.
Note
Execution sequence. The image promotion and execution of the pipelines depend on the sequence in which the environments are added.
Click the Apply button to display the stage in the Stages menu.
Continuous delivery menu
Click the Apply button to start the provisioning of the pipeline.
As a result, a new environment will be created in the environments list.
This page provides comprehensive instructions on how to integrate a new cluster into the KubeRocketCI workloads. By doing so, it creates an opportunity for users to employ multi-cluster deployment, thereby facilitating the segregation of different environments across various clusters.
Before moving ahead, ensure you have already performed the guidelines outlined in the Argo CD Integration page.
"},{"location":"user-guide/add-cluster/#deploy-to-remote-cluster","title":"Deploy to Remote Cluster","text":"
To deploy an application to a remote cluster, follow the steps below:
Navigate to KubeRocketCI portal -> Configuration -> Clusters and click the + Add cluster button:
Clusters menu
In the drop-down window, specify the required fields:
Cluster Name - a unique and descriptive name for the new cluster;
Cluster Host - the cluster\u2019s endpoint URL (e.g., example-cluster-domain.com);
Cluster Token - a Kubernetes token with permissions to access the cluster. This token is required for proper authorization;
Skip TLS verification - allows connect to cluster without cluster certificate verification;
Cluster Certificate - a Kubernetes certificate essential for authentication. Obtain this certificate from the configuration file of the user account you intend to use for accessing the cluster.
Note
The Cluster Certificate field is hidden if the skip TLS verification option is enabled.
Add cluster
Click the Apply button to add the cluster.
As a result, the Kubernetes secret will be created for further integration and you will be able to select the integrated cluster when creating a new stage:
To add a Git server, navigate to the Git servers section on the navigation bar and click Create (the plus sign icon in the lower-right corner of the screen). Once clicked, the Create Git server dialog will appear. You can create a Git server in YAML or via the three-step menu in the dialog.
"},{"location":"user-guide/add-git-server/#create-git-server-in-yaml","title":"Create Git Server in YAML","text":"
Click Edit YAML in the upper-right corner of the Create Git server dialog to open the YAML editor and create a Git server.
Edit YAML
To edit YAML in the minimal editor, turn on the Use minimal editor toggle in the upper-right corner of the Create Git server dialog.
To save the changes, select the Save & Apply button.
"},{"location":"user-guide/add-git-server/#create-git-server-in-the-dialog","title":"Create Git Server in the Dialog","text":"
Fill in the following fields:
Create Git server
Git provider - select Gerrit, GitLab or GitHub.
Host - enter a Git server endpoint.
User - enter a user for Git integration.
SSH port - enter a Git SSH port.
HTTPS port - enter a Git HTTPS port.
Private SSH key - enter a private SSH key for Git integration.
Access token - enter an access token for Git integration. To generate this token, go to GitLab/GitHub account -> Settings -> SSH and GPG keys -> select New SSH key and add SSH key.
Click the Apply button to add the Git server to the Git servers list. As a result, the Git Server object and the corresponding secret for further integration will be created.
KubeRocketCI portal allows you to create an application, clone an existing repository with the application to your Version Control System (VCS), or using an external repository and importing an application to the environment. When an application is created or cloned, the system automatically generates a corresponding repository within the integrated Version Control System. The functionality of the Infrastructure codebase type is to create resources in cloud provider. You can create an Infrastructure in YAML or via the two-step menu in the dialog.
To add an infrastructure, navigate to the Components section on the navigation bar and click + Create component:
Create new infrastructure
Once clicked, the Create new component dialog will appear, then select Infrastructure and choose one of the strategies:
Infrastructure info
In the Create new component menu, select the necessary configuration strategy. The choice will define the parameters you will need to specify:
Create from template \u2013 creates a project on the pattern in accordance with an infrastructure language, a build tool, and a framework.
Import project - allows using existing VCS repository to integrate with KubeRocketCI. While importing the existing repository, select the Git server from the drop-down list and define the relative path to the repository, such as epmd-edp/python-python-flask.
Note
In order to use the Import project strategy, make sure to adjust it with the Integrate GitLab/GitHub With Tekton page.
Clone project \u2013 clones the indicated repository into KubeRocketCI. While cloning the existing repository, it is required to fill in the Repository URL field and specify the Repository credentials field if needed:
Clone infrastructure
"},{"location":"user-guide/add-infrastructure/#create-infrastructure-in-yaml","title":"Create Infrastructure in YAML","text":"
Click Edit YAML in the upper-right corner of the Create Infrastructure dialog to open the YAML editor and create the Infrastructure.
Edit YAML
To edit YAML in the minimal editor, turn on the Use minimal editor toggle in the upper-right corner of the Create Infrastructure dialog.
To save the changes, select the Save & Apply button.
"},{"location":"user-guide/add-infrastructure/#create-infrastructure-via-ui","title":"Create Infrastructure via UI","text":"
The Create Infrastructure dialog contains the two steps:
The Codebase Info Menu
The Advanced Settings Menu
"},{"location":"user-guide/add-infrastructure/#codebase-info-menu","title":"Codebase Info Menu","text":"
In our example, we will use the Create from template strategy.
Select all the settings that define how the infrastructure will be added to Git server:
Create infrastructure
Git server - the pre-configured server where the component will be hosted. Select one from the from the drop-down list. Please refer to the Manage Git Servers page to learn how to create the one.
Repository name - the relative path to the repository, such as epmd-edp/python-python-flask.
Component name - the name of the infrastructure. Must be at least two characters using the lower-case letters, numbers and inner dashes.
Description - brief and concise description that explains the purpose of the infrastructure.
Empty project - check this box to create a infrastructure with an empty repository. The empty repository option is available only for the Create from template strategy.
Specify the infrastructure language properties:
Infrastructure code language - defines the code language with its supported frameworks.
Language version/framework - defines the specific framework or language version of the infrastructure. The field depends on the selected code language.
Build Tool - allows to choose the build tool to use. A set tools and can be changed in accordance with the selected code language.
In the Advanced Settings menu, specify the branch options and define the Jira settings:
Advanced settings
Follow the instructions below to fill in the fields of the Advanced Setting menu:
Default branch - the name of the branch where you want the development to be performed.
Note
The default branch cannot be deleted.
Codebase versioning type - defines how will the infrastructure tag be changed once the new image version is built. There are two versioning types:
default: Using the default versioning type, in order to specify the version of the current artifacts, images, and tags in the Version Control System, a developer should navigate to the corresponding file and change the version manually.
edp: Using the edp versioning type, a developer indicates the version number from which all the artifacts will be versioned and, as a result, automatically registered in the corresponding file (e.g. pom.xml). When selecting the edp versioning type, the extra fields will appear, type the version number from which you want the artifacts to be versioned:
Edp versioning
Note
The Start Version From field should be filled out in compliance with the semantic versioning rules, e.g. 1.2.3 or 10.10.10. Please refer to the Semantic Versioning page for details.
Specify the pattern to validate a commit message - the regular expression used to indicate the pattern that is followed on the project to validate a commit message in the code review pipeline. An example of the pattern: ^[PROJECT_NAME-d{4}]:.*$.
JIRA integration
Integrate with Jira server - this check box is used in case it is required to connect Jira tickets with the commits and have a respective label in the Fix Version field.
Note
To adjust the Jira integration functionality, first apply the necessary changes described on the Adjust Jira Integration page, and Adjust VCS Integration With Jira.
Jira Server - the integrated Jira server with related Jira tasks.
Specify the pattern to find a Jira ticket number in a commit message - based on this pattern, the value from KubeRocketCI will be displayed in Jira.
Mapping fields
Mapping field name - the section where the additional Jira fields are specified the names of the Jira fields that should be filled in with attributes from KubeRocketCI:
Select the name of the field in a Jira ticket. The available fields are the following: Fix Version/s, Component/s and Labels.
Click the Add button to add the mapping field name.
Enter Jira pattern for the field name:
For the Fix Version/s field, select the EDP_VERSION variable that represents an EDP upgrade version, as in 2.7.0-SNAPSHOT.Combine variables to make the value more informative. For example, the pattern EDP_VERSION-EDP_COMPONENT will be displayed as 2.7.0-SNAPSHOT-nexus-operator in Jira.
For the Component/s field select the EDP_COMPONENT variable that defines the name of the existing repository. For example, nexus-operator.
For the Labels field select the EDP_GITTAGvariable that defines a tag assigned to the commit in Git Hub. For example, build/2.7.0-SNAPSHOT.59.
Click the bin icon to remove the Jira field name.
Click the Apply button to add the infrastructure to the Components list.
Note
After the complete adding of the application, inspect the Manage Infrastructures page to learn how you can operate with infrastructure codebase types.
KubeRocketCI portal allows you to create a library, clone an existing repository with the library to your Version Control System (VCS), or using an external repository and importing a library to the environment. When a library is created or cloned, the system automatically generates a corresponding repository within the integrated VCS. You can create a library in YAML or via the two-step menu in the dialog.
To add a library, navigate to the Components section on the navigation bar and click + Create component:
Create new library
Once clicked, the Create new component dialog will appear, then select Library and choose one of the strategies:
Create new component menu
In the Create new component menu, select the necessary configuration strategy. The choice will define the parameters you will need to specify:
Create from template \u2013 creates a project on the pattern in accordance with a library language, a build tool, and a framework.
Import project - allows using existing VCS repository to integrate with KubeRocketCI. While importing the existing repository, select the Git server from the drop-down list and define the relative path to the repository, such as epmd-edp/python-python-flask.
Note
In order to use the Import project strategy, make sure to adjust it with the Integrate GitLab/GitHub With Tekton page.
Clone project \u2013 clones the indicated repository into KubeRocketCI. While cloning the existing repository, it is required to fill in the Repository URL field and specify the Repository credentials field if needed:
Clone library
"},{"location":"user-guide/add-library/#create-library-in-yaml","title":"Create Library in YAML","text":"
Click Edit YAML in the upper-right corner of the Create Library dialog to open the YAML editor and create the library:
Edit YAML
To edit YAML in the minimal editor, turn on the Use minimal editor toggle in the upper-right corner of the Create Application dialog.
To save the changes, select the Save & Apply button.
"},{"location":"user-guide/add-library/#create-library-via-ui","title":"Create Library via UI","text":"
The Create Library dialog contains the two steps:
The Codebase Info Menu
The Advanced Settings Menu
"},{"location":"user-guide/add-library/#the-codebase-info-menu","title":"The Codebase Info Menu","text":"
In our example, we will use the Create from template strategy:
Create library
Select all the settings that define how the library will be added to Git server:
Git server - the pre-configured server where the component will be hosted. Select one from the from the drop-down list. Please refer to the Manage Git Servers page to learn how to create the one.
Repository name - the relative path to the repository, such as epmd-edp/python-python-flask.
Component name - the name of the library. Must be at least two characters using the lower-case letters, numbers and inner dashes.
Description - brief and concise description that explains the purpose of the library.
Empty project - check this box to create a library with an empty repository. The empty repository option is available only for the Create from template strategy.
Specify the library language properties:
Library code language - defines the code language with its supported frameworks:
Java \u2013 selecting specific Java version available.
JavaScript - selecting JavaScript allows using the NPM tool.
Python - selecting Python allows using the Python v.3.8, FastAPI, Flask.
Groovy-pipeline - selecting Groovy-pipeline allows having the ability to customize a stages logic.
Terraform - selecting Terraform allows using the Terraform different versions via the Terraform version manager (tfenv). KubeRocketCI supports all the actions available in Terraform, thus providing the ability to modify the virtual infrastructure and launch some checks with the help of linters. For details, please refer to the Use Terraform Library in KubeRocketCI page.
Rego - this option allows using Rego code language with an Open Policy Agent (OPA) Library. For details, please refer to the Use Open Policy Agent page.
Container - this option allows using the Kaniko tool for building the container images from a Dockerfile.
Helm - this option allows using the chart testing lint (Pipeline) for Helm charts or using Helm chart as a set of other Helm charts organized according to the example.
C# - selecting C# allows using .Net v.3.1 and .Net v.6.0.
Other - selecting Other allows extending the default code languages when creating a codebase with the Clone/Import strategy.
Note
The Create strategy does not allow to customize the default code language set.
Language version/framework - defines the specific framework or language version of the library. The field depends on the selected code language.
Build Tool - allows to choose the build tool to use. A set tools and can be changed in accordance with the selected code language.
Click the Proceed button to switch to the next menu.
In the Advanced Settings menu, specify the branch options and define the Jira settings:
Advanced settings
Default branch - the name of the branch where you want the development to be performed.
Note
The default branch cannot be deleted.
Codebase versioning type - defines how will the library tag be changed once the new image version is built. There are two versioning types:
default: Using the default versioning type, in order to specify the version of the current artifacts, images, and tags in the Version Control System, a developer should navigate to the corresponding file and change the version manually.
edp: Using the edp versioning type, a developer indicates the version number from which all the artifacts will be versioned and, as a result, automatically registered in the corresponding file (e.g. pom.xml). When selecting the edp versioning type, the extra fields will appear, type the version number from which you want the artifacts to be versioned:
EDP versioning
Note
The Start Version From field should be filled out in compliance with the semantic versioning rules, e.g. 1.2.3 or 10.10.10. Please refer to the Semantic Versioning page for details.
Specify the pattern to validate a commit message - the regular expression used to indicate the pattern that is followed on the project to validate a commit message in the code review pipeline. An example of the pattern: ^[PROJECT_NAME-d{4}]:.*$.
Integrate with Jira server
Integrate with Jira server - this check box is used in case it is required to connect Jira tickets with the commits and have a respective label in the Fix Version field.
Note
To adjust the Jira integration functionality, first apply the necessary changes described on the Adjust Jira Integration page, and Adjust VCS Integration With Jira.
Jira Server - the integrated Jira server with related Jira tasks.
Specify the pattern to find a Jira ticket number in a commit message - based on this pattern, the value from KubeRocketCI will be displayed in Jira.
Mapping fields
Mapping field name - the section where the additional Jira fields are specified the names of the Jira fields that should be filled in with attributes from KubeRocketCI:
Select the name of the field in a Jira ticket. The available fields are the following: Fix Version/s, Component/s and Labels.
Click the Add button to add the mapping field name.
Enter Jira pattern for the field name:
For the Fix Version/s field, select the EDP_VERSION variable that represents an EDP upgrade version, as in 2.7.0-SNAPSHOT.Combine variables to make the value more informative. For example, the pattern EDP_VERSION-EDP_COMPONENT will be displayed as 2.7.0-SNAPSHOT-nexus-operator in Jira.
For the Component/s field select the EDP_COMPONENT variable that defines the name of the existing repository. For example, nexus-operator.
For the Labels field select the EDP_GITTAGvariable that defines a tag assigned to the commit in Git Hub. For example, build/2.7.0-SNAPSHOT.59.
Click the bin icon to remove the Jira field name.
Click the Apply button to add the library to the Components list.
After the complete adding of the library, inspect the Library Overview page to learn how you can operate applications.
"},{"location":"user-guide/add-marketplace/","title":"Add Component via Marketplace","text":""},{"location":"user-guide/add-marketplace/#add-component-via-marketplace","title":"Add Component via Marketplace","text":"
With the built-in Marketplace, users can easily create a new application by clicking several buttons. This page contains detailed guidelines on how to create a new component with the help of the Marketplace feature.
This section describes how to use quality gate in KubeRocketCI and how to customize the quality gate for the CD pipeline with the selected build version of the promoted application between stages.
"},{"location":"user-guide/add-quality-gate/#apply-new-quality-gate-to-pipelines","title":"Apply New Quality Gate to Pipelines","text":"
Quality gate pipeline is a usual Tekton pipeline but with a specific label: app.edp.epam.com/pipelinetype: deploy. To add and apply the quality gate to your pipelines, follow the steps below:
1. To use the Tekton pipeline as a quality gate pipeline, add this label to the pipelines:
2. Insert the value that is the quality gate name displayed in the quality gate drop-down list of the CD pipeline menu:
metadata:\n name: <name-of-quality-gate>\n
3. Ensure the task promote-images contains steps and logic to apply to the project. Also ensure that the last task is promote-images which parameters are mandatory:
4. Create a new pipeline with a unique name or modify your created pipeline with the command below. Please be aware that the \u2039edp-project\u203a value is the name of the EDP tenant:
Before running the quality gate, first of all, ensure that the environment has deployed the created CD pipeline and then ensure that the application is successfully deployed and ready to run the quality gate. To run quality gate, please follow the steps below:
Check the CD pipeline status. To do this, open the created CD pipeline, select Image stream version, click DEPLOY button and wait until Applications, Health and Sync statuses become green. This implies that the application is successfully deployed and ready to run the quality gate.
CD pipeline stage overview
Select the name-of-quality-gate of Quality gates from the drop-down list and click the RUN button.The execution process should be started in the Pipelines menu:
Quality gate pipeline status
"},{"location":"user-guide/add-quality-gate/#add-stage-for-quality-gate","title":"Add Stage for Quality Gate","text":"
For a better understanding of this section, please read the documentation about how to add a new stage for quality gate. The scheme below illustrates two approaches of adding quality gates:
Types of adding quality gate
The first type of adding a quality gate is about adding the specific quality gate to the specific pipeline stage.
The second type is rather optional and implies activating the Promote in pipelines option while creating a CD Pipeline to pass the quality gate in a certain sequence.
As a result, after the quality gate is successfully passed, the projected image is promoted to the next stage.
This section describes the subsequent possible actions that can be performed with the newly added or existing applications.
"},{"location":"user-guide/application/#check-and-remove-application","title":"Check and Remove Application","text":"
As soon as the application is successfully provisioned, the following will be created:
An Application Codebase type will appear in the Codebase list of the Components section.
With the Create strategy, a new project will be generated on GitHub or another integrated VCS. When Clone is chosen, the repository will be forked from the original and copied to the KubeRocketCI-integrated repository. If Import is selected, the platform connects to the chosen repository.
The added application will be listed in the Applications list allowing you to do the following:
Applications menu
Application status - displays the application status. Can be red or green depending on if the KubeRocketCI portal managed to connect to the Git Server with the specified credentials or not.
Application name (clickable) - displays the application name set during the application creation.
Open documentation - opens the application related documentation page.
Enable filtering - enables filtering by application name and namespace where this custom resource is located in.
Create new application - displays the Create new component menu.
Edit application - edit the application by selecting the options icon next to its name in the applications list, and then selecting Edit. For details see the Edit Existing Application section.
Delete application - remove application by clicking the vertical ellipsis button and then selecting Delete.
Note
The application that is used in a CD pipeline cannot be removed.
There are also options to sort the applications:
Sort the existing applications in a table by clicking the sorting icons in the table header. Sort the applications alphabetically by their name, language, build tool, framework, and CI tool. You can also sort the applications by their status: Created, Failed, or In progress.
Select a number of applications displayed per page (15, 25 or 50 rows) and navigate between pages if the number of applications exceeds the capacity of a single page:
This section describes the subsequent possible actions that can be performed with the newly added or existing autotests.
"},{"location":"user-guide/autotest/#check-and-remove-autotest","title":"Check and Remove Autotest","text":"
As soon as the autotest is successfully provisioned, the following will be created:
An Autotest Codebase type will appear in the Codebase list of the Components section.
With the Create strategy, a new project will be generated on GitHub or another integrated VCS. When Clone is chosen, the repository will be forked from the original and copied to the KubeRocketCI-integrated repository. If Import is selected, the platform connects to the chosen repository.
Info
To navigate quickly to Tekton, Version Control System, SonarQube, Nexus, and other resources, click the Overview section on the navigation bar and hit the necessary link.
The added autotest will be listed in the Autotests list allowing you to do the following:
Autotests page
Autotest status - displays the autotest status. Can be red or green depending on KubeRocketCI portal managed to connect to the Git Server with the specified credentials or not.
Autotest name (clickable) - displays the autotest name set during the autotest creation.
Open documentation - opens the autotest related documentation page.
Enable filtering - enables filtering by autotest name and namespace where this custom resource is located in.
Create new autotest - displays the Create new component menu.
Edit autotest - edit the autotest by selecting the options icon next to its name in the autotests list, and then selecting Edit. For details see the Edit Existing Autotest section.
Delete autotest - remove autotest by clicking the vertical ellipsis button and then selecting Delete.
Note
The autotest that is used in a CD pipeline cannot be removed.
There are also options to sort the autotests:
Sort the existing autotests in a table by clicking the sorting icons in the table header. Sort the autotests alphabetically by their name, language, build tool, framework, and CI tool. You can also sort the autotests by their status: Created, Failed, or In progress.
Select a number of autotests displayed per page (15, 25 or 50 rows) and navigate between pages if the number of autotests exceeds the capacity of a single page.
KubeRocketCI portal provides the ability to enable, disable or edit the Jira Integration functionality for autotests.
To edit an autotest directly from the Autotests overview page or when viewing the autotest data:
Select Edit in the options icon menu:
Edit autotest on the autotests overview page
Edit autotest when viewing the autotest data
To enable Jira integration, on the Edit Autotest page do the following:
Edit library
a. Mark the Integrate with Jira server check box and fill in the necessary fields. Please see steps d-h on the Add Autotests page.
b. Click the Apply button to apply the changes.
Note
To adjust the Jira integration functionality, first apply the necessary changes described on the Adjust Jira Integration and Adjust VCS Integration With Jira pages.
To disable Jira integration, in the Edit Autotest dialog do the following:
Clear the Integrate with Jira server check box.
Click the Apply button to apply the changes.
To create, edit and delete application branches, please refer to the Manage Branches page.
"},{"location":"user-guide/autotest/#add-autotest-as-a-quality-gate","title":"Add Autotest as a Quality Gate","text":"
In order to add an autotest as a quality gate to a newly added CD pipeline, do the following:
Create a CD pipeline with the necessary parameters. Please refer to the Add CD Pipeline section for the details.
In the Stages menu, select the Autotest quality gate type. It means the promoting process should be confirmed by the successful passing of the autotests.
In the additional fields, select the previously created autotest name and specify its branch.
After filling in all the necessary fields, click the Create button to start the provisioning of the pipeline. After the CD pipeline is added, the new namespace containing the stage name will be created in Kubernetes (in OpenShift, a new project will be created) with the following name pattern: [cluster name]-[cd pipeline name]-[stage name].
"},{"location":"user-guide/autotest/#configure-autotest-launch-at-specific-stage","title":"Configure Autotest Launch at Specific Stage","text":"
In order to configure the added autotest launch at the specific stage with necessary parameters, do the following:
Add the necessary stage to the CD pipeline. Please refer to the Add CD Pipeline documentation for the details.
Navigate to the run.json file and add the stage name and the specific parameters.
There is an ability to run the autotests locally using the IDEA (Integrated Development Environment Application, such as IntelliJ, NetBeans etc.). To launch the autotest project for the local verification, perform the following steps:
Clone the project to the local machine.
Open the project in IDEA and find the run.json file to copy out the necessary command value.
Paste the copied command value into the Command line field and run it with the necessary values and namespace.
As a result, all the launched tests will be executed.
This section provides details on the Build pipeline of the EDP CI/CD pipeline framework. Explore below the pipeline purpose, stages and possible actions to perform.
The purpose of the Build pipeline contains the following points:
Check out, test, tag and build an image from the mainstream branch after a patch set is submitted in order to inspect whether the integrated with the mainstream code fits all quality gates, can be built and tested;
Be triggered if any new patch set is submitted;
Tag a specific commit in Gerrit in case the build is successful;
Build a Docker image with an application that can be afterward deployed using the Tekton/Argo CD Deploy pipeline.
Find below the functional diagram of the Build pipeline with the default stages:
"},{"location":"user-guide/build-pipeline/#build-pipeline-for-application-and-library","title":"Build Pipeline for Application and Library","text":"
The Build pipeline is triggered automatically after the Code Review pipeline is completed and the changes are submitted.
To review the Build pipeline, take the following steps:
Open Tekton Dashboard via Overview page of the EDP Portal.
Review stages for the application and library codebases:
Init - initialization of the Code Review pipeline inputs;
Checkout - checkout of the application code;
Get-version - get the version from the pom.XML file and add the build number;
Compile - code compilation;
Tests - tests execution;
Sonar - Sonar launch that checks the whole code;
Build - artifact building and adding to Nexus;
Build-image - docker image building and adding to Docker Registry. The Build pipeline for the library has the same stages as the application except the Build-image stage, i.e. the Docker image is not building.
Push - artifact docker image pushing to Nexus and Docker Registry;
Git-tag - adding of the corresponding Git tag of the current commit to relate with the image, artifact, and build version.
After the Build pipeline runs all the stages successfully, the corresponding tag numbers will be created in Kubernetes/OpenShift and Nexus.
"},{"location":"user-guide/build-pipeline/#check-the-tag-in-kubernetesopenshift-and-nexus","title":"Check the Tag in Kubernetes/OpenShift and Nexus","text":"
After the Build pipeline is completed, check the tag name and the same with the commit revision. Simply navigate to Gerrit \u2192 Projects \u2192 List \u2192 select the project \u2192 Tags.
Note
For the Import strategy, navigate to the repository from which a codebase is imported \u2192 Tags. It is actual both for GitHub and GitLab.
Open the Kubernetes/OpenShift Overview page and click the link to Nexus and check the build of a new version.
Switch to Kubernetes \u2192 CodebaseImageStream (or OpenShift \u2192 Builds \u2192 Images) \u2192 click the image stream that will be used for deployment.
Check the corresponding tag.
"},{"location":"user-guide/build-pipeline/#configure-and-start-pipeline-manually","title":"Configure and Start Pipeline Manually","text":"
The Build pipeline can be started manually. To set the necessary stages and trigger the pipeline manually, take the following steps:
Open the Build pipeline for the created library.
Click the Build with parameters option from the left-side menu. Modify the stages by removing the whole objects massive:{\"name\". \"tests\"} where name is a key and tests is a stage name that should be executed.
Open Tekton Dashboard or Component details page and check the successful execution of all stages.
CD Pipeline (Continuous Delivery Pipeline) - an EDP business entity that describes the whole delivery process of the selected application set via the respective stages. The main idea of the CD pipeline is to promote the application build version between the stages by applying the sequential verification (i.e. the second stage will be available if the verification on the first stage is successfully completed). The CD pipeline can include the essential set of applications with its specific stages as well.
In other words, the CD pipeline allows the selected image stream (Docker container in Kubernetes terms) to pass a set of stages for the verification process (SIT - system integration testing with the automatic type of a quality gate, QA - quality assurance, UAT - user acceptance testing with the manual testing).
Note
It is possible to change the image stream for the application in the CD pipeline. Please refer to the Edit CD Pipeline section for the details.
A CI/CD pipeline helps to automate steps in a software delivery process, such as the code build initialization, automated tests running, and deploying to a staging or production environment. Automated pipelines remove manual errors, provide standardized development feedback cycle, and enable the fast product iterations. To get more information on the CI pipeline, please refer to the CI Pipeline Details chapter.
The codebase stream is used as a holder for the output of the stage, i.e. after the Docker container (or an image stream in OpenShift terms) passes the stage verification, it will be placed to the new codebase stream. Every codebase has a branch that has its own codebase stream - a Docker container that is an output of the build for the corresponding branch.
Note
For more information on the main terms used in EPAM Delivery Platform, please refer to the EDP Glossary
The Deploy pipeline is used by default on any stage of the Continuous Delivery pipeline. It addresses the following concerns:
Deploying the application(s) to the main STAGE (SIT, QA, UAT) environment in order to run autotests and to promote image build versions to the next environments afterwards.
Deploying the application(s) to a custom STAGE environment in order to run autotests and check manually that everything is ok with the application.
Deploying the latest or a stable and some particular numeric version of an image build that exists in Docker registry.
Promoting the image build versions from the main STAGE (SIT, QA, UAT) environment.
Auto deploying the application(s) version from the passed payload (using the CODEBASE_VERSION job parameter).
Find below the functional diagram of the Deploy pipeline with the default stages:
Note
The input for a CD pipeline depends on the Trigger Type for a deploy stage and can be either Manual or Auto.
CI Pipeline (Continuous Integration Pipeline) - an EDP business entity that describes the integration of changes made to a codebase into a single project. The main idea of the CI pipeline is to review the changes in the code submitted through a Version Control System (VCS) and build a new codebase version so that it can be transmitted to the Continuous Delivery Pipeline for the rest of the delivery process.
There are three codebase types in EPAM Delivery Platform:
Applications - a codebase that is developed in the Version Control System, has the full lifecycle starting from the Code Review stage to its deployment to the environment;
Libraries - this codebase is similar to the Application type, but it is not deployed and stored in the Artifactory. The library can be connected to other applications/libraries;
Autotests - a codebase that inspects the code and can be used as a quality gate for the CD pipeline stage. The autotest only has the Code Review pipeline and is launched for the stage verification.
Note
For more information on the above mentioned codebase types, please refer to the Add Application, Add Library, Add Autotests and Autotest as Quality Gate pages.
The Continuous Integration part means the following:
all components of the application development are in the same place and perform the same processes for running;
the results are published in one place and replicated into EPAM GitLab or VCS (version control system);
the repository also includes a storage tool (e.g. Nexus) for all binary artifacts that are produced by the Tekton CI server after submitting changes from Code Review tool into VCS;
The Code Review and Build pipelines are used before the code is delivered. An important part of both of them is the integration tests that are launched during the testing stage.
Many applications (SonarQube, Gerrit, etc,) used by the project need databases for their performance.
The Continuous Delivery comprises an approach allowing to produce an application in short cycles so that it can be reliably released at any time point. This part is tightly bound with the usage of the Code Review, Build, and Deploy pipelines.
The Deploy pipelines deploy the applications configuration and their specific versions, launch automated tests and control quality gates for the specified environment. As a result of the successfully completed process, the specific versions of images are promoted to the next environment. All environments are sequential and promote the build versions of applications one-by-one. The logic of each stage is described as a code of Tekton pipelines and stored in the VCS.
During the CI/CD, there are several continuous processes that run in the repository, find below the list of possible actions:
Review the code with the help of Gerrit tool;
Run the static analysis using SonarQube to control the quality of the source code and keep the historical data which helps to understand the trend and effectivity of particular teams and members;
Analyze application source code using SAST, byte code, and binaries for coding/design conditions that are indicative of security vulnerabilities;
Build the code with Tekton CI and run automated tests that are written to make sure the applied changes will not break any functionality.
Note
For the details on autotests, please refer to the Autotest, Add Autotest, and Autotest as Quality Gate pages.
The release process is divided into cycles and provides regular delivery of completed pieces of functionality while continuing the development and integration of new functionality into the product mainline.
Explore the main flow that is displayed on the diagram below:
This section describes the subsequent possible actions that can be performed with the newly added or existing clusters.
In a nutshell, cluster in EDP Portal is a Kubernetes secret that stores credentials and endpoint to connect to the another cluster. Adding new clusters allows users to deploy applications in several clusters, thus improving flexibility of your infrastructure.
The added cluster will be listed in the clusters list allowing you to do the following:
Clusters list
Cluster status - displays the cluster status. Can be red or green depending on if the KubeRocketCI portal managed to connect to the cluster host with the specified credentials or not.
Open documentation - opens the cluster related documentation page.
Add a new cluster - displays the cluster creation form.
Cluster properties - shows the specified cluster properties.
Delete cluster - remove cluster by clicking the recycle bin icon.
This section provides details on the Code Review pipeline of the EDP CI/CD framework. Explore below the pipeline purpose, stages and possible actions to perform.
The purpose of the Code Review pipeline contains the following points:
Check out and test a particular developer's change (Patch Set) in order to inspect whether the code fits all the quality gates and can be built and tested;
Be triggered if any new Patch Set appears in GitHub/GitLab/Gerrit;
Send feedback about the build process in Tekton to review the card in Gerrit;
Send feedback about Sonar violations that have been found during the Sonar stage.
Find below the functional diagram of the Code Review pipeline with the default stages:
In this section, we will introduce you to the different types of codebases and strategies for onboarding codebases onto the KubeRocketCI.
"},{"location":"user-guide/components/#component-and-codebase","title":"Component and Codebase","text":"
From a business perspective, Components represent the functional building blocks of software projects. They define the purpose and functionality of different parts of a business application, such as core applications, libraries, automated tests, and infrastructure settings. Components are about what software does and how it aligns with business goals.
From a technical implementation perspective, Codebases are the Kubernetes custom resources that manage the technical aspects of these Components. They serve as the bridge between the business logic represented by Components and the underlying Git repositories. Codebases are responsible for the technical implementation, ensuring that the Components are efficiently stored, versioned, and synchronized with the version control system. They represent the state of Components from a technical standpoint.
Components are the building blocks of software projects. They come in different types, such as Applications, Libraries, Autotests, and Infrastructure. Each component type serves a specific purpose in the development process. Applications are the deployable unit of projects, libraries contain reusable code, autotests facilitate automated testing, and infrastructure defines a project's infrastructure settings.
Codebases are Kubernetes custom resources (CR) that represent the state of the components. They are a crucial link between component's state and underlying Git repositories. In essence, each codebase corresponds to a specific component and reflects its current state within a single Git repository. This one-to-one mapping ensures that the component's state is efficiently managed and versioned.
KubeRocketCI accommodates a variety of codebase types, each serving a specific purpose in the development process. The codebase types available in KubeRocketCI are:
Application: the codebase that contains the source code and manifests of application that can be deployed to Kubernetes clusters. One can use different languages, frameworks, and build tools to develop application.
Library: the codebase that contains reusable code components that can be shared across multiple projects. They are an essential resource for efficient and consistent development.
Autotest: the codebase that facilitates the implementation of automated tests, helping ensure the quality, performance and reliability of applications.
Infrastructure: Infrastructure codebases are used to define and manage the underlying infrastructure of projects using the Infrastructure as Code approach, ensuring consistency and reproducibility.
The platform supports the following strategies to onboard codebases on the platform:
Create from template - This strategy allows to create a new codebase from a predefined template that matches application language, build tool, and framework. One can choose from a variety of templates that cover different technologies and use cases. This strategy is recommended for projects that start developing their applications from scratch or want to follow the best practices of KubeRocketCI.
Import project - This strategy allows to import an existing codebase from a Git server that is integrated with KubeRocketCI. One can select the Git server and the repository to import, and KubeRocketCI will replicate it to the platform and perform configure. This strategy is suitable for projects that already have a codebase on a Git server and want to leverage the benefits of KubeRocketCI.
Clone project \u2013 This strategy allows to clone an existing codebase from any Git repository that is accessible via HTTPS. One can provide the repository URL and KubeRocketCI will clone it to the platform and configure it. This strategy is useful for projects that want to copy a codebase from an external source and customize it for their needs.
The codebase-operator is responsible for creating and managing the codebase custom resource on the KubeRocketCI. The codebase CR defines the metadata and configuration of the codebase, such as the name, description, type, repository URL, branch, path, CD tool, etc. The codebase-operator watches for changes in the codebase CR and synchronizes them with the corresponding Git repository and KubeRocketCI components. Learn more about the codebase-operator and the custom resource (CR) API.
The Configuration tab of the KubeRocketCI portal is designed to integrate KubeRocketCI with third-party components. In this page you will get a brief overview of all the sections presented in the Configuration tab.
Here is the list of all the sections provided in the Configuration tab. Familiarize yourself with purposes of each section:
Configuration Section Description Links Configure links for quick access to required tools that will be displayed on the Overview page or in specific resource details, such as application or stage details. Additionally, this section is used to configure widgets, such as SonarQube and DependencyTrack. Nexus Integrate Nexus to store and manage your application artifacts, facilitating a Continuous Integration flow within the platform. Registry Integrate platform with a container registry to store container artifacts. Clusters Integrate platform with external clusters to enable remote cluster deployment. GitOps Onboard a specific repository used for the GitOps approach purposes. Argo CD Integrate platform with Argo CD to enable the GitOps approach. DefectDojo Connect platform with DefectDojo to manage and track security defects in applications. DependencyTrack Connect the platform with the DependencyTrack tool for monitoring and managing vulnerabilities within third-party components. SonarQube Integrate SonarQube to enable static code analysis. Git Server Connect the platform to Version Control Systems, such as GitHub, GitLab, or Gerrit for source code management. Jira Integrate Jira to track and deliver the status of your projects on a dedicated dashboard. SSO Integrate platform with identity provider to enable the Single Sign-On approach."},{"location":"user-guide/configuration-overview/#related-articles","title":"Related Articles","text":"
This page is dedicated to the GitOps section of the Configuration tab, the process of establishing the GitOps repository, outline benefits it extends to users within the platform capabilities. GitOps, short for \"Git Operations\", is a modern approach to managing and automating infrastructure and application deployments. In GitOps, the desired state of your environment is declared and stored in a Git repository. With GitOps, you can ensure that your infrastructure and applications are always in sync with your intended configurations and readily adapt to changing requirements.
The purpose of the GitOps section is to provide users with the ability to customize the state of their environments with the help of GitOps approach that enables you to store your entire deployment configuration in a Git repository, providing version control for changes, consistent collaboration, and automated deployments. Enforcing GitOps allows you to declaratively define and automate your configurations, ensuring consistency, version control, and collaboration within your team.
Once the GitOps repository is added to the platform, you can set custom parameters for the deployed Helm Chart. To redefine the parameters, follow the steps below:
In the GitOps repository, create the values.yaml file according to the <pipeline-name>/<stage-name>/<application-name>-values.yaml pattern.
In the created values.yaml file, enter the parameters with their custom values.
Navigate to the Environments section. Open the created environment, open its stage and deploy it with the Values override checkbox selected as it is shown below:
This section describes the subsequent possible actions that can be performed with the newly added or existing infrastructures.
"},{"location":"user-guide/infrastructure/#check-and-remove-inrastructure","title":"Check and Remove Inrastructure","text":"
As soon as the infrastructure is successfully provisioned, the following will be created:
An Infrastructure Codebase type will appear in the Codebase list of the Components section.
With the Create strategy, a new project will be generated on GitHub or another integrated VCS. When Clone is chosen, the repository will be forked from the original and copied to the KubeRocketCI-integrated repository. If Import is selected, the platform connects to the chosen repository.
The added infrastructure will be listed in the infrastructure list allowing you to do the following:
Components menu
Infrastructure status - displays the infrastructure status. Can be red or green depending on if the KubeRocketCI portal managed to connect to the Git Server with the specified credentials or not.
Infrastructure name (clickable) - displays the infrastructure name set during the library creation.
Open documentation - opens the infrastructure related documentation page.
Enable filtering - enables filtering by library name and namespace where this custom resource is located in.
Create new infrastructure - displays the Create new component menu.
Edit infrastructure - edit the infrastructure by selecting the options icon next to its name in the infrastructures list, and then selecting Edit. For details see the Edit Existing Infrastructure section.
Delete infrastructure - remove infrastructure by clicking the vertical ellipsis button and then selecting Delete.
There are also options to sort the infrastructures:
Sort the existing infrastructures in a table by clicking the sorting icons in the table header. Sort the infrastructures alphabetically by their name, language, build tool, framework, and CI tool. You can also sort the infrastructures by their status: Created, Failed, or In progress.
Select a number of infrastructures displayed per page (15, 25 or 50 rows) and navigate between pages if the number of items exceeds the capacity of a single page.
This section describes the subsequent possible actions that can be performed with the newly added or existing libraries.
"},{"location":"user-guide/library/#check-and-remove-library","title":"Check and Remove Library","text":"
As soon as the library is successfully provisioned, the following will be created:
A Library Codebase type will appear in the Codebase list of the Components section.
With the Create strategy, a new project will be generated on GitHub or another integrated VCS. When Clone is chosen, the repository will be forked from the original and copied to the KubeRocketCI-integrated repository. If Import is selected, the platform connects to the chosen repository.
Info
To navigate quickly to OpenShift, Tekton, Gerrit, SonarQube, Nexus, and other resources, click the Overview section on the navigation bar and hit the necessary link.
The added library will be listed in the Libraries list allowing to do the following:
Library menu
Library status - displays the library status. Can be red or green depending on if the KubeRocketCI portal managed to connect to the Git Server with the specified credentials or not.
Library name (clickable) - displays the library name set during the library creation.
Open documentation - opens the library related documentation page.
Enable filtering - enables filtering by library name and namespace where this custom resource is located in.
Create new library - displays the Create new component menu.
Edit library - edit the library by selecting the options icon next to its name in the libraries list, and then selecting Edit. For details see the Edit Existing Library section.
Delete Library - remove library by clicking the vertical ellipsis button and then selecting Delete.
Note
The library that is used in a CD pipeline cannot be removed.
There are also options to sort the libraries:
Sort the existing libraries in a table by clicking the sorting icons in the table header. Sort the libraries alphabetically by their name, language, build tool, framework, and CI tool. You can also sort the libraries by their status: Created, Failed, or In progress.
Select a number of libraries displayed per page (15, 25 or 50 rows) and navigate between pages if the number of libraries exceeds the capacity of a single page.
This page describes how to manage branches in the created component, whether it is an application, library, autotest or infrastructure.
"},{"location":"user-guide/manage-branches/#add-new-branch","title":"Add New Branch","text":"
Note
When working with libraries, pay attention when specifying the branch name: the branch name is involved in the formation of the library version, so it must comply with the Semantic Versioning rules for the library.
When adding a component, the default branch is a master branch. In order to add a new branch, follow the steps below:
Navigate to the Branches block by clicking the component name link in the Components list.
Click the + Create button:
Add branch
Click Edit YAML in the upper-right corner of the dialog to open the YAML editor and add a branch. Otherwise, fill in the required fields in the dialog:
New branch
a. Release Branch - select the Release Branch check box if you need to create a release branch.
b. Branch name - type the branch name. Pay attention that this field remains static if you create a release branch. For the Clone and Import strategies: if you want to use the existing branch, enter its name into this field.
c. From Commit Hash - paste the commit hash from which the branch will be created. For the Clone and Import strategies: Note that if the From Commit Hash field is empty, the latest commit from the branch name will be used.
d. Branch version - enter the necessary branch version for the artifact. The Release Candidate (RC) postfix is concatenated to the branch version number.
e. Default branch version - type the branch version that will be used in a master branch after the release creation. The Snapshot postfix is concatenated to the master branch version number.
f. Click the Apply button and wait until the new branch will be added to the list.
Info
Adding of a new branch is indicated in the context of the EDP versioning type.
The default component repository is cloned and changed to the new indicated version before the build, i.e. the new indicated version will not be committed to the repository; thus, the existing repository will keep the default version.
Follow a three-step process to integrate a container registry in KubeRocketCI:
In the KubeRocketCI -> Configuration -> Registry:
Registry settings
Select Registry Provider and enter the required details.
Confirm settings by clicking the Save button.
The required fields vary depending on which container registry is chosen:
AWS ECRDockerHubHarborOpenShiftNexus
AWS ECR settings
Fields Description Registry Endpoint Format for the (AWS) Elastic Container Registry endpoint: xxxxxxxxxxxx.dkr.ecr..amazonaws.com. Where xxxxxxxxxxxx is your AWS account ID and <region> is where your ECR is hosted. Registry Space The suffix project name in registry. AWS Region The geographic area where the (AWS) Elastic Container Registry repository is hosted. Authentication/IRSA Role ARN Specify the IAM role with a policy for interacting with ECR with your Kubernetes cluster.
DockerHub settings
Fields Description Registry Space The unique identifier/name of the user or company linked to your DockerHub account. User The user account id or community user account id with push permission. Password/Token Provide the Password/Token corresponding to your docker hub account. It is recommended to use Token for security purposes. Checkbox/Use the Push Account's credentials Check this to use the same account for pulling and pushing operations. If unchecked, please enter the user account ID and Password/Token for your DockerHub account or community user account ID with pull permission.
Harbor settings
Fields Description Registry Endpoint Enter Harbor registry endpoint URL, for example, registry.example.com. Registry Space The project name in registry. User Provide the robot account name with push permissions. Password/Token Provide the secret corresponding to your harbor account. Checkbox/Use the Push Account's credentials Check this to use the same account for pulling and pushing operations. Provide the account name with pull permissions.
OpenShift settings
Fields Description Registry Endpoint OpenShift service registry endpoint URL (e.g., image-registry.openshift-image-registry.svc:5000). Project The project name in registry. Password/Token Supply the password for the user who has pull authorization privileges in your OpenShift container image registry.
Nexus settings
Fields Description Registry Endpoint Nexus service registry endpoint URL (e.g., image-registry.nexus-image-registry.svc:5000). Repository Specify the Nexus repository that corresponds to your project. User Provide the username with push permissions. Password/Token Enter the confidential combination used for authenticating your access to the container registry."},{"location":"user-guide/manage-container-registries/#remove-container-registry","title":"Remove Container Registry","text":"
To remove container registry integration from KubeRocketCI, follow the steps below:
Warning
Proceed with caution, removing registry settings might disrupt your CI/CD process. All new components created after changing the registry such as Components and Environments will start working out of the box. To work with existing codebases and pipelines familiarize with the change container registry guide.
1. In the KubeRocketCI -> Configuration -> Registry.
2. Click the Reset registry button, type the confirm word and then click Confirm:
This page describes actions that can be performed to an already created environment. If no environments are created yet, navigate to the Add Environment page:
Environments page
Environment status - displays the environment status. Can be red or green depending on if the KubeRocketCI portal managed to connect to the Git Server with the specified credentials or not.
Environment name (clickable) - displays the Git Server name set during the Git Server creation.
Open documentation - opens the documentation that leads to this page.
Enable filtering - enables filtering by Git Server name and namespace where this environment is located in.
Create new environment - displays the Create new component menu.
Edit environment - edit the environment by selecting the options icon next to its name in the environment list, and then selecting Edit. For details see the Edit Existing Environment section.
Delete environment - remove environment by clicking the vertical ellipsis button and then selecting Delete.
Note
Please keep in mind that after deleting the environment, all the created resources within the environment will be deleted.
Edit the environment directly from the environment overview page or when viewing the environment data:
Select Edit in the options icon menu next to the environment name:
Edit environment when viewing the environment data
Apply the necessary changes (edit the list of applications for deploy, application branches, and promotion in the pipeline). Add new extra stages by clicking the plus sign icon and filling in the application branch and promotion in the pipeline.
Edit environment dialog
Click the Apply button to confirm the changes.
"},{"location":"user-guide/manage-environments/#add-a-new-stage","title":"Add a New Stage","text":"
In order to create a new stage for the existing environment, follow the steps below:
Navigate to the Stages block by clicking the environment name link in the environments list.
Click the Create stage button:
Add environment stage
Fill in the required fields in the dialog. Alternatively, click Edit YAML in the upper-right corner of the Create stage dialog to open the YAML editor and add a stage. Please see the Stages Menu section for details.
To view the environment stage data for the existing environment, follow the steps below:
Navigate to the Stages block by clicking the environment name link in the environments list.
Expand environment stage
Click stage name. The following blocks will be displayed:
Environment stage overview
a. Applications - displays the status of the applications related to the stage and allows deploying the applications. Applications health and sync statuses are returned from the Argo CD tool. b. Pipelines - displays all the deploy pipeline runs launched for this stage. c. Monitoring - opens the grafana window that allows for watching various metrics.
Navigate to the Applications block of the stage and select an application.
Select the image stream version from the drop-down list.
(Optional) Enable setting custom values for Helm Charts. For more details, please refer to the Manage GitOps page.
Click Deploy. The application will be deployed in the Argo CD tool as well.
Info
In case of using OpenShift internal registry, if the deployment fails with the ImagePullBackOff error, delete the pod that was created for this application.
To update application, use the Deploy button:
Update the application
To uninstall the application, click the Uninstall button:
Uninstall the application
As a result, the application will be updated or uninstalled in the Argo CD tool as well.
Note
In a nutshell, the Update button updates your image version in the Helm chart, whereas the Uninstall button deletes the Helm chart from the namespace where the Argo CD application is deployed.
There is a couple of KubeRocketCI portal capabilities that will help in monitoring and troubleshooting deployed applications, namely, terminal and logs.
To inspect the deployed application in KubeRocketCI portal, take the following steps:
Open the application logs by clicking the Show Logs button:
Show Logs button
Inspect the shown logs:
Inspect Logs
Open the application terminal by clicking the Show Terminal button:
The KubeRocketCI marketplace offers a range of Templates, predefined tools and settings for creating software. These Templates speed up development, minimize errors, and ensure consistency. A key KubeRocketCI marketplace feature is customization. Organizations can create and share their own Templates, finely tuned to their needs. Each Template serves as a tailored blueprint of tools and settings.
These tailored Templates include preset CI/CD pipelines, automating your development workflows. From initial integration to final deployment, these processes are efficiently managed. Whether for new applications or existing ones, these Templates enhance processes, save time, and ensure consistency.
To see the Marketplace section, navigate to the Marketplace tab. General look of the Marketplace section is described below:
Marketplace section (listed view)
Marketplace templates - all the components marketplace can offer;
Template properties - the item summary that shows the type, category, language, framework, build tool and maturity;
Enable/disable filters - enables users to enable/disable searching by the item name or namespace it is available in;
Change view - allows switching from the listed view to the tiled one and vice versa. See the view options for details.
There is also a possibility to switch into the tiled view instead of the listed one:
Marketplace section (tiled view)
To view the details of a marketplace item, simply click its name:
Item details
The details window shows supplemental information, such as item's author, keywords, release version and the link to the repository it is located in. The window also contains the Create from template button that allows users to create the component by the chosen template. The procedure of creating new components is described in the Add Component via Marketplace page.
"},{"location":"user-guide/opa-stages/","title":"Use Open Policy Agent","text":""},{"location":"user-guide/opa-stages/#use-open-policy-agent","title":"Use Open Policy Agent","text":"
Open Policy Agent (OPA) is a policy engine that provides:
High-level declarative policy language Rego;
API and tooling for policy execution.
EPAM Delivery Platform ensures the implemented Open Policy Agent support allowing to work with Open Policy Agent bundles that is processed by means of stages in the Code Review and Build pipelines. These pipelines are expected to be created after the Rego OPA Library is added.
In the Build pipeline, the following stages are available:
checkout stage, a standard step during which all files are checked out from a selected branch of the Git repository.
get-version optional stage, a step where library version is determined either via:
2.1. Standard EDP versioning functionality.
2.2. Manually specified version. In this case .manifest file in a root directory MUST be provided. File must contain a JSON document with revision field. Minimal example: { \"revision\": \"1.0.0\" }\".
tests stage containing a script that performs the following actions: 3.1. Runs policy tests. 3.2. Converts OPA test results into JUnit format. 3.3. Publishes JUnit-formatted results.
git-tag stage, a standard step where git branch is tagged with a version.
"},{"location":"user-guide/prepare-for-release/","title":"Prepare for Release","text":""},{"location":"user-guide/prepare-for-release/#prepare-for-release","title":"Prepare for Release","text":"
After the necessary applications are added to EDP, they can be managed via the Admin Console. To prepare for the release, create a new branch from a selected commit with a set of CI pipelines (Code Review and Build pipelines), launch the Build pipeline, and add a new CD pipeline as well.
Note
Please refer to the Add Application and Add CD Pipeline for the details on how to add an application or a CD pipeline.
Become familiar with the following preparation steps for release and a CD pipeline structure:
Create a new branch
Launch the Build pipeline
Add a new CD pipeline
Check CD pipeline structure
"},{"location":"user-guide/prepare-for-release/#create-a-new-branch","title":"Create a New Branch","text":"
Open Gerrit via the Admin Console Overview page to have this tab available in a web browser.
Being in Admin Console, open the Applications section and click an application from the list to create a new branch.
Once clicked the application name, scroll down to the Branches menu and click the Create button to open the Create New Branch dialog box, fill in the Branch Name field by typing a branch name.
Open the Gerrit tab in the web browser, navigate to Projects \u2192 List \u2192 select the application \u2192 Branches \u2192 gitweb for a necessary branch.
Select the commit that will be the last included to a new branch commit.
Copy to clipboard the commit hash.
Paste the copied hash to the From Commit Hash field and click Proceed.
Note
If the commit hash is not added to the From Commit Hash field, the new branch will be created from the head of the master branch.
"},{"location":"user-guide/prepare-for-release/#launch-the-build-pipeline","title":"Launch the Build Pipeline","text":"
After the new branches are added, open the details page of every application and click the CI link that refers to Jenkins.
Note
The adding of a new branch may take some time. As soon as the new branch is created, it will be displayed in the list of the Branches menu.
To build a new version of a corresponding Docker container (an image stream in OpenShift terms) for the new branch, start the Build pipeline. Being in Jenkins, select the new branch tab and click the link to the Build pipeline.
Navigate to the Build with Parameters option and click the Build button to launch the Build pipeline.
Warning
The predefined default parameters should not be changed when triggering the Build pipeline, otherwise, it will lead to the pipeline failure.
"},{"location":"user-guide/prepare-for-release/#add-a-new-cd-pipeline","title":"Add a New CD Pipeline","text":"
Add a new CD pipeline and indicate the new release branch using the Admin console tool. Pay attention to the Applications menu, the necessary application(s) should be selected there, as well as the necessary branch(es) from the drop-down list.
Note
For the details on how to add a CD pipeline, please refer to the Add CD Pipeline page.
As soon as the Build pipelines are successfully passed in Jenkins, the Docker Registry, which is used in EDP by default, will have the new image streams (Docker container in Kubernetes terms) version that corresponds to the current branch.
Open the Kubernetes/OpenShift page of the project via the Admin Console Overview page \u2192 go to CodebaseImageStream (in OpenShift, go to Builds \u2192 Images) \u2192 check whether the image streams are created under the specific name (the combination of the application and branch names) and the specific tags are added. Click every image stream link.
"},{"location":"user-guide/prepare-for-release/#check-cd-pipeline-structure","title":"Check CD Pipeline Structure","text":"
When the CD pipeline is added through the Admin Console, it becomes available in the CD pipelines list. Every pipeline has the details page with the additional information. To explore the CD pipeline structure, follow the steps below:
Open Admin Console and navigate to Continuous Delivery section, click the newly created CD pipeline name.
Discover the CD pipeline components:
Applications - the list of applications with the image streams and links to Jenkins for the respective branch;
Stages - a set of stages with the defined characteristics and links to Kubernetes/OpenShift project;
Note
Initially, an environment is empty and does not have any deployment unit. When deploying the subsequent stages, the artifacts of the selected versions will be deployed to the current project and the environment will display the current stage status. The project has a standard pattern: \u2039edp-name\u203a-\u2039pipeline-name\u203a-\u2039stage-name\u203a.
Deployed Versions - the deployment status of the specific application and the predefined stage.
"},{"location":"user-guide/prepare-for-release/#launch-cd-pipeline-manually","title":"Launch CD Pipeline Manually","text":"
Follow the steps below to deploy the QA and UAT application stages:
As soon as the Build pipelines for both applications are successfully passed, the new version of the Docker container will appear, thus allowing to launch the CD pipeline. Simply navigate to Continuous Delivery and click the pipeline name to open it in Jenkins.
Click the QA stage link.
Deploy the QA stage by clicking the Build Now option.
After the initialization step starts, in case another menu is opened, the Pause for Input option will appear. Select the application version in the drop-down list and click Proceed. The pipeline passes the following stages:
Init - initialization of the Jenkins pipeline outputs with the stages that are the Groovy scripts that execute the current code;
Deploy - the deployment of the selected versions of the docker container and third-party services. As soon as the Deployed pipeline stage is completed, the respective environment will be deployed.
Approve - the verification stage that enables to Proceed or Abort this stage;
Promote-images - the creation of the new image streams for the current versions with the pattern combination: [pipeline name]-[stage name]-[application name]-[verified];
After all the stages are passed, the new image streams will be created in the Kubernetes/OpenShift with the new names.
Deploy the UAT stage, which takes the versions that were verified during the QA stage, by clicking the Build Now option, and select the necessary application versions. The launch process is the same as for all the deploy pipelines.
To get the status of the pipeline deployment, open the CD pipeline details page and check the Deployed versions state.
"},{"location":"user-guide/prepare-for-release/#cd-pipeline-as-a-team-environment","title":"CD Pipeline as a Team Environment","text":"
Admin Console allows creating a CD pipeline with a part of the application set as a team environment. To do this, perform the following steps;
Open the Continuous Delivery section \u2192 click the Create button \u2192 enter the pipeline name (e.g. team-a) \u2192 select ONE application and choose the master branch for it \u2192 add one DEV stage.
As soon as the CD pipeline is added to the CD pipelines list, its details page will display the links to Jenkins and Kubernetes/OpenShift.
Open Jenkins and deploy the DEV stage by clicking the Build Now option.
Kubernetes/OpenShift keeps an independent environment that allows checking the new versions, thus speeding up the developing process when working with several microservices.
As a result, the team will have the same abilities to verify the code changes when developing and during the release.
The Links section is designed to store all the component references in one place. Additional feature is to display these references directly in the Overview page of the KubeRocketCI portal. Some of the links are also located in the application details and stage details pages. Integrating some of the tools will also make these links clickable.
Navigate to KubeRocketCI -> Configuration -> Links and click the + Create Link button:
Links section
In the appeared window, insert the link name, URL, and SVG icon in base 64 format. Click the checkbox if you want your link to be displayed on the overview page and click Apply:
Create reference menu
If the Show on Overview Page option is selected, the image will be displayed on the Overview page among the other links:
"},{"location":"user-guide/terraform-stages/","title":"CI Pipelines for Terraform","text":""},{"location":"user-guide/terraform-stages/#ci-pipelines-for-terraform","title":"CI Pipelines for Terraform","text":"
EPAM Delivery Platform ensures the implemented Terraform support by adding a separate component type called Infrastructure. The Infrastructure codebase type allows to work with Terraform code that is processed by means of stages in the Code-Review and Build pipelines.
"},{"location":"user-guide/terraform-stages/#pipeline-stages-for-terraform","title":"Pipeline Stages for Terraform","text":"
Under the hood, Infrastructure codebase type, namely Terraform, looks quite similar to other codebase types. The distinguishing characterstic of the Infrastructure codebase type is that there is a stage called terraform-check in both of Code Review and Build pipelines. This stage runs the pre-commit activities which in their turn run the following commands and tools:
Terraform fmt - the first step of the stage is basically the terraform fmt command. The terraform fmt command automatically updates the formatting of Terraform configuration files to follow the standard conventions and make the code more readable and consistent.
Lock provider versions - locks the versions of the Terraform providers used in the project. This ensures that the project uses specific versions of the providers and prevents unexpected changes from impacting the infrastructure due to newer provider versions.
Terraform validate - checks the syntax and validity of the Terraform configuration files. It scans the configuration files for all possible issues.
Terraform docs - generates human-readable documentation for the Terraform project.
Tflint - additional validation step using the tflint linter to provide more in-depth checks in addition to what the terraform validate command does.
Checkov - runs the checkov command against the Terraform codebase to identify any security misconfigurations or compliance issues.
Tfsec - another security-focused validation step using the tfsec command. Tfsec is a security scanner for Terraform templates that detects potential security issues and insecure configurations in the Terraform code.
Note
The commands and their attributes are displayed in the .pre-commit-config.yaml file.