All Projects → SkygearIO → Skygear Server

SkygearIO / Skygear Server

Licence: apache-2.0
Skygear - an open source serverless platform for modern secure app development

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Skygear Server

Autoserver
Create a full-featured REST/GraphQL API from a configuration file
Stars: ✭ 188 (-50.53%)
Mutual labels:  serverless, baas, server
Syncano Node
Syncano Toolkit for JavaScript development
Stars: ✭ 61 (-83.95%)
Mutual labels:  serverless, serverless-framework, baas
Aws Auto Cleanup
Open-source application to programmatically clean your AWS resources based on a whitelist and time to live (TTL) settings
Stars: ✭ 276 (-27.37%)
Mutual labels:  serverless, serverless-framework
Serverless Plugin Canary Deployments
Canary deployments for your Serverless application
Stars: ✭ 283 (-25.53%)
Mutual labels:  serverless, serverless-framework
Serverless Wsgi
Serverless plugin to deploy WSGI applications (Flask/Django/Pyramid etc.) and bundle Python packages
Stars: ✭ 377 (-0.79%)
Mutual labels:  serverless, serverless-framework
Aws App Sync
Easily Deploy AWS AppSync GraphQL APIs Using Serverless Framework Components
Stars: ✭ 261 (-31.32%)
Mutual labels:  serverless, serverless-framework
Fullstack App
⚡ Ready-to-use, serverless, full-stack application built with AWS Lambda, Express.js, React, AWS DynamoDB and AWS HTTP API.
Stars: ✭ 265 (-30.26%)
Mutual labels:  serverless, serverless-framework
Midway Faas
🔱 A simple and lightweight serverless framework
Stars: ✭ 363 (-4.47%)
Mutual labels:  serverless, serverless-framework
Serverless Google Cloudfunctions
Serverless Google Cloud Functions Plugin – Adds Google Cloud Functions support to the Serverless Framework
Stars: ✭ 241 (-36.58%)
Mutual labels:  serverless, serverless-framework
Grant
OAuth Proxy
Stars: ✭ 3,509 (+823.42%)
Mutual labels:  serverless, server
Serverless Iam Roles Per Function
Serverless Plugin for easily defining IAM roles per function via the use of iamRoleStatements at the function level.
Stars: ✭ 311 (-18.16%)
Mutual labels:  serverless, serverless-framework
Swim
Distributed software platform for building stateful, massively real-time streaming applications.
Stars: ✭ 368 (-3.16%)
Mutual labels:  serverless, serverless-framework
Serverlessbydesign
A visual approach to serverless development. Think. Build. Repeat.
Stars: ✭ 254 (-33.16%)
Mutual labels:  serverless, serverless-framework
Jazz
Platform to develop and manage serverless applications at an enterprise scale!
Stars: ✭ 254 (-33.16%)
Mutual labels:  serverless, serverless-framework
Zappa
Serverless Python
Stars: ✭ 224 (-41.05%)
Mutual labels:  serverless, serverless-framework
Serverless Prune Plugin
Serverless plugin to reap unused versions of deployed functions from AWS
Stars: ✭ 243 (-36.05%)
Mutual labels:  serverless, serverless-framework
Hands On Serverless Guide
A hands-on guide for building Serverless applications
Stars: ✭ 288 (-24.21%)
Mutual labels:  serverless, serverless-framework
Pode
Pode is a Cross-Platform PowerShell web framework for creating REST APIs, Web Sites, and TCP/SMTP servers
Stars: ✭ 329 (-13.42%)
Mutual labels:  serverless, server
Aws Lambda Typescript
This sample uses the Serverless Application Framework to implement an AWS Lambda function in TypeScript, deploy it via CloudFormation, publish it through API Gateway to a custom domain registered on Route53, and document it with Swagger.
Stars: ✭ 228 (-40%)
Mutual labels:  serverless, serverless-framework
Formplug Serverless
Form forwarding service for AWS Lambda
Stars: ✭ 232 (-38.95%)
Mutual labels:  serverless, serverless-framework

Skygear Logo

Next is the V2 of Skygear that aim to follow

  • Support multi tenant at core, make cloud deploy scalable at first day.
  • Simplify deployment.
  • Give back application lifecycle to cloud code developer and skygear developer.
  • Drop zmq and model against HTTP semantics.
  • Drop v1 Record class

Project structure

.
├── pkg
│   ├── server    <-- original skygear-server code
│   ├── auth
│   ├── gateway
│   └── core
└── cmd
    ├── auth
    │   └── main.go
    └── gateway
        └── main.go

Troubleshooting

If you encounter a build error look like invalid flag in pkg-config --cflags: -Xpreprocessor, export CGO_CFLAGS_ALLOW=-Xpreprocessor.

Dependencies

If you plan to build and run locally, you need to install the following dependencies.

  • pkgconfig
  • vips >= 8.7

If you are on macOS and user of homebrew, you can install them by

brew install pkgconfig vips

Gateway

Migration

To add a new gear

  1. Add db migration to config db
    • Add enabled column to plan table
    • Add version column to app table
  2. Update pkg/gateway/model/app.go with new gear in Gear, App and GetGearVersion.
  3. Update GetAppByDomain in pkg/gateway/db/app.go with the new gear version column.
  4. Update Plan struct and CanAccessGear func in pkg/gateway/model/plan.go
  5. Update GearURLConfig and GetGearURL func in pkg/gateway/config/config.go

DB migration

The following part is about gateway and gears db migration.

If you come from skygear-server 0.x to 1.x, the biggest difference is that gears in skygear next would not support auto db migration in server boot time.

DB migration must be run before server boot up. And since we do not have a full featured db management tool for skygear yet, here is a general guide for new comers of skygear next user.

  1. Create a schema for common gateway.
  2. Create a schema for your app.
  3. Run core and gear(s) migration.

For example, the app name is helloworld and you want to run auth gear .

# Base app_config schema for core gateway
CREATE SCHEMA app_config;
# Create shared schema for apps
# Run the following SQL in any postgresql client, like Postico
CREATE SCHEMA app;

# If you have psql cli
$ psql ${DATABASE_URL} -c "CREATE SCHEMA app;"

# Run core and auth migration
$ make -C migrate migrate MIGRATE_CMD=up DATABASE_URL=${DATABASE_URL} SCHEMA=app

See below sections for more commands about db migration.

Commands

Add a version

# MODULE can be gateway, core, auth...
$ export MODULE=<module_name>
$ export REVISION=<revision_description>
$ make -C migrate add-version MODULE=${MODULE} REVISION=${REVISION}

Check current db version

$ make -C migrate

Dry run the migration

Transaction will be rollback

$ make -C migrate MIGRATE_CMD=up DRY_RUN=1

Run the migration with github source

$ make -C migrate migrate \
    CORE_SOURCE=github://:@skygeario/skygear-server/migrations/core#6918eed \
    AUTH_SOURCE=github://:@skygeario/skygear-server/migrations/auth#6918eed \
    MIGRATE_CMD=up

Running db migration to all apps in cluster (multi-tenant mode)

Run core and auth migrations to apps which auth version in live

$ make -C migrate migrate \
    APP_FILTER_KEY=auth_version \
    APP_FILTER_VALUE=live \
    CONFIG_DATABASE=postgres://postgres:@localhost/postgres?sslmode=disable \
    HOSTNAME_OVERRIDE=localhost \
    MIGRATE_CMD=up

Start migration server in http server mode

  • To start the migration server
$ make -C migrate http
  • Calling the migration server

    POST /migrate
    

    Request example

    {
        "migration": "auth",
        "schema": "app_config",
        "database": "postgres://postgres:@localhost:5432/postgres?sslmode=disable",
        "command": "version"
    }
    

    Response example

    {
        "result":"1563434450"
    }
    

License & Copyright

Copyright (c) 2015-present, Oursky Ltd.
All rights reserved.

This source code is licensed under the Apache License version 2.0
found in the LICENSE file in the root directory of this source tree.
An additional grant of patent rights can be found in the PATENTS
file in the same directory.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].