Giter Club home page Giter Club logo

beamr-serverless's Introduction

Beam on EMR Serverless (bEaMR-Serverless)

Overview

bEaMR-Serverless is a project focused on deploying and managing Apache Beam applications on AWS EMR Serverless infrastructure. It includes a Terraform management script (tf) and a Python CLI script for job submission to EMR Serverless. The tf script streamlines Terraform operations across multiple environments, while the Python CLI script facilitates the submission of Apache Beam jobs to EMR Serverless.

Key Components

  • Terraform Script (tf): Manages infrastructure for Apache Beam applications on EMR Serverless using Terraform.
  • Workspace Management: Utilizes Terraform workspaces for segregating environments like dev, prod, etc.
  • Docker Integration: Handles building and pushing Docker images required for the serverless application.
  • EMR Serverless Job Submission Script: A Python CLI tool for submitting Apache Beam jobs to AWS EMR Serverless.

Prerequisites

Usage

Terraform Script (tf)

Execute Terraform commands within the project's infrastructure context:

./tf [terraform_command] [options]

Examples:

./tf plan
./tf apply
./tf destroy

If you run into permissions issues, don't forget to supply credentials. There are a lot of different mechanisms available here, so review the docs as needed. Here's an example of using a pre-configured profile named "your-aws-profile":

AWS_PROFILE=your-aws-profile ./tf apply

Managing Workspaces

Manage different deployment environments using workspaces. Automatically selects the appropriate variable file for the active workspace:

./tf workspace new [workspace_name]
./tf workspace select [workspace_name]

Docker Image Management

Build and push Docker images as part of the infrastructure setup:

./tf update_image

EMR Serverless Job Submission Script

Submit Apache Beam jobs to EMR Serverless using the Python CLI script:

python emr_job_cli.py \
  --application-id "app-id" \
  --execution-role-arn "arn:aws:iam::123456789012:role/MyRole" \
  --entry-point "s3://path/to/assembly.jar" \
  --entry-point-arguments "arg1 arg2 arg3" \
  --spark-submit-parameters "--executor-memory 1G --total-executor-cores 2" \
  --name "MyBeamJob"

Replace the placeholders with actual job details. entryPointArguments should be a space-separated list of arguments.

Terraform Workspace Usage and Requirements

Overview

Terraform workspaces are extensively used to manage and isolate configurations for different environments in bEaMR-Serverless.

Important Notes

  • Avoid Default Workspace: The project contains custom logic to prevent the use of Terraform's default workspace.
  • Workspace-Specific Configuration: Each workspace requires a terraform.[workspace].tfvars file for environment-specific configurations.
  • Credentials and Secrets: Handle AWS credentials and sensitive data securely, especially when using the job submission script.

beamr-serverless's People

Contributors

moradology avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.