Coder Social home page Coder Social logo

mdsohelmia / rafter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rafter-platform/rafter-alpha

0.0 0.0 0.0 997 KB

Serverless deployment platform powered by Google Cloud

Home Page: https://rafter.app

Makefile 0.02% PHP 79.75% HTML 20.17% Shell 0.07%

rafter's Introduction

Rafter ๐Ÿก

Rafter is a serverless deployment platform powered by Google Cloud. It leverages Google Cloud Run (and many other tools) to transform your Git repository into a fully-scalable serverless application running in the cloud - with zero configuration.

๐Ÿ’ฐ Scales to zero when not in use, saving you money โ€” perfect for hobby projects
๐Ÿ”ฅ Automatically scales to handle load
๐Ÿ”Œ Manages, connects and creates Cloud SQL databases for your applications automatically
โšก๏ธ Connects to GitHub and supports deploy-on-push
๐Ÿš€ Spin up multiple environments available at vanity URLs at the click of a button
โœจ No Dockerfiles required

โš ๏ธ Rafter is still very much a work-in-progress! โš ๏ธ

Google Cloud Services

Cloud Run (web service)

Official Documentation

  • Creates services for each environment of each project, automatically
  • Cloud Run handles all traffic roll-out, scaling, and configuration
  • Environment variables are assigned to each unique service through the API

Cloud Build (image creation)

Official Documentation

  • Docker images are created when code is pushed to GitHub
  • Dockerfile is automatically provided based on type of project
  • Currently supported: Laravel, Node.js

Cloud SQL (database)

Official Documentation

  • Database instances are provisioned by Rafter through the API
  • Databases are created and assigned to projects automatically using the Admin API
  • Environmental variables are properly assigned based on type of project

Cloud Firestore (cache and session drivers)

UPDATE: This... doesn't work great, due to a number of factors. Looking into alternatives.

Official Documentation

  • NoSQL database to support key-value caching and session management
  • Drivers integrated automatically based on project
  • No additional credentials required for consumer apps to use, since credentials are supplied within Cloud Run

Cloud Tasks (queue driver)

Official Documentation

  • Robust queue management platform
  • Queues are automatically created for each environment
  • Dedicated Cloud Run service is created for each project to handle incoming jobs through HTTP request payloads
  • No daemon or worker instance is required
  • Since Cloud Run is serverless, instances can fan out, thousands of jobs can be processed in a matter of seconds

Cloud Storage (image artifacts and uploads)

Official Documentation

  • Object storage, similar to S3
  • Automatically handles uploaded artifacts from Cloud Build
  • Integrated into application helpers based on project type to handle user uploads

Cloud Scheduler

Official Documentation

  • Used for firing cron events in e.g. Laravel

Cloud Logging

Official Documentation

  • HTTP requests, stdout and app logs displayed inside Rafter log viewer

Roadmap

Here are things I'd like to work on next:

  • Extract laravel-rafter-core into a package
  • Inject Laravel Stackdriver log driver config
  • Support other projects:
    • Node
    • WordPress
    • Rails
    • Go
    • Custom Dockerfile
  • Email driver support (does Google offer this as part of GCP?)
  • Integration of Secret Manager
  • Integration of commands
  • Integration of GCS for better uploads with Laravel
  • Better Database operations
  • Leverage GitHub Deployment API to mark when a branch has been deployed
  • Lots of UI upgrades:
    • Log viewer
    • Database information
    • User profile/settings
  • Better Cloud Build optimization
    • Clone using ZIP instead of Git
    • Use secrets rather than plain text tokens for security
    • Consider adding multistage builds for Nodejs, Composer building steps
  • Implement Custom Domain assignment and onboarding
  • Implement an environment deletion workflow to delete resources/schedulers/etc
  • Allow users to clone a public project without having to connect a source provider
  • Create a CLI to allow users to push a local project without connecting a source provider

Development notes

  • Clone it
  • Use Valet to run it and connect to a local MySQL database
  • Run make share to fire up ngrok.io local tunnel
  • Requires grpc PHP extension to be installed locally: pecl install grpc

Inspiration

rafter's People

Contributors

jplhomer avatar dependabot[bot] avatar lucasmichot 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.