All Projects → crybapp → portals

crybapp / portals

Licence: MIT license
Microservice that queues, creates and closes Portal instances

Programming Languages

typescript
32286 projects
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to portals

Chopsticks
Chopsticks is an orchestration library: it lets you execute Python code on remote hosts over SSH.
Stars: ✭ 151 (+480.77%)
Mutual labels:  orchestration
K8s Appcontroller
AppController is a pod that you can spawn in your Kubernetes cluster which will take care of your complex deployments for you.
Stars: ✭ 214 (+723.08%)
Mutual labels:  orchestration
Xstate
State machines and statecharts for the modern web.
Stars: ✭ 18,300 (+70284.62%)
Mutual labels:  orchestration
Patrowlengines
PatrOwl - Open Source, Free and Scalable Security Operations Orchestration Platform
Stars: ✭ 162 (+523.08%)
Mutual labels:  orchestration
Ansible Pan
Ansible modules for Palo Alto Networks NGFWs
Stars: ✭ 197 (+657.69%)
Mutual labels:  orchestration
Baker
Orchestrate microservice-based process flows
Stars: ✭ 233 (+796.15%)
Mutual labels:  orchestration
Core
Eru, a simple, stateless, flexible, production-ready orchestrator designed to easily integrate into existing workflows. Can run any virtualization things in long or short time.
Stars: ✭ 147 (+465.38%)
Mutual labels:  orchestration
cb-tumblebug
Cloud-Barista Multi-Cloud Infra Management Framework
Stars: ✭ 33 (+26.92%)
Mutual labels:  orchestration
K8s Bigip Ctlr
Repository for F5 Container Ingress Services for Kubernetes & OpenShift.
Stars: ✭ 204 (+684.62%)
Mutual labels:  orchestration
Ansible Role Kubernetes
Ansible Role - Kubernetes
Stars: ✭ 247 (+850%)
Mutual labels:  orchestration
Thehive
TheHive: a Scalable, Open Source and Free Security Incident Response Platform
Stars: ✭ 2,300 (+8746.15%)
Mutual labels:  orchestration
Helios
Docker container orchestration platform
Stars: ✭ 2,089 (+7934.62%)
Mutual labels:  orchestration
Cstar
Apache Cassandra cluster orchestration tool for the command line
Stars: ✭ 242 (+830.77%)
Mutual labels:  orchestration
Koding
The Simplest Way to Manage Your Entire Dev Infrastructure!
Stars: ✭ 1,945 (+7380.77%)
Mutual labels:  orchestration
dockerfiles
🐳 Dockerfiles for Nette Framework. Nette in Docker. (@nette)
Stars: ✭ 15 (-42.31%)
Mutual labels:  orchestration
Terrahub
Terraform Automation and Orchestration Tool (Open Source)
Stars: ✭ 148 (+469.23%)
Mutual labels:  orchestration
Haven Platform
Haven is an open source Docker container management system. It integrates container, application, cluster, image, and registry management in one single place.
Stars: ✭ 223 (+757.69%)
Mutual labels:  orchestration
paco
Paco: Prescribed automation for cloud orchestration
Stars: ✭ 32 (+23.08%)
Mutual labels:  orchestration
blueprint-examples
This is where you can find officially supported Cloudify blueprints that work with the latest versions of Cloudify. Please make sure to use the blueprints from this repo when you are evaluating Cloudify.
Stars: ✭ 25 (-3.85%)
Mutual labels:  orchestration
Aws Etl Orchestrator
A serverless architecture for orchestrating ETL jobs in arbitrarily-complex workflows using AWS Step Functions and AWS Lambda.
Stars: ✭ 245 (+842.31%)
Mutual labels:  orchestration

Cryb OSS

@cryb/portalsVM microservice

GitHub contributors License Patreon Donate Chat on Discord

Docs

Info

@cryb/portals is the microservice used to handle requests @cryb/api to create and destroy 'Portals', which is the term we use for VM instances.

@cryb/portal instances also connect to @cryb/portals over WS to send and recieve updates like controller events and health updates.

Status

@cryb/portals has been actively developed internally since September 2019, and is now open source as of October 2019.

Codebase

The codebase for @cryb/portals is written in JavaScript, utilising TypeScript and Node.js. Express.js is used for our REST API, while the WebSocket API uses the ws module.

MongoDB is used as the primary database, while Redis is used for cache and PUB/SUB.

Code Style

We ask that you follow our code style guidelines when contributing to this repository.

We use TSLint in order to lint our code. Run yarn lint before committing any code to ensure it's clean.

Note: While we have most rules covered in our tslint.json config, it's good practice to familarise yourself with our code style guidelines.

Folder Structure

cryb/portals/
└──┐ src # The core source code
   ├──┐ config # Config files for Redis, Passport, etc
   │  └── providers # Config files for the provider APIs, such as Google Cloud, Kubernetes, etc.
   ├── controllers # Our REST route controller files
   ├── drivers # Methods used to deploy Portal instances
   ├── models # Models for our a data types, such as portals and requests
   ├── schemas # Mongoose schema files
   ├── server # Our Express.js setup and WebSocket setup
   ├── services # Services such as queue management, etc
   └── utils # Helper methods

First time setup

First, clone the @cryb/portals repository locally:

git clone https://github.com/crybapp/portals.git

Installation

The following services need to be installed for @cryb/portals to function:

  • MongoDB
  • Redis

We recommend that you run the following services alongside @cryb/portals, but they're not required.

  • @cryb/api
  • @cryb/web
  • @cryb/aperture

You also need to install the required dependencies by running yarn.

Ensure that .env.example is either copied and renamed to .env, or is simply renamed to .env.

In this file, you'll need some values. Documentation is available in the .env.example file.

Running the app locally

Background Services

Make sure that you have installed MongoDB and Redis, and they are both running locally on port 27017 and 6379 respectively.

The command to start MongoDB is mongod, and the command to start Redis is redis-server.

If you're developing a feature that requires the VM infrastructure, then make sure @cryb/aperture is running.

Starting @cryb/portals

To run @cryb/portals in development mode, run yarn dev.

It is recommended that in production you run yarn build, then yarn start.

Adding a custom provider

@cryb/portals makes it easy to add a custom cloud provider to deploy Portal instances onto.

  1. First, make a config file under src/config/providers. You want to call this foo.config.ts. This file should export a method that returns the API of the provider you want to use. See example.config.ts or gcloud.config.ts for an example of how Google Cloud intergration is handled.
  2. Next, make a file under src/drivers. You want to call this foo.driver.ts. You can copy the code in example.driver.ts as a starting point.
  3. Import your foo.config.ts file then create an instance of the client using the createClient method exported in the config file.
  4. Then add the code to create a cloud deployment with the desired config under the try { clause in the openPortalInstance method.
  5. Optional, but recommended Add the method under the try { clause in closePortalInstance to destroy the VM instance. This will be called when a Room no longer needs a portal, such as when all members have gone offline.
  6. Now, under src/drivers/router.ts, import your driver and rename its methods so they don't conflict when any other drivers. See below:
import {
    openPortalInstance as openFooPortalInstance,
    closePortalInstance as closeFooPortalInstance
} from './foo.driver'
  1. If you're not using TypeScript, skip this step Make sure you have added the name of your driver to the Driver type. See below:
type Driver = 'gcloud' | 'kubernetes' | 'foo'
  1. Add a case to the switch statement under openPortalInstance with the name of your driver methods. See below:
switch(driver) {
    ...
    case 'foo':
        openFooPortalInstance(portal)
        break
}
  1. Optional, but recommended If you added a closePortalInstance handler in your driver, add a case to the switch statement under closePortalInstance with the name of your driver methods. See below:
switch(driver) {
    ...
    case 'foo':
        closeFooPortalInstance(portal)
        break
}
  1. Make sure you change the current driver under fetchCurrentDriver. See below:
const fetchCurrentDriver = () => 'foo' as Driver

Done! Enjoy using @cryb/portals with the cloud provider of your preferred choice. For any help, view here. If you're feeling generous, create a PR request with your driver so the community can use it. Be sure to follow our Guidelines before submitting a PR.

Questions / Issues

If you have an issues with @cryb/portals, please either open a GitHub issue, contact a maintainer or join the Cryb Discord Server and ask in #tech-support.

License

FOSSA Status

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