You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

DRAFT

Introduction

Welcome to the user guide on packaging the Helm chart for the hello-world microservice into a CSAR (Cloud Service Archive) with Automation Composition Management (ACM) definitions. This guide is designed to help you seamlessly integrate your microservices into an ACM-enabled Kubernetes environment, enabling efficient orchestration and management.

Purpose

As organizations embrace microservices architecture, the need for effective orchestration and automation becomes critical. Automation Composition Management (ACM) provides a solution by allowing users to define, deploy, and manage complex microservice compositions seamlessly.

This documentation focuses on packaging a Helm chart, which encapsulates the hello-world microservice, into a CSAR. The CSAR includes not only the Helm chart for deployment but also ACM definitions that specify how the microservice should be orchestrated and interact with other components in your Kubernetes environment. 

Prerequisites

Before you proceed, please ensure that the following prerequisites are met:

  • ACM components including acm-runtime and required participants (Kubernetes in this case) are deployed in docker or Kubernetes environment.
  • Kubernetes and Helm are installed.
  • Chartmuseum server is installed to host the hello-world microservice helm chart.

Now, let's dive into the step-by-step process of packaging your Helm chart into a CSAR with ACM definitions for a seamless integration with ACM in your Kubernetes environment.

Overview

In this section, we provide a high-level overview of the process of packaging the Helm chart for the hello-world microservice into an rApp Package. This packaging process enables you to create a Cloud Service Archive (CSAR) that not only includes the Helm chart for deployment but also integrates Automation Composition Management (ACM) definitions, TOSCA metadata, and essential metadata files. This integration ensures seamless orchestration and management of your microservices within a Kubernetes environment.

Components

  • Helm Chart - The Helm chart encapsulates the hello-world microservice along with its configurations and dependencies. It serves as the deployment package for your microservice.
  • ACM Compositions - ACM compositions define how the microservice components interact within the Kubernetes environment. These compositions provide a blueprint for orchestrating complex scenarios and enable the dynamic configuration of microservice deployments.
  • ACM Instance Files - Instance files specify the configurations and details for the deployment of ACM compositions. Each instance file represents a unique deployment scenario or configuration set.
  • TOSCA Metadata - The TOSCA Metadata file specifies essential metadata about the CSAR, including version information and the entry definition file. It plays a crucial role in defining the structure and versioning of the CSAR.
  • Metadata File - The Metadata File contains metadata specific to the application service descriptor (ASD). It includes information such as the application name, provider, release date/time, and entry definition type. It also lists the sources for the CSAR, including TOSCA files and ACM definition files.

Relationship with ACM and Kubernetes

The rApp Package combines the strengths of Helm for microservice deployment with the orchestration capabilities of ACM in a Kubernetes environment. ACM ensures that your microservices are deployed and configured according to defined compositions, allowing for flexibility and adaptability in complex scenarios.

Benefits

  • Seamless Integration - The rApp Package seamlessly integrates Helm, ACM, and Kubernetes, providing a unified approach to microservice orchestration.
  • Dynamic Configuration - ACM compositions allow for dynamic configuration changes, enabling the adaptation of your microservices to different deployment scenarios.
  • Efficient Management - The combination of Helm and ACM streamlines the deployment and management of microservices, reducing complexity and enhancing operational efficiency.


Now, let's proceed with the step-by-step guide to package your Helm chart into an rApp Package with ACM definitions for deployment in your Kubernetes environment.

rApp Generator: Creating a CSAR Package

Overview

The rApp Generator simplifies the process of creating a Cloud Service Archive (CSAR) package, including Automation Composition Management (ACM) definitions, for your microservices. This guide outlines the directory structure, contents, and the steps involved in using the `generate.sh` script to generate a CSAR package.

Directory Structure

rapp-hello-world

|-- definitions

    -- asd.yaml

    -- asd_types.yaml

|-- files

      -- Acm

          -- definition

               -- compositions.json

          -- instances

               -- k8s-instance.json

|-- TOSCA-Metadata

      -- TOSCA.meta

|-- asd.mf

|-- generate.sh

|-- generate.bat


asd.yaml and asd_types.yaml

TOSCA is a standard for describing the topology and orchestration of cloud applications. The asd.yaml and asd_types.yaml files conform to the TOSCA specification and defining the application service descriptor (ASD) and related types. They describe the structure and properties of the application service, its components, and configurations.

ACM Compositions (compositions.json)

The file containing ACM compositions must be named compositions.json. This JSON file defines the ACM compositions for the rApp. It includes data types, node types, and a topology template specifying the structure of the compositions. ACM compositions define how the application components interact. They specify the structure of the automation composition and the types of components involved.

ACM Instance (k8s-instance.json)

This JSON file represents an instance of the ACM composition. It specifies the name, version, and properties of the instance, including the elements involved (e.g., K8S microservice) and their configurations. In this case, it includes information about the K8S microservice. While there is no strict naming convention for instance files, it is recommended to use descriptive names that reflect the purpose or content of the instance.

TOSCA Metadata (TOSCA.meta)

This file provides metadata about the CSAR. It includes the CSAR version, TOSCA meta-file version, the entry definition file, and ETSI-specific information.

Metadata File (asd.mf)

This file contains metadata for the application service descriptor (ASD). It includes information such as the application name, provider, release date/time, and entry definition type. It also lists the sources for the CSAR, including TOSCA files and ACM definition files.


CSAR Generation Process

Prepare your rApp Resources:
   - Organize ASD definitions, ACM compositions, instance files, and TOSCA Metadata in the designated directory structure.

Run the `generate.sh` Script:
   - Execute the `generate.sh` script, providing the rApp resource folder name as a parameter.


          ./generate.sh rapp-hello-world     

Verification:
   - Check for any error messages during the CSAR generation process.
   - Verify that the CSAR file (`rapp-hello-world.csar`) is generated in the same directory.

Result:
   - Once the process is complete, the script will indicate that the rApp package has been generated successfully.

rApp package rapp-hello-world.csar generated.


  • No labels