Coder Social home page Coder Social logo

scoot's Introduction

Scoot

Build Status codecov.io GoDoc

Scoot is infrastructure to make developer tools smaller, simpler, and more distributed. The core concept of Scoot is the Snapshot, which represents an immutable filesystem state. Scoot allows for execution of commands against input Snapshots to create new output Snapshots.

Scoot Components

Scheduler

The Scheduler receives and distrubutes jobs to workers, and maintains state. It is also responsible for serving the Cloud Scoot API for clients.

Worker

The Worker (workerserver) receives information about jobs and runs them, and is responsible for all Snapshot-related functionality.

Daemon

The local daemon serves a Protobuf interface and can either send Scoot jobs to a remote scheduler or to embedded local workers.

Client APIs
  • Cloud Scoot API
  • Worker API
  • Daemon API
Jobs and Tasks

Scoot work is broken down into independent jobs, which can consist of one or more tasks, which are executed sequentially.

Example

Setup a scheduler and worker nodes locally:

go run ./binaries/setup-cloud-scoot/main.go --strategy local.local

Run a series of randomly generated tests against the local scheduler and workers:

go run ./binaries/scootapi/main.go run_smoke_test

Scoot Integration Tests

Scoot has a few tests that exercise varying levels of common usages and workflows.

Smoketest/Swarmtest

Invokes a scootapi client directly to run jobs against a local cluster and waits for the scheduled jobs to complete.

(./scootapi/client/smoke_test_cmd.go)

Recoverytest

Invokes a scootapi client directly to run jobs against a local cluster, kills the cluster, attempts to spin up a new one, and waits for the originally scheduled jobs to complete.

(./binaries/recoverytest/main.go)

Integration

Invokes a scootapi and scoot-snapshot-db client via CLI to run a job against a local cluster and waits for the job to complete

(./tests/integration_test.go)

Scoot Thrift Code

(open source scoot code is in workspace/github.com/twitter/scoot)

Generating thrift files (scootapi used as an example)

  • To Generate files run from scoot's scootapi directory:
thrift --gen go:package_prefix=github.com/twitter/scoot/scootapi/gen-go/,package=scoot,thrift_import=github.com/apache/thrift/lib/go/thrift scoot.thrift

Scoot Protobuf Code

Generating go protobuf files (for local Scoot Daemon) cd to scoot's daemon/protocol

protoc -I . daemon.proto --go_out=plugins=grpc:.

Generating python client files (for client library accessing local Scoot Daemon) cd to scoot's daemon/protocol

python -m grpc.tools.protoc -I. --python_out=./python/scoot --grpc_python_out=./python/scoot daemon.proto

Installation Instructions

Install 3rd party tools:

###Thrift (version >= 0.9.3) macOS:

brew install thrift

Thrift for go:

go get github.com/apache/thrift/lib/go/thrift

Protobuf for the Scoot Daemon

  • If necessary, remove any conflicting or older versions of Protobuf:
brew uninstall protobuf

grpcio for python

pip install grpcio grpcio-tools

(If grpcio* is already installed you should probably update it by including '--upgrade' to the above pip command)

docopt for python

pip install docopt==0.6.2

Install/Access Scoot Executables and libraries

Scoot Local Daemon, Local Scheduler and Local Worker

*cd to scoot directory (workspace/github.com/twitter/scoot) *run: go install ./binaries/... ** the binaries will be installed in workspace/bin

Scoot Local Daemon Command Line Client

### Python client library
Can be found at workspace/github.com/twitter/scoot/daemon/protocol/python/scoot/client_lib.py

scoot's People

Contributors

caitiem20 avatar dbentley avatar dgassaway avatar grimreaper avatar jasonbs10 avatar jeanettebruno avatar jieghost avatar ryancouto avatar

Watchers

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