Skip to content

Commit bf1e0b9

Browse files
committed
chore(demo): updated the demo documents to include the documentation of labs projects
1 parent 9a92a1c commit bf1e0b9

82 files changed

Lines changed: 7902 additions & 279 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
# Gasper
2+
3+
> Your Cloud in a Binary
4+
5+
<img align="right" width="350px" height="400px" src="./docs/content/assets/logo/gasperlogo.svg">
6+
7+
[![Build Status](https://travis-ci.org/sdslabs/gasper.svg?branch=develop)](https://travis-ci.org/sdslabs/gasper)
8+
[![Docs](https://img.shields.io/badge/docs-current-brightgreen.svg)](https://gasper-docs.netlify.com/)
9+
[![Go Report Card](https://goreportcard.com/badge/github.com/sdslabs/gasper)](https://goreportcard.com/report/github.com/sdslabs/gasper)
10+
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/sdslabs/gasper/blob/develop/LICENSE.md)
11+
12+
Gasper is an intelligent Platform as a Service (PaaS) used for deploying and managing applications and databases in any cloud topology.
13+
14+
## Contents
15+
16+
* [Overview](#overview)
17+
* [Features](#features)
18+
* [Supported Languages](#supported-languages)
19+
* [Supported Databases](#supported-databases)
20+
* [Documentation](#documentation)
21+
* [Dependencies](#dependencies)
22+
* [Download](#download)
23+
* [Development](#development)
24+
* [Contributing](#contributing)
25+
* [Meet the A-Team](#meet-the-a-team)
26+
* [Contact](#contact)
27+
28+
## Overview
29+
30+
### The Dilemma
31+
Imagine you have a couple of *Bare Metal Servers* and/or *Virtual Machines* (collectively called nodes) at your disposal. Now you want to deploy a couple of applications/services to these nodes in such a manner so as to not put too much load on a single node.
32+
33+
### Naive Approach
34+
Your 1st option is to manually decide which application goes to which node, then use ssh/telnet to manually
35+
setup all of your applications in each node one by one.
36+
37+
### A Wise Choice
38+
But you are smarter than that, hence you go for the 2nd option which is [Kubernetes](https://kubernetes.io/). You setup Kubernetes in all of your
39+
nodes which forms a cluster, and now you can deploy your applications without worrying about load distribution. But
40+
Kubernetes requires a lot of configuration for each application(deployments, services, stateful-sets etc) not to mention
41+
pipelines for creating the corresponding docker image.
42+
43+
### The Ultimatum
44+
Here comes (🥁drumroll please 🥁) **Gasper**, your 3rd option!<br>
45+
Gasper builds and runs applications in docker containers **directly from source code**. You no longer need to create application specific docker images and build pipelines, let Gasper do the heavylifting for you 😊.
46+
Gasper requires minimal parameters for deploying an application, so minimal that you can count them on fingers in one hand 🤚. Same goes for Gasper provisioned databases. Gone are the days of hard labour (writing configurations).
47+
48+
## Features
49+
50+
Fear not because the reduction in complexity doesn't imply the reduction in features. You can rest assured because Gasper has:-
51+
52+
* Worker services for creating/managing databases and applications
53+
* Master service for:-
54+
* Checking the status of worker services
55+
* Intelligently distributing applications/databases among them
56+
* Transferring applications from one worker node to another in case of node failure
57+
* Removing dead worker nodes from the cloud
58+
* REST API interface for the entire ecosystem
59+
* Reverse-proxy service with HTTPS, HTTP/2, Websocket and gRPC support for accessing deployed applications
60+
* DNS service which automatically creates DNS entries for all applications which in turn are resolved inside containers
61+
* SSH service for providing ssh access directly to an application's docker container
62+
* Virtual terminal for interacting with your application's docker container from your browser
63+
* Dynamic addition/removal of nodes and services without configuration changes or restarts
64+
* Compatibility with Linux, Windows, MacOS, FreeBSD and OpenBSD
65+
* All of the above packaged with ❤️ in a **single binary**
66+
67+
## Supported Languages
68+
69+
Gasper currently supports applications of the following types:-
70+
71+
* Static web pages
72+
* PHP
73+
* Python 2
74+
* Python 3
75+
* Node.js
76+
* Golang
77+
* Ruby
78+
* Rust
79+
80+
It ain't much but it's honest work 🥳
81+
82+
## Supported Databases
83+
84+
The following databases are supported by Gasper:-
85+
86+
* MySQL
87+
* MongoDB
88+
* PostgreSQL
89+
* Redis
90+
91+
It ain't.... (complete the rest yourself)
92+
93+
## Documentation
94+
95+
You can find the complete documentation of Gasper at [https://gasper-docs.netlify.app/](https://gasper-docs.netlify.app/)
96+
97+
## Dependencies
98+
99+
The only thing you need for running Gasper is [Docker](https://www.docker.com/). Here are the installation guides for:-
100+
101+
* [Linux](https://runnable.com/docker/install-docker-on-linux)
102+
* [MacOS](https://docs.docker.com/docker-for-mac/install/)
103+
* [Windows](https://docs.docker.com/docker-for-windows/install/)
104+
105+
If you perhaps need a higher degree of control over your entire cloud then you may setup [MongoDB](https://www.mongodb.com/download-center/community) and [Redis](https://redis.io/download) separately within your infrastructure and make the necessary changes in the `mongo` and `redis` sections of `config.toml`.
106+
107+
## Download
108+
109+
Assuming you have the [dependencies](#dependencies) installed, head over to Gasper's [releases](https://github.com/sdslabs/gasper/releases) page and grab the latest binary according to your operating system and system architecture
110+
111+
Run the downloaded binary with the [sample configuration file](./config.sample.toml)
112+
113+
```bash
114+
$ ./gasper --conf ./config.toml
115+
```
116+
117+
## Development
118+
119+
You need to have [Golang 1.13.x](https://golang.org/dl/) or higher installed along with the mentioned [dependencies](#dependencies)
120+
121+
Open your favourite terminal and perform the following tasks:-
122+
123+
1. Cross-check your golang version.
124+
125+
```bash
126+
$ go version
127+
go version go1.13.5 darwin/amd64
128+
```
129+
130+
2. Clone this repository.
131+
132+
```bash
133+
$ git clone https://github.com/sdslabs/gasper
134+
```
135+
136+
3. Go inside the cloned directory and list available *makefile* commands.
137+
138+
```bash
139+
$ cd gasper && make help
140+
141+
Gasper: Your cloud in a binary
142+
143+
install Install missing dependencies
144+
build Build the project binary
145+
tools Install development tools
146+
release Build release binaries
147+
start Start in development mode with hot-reload enabled
148+
clean Clean build files
149+
fmt Format entire codebase
150+
vet Vet entire codebase
151+
lint Check codebase for style mistakes
152+
test Run tests
153+
help Display this help
154+
```
155+
156+
4. Setup project configuration and make changes if required. The configuration file is well-documented so you
157+
won't have a hard time looking around.
158+
159+
```bash
160+
$ cp config.sample.toml config.toml
161+
```
162+
163+
5. Start the development server.
164+
165+
```bash
166+
$ make start
167+
```
168+
169+
## Contributing
170+
171+
If you'd like to contribute to this project, refer to the [contributing documentation](./CONTRIBUTING.md).
172+
173+
## Meet the A-Team
174+
175+
* Anish Mukherjee [@alphadose](https://github.com/alphadose)
176+
* Vaibhav [@vrongmeal](https://github.com/vrongmeal)
177+
* Supratik Das [@supra08](https://github.com/supra08)
178+
* Karanpreet Singh [@karan0299](https://github.com/karan0299)
179+
* Mohit Sharma [@Scar26](https://github.com/Scar26)
180+
181+
Gasper Logo: Leshna Balara [@leshnabalara](https://github.com/leshnabalara)
182+
183+
You can find the entire list of contributors [here](https://github.com/sdslabs/gasper/graphs/contributors)
184+
185+
Created with 💖 by [SDSLabs](https://github.com/sdslabs)
186+
187+
## Contact
188+
189+
If you have a query regarding the product or just want to say hello then feel free to visit
190+
[chat.sdslabs.co](http://chat.sdslabs.co/) or drop a mail at [contact@sdslabs.co.in](mailto:contact@sdslabs.co.in)
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Concepts
2+
3+
## Terminology
4+
5+
* **Node**: A Virtual Machine or a Bare-Metal Server
6+
* **Worker Node**: A node which handles creation/management of applications and databases
7+
* **Support Node**: A node which supports the functioning of applications and databases in worker nodes
8+
* **Master Node**: A node which manages all other nodes and keeps them in check
9+
10+
## Components
11+
12+
Gasper is divided into number of components each playing a specific role in the ecosystem. Lets have a look.
13+
14+
### AppMaker 💧
15+
16+
AppMaker service deals with creating and managing applications and their life-cycles.
17+
18+
It currently supports applications of the following types
19+
20+
* Static web pages
21+
* PHP
22+
* Python 2
23+
* Python 3
24+
* Node.js
25+
* Golang
26+
* Ruby
27+
28+
It ain't much but it's honest work 🥳
29+
30+
!!!info
31+
A node with **AppMaker** deployed is a Worker Node
32+
33+
### DbMaker 🔥
34+
35+
DbMaker service deals with creating and managing databases and their life-cycles
36+
37+
It currently supports databases of the following types
38+
39+
* MySQL
40+
* MongoDB
41+
* PostgreSQL
42+
* Redis
43+
44+
It ain't.... (complete the rest yourself)
45+
46+
!!!info
47+
A node with **DbMaker** deployed is a Worker Node
48+
49+
### GenProxy ⚡
50+
51+
GenProxy service deals with reverse-proxying HTTP, HTTPS, HTTP/2, Websocket and gRPC requests to the desired application's IPv4 address and port based on the hostname.
52+
53+
!!!info
54+
A node with **GenProxy** deployed is a Support Node
55+
56+
### GenDNS 💡
57+
58+
GenDNS service deals with creating and managing DNS records of all deployed applications. All DNS records point to the IPv4 addresses of GenProxy ⚡ instances which in turn reverse-proxies the request to the desired application's IPv4 address and port.
59+
60+
!!!note
61+
**GenDNS** stores DNS records in such a manner that all requests are equally distributed among all available **GenProxy** instances. The records dynamically change with the addition/deletion of **GenProxy** instances.
62+
63+
!!!info
64+
A node with **GenDNS** deployed is a Support Node
65+
66+
### GenSSH 🗿
67+
68+
GenSSH service provides [SSH](https://www.ssh.com/ssh/protocol/) access directly to an application's docker container to the end user.
69+
The SSH command will be automatically returned to the user on application creation provided the node where the application is deployed has the GenSSH service deployed.
70+
71+
!!!info
72+
A node with **GenSSH** deployed is a Support Node
73+
74+
### Master 🌪
75+
76+
Master is the master of the entire Gasper ecosystem which performs the following tasks
77+
78+
* Equal distribution of applications and databases among worker nodes
79+
* User Authentication based on JWT (JSON Web Token)
80+
* User API for performing operations on any application/database in any node (Identity Access Management is handled with JWT)
81+
* Admin API for fetching and managing information of all nodes, applications, databases and users
82+
* Removal of inactive nodes from the cloud ecosystem
83+
* Re-scheduling of applications in case of node failure
84+
85+
Master API docs are available [here](/api)
86+
87+
!!!info
88+
You can interact with the entire Gasper ecosystem (example:- create/manage applications or databases) only through the REST API provided by **Master**
89+
90+
!!!info
91+
A node with **Master** deployed is a Master Node
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Admin Configuration
2+
3+
An admin user is created every time a Gasper instance is spawned in any node
4+
5+
The credentials of the default admin user are defined in the **admin** section of the configuration file
6+
7+
```toml
8+
###########################
9+
# Admin Configuration #
10+
###########################
11+
12+
# Default admin credentials for the Gasper ecosystem.
13+
[admin]
14+
email = "anish.mukherjee1996@gmail.com"
15+
username = "alphadose"
16+
password = "alphadose"
17+
```
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# AppMaker Configuration
2+
3+
AppMaker deals with creating and managing applications and their life-cycles
4+
5+
The following section deals with the configuration of AppMaker
6+
7+
```toml
8+
##############################
9+
# AppMaker Configuration #
10+
##############################
11+
12+
[services.appmaker]
13+
deploy = true # Deploy AppMaker?
14+
port = 4000
15+
16+
# Time Interval (in seconds) in which metrics of all application containers
17+
# running in the current node are collected and stored in the central mongoDB database
18+
metrics_interval = 600
19+
20+
# Time Interval (in seconds) in which health is checked of all application containers and if unhealthy, they are restarted
21+
health_interval = 300
22+
23+
# Hard Limits the total number of app instances that can be deployed by an user
24+
# Set app_limit = -1 if no hard limit is to be imposed
25+
app_limit = 10
26+
27+
# Specifies the maximum CPU allocation for a container created by a non admin user
28+
max_container_cpu = 0.25
29+
30+
# Specifies the maximum memory allocation for a container created by a non admin user
31+
max_container_memory = 0.5
32+
```
33+
34+
!!!warning
35+
The node where **AppMaker** is to be deployed should have **Docker** installed and running
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Cloudflare Configuration
2+
3+
Gasper has in-built support for using [cloudflare](https://www.cloudflare.com/) services
4+
5+
If Gasper's cloudflare plugin is enabled then whenever an application is created, its corresponding DNS entry will be automatically created in cloudflare
6+
7+
The DNS entry created will be according to the [domain](/configurations/global/#domain) parameter in the configuration file
8+
9+
???example
10+
If the domain parameter's value is `sdslabs.co` and you have created an application named **foo**, then an entry will be created in cloudflare (if plugin enabled) with the domain name `foo-app-gasper.sdslabs.co`
11+
12+
!!!warning
13+
The domain name set in the [domain](/configurations/global/#domain) parameter should be managed by cloudflare in order for this plugin to work
14+
15+
The following section deals with configurations related to Cloudflare
16+
17+
```toml
18+
################################
19+
# CloudFlare Configuration #
20+
################################
21+
22+
[cloudflare]
23+
# API Token used for creating/updating Cloudflare's DNS records.
24+
# This token must have the scopes ZONE:ZONE:READ, ZONE:ZONE:EDIT, ZONE:DNS:EDIT and ACCOUNT:ACCOUNT SETTINGS:READ.
25+
api_token = ""
26+
plugin = false # Use Cloudflare Plugin?
27+
public_ip = "" # IPv4 address for Cloudflare's DNS records to point to.
28+
```
29+
30+
You can generate a *Cloudflare API Token* from [here](https://dash.cloudflare.com/profile/api-tokens) and fill that value in the **api_token** field in the above configuration
31+
32+
!!!warning
33+
The generated token must have the permissions **ZONE:ZONE:READ**, **ZONE:ZONE:EDIT**, **ZONE:DNS:EDIT** and **ACCOUNT:ACCOUNT SETTINGS:READ** in order for this plugin to work
34+
35+
The **public_ip** field in the above configuration should hold the public IPv4 address of an **GenProxy ⚡** instance or a **load balancer** pointing to multiple **GenProxy ⚡** instances
36+
37+
!!!warning
38+
If you wish to use the Cloudflare plugin in your cloud ecosystem then make sure that the above configuration is **same** across all **nodes** where **AppMaker 💧** is deployed

0 commit comments

Comments
 (0)