Code Monkey home page Code Monkey logo

ecsspawner's Introduction

ECS / AWS Spawner for Juputer HUB

Build Status

The ecsspawner (also known as JupyterHub ECS/AWS Spawner) enables JupyterHub to spawn single-user notebook servers on a ECS cluster in AWS.

Introduction

Amazon ECS (Elastic Container Service) is a highly scalable, high-performance container orchestration service which allows us to easily run and scale containerized applications on AWS.

ECS Task

Jupyter Notebooks are instantiated using ECS Tasks. A Task is the mechanism offered by Amazon ECS to encapsulate containers allowing us to specificy its charateristics using Task definitions.

A task definition includes:

  • The Docker image to use
  • CPU and memory requirements
  • AWS Network, logging, volumens and IAM roles
  • Launch types: EC2 or Fargate. Read more about

When using EC2 launch type, we have some alternatives for starting ECS tasks:

  1. Let Amazon ECS to run the Task based on the task definition using the current cluster capacity.
  2. Create a EC2 instance on the cluster, and start the ECS task on the created EC2 instance.
  3. Combined: Let amazon to run the task (1) and as a fallback scenario use (2) when no cluster capacity is available.

How to

## Spawner Configuration

c.JupyterHub.spawner_class = 'awsspawner.EcsTaskSpawner'

Spawner Configuration

strategy: Defines the spawning mechanism to be used. Possible values are

  • ECSSpawnerHandler: Let Amazon ECS to run the Task based on the task definition
  • ECSxEC2SpawnerHandler: Create a EC2 instance on the cluster, and start the ECS task on the created EC2 instance

cluster_name: ECS cluster name.

ecs_task_definition: When using ECS spawning mechanim, a task definition string is mandatory. The task definition must point to a definition where a Jupyter notebook is specified.

ec2_instance_template: When using EC2/ECSxEC2 mechanism, an AWS ECS instance template is required to determine EC2 instantiation.

c.Spawner.strategy = 'ECSxEC2SpawnerHandler'
c.Spawner.strategy_parms = {
    'cluster_name': 'notebook-cluster',
    'ec2_instance_template': 'ec2-demo-template',
    'ecs_task_definition': 'jupyter-notebook-template',
    'port': 8888
}

ecsspawner's People

Contributors

sridhar562345 avatar

Stargazers

CB 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.