Code Monkey home page Code Monkey logo

flotilla's Introduction

Flotilla - The Petit Fleet

Build Status

Flotilla is an alternative to fleet that uncouples from CoreOS/etcd and couples to AWS.

Flotilla uses:

  • DynamoDb - for persistence, locking and communication
  • ELB - to reroute traffic during an upgrade
  • IAM - for access control
  • KMS - for encryption of environment variables
  • CloudFormation - for provisioning resources
  • SQS - for communication between components

Like fleet, flotilla distributes systemd units across a cluster of machines.

Unlike fleet, flotilla manages environment variables for scheduled services, and supports weighted distributions of services (for canaries, A/B, load balancing, etc).

Scheduling

Flotilla introduces the concept of a service to distinguish worker instances. An instance is born into a service and advertises membership in DynamoDb.

A scheduler running in the cluster periodically checks for:

  • Which units+configurations are defined for each service? What are their weights?
  • How many instances are currently being used for this service?

Given these inputs, the scheduler updates assignments for instances to satsify the current configuration.

Currently there is a single scheduler for the entire cluster. DynamoDb parallel scans are the intended scaling path for multiple schedulers.

Deployment

Flotilla workers periodically check for assignments in DynamoDb. If a worker's assignment is changed, it executes the following steps:

  1. Acquire deployment lock for service.
  2. If ELB is defined:
    1. Request deregistration from ELB.
    2. Wait for ELB deregistration (i.e. drain connections)
  3. Stop and unload all existing flotilla units.
  4. Start new flotilla units.
  5. If ELB is defined:
    1. Request registration to ELB.
    2. Wait for ELB registration (i.e. health check).
  6. Release deployment lock for service.

Limitations

Don't use this in production. This implementation is output from 3x8h "hackathon"s.

flotilla's People

Contributors

deviavir avatar thepwagner avatar

Stargazers

Alan Grosskurth avatar Émilien (perso) avatar  avatar François Baldassari avatar James Clark avatar rzdar avatar Aaron Heckmann avatar

Watchers

 avatar  avatar James Cloos avatar Eric Migicovsky avatar Robert Yawn avatar Kean Wong avatar François Baldassari avatar  avatar  avatar Aaron Heckmann (pebble account) avatar  avatar

flotilla's Issues

AWS:CM support

As a flotilla user,
I want to provision/maintain certificates via LetsEncrypt,
So that I can provide HTTPS even easier!

Failed service behaviour

Investigating/improving behaviour of a failed service (i.e. systemd start fails, ELB health checks fail). Right now we don't stop rollout when health checks fail :/
The scheduler can notice broken systemd services via the "status" table, but if services start but fail ELB check, we'll roll out a broken revision!

Determine AZs

Needing to determine Az1,Az2,Az3 for a particular region/account is a pain: I was thinking a "probe" template that creates a VPC+3x subnets using Fn::GetAZs could do that automagically: either us-east-1a, us-east-1b, us-east-2c are valid for you, or there's a parseable error stating which AZs can contain subnets (for me it's us-east-1a, us-east-1c, us-east-1d: hence the pain )

Speed up deploys

Using messaging and/or DynamoDB stream to react to "unlock" events faster: deploys can go faster if they start one after the other.

ssl @ ELB support

As a flotilla user,
I want to configure ELBs to terminate SSL connections,
So that I can expose HTTPS services.

Referenced units

Units in a ServiceRevision that reference each other (i.e. proxy.service is After=worker.service) should map to deployed names.

CLI: Adding new service doesn't provision

$ docker run -v /Users/chase/.aws/pebbledev.credentials:/root/.aws/credentials flotilla service --region us-east-1 --name docker-registry --elb-scheme internet-facing --dns-name registry-flotilla.pebbledev.com --health-check 10 --instance-type t2.small --provision --instance-min 1 --instance-max 2

2016-01-12 08:24:24,520 - INFO - MainThread - Service docker-registry updated in: us-east-1

Tried to test roll out a service, after running init. Stacks table is empty, it is added to the services table but no service seems to get rolled out.

Dynamic Subnets/Routing according to region's AZs

As a Flotilla user,
I want to saturate a region's AZs,
So that my application is resilient against AZ failure.

As a Flotilla user,
I want to not oversaturate a region's AZs,
So that costs are minimized.

Timer support

As a flotilla user,
I want to deploy a systemd timer,
So that I can deploy a unit that should only fire periodically.

Add a frontend

Some kind/any kind of frontend; git-deploy, CLI, json+web. Driving everything from demo.py + commenting out atm.

Administrative SSH access

As a flotilla guinea pig,
I want to be able to SSH to instances launched by flotilla,
So that I can understand what's broken and grab logs for better bug reports.

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.