Getting started with Automated Analysis
Introduction
Argo Rollout enhances the deployment capabilities of Kubernetes with features such as blue-green, canary, experimentation, and progressive delivery. The OpsMx Intelligent Software Delivery (ISD) platform integrates with Argo Rollout to automate the verification of deployments and reduce the risk of releasing faulty updates to production through progressive delivery.
ISD uses machine learning algorithms, Natural Language Processing (NLP), and statistical analysis to evaluate new releases and identify potential risks in comparison to the base releases. It integrates with the widely used log and metrics monitoring tools to perform analysis during the rollout process.
ISD integrates with the following monitoring tools:
Amazon Cloudwatch
AppDynamics
DataDog
Dynatrace
ElasticSearch
Graphite
Graylog
New Relic
Prometheus
Splunk
Stackdriver
SumoLogic
VMware Tanzu Observability
Prerequisites
Argo CD (v2.4.8 or later) with Argo Rollouts (v1.3 or later) Installed.
Application configured for deployments using Argo Rollouts.
A log or metrics monitoring tool for observing applications (Refer to the above list of monitoring tools that ISD supports).
Application configured for collecting metrics and logs through the supported monitoring tools.
Overview of Performing Automated Analysis
Connect the ISD to the existing Argo CD instances.
To monitor data, we need to integrate the ISD system with appropriate monitoring tools. This integration will allow us to access the data source for application logs, such as Elastic, and metrics, such as Prometheus. These integration accounts will be utilized in subsequent data analysis processes.
OPTIONAL: Adjust the log selection strings and topic type (CRITICAL, ERROR, WARNING, IGNORE) as necessary based on the specific needs of your application.
OPTIONAL: Adjust the metric selection as necessary based on the specific needs of your application
Perform automated analysis during rollouts.
Evaluate analysis report.
Setup for enabling Automated Analysis
To enable the Automated Analysis you need to perform a one-time platform setup and one-time setup for each application as stated below.
The following is the sequence of activities for one-time platform setup.
Connect to existing Argo CD
Integrate with monitoring tools - Data Sources
Set up Kubernetes profile Secret for ISD
Create ServiceAccount for ISD Analysis
Following are the sequence of activities for application setup for Automated Rollout analysis.
Create Log and Metric Template ConfigMaps
Create Analysis configuration
Setup Rollout AnalysisTemplate
Update rollout.yaml to enable Automated Analysis
One-time Platform Setup:
Step 1: Connect to Existing Argo CD
To connect the ISD platform to one or more existing Argo CD installations, follow the steps below:
Access the CD Integration sub-menu under the top-level Setup menu in the ISD UI.
Deploy a secure agent in the same cluster as the Argo CD or in the same security domain as the Argo CD.
Enter a name for the Argo CD connection in the ISD platform.
Step 2: Integrate with Monitoring Tools - Data Sources
To integrate the ISD platform with the monitoring tools used to observe the applications during deployments, follow the steps below:
Access the Integrations sub-menu under the top-level Setup menu in the ISD UI.
Connect the ISD platform to the desired monitoring tools.
Create and configure "accounts" in the ISD platform to represent the connections to the monitoring tools.
Use the account names in the log and metrics templates during application setup.
Step 3: Set up Kubernetes profile Secret for ISD
Step 4: Create ServiceAccount for ISD Analysis
Application Setup for Automated Rollout Analysis
Step 1: Create Log and Metric Template ConfigMaps
The following example demonstrates a typical configuration for an ElasticSearch log provider. Create the Log and Metrics template in the application's git folder and update the account names for the log and monitoring, as defined in Step 2 of the platform setup section.
Sample Log Template (for ElasticSearch):
Step 2: Create Analysis configuration
Step 3: Setup Rollout AnalysisTemplate
Step 4: Update rollout.yaml to enable Automated Analysis
Now, we are ready to add the automated analysis as part of the rollout strategy.
The rollout.yaml file is the key configuration file for Argo Rollout and it specifies various details related to the rollout strategy. To enable automated analysis, update the rollout.yaml file with the following steps:
Specify the Rollout Strategy: Choose between Canary or Blue Green rollout strategy based on your requirements.
Configure Traffic Shaping: Specify the traffic shaping details such as the percentage of traffic to be redirected to the canary version.
Progressive Delivery Steps (optional): Define one or more progressive delivery steps if required.
Automated AnalysisTemplate specification: Add the automated analysis specification as defined in the previous steps in the AnalysisTemplate.
Final Checklist
Finally, ensure that you have completed all the necessary platform setup steps, including creating the Kubernetes secret for the cluster and the service account per namespace. This will allow you to see the applications in the ISD UI and the integrations created in the setup page.
Make sure that all the following relevant files are present in the same Git folder.
Rollout and supporting objects for your application.
AnalysisTemplate that refers to log and/or metric template, profile-secret, provider-config
Log and/or metric templates
Profile secret
Provider config
To check that everything is in place, you can use the sample output as a reference. In this example, the Kubernetes secret and the service account definitions required for the analysis job are located in the same folder as the application, but this is not a strict requirement.
Perform Automated Analysis During Rollout
During a rollout, automated analysis will be triggered automatically as part of the progressive delivery process by updating the rollout.yaml file for your service. The status of the rollout can be monitored using the Argo Rollout extension or the Rollout dashboard. Refer to the image below.
The analysis will be carried out based on the configuration specified in the AnalysisTemplate and a report will be generated after each analysis performed during the progressive rollout. Usually, the analysis is conducted after each progressive rollout step. If the rollout is successful, the new version will be deployed, and users can review the report for any identified risks.
Understanding the Automated Analysis Report
The ISD platform produces one or multiple analysis reports per rollout, as defined in the rollout.yaml. The overall score determines whether the rollout continues or stops.
Summary
The ISD platform offers a sophisticated machine learning-based analysis tool for your Argo Rollout that significantly reduces the risk during the progressive release of new applications.
ISD automated analysis utilizes log and metric data sources to automatically evaluate and identify potential risks in new releases, streamlining the analysis process and reducing the potential for errors.
Last updated
Was this helpful?