Skip to content

EMR-EKS is a CLI tool that simplifies managing AWS EMR jobs on EKS with commands for handling virtual clusters, job runs, and built-in autocompletion

License

Notifications You must be signed in to change notification settings

shivanshthapliyal/aws-emr-eks-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS emr-eks CLI

GitHub license

EMR-EKS is a command-line interface (CLI) tool created to simplify the management of AWS EMR jobs on EKS. It offers user-friendly commands for managing virtual clusters, describing, canceling, and cloning job runs, all with the convenience of built-in command autocompletion to enhance the user experience.

Installation

Prerequisites

  • AWS CLI must be configured with appropriate permissions.
  • jq must be installed for JSON processing.

Quickstart

Auto Installation

Run the Quick Installation Script:

git clone https://github.com/shivanshthapliyal/aws-emr-eks-cli.git
cd aws-emr-eks-cli
./install.sh

This script will set the necessary permissions, add the CLI to your PATH, and verify the setup.

Manual Installation

If you want to manually install, see Manual Installation.

Usage

To use aws emr-eks cli, you can run the emr-eks command followed by subcommands:

emr-eks <command> [options]

Available Commands

Command Arguments Description
fetch-virtual-clusters None Fetches and saves the virtual clusters available in your AWS account.
list-running-jobs <eks_cluster_name> <virtual_cluster_name>
(This information can be autocompleted using TAB once fetch-virtual-clusters has run once.)
Lists the running jobs in the specified EKS cluster and virtual cluster.
describe-job <eks_cluster_name> <virtual_cluster_name> <JOB_ID> Describes a specific job identified by JOB_ID.
cancel-job <eks_cluster_name> <virtual_cluster_name> <job_id> Cancels a specific job.
clone-job <eks_cluster_name> <virtual_cluster_name> <JOB_ID> Clones a specific job.
get_pods <eks_cluster_name> <virtual_cluster_name> <job_id> Retrieves pods related to the specified job.

Examples

# Fetching Virtual Clusters for auto-completions
emr-eks fetch-virtual-clusters

# List running jobs on a virtual cluster 
emr-eks list-running-jobs myekscluster myvirtualcluster

# Get Pods for a job
emr-eks get-pods myekscluster myvirtualcluster 000000012thisisajobID

# Describing a Job
emr-eks describe-job myekscluster myvirtualcluster 000000012thisisajobID

# Cancelling a Job
emr-eks cancel-job myekscluster myvirtualcluster 000000012thisisajobID

# Cloning a Job
emr-eks clone-job myekscluster myvirtualcluster 000000012thisisajobID

Manual Installation

  1. Clone the Repository

    git clone https://github.com/shivanshthapliyal/aws-emr-eks-cli.git
    cd aws-emr-eks-cli
  2. Set Executable Permissions

    Make the script executable:

    chmod +x bin/emr-eks
  3. Add the Script to Your PATH

    Optionally, you can add the tool to your system's PATH to use it from anywhere:

    echo 'export PATH="$PATH:/path/to/aws-emr-eks-cli/bin"' >> ~/.zshrc
    source ~/.zshrc

    Replace /path/to/aws-emr-eks-cli with the actual path to the bin directory in your cloned repository.

Supported shell for autocompletion

For now, I could only develop autocompletions for following:

  • bash
  • zsh

Contributing

Contributions are welcome! Please fork the repository and open a pull request with your improvements.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

About

EMR-EKS is a CLI tool that simplifies managing AWS EMR jobs on EKS with commands for handling virtual clusters, job runs, and built-in autocompletion

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages