beixinjing / enseada

A Cloud native multi-package registry

Home Page:https://enseada.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enseada

A Cloud native multi-package registry

version build status docker pulls license maintainability test coverage Go Report Card Discord Badge

logo

Enseada is a modern, fast and scalable package registry, designed from the ground up to run in elastic, container-based environments and to be highly available and distributed.

It leverages scalability by using natively distributed technologies.

Check out the official documentation for a complete manual of operation.

Features

The registry itself is written in Golang, a fast, resource efficient and statically compiled programming language built for the Cloud.

CouchDB is used as the primary datastore, containing information about repositories, users and access control. CouchDB is a web-native database written in Erlang and based on web technologies like HTTP and JSON.

Both local disks an object storage services are supported, altough the latter are strongly recommended for production deployments.

Supported package repositories

Enseada is a multi-package registry, meaning it can support a large number of package formats and registry APIs.

At the moment, the following formats are supported:

Supported storage providers

The storage layer used by Enseada provides pluggable backends, allowing to easily support multiple storage providers. See the configuration guide for how to setup the storage layer.

At the moment, only these providers are supported:

  • S3 compatible (AWS S3, Minio, DigitalOcean Spaces, Scaleway Object Storage, Ceph, etc)
  • Google Cloud Storage
  • Microsoft Azure Blobs
  • Local disk

Local disk is only supported in single-node mode. To run multiple instances use an object storage provider.

HTTPS and HTTP/2 support

Enseada has full support for strict HTTPS, enabling it is very simple.

Passing the environment value SSL=yes|true|active (or any kind of non-empty value) will turn on HTTPS on the entire application (with HSTS enabled). This will require two additional environment variables.

## The path to the key file
SSL_KEY_PATH=nil

## The path to the certificate file
SSL_CERT_PATH=nil

When HTTPS is active, Enseada switches automatically to HTTP/2. You can check the active protocol by looking at the response body of the GET /health endpoint:

{
    "status": "UP",
    "protocol": "HTTP/2.0",
    "host": "localhost:9623",
    "remote": "[::1]:46558",
    "method": "GET",
    "path": "/health"
}

Build

Enseada is built as a statically linked executable. If you have Make installed, you can build a new executable from sources by simply running make build-server from the root folder and then running bin/enseada-server.

The following tasks are available:

$ make help

all                      Build standalone server binary (default)
build-server             Build server binary
build-client             Build client binary
test-bench               Run benchmarks
test-short               Run only short tests
test-verbose             Run tests in verbose mode with coverage reporting
check test tests         Run tests
test-xml                 Run tests with xUnit output
test-coverage            Run coverage tests
lint                     Run golint
fmt                      Run gofmt on all source files
vet                      Run go vet on all source files
imports                  Run goimports on all source files
build-standalone-server  Build server binary with embedded static assets
web                      Build web assets with Webpack
rpc                      Generate RPC code
deps                     Install dependencies
clean                    Cleanup everything
update-license           Update license headers
install-hooks            Install git hooks

Enseada is also packaged as a Docker image. Build one with docker build -t myname/enseada:latest .

Web UI

Enseada comes with a management web UI. To build it from sources, NodeJS and Yarn are required.

Execute the following commands to build the static assets.

# Go the the web directory
cd web

# Install all dependencies
yarn install

# Build for development (all stylesheets, no minification)
yarn build

# Build for production (minimal stylesheets, minification)
yarn build:prod

To build assets for production, you can also run make web that will do everything for you.

Enseada will pick them up on its own. To embed them into the final executable using go.rice run make build-standalone-server.

Local Database

A local CouchDB instance can be started using the provided docker-compose.yml file. Simply run docker-compose up -d to start it in background, it will be available on http://localhost:5984 and will persist data in a Docker volume.

Upon first run, the database server is uninitialized. Please run the initialization setup for single node deployment by visiting http://localhost:5984/_utils/#setup and following the instructions.

Local Minio Server

A local Minio server can be started using the provided docker-compose.yml file. Simply run docker-compose up -d to start it in background, it will be available on http://localhost:9000 and will persist data in a Docker volume.

Upon first run no bucket is present. Create a new one and configure the name in the appropriate environment variable in the Enseada configuration.

Security Policy

If you want to report a security vulnerability, please follow the steps which we have defined for you in our security policy.

Chat

Need some help or want to have a chat? Join our Discord server!
Discord Banner

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

About

A Cloud native multi-package registry

https://enseada.io

License:Mozilla Public License 2.0


Languages

Language:Go 96.4%Language:HTML 1.6%Language:Makefile 1.3%Language:JavaScript 0.4%Language:Dockerfile 0.1%Language:Shell 0.1%Language:CSS 0.0%Language:Roff 0.0%