meta/comms/april-2018-grant.md

5.8 KiB

ButtCloud 🌈

an April 2018 #ssbc-grants proposal

i'd like to work on better pub infrastructure and a hosted pub-as-a-service product.

team

me! 😺

goals

  • we build an open source business on Scuttlebutt!
  • a pub is your personal cloud device that is always available and publicly accessible
  • a pub should be affordable (start pricing at ~$7/month per pub, try to get to ~$1/month per pub)
  • we support open source infrastructure providers, like OVH and Catalyst
  • the infrastructure code should easy for others to contribute and maintain

the story so far

pubs are important (1, 2, 3), but public pubs are a stop-gap we've used for too long, we need private pubs for everyone!

over the holidays, i got maybe 80% of the way towards automated Scuttlebutt pub infrastructure using Salt Stack, hosted on Open Stack using OVH public cloud. i've also been able to achieve mostly reliable pubs using an ssb-pub Docker image.

i want to throw away all the Salt Stack work i did and start over with Docker Swarm.

i expect this will take longer than a month of full-time work to complete.

sub-projects

there are three main sub-projects:

  • provider service
  • hub swarm
  • pub service

architecture

  • provider service
    • web app
      • join
        • land
        • sign in
        • create pub
        • pay for pub
        • start pub service
      • monitor
        • land
        • sign in
        • view pub
        • see stats
      • command
        • land
        • sign in
        • view pub
        • run command
    • web api
      • users
        • id
        • name
        • email
      • pub
        • bots
          • id
          • userId
          • name
          • status (up, down, none)
        • stats
          • stream Docker stats
        • commands
          • relay commands to pub services
        • orchestrator
          • on schedule, check what pubs are up
          • have 1 pub per 1 GB memory, 1 hub per 15 GB memory
          • queue worker jobs to ensure correct swarm
      • payment
        • products
        • plans
        • customers
        • subscriptions
    • swarm worker
      • manage hub machines
        • create hub
        • destroy hub
      • manage pub services
        • ensure pub service is up
        • ensure pub service is down
    • mailer worker
  • pub service

stack

roadmap

rough draft, subject to change

  • upgrade pub service
    • update ssb-pub to use docker-compose (so we can host multiple Scuttlebutt processes in the same service)
      • add ssb-viewer
      • add git-ssb-web
  • prototype hub swarm
    • setup single "hub manager" to be docker swarm manager
      • run mock provider service on manager
    • setup many "hub worker"s to be docker swarm workers
  • create provider service
    • upgrade mock provider service to include postgres and redis databases
    • scaffold web api, web app, swarm worker, and mailer worker
    • implement provider web app user flows
  • automate swarm
    • implement swarm orchestration functionality
  • start business
    • understand costs, determine prices, forecast profit/loss
    • decide on company jurisdiction and legal structure
    • copy or create (with help) a Terms of Service & Privacy Policy