/addons-transformer-for-amazon-eks

Addons Transformer to transform ISV Softwares to EKS Marketplace

Primary LanguageJavaScriptApache License 2.0Apache-2.0

Addons Transformer CLI for Amazon EKS

Introduction

Sleek Marketplace validator is solution provide pre-launch validations of the partner software on compatibility with Sleek guidelines, covering static and dynamic (deployment/runtime) aspects. This npm module does the following:

  1. Installs project dependencies such as kubectl, eksctl, helm utilities to the terminal.
  2. Grabs the following user inputs :
    • Addon Name
    • Helm Url of the Addon
    • Addon version
    • Deployment namespace
    • Account id of the marketplace account
    • AWS region
  3. Authenticates to ECR Repo and downloads the helm chart from the specified Helm repo url.
  4. Performs static validations to find occurrences of:
    • .Capabilities
    • helm.sh/hook
  5. Sends the addon and the report of the validation to the AWS Marketplace team to start getting the addon listed on the EKS console marketplace.

Pre-requisites

To implement this solution, you need the following prerequisites:

  • The AWS Command Line Interface (AWS CLI) installed. The AWS CLI is a unified tool to manage your AWS services.
  • AWS CLI default profile should be configured to access your AWS Account.
  • Node version 18.12.1 or later.
  • NPM version 8.19.2 or later.

Usage

$ npm install -g addons-transformer-for-amazon-eks
$ addons-transformer-for-amazon-eks COMMAND
running command...
$ addons-transformer-for-amazon-eks (--version)
addons-transformer-for-amazon-eks/0.0.1 darwin-arm64 node-v20.8.0
$ addons-transformer-for-amazon-eks --help [COMMAND]
USAGE
  $ addons-transformer-for-amazon-eks COMMAND
...

Commands

addons-transformer-for-amazon-eks configure

Sets up the Sleek CLI to work with a given helm chart

USAGE
  $ addons-transformer-for-amazon-eks configure [--addonName <value>] [--addonVersion <value>] [--helmUrl
    <value>] [--marketplaceId <value>] [--namespace <value>] [--region <value>]

FLAGS
  --addonName=<value>      Name of the addon
  --addonVersion=<value>   Version of the addon
  --helmUrl=<value>        Helm URL of the addon
  --marketplaceId=<value>  Marketplace AWS Account ID
  --namespace=<value>      Namespace of the addon
  --region=<value>         AWS Region

DESCRIPTION
  Sets up the Sleek CLI to work with a given helm chart


  Extracts information from the environment to populate information required for the Sleek CLI to function. If
  certain information is not found, prompts the user for it and asks them to validate the information extracted from
  the environment.

  This information is stored ~/.sleek/config.json
  Each of these configurations can be edited by passing the exact addon name and version.

  The CLI requires the following:
  * AWS Region
  * Marketplace AWS Account ID
  * Addon Name
  * Addon Version
  * Addon Helm Url
  * Deployment Namespace

  Each of these can be passed as flags to this command with the following flags:
  * --region
  * --marketplace_id
  * --addon_name
  * --addon_version
  * --helm_url
  * --namespace


EXAMPLES
  $ addons-transformer-for-amazon-eks configure

See code: src/commands/configure.ts

addons-transformer-for-amazon-eks submit

Uses the pre-existing configurations to submit the addon to the AWS marketplace

USAGE
  $ addons-transformer-for-amazon-eks submit [--addonName <value>] [--addonVersion <value>]

FLAGS
  --addonName=<value>     Name of the addon to submit
  --addonVersion=<value>  Version of the addon to submit

DESCRIPTION
  Uses the pre-existing configurations to submit the addon to the AWS marketplace


  Sends the selected addon, version to the marketplace for final submission and upload it to Project Sleek.

  It reads from the addons stored in the config: ~/.sleek/config.json and presents them as options to the user to
  submit.

  The CLI requires the configure command to be run before hand to ensure there are correct configurations for each of
  the addons.

  This command requires the following:
  * Addon Name - as used in the configure command
  * Addon Version - as used in the configure command

  If no flags are provided, the CLI will launch an interactive menu which let's you select which addon to submit to
  the marketplace.


EXAMPLES
  $ addons-transformer-for-amazon-eks submit

See code: src/commands/submit.ts

addons-transformer-for-amazon-eks validate

Validates a given addon from the configuration provided through the 'configure' command

USAGE
  $ addons-transformer-for-amazon-eks validate [--addonName <value>] [--addonVersion <value>]

FLAGS
  --addonName=<value>     Name of the addon to validate
  --addonVersion=<value>  Version of the addon to validate

DESCRIPTION
  Validates a given addon from the configuration provided through the 'configure' command


  This performs pre-launch validations of the partner software on compatibility with Sleek guidelines, covering static
  and dynamic (deployment/runtime) aspects.

  Runs the static analysis to find occurrences of:
  * .Capabilities
  * helm.sh/hook

  This command requires the "configure" command to have been run, it needs:
  * Helm URL
  to be configured correctly.

  It will perform a static validation on the device and then give you the option to submit it to the marketplace for
  runtime and further validation before it can be included in the EKS Console marketplace.


EXAMPLES
  $ addons-transformer-for-amazon-eks validate

See code: src/commands/validate.ts