• Stars
    star
    197
  • Rank 197,722 (Top 4 %)
  • Language
    Go
  • License
    MIT License
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

⚡️ A lightweight service that will build and store your go projects binaries, Integrated with Github, Gitlab, Bitbucket and Bitbucket Server.

Rabbit Logo

Rabbit

A lightweight service that will build and store your go projects binaries.

Rabbit is a lightweight service that will build and store your go projects binaries. Once a VCS system (Github, Gitlab, Bitbucket or Bitbucket Server) notifies rabbit of a new release, it clones the project, builds different binaries and publishes them.


Screenshot


Documentation

Development:

Rabbit uses Go Modules to manage dependencies. First Create a prod config file.

$ git clone https://github.com/Clivern/Rabbit.git
$ cp config.dist.yml config.prod.yml

Then add your default configs. You probably wondering how the following configs even work! let's pick one and explain.

The item mode: ${RABBIT_APP_MODE:-dev} means that the mode is dev unless environment variable RABBIT_APP_MODE is defined. so you can always override the value by defining the environment variable export RABBIT_APP_MODE=prod. and same for others

# General App Configs
app:
    # Env mode (dev or prod)
    mode: ${RABBIT_APP_MODE:-dev}
    # HTTP port
    port: ${RABBIT_APP_PORT:-8080}
    # App URL
    domain: ${RABBIT_APP_DOMAIN:-http://127.0.0.1:8080}
    # TLS configs
    tls:
        status: ${RABBIT_APP_TLS_STATUS:-off}
        pemPath: ${RABBIT_APP_TLS_PEMPATH:-cert/server.pem}
        keyPath: ${RABBIT_APP_TLS_KEYPATH:-cert/server.key}

# Redis Configs
redis:
    addr: ${RABBIT_REDIS_ADDR:-localhost:6379}
    password: ${RABBIT_REDIS_PASSWORD:- }
    db: ${RABBIT_REDIS_DB:-0}

# Message Broker Configs
broker:
    # Broker driver (native or redis)
    driver: ${RABBIT_BROKER_DRIVER:-native}
    # Native driver configs
    native:
        # Queue max capacity
        capacity: ${RABBIT_BROKER_NATIVE_CAPACITY:-50}
        # Number of concurrent workers
        workers: ${RABBIT_BROKER_NATIVE_WORKERS:-1}
    # Redis configs
    redis:
        channel: ${RABBIT_BROKER_REDIS_CHANNEL:-rabbit}

# Log configs
log:
    # Log level, it can be debug, info, warn, error, panic, fatal
    level:  ${RABBIT_LOG_LEVEL:-warn}
    # output can be stdout or abs path to log file /var/logs/rabbit.log
    output:  ${RABBIT_LOG_OUTPUT:-stdout}
    # Format can be json
    format:  ${RABBIT_LOG_FORMAT:-json}

# Release configs
releases:
    # Releases absolute path
    path: ${RABBIT_RELEASES_PATH:-/app/var/releases}
    name: ${RABBIT_RELEASES_NAME:-"[.Tag]"}

# Build configs
build:
    # Build absolute path
    path: ${RABBIT_BUILD_PATH:-/app/var/build}
    # Number of parallel builds
    parallelism: ${RABBIT_BUILD_PARALLELISM:-1}

# Application Database
database:
    # Database driver (redis)
    driver: ${RABBIT_DATABASE_DRIVER:-redis}
    # Redis
    redis:
        hash_prefix: ${RABBIT_DATABASE_REDIS_HASH_PREFIX:-rabbit_}

# Third Party API Integration
integrations:
    # Github Configs
    github:
        # Webhook URI (Full URL will be app.domain + webhook_uri)
        webhook_uri: ${RABBIT_INTEGRATION_GITHUB_WEBHOOK_URI:-/webhook/github}
        # Webhook Secret (From Repo settings page > Webhooks)
        webhook_secret: ${RABBIT_INTEGRATION_GITHUB_WEBHOOK_SECRET:- }
        # whether to use ssh or https to clone
        clone_with: ${RABBIT_INTEGRATION_GITHUB_CLONE_WITH:-https}
        # HTTPS URL format, Full name will be something like Clivern/Rabbit
        https_format: ${RABBIT_INTEGRATION_GITHUB_HTTPS_FORMAT:-https://github.com/[.RepoFullName].git}
        # SSH URL format, Full name will be something like Clivern/Rabbit
        ssh_format: ${RABBIT_INTEGRATION_GITHUB_SSH_FORMAT:[email protected]:[.RepoFullName].git}
    # Bitbucket Configs
    bitbucket:
        # Webhook URI (Full URL will be app.domain + webhook_uri)
        webhook_uri: ${RABBIT_INTEGRATION_BITBUCKET_WEBHOOK_URI:-/webhook/bitbucket}
        # whether to use ssh or https to clone
        clone_with: ${RABBIT_INTEGRATION_BITBUCKET_CLONE_WITH:-https}
        # HTTPS URL format, Full name will be something like Clivern/Rabbit
        https_format: ${RABBIT_INTEGRATION_BITBUCKET_HTTPS_FORMAT:-https://bitbucket.org/[.RepoFullName].git}
        # SSH URL format, Full name will be something like Clivern/Rabbit
        ssh_format: ${RABBIT_INTEGRATION_BITBUCKET_SSH_FORMAT:[email protected]:[.RepoFullName].git}
    bitbucket_server:
        # Webhook URI (Full URL will be app.domain + webhook_uri)
        webhook_uri: ${RABBIT_INTEGRATION_BITBUCKET_SERVER_WEBHOOK_URI:-/webhook/bitbucket-server}
        # Webhook Secret (From Repo settings page > Webhooks)
        webhook_secret: ${RABBIT_INTEGRATION_BITBUCKET_SERVER_WEBHOOK_SECRET:- }
        # whether to use ssh or https to clone
        clone_with: ${RABBIT_INTEGRATION_BITBUCKET_SERVER_CLONE_WITH:-https}
        # HTTPS URL format, Full name will be something like Clivern/Rabbit
        https_format: ${RABBIT_INTEGRATION_BITBUCKET_SERVER_HTTPS_FORMAT:-https://git.bitbucket.com/scm/[.RepoFullName].git}
        # SSH URL format, Full name will be something like Clivern/Rabbit
        ssh_format: ${RABBIT_INTEGRATION_BITBUCKET_SERVER_SSH_FORMAT:-ssh://[email protected]/[.RepoFullName].git}
    gitlab:
        # Webhook URI (Full URL will be app.domain + webhook_uri)
        webhook_uri: ${RABBIT_INTEGRATION_GITLAB_WEBHOOK_URI:-/webhook/gitlab}
        # Webhook Secret (From Repo settings page > Webhooks)
        webhook_secret: ${RABBIT_INTEGRATION_GITLAB_WEBHOOK_SECRET:- }
        # whether to use ssh or https to clone
        clone_with: ${RABBIT_INTEGRATION_GITLAB_CLONE_WITH:-https}
        # HTTPS URL format, Full name will be something like Clivern/Rabbit
        https_format: ${RABBIT_INTEGRATION_GITLAB_HTTPS_FORMAT:-https://gitlab.com/[.RepoFullName].git}
        # SSH URL format, Full name will be something like Clivern/Rabbit
        ssh_format: ${RABBIT_INTEGRATION_GITLAB_SSH_FORMAT:[email protected]:[.RepoFullName].git}

And then run the application.

$ go build rabbit.go
$ ./rabbit

// OR

$ go run rabbit.go

// To Provide a custom config file
$ ./rabbit -config=/custom/path/config.prod.yml
$ go run rabbit.go -config=/custom/path/config.prod.yml

Deployment

Rabbit needs a decent resources to be able to work properly because the build process itself done by goreleaser and it consumes a lot. So keep build.parallelism equal 1 and increase if you have more resources and would like to speed the build process.

On a Linux Server

Make sure you have git, golang 1.12 and goreleaser installed, and make goreleaser executable from everywhere.

# To download the latest goreleaser binary for linux (https://github.com/goreleaser/goreleaser/releases)
$ curl -sL https://github.com/goreleaser/goreleaser/releases/download/v0.116.0/goreleaser_Linux_x86_64.tar.gz | tar xz

Also make sure you are able to clone all your repositories in a non-interactive way. Just configure ssh-key and add the remote VCS to your known hosts.

Then download the latest Rabbit binary.

$ curl -sL https://github.com/Clivern/Rabbit/releases/download/x.x.x/rabbit_x.x.x_OS.tar.gz | tar xz

Create your config file as explained before on development part and run rabbit with systemd or anything else you prefer.

$ ./rabbit -config=/custom/path/config.prod.yml

On Docker

Running rabbit with docker-compose is pretty straightforward.

$ git clone https://github.com/Clivern/Rabbit.git
$ cd Rabbit/deployments/docker
$ docker-compose build
$ docker-compose up -d

Docker will mount you host server ~/.ssh directory in order to be able to clone repositories that need ssh key. Please make sure it has the right permissions and also remote VCS added to known hosts. otherwise rabbit will stuck on git interactive clone.

Versioning

For transparency into our release cycle and in striving to maintain backward compatibility, Rabbit is maintained under the Semantic Versioning guidelines and release process is predictable and business-friendly.

See the Releases section of our GitHub project for changelogs for each release version of Rabbit. It contains summaries of the most noteworthy changes made in each release.

Bug tracker

If you have any suggestions, bug reports, or annoyances please report them to our issue tracker at https://github.com/clivern/rabbit/issues

Security Issues

If you discover a security vulnerability within Rabbit, please send an email to [email protected]

Contributing

We are an open source, community-driven project so please feel free to join us. see the contributing guidelines for more details.

License

© 2019, Clivern. Released under MIT License.

Rabbit is authored and maintained by @Clivern.

More Repositories

1

Beaver

💨 A real time messaging system to build a scalable in-app notifications, multiplayer games, chat apps in web and mobile apps.
Go
1,439
star
2

Peanut

🐺 Deploy Databases and Services Easily for Development and Testing Pipelines.
Go
698
star
3

Walrus

🔥 Fast, Secure and Reliable System Backup, Set up in Minutes.
Go
458
star
4

Gauntlet

🔖 Guides, Articles, Podcasts, Videos and Notes to Build Reliable Large-Scale Distributed Systems.
430
star
5

Beetle

🔥 Kubernetes multi-cluster deployment automation service.
Go
163
star
6

Hippo

💨A well crafted go packages that help you build robust, reliable, maintainable microservices.
Go
143
star
7

Poodle

🔥 A fast and beautiful command line tool to build API requests.
Go
135
star
8

Cattle

🐺 Platform to Run and Share Code. It Supports PHP, Python, Ruby, Elixir, Java, Go, Rust, C and C++.
Python
60
star
9

Buzzard

🦀 Learning Rust by Examples.
Rust
57
star
10

Hamster

🐀 A Bot toolkit for github that supports OAuth, Events, API, Custom Commands and Check Runs.
Go
41
star
11

Chunk

🐺 Asynchronous Task Queue Based on Distributed Message Passing for PHP.
PHP
36
star
12

Rhino

❄️ HTTP Mocking & Debugging Service.
Go
31
star
13

Imap

📬 Access Mailbox Using PHP IMAP.
PHP
29
star
14

Racter

🐊 A Java Framework for Building Bots on Facebook's Messenger Platform.
Java
18
star
15

terraform-provider-boilerplate

🏄Terraform Provider Boilerplate.
Go
17
star
16

Cluster

Golang Package for System Clustering.
Go
15
star
17

Laravel-CSV-Export

🔎 Export a Large Dataset in CSV Format.
PHP
13
star
18

PyLogging

🏉 Python Logging Library
Python
12
star
19

file_uploader

🗿 PHP File Uploader Package
PHP
12
star
20

Chaos

🐺 A Server Chaos Maker, Set up in Minutes.
Go
11
star
21

wit-java

🗿Java Library For Wit.ai
Java
11
star
22

generator-goapi

🐙 Yeoman Generator for Golang Microservices.
Go
6
star
23

Observability-php-sdk

🐺 Observability SDK for PHP Applications.
PHP
6
star
24

Bull

📦Microservices Playground with Symfony 4.
PHP
5
star
25

Apes

💨Chaos and Resiliency Testing Service.
Go
5
star
26

ghbot

🤖 Github Follow Bot in Python.
Python
5
star
27

Kraven

💮 A SaaS docker management dashboard to manage your docker containers, images, volumes, networks and much more!
Python
5
star
28

Pindo

🐺 Securely Build and Run Code in Docker.
Python
5
star
29

arduino_exporter

🐺 Arduino Prometheus Exporter.
Python
4
star
30

Mammal

🐺 A Sample Microservice.
Go
3
star
31

PyArchiver

Python Compression and Archiving Library
Python
3
star
32

Kevin

🐺 Web Application to Inspect HTTP Requests & Build Custom Endpoints.
Python
3
star
33

Glove

🐺 Prometheus Exporter Boilerplate.
Go
3
star
34

Bucket

Consistent Hashing Algorithm Package for Scalable Data Distribution
Java
3
star
35

pushover-actions

🧬 Push notifications for github repository changes through pushover.
Go
3
star
36

Jarvis

👻The Hitchhiker's Guide To Go Language
Go
3
star
37

Redis-PubSub

Build Realtime Apps With Redis PubSub
HTML
2
star
38

Koala

🧬 Kubernetes Playground for Testing Purposes.
Go
2
star
39

Snippets

🍫 Sublime Text Snippets.
Shell
2
star
40

MongoPlaybook

📚 It's worth to give it a try
2
star
41

Toad

❄️ Containerized Application for Testing Purposes.
Go
2
star
42

Memcached

Memcached Client for PHP.
PHP
2
star
43

Monkey

🐵 Apache CloudStack SDK in PHP that supports sync calls, async calls and multiple dependent calls.
PHP
2
star
44

generator-gopkg

🐙 Yeoman Generator for Golang Packages.
JavaScript
2
star
45

fast-yt-videos

A WordPress Plugin That Increase Youtube Videos Loading Time
PHP
2
star
46

Walnut

📧 Async Transactional Email Service.
PHP
1
star
47

Dunk

How to Create a Facebook Messenger Bot With Java
Java
1
star
48

Beagle

Symfony Applications Boilerplate.
PHP
1
star
49

Polars

A Ruby SDK for Different Linux Operating System Distributions.
Ruby
1
star
50

Thanos

🔥53 77 69 73 73 20 4b 6e 69 66 65 21
Python
1
star
51

Events

ES tryout with Symfony 5
PHP
1
star
52

Kemet

My dotfiles.
Shell
1
star
53

PyHusky

🐺 Python Role Based Permissions Library.
Python
1
star
54

Weasel

🐺 Modern Command Line Tool for Apache Kafka.
Go
1
star
55

Oxygen

🐺 Ansible Collection to Deploy A Reliable PHP Services.
Jinja
1
star
56

Fred

🐉 A Java Framework for Building Slack Bots.
Java
1
star
57

Trent

Experimental Chatbots With Java & Play Framework
Java
1
star
58

beaver.js

A JavaScript client for beaver, the real time messaging system.
TypeScript
1
star
59

LWT

🐺 Simple ERP Application Skeleton In Symfony 3.3.9.
PHP
1
star
60

Bear

A WordPress Themes Boilerplate.
PHP
1
star
61

Minion

Single Page Application Boilerplate.
TypeScript
1
star
62

Kevin-Cookbook

🐙A Chef Cookbook To Deploy Kevin on Linux Servers.
Ruby
1
star
63

Frog

🐸 A Java Framework for Social Sign In.
Java
1
star
64

terraform-provider-beetle

🔥 Beetle Terraform Provider.
Go
1
star
65

Alligator

🐊 Golang Package Boilerplate.
Makefile
1
star
66

Mantis

A Minimalist ORM for Python
Python
1
star