5.11.0 • Published 4 years ago

@nteract/commuter v5.11.0

Weekly downloads
64
License
BSD-3-Clause
Repository
github
Last release
4 years ago

Glitch Deployed styled with prettier

com·mut·er

/kəˈmyo͞odər/ a person who travels some distance to work on a regular basis.

As commuters, we rush around from place to place all day. We go to work, school, and stores. We travel to locations near and far. Eventually, we return to our cozy home. :car: :office: :airplane: :tokyo_tower: :bullettrain_side: :department_store: :bus: :school: :bike: :city_sunset: :runner: :house_with_garden:

Like commuters, our data travels around too. Sometimes we need a notebook at work and other times at a client's site. Wherever and whenever you need your notebooks, commuter has you covered.

What is "commuter"?

As an opinionated nteract focused server, commuter reads notebooks from a local directory or Amazon S3, has a directory explorer to find notebooks, and provides a jupyter compatible version of the contents API. You determine where your notebooks should reside and where they should be shared. Flexibility and convenience.

commuter

Try commuter today and take your notebooks wherever you need them.

Installation

You may use whichever package manager (npm or yarn) best suits your workflow. The nteract team internally uses yarn.

npm install @nteract/commuter -g
# OR
yarn global add @nteract/commuter

Usage

Configure and run commuter with environment variables and commuter server.

Example local run (using a network file share!):

COMMUTER_LOCAL_STORAGE_BASEDIRECTORY=/efs/users/ commuter

Example S3 run:

COMMUTER_BUCKET=sweet-notebooks commuter

Environment Variables

General Environment Variables

Environment VariableDescriptionDefault
COMMUTER_STORAGE_BACKENDlocal, s3, or gcslocal
COMMUTER_DISCOVERY_BACKENDeither elasticsearch or none"none"
COMMUTER_PORTPort to run commuter on4000
COMMUTER_LOCAL_STORAGE_BASEDIRECTORYdirectory to serve in local storage modeprocess.cwd()
COMMUTER_ES_HOSTElasticSearch Host""

Environment Variables for S3 Storage

Authentication to S3 is using CredentialProviderChain with default providers. This supports the most common ways of authenticating in AWS.

Environment VariableDescriptionDefault
AWS_ACCESS_KEY_IDSpecifies an AWS access key associated with an IAM user or role.Optional
AWS_SECRET_ACCESS_KEYSpecifies the secret key associated with the access key. This is essentially the "password" for the access key.Optional
AWS_SESSION_TOKENSpecifies the session token value that is required if you are using temporary security credentials.Optional
AWS_PROFILESpecifies the name of the profile with the credentials and options to use. This can be the name of a profile stored in a credentials or config filedefault
COMMUTER_S3_BASE_PREFIXprefix on the bucket, similar to base directory""
COMMUTER_S3_PATH_DELIMITERseparator for "paths""/"
COMMUTER_BUCKETbucket contents served fromRequired in S3 mode, no default
COMMUTER_S3_ENDPOINTS3 endpointOptional, selected automatically
COMMUTER_S3_FORCE_PATH_STYLESet to true to activate s3ForcePathStyle. Forces path-style URLs for s3 objects, therefore URLs will be in the form <endpoint>/<bucket>/<key> instead of <bucket>.<endpoint>/<key>false

Environment Variables for Google Storage

Environment VariableDescriptionDefault
GOOGLE_APPLICATION_CREDENTIALSfile path of the JSON file that contains your service account key""
COMMUTER_BUCKETGCS bucket name without "gs://" prefixRequired
COMMUTER_GCS_PATH_DELIMITERseparator for "paths""/"
COMMUTER_GCS_BASE_PREFIXprefix on the bucket, similar to base directory""

Roadmap

ROADMAP Document

Development

Quick Start

  1. git clone git@github.com:nteract/commuter.git
  2. cd commuter
  3. yarn
  4. yarn dev
  5. open http://localhost:4000

Dev Docker

A Dockerfile for a local dev server can be use as follows:

  1. docker build --tag commuter:dev --file Dockerfile.dev .
  2. Run this:

Tests

There are three ways you can run tests:

  • If you have your environment set up, you can run tests locally via yarn test.
  • This repository is also set up with GitHub Actions, a builtin CI system, which will automatically trigger test builds for multiple Node versions upon every push into this repository. You can then check out the results in the Actions tab.
  • These GitHub Actions can be triggered locally using act, this way you don't have to have your JavaScript environment set up and you don't have to commit and push in order to run the tests remotely through GitHub.

Deployment

  1. Install commuter cli yarn add @nteract/commuter
  2. exec commuter - the service is typically wrapped inside daemontools

Deployment (Docker / Kubernetes)

A Dockerfile intended for Production use (suitable for Kubernetes or other container runtime) has been contributed. Instructions are below.

Note: there is no officially published Docker image at this time, you should publish it to your own image registry.

  1. Build and tag image docker build --tag commuter:latest .
  2. Image can be executed as follows:
5.11.0

4 years ago

5.10.1

4 years ago

5.10.0

4 years ago

5.9.1

4 years ago

5.9.0

5 years ago

5.8.0

5 years ago

5.7.0

6 years ago

5.6.14

6 years ago

5.6.13

6 years ago

5.6.12

6 years ago

5.6.11

6 years ago

5.6.9

6 years ago

5.6.8

6 years ago

5.6.7

6 years ago

5.6.6

6 years ago

5.6.5

6 years ago

5.6.4

6 years ago

5.6.3

6 years ago

5.6.2

6 years ago

5.6.1

6 years ago

5.6.0

6 years ago

5.5.3

6 years ago

5.5.2

6 years ago

5.5.1

6 years ago

5.5.0

6 years ago

5.4.0

6 years ago

5.3.0

6 years ago

5.2.0

6 years ago

5.1.0

6 years ago

5.0.5

6 years ago

5.0.4

6 years ago

5.0.3

6 years ago

5.0.0

6 years ago

4.0.1

6 years ago

4.0.0

6 years ago

3.1.2

6 years ago

3.1.1

6 years ago

3.1.0

6 years ago

3.0.7

6 years ago

3.0.6

6 years ago

2.0.0

7 years ago

1.7.3

7 years ago

1.7.2

7 years ago

1.7.1

7 years ago

1.7.0

7 years ago

1.6.0

7 years ago

1.5.1

7 years ago

1.5.0

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.10

7 years ago

1.3.9

7 years ago

1.3.8

7 years ago

1.3.7

7 years ago

1.3.6

7 years ago

1.3.5

7 years ago

1.3.4

7 years ago

1.3.3

7 years ago

1.3.2

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago