Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yuuki/binrep
The static binary repository manager
https://github.com/yuuki/binrep
artifact-repository-manager aws-s3 binary-repository-manager go repository
Last synced: 14 days ago
JSON representation
The static binary repository manager
- Host: GitHub
- URL: https://github.com/yuuki/binrep
- Owner: yuuki
- License: mit
- Created: 2017-10-12T11:34:33.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-10T15:50:26.000Z (about 7 years ago)
- Last Synced: 2024-06-20T11:07:40.955Z (6 months ago)
- Topics: artifact-repository-manager, aws-s3, binary-repository-manager, go, repository
- Language: Go
- Homepage:
- Size: 7.94 MB
- Stars: 12
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Binrep
======[![Build Status](https://travis-ci.org/yuuki/binrep.png?branch=master)][travis]
[![Go Report Card](https://goreportcard.com/badge/github.com/yuuki/droot)][goreportcard]
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)][license][travis]: https://travis-ci.org/yuuki/binrep
[goreportcard]: (https://goreportcard.com/report/github.com/yuuki/binrep)
[license]: https://github.com/yuuki/binrep/blob/master/LICENSEBinrep is the static binary repository manager that uses Amazon S3 as file storage.
# Overview
`binrep` provides a simple way to store and deploy static binary files such as Go binaries, tarballs, images and web assets(css/javascript). `binrep` just pushes static binary files into a S3 bucket with directory layouts like `go get` does, and pulls the binaries from the bucket.
The deployment of (private) tools written by Go takes a lot more works, especially in the environment that has many servers, than that of LL scripts in a single file such as shell script, Perl, Python, Ruby). Git is an informat approach to the deployment, but git is not for binary management. The next approach is a package manager such apt or yum, but it takes a lot of trouble to make packages. The other approach is just to use a HTTP file server including S3, but it needs uniform and accessible location of binary files and the version management. There, `binrep` resolves the problems of static binary management.
## Features
The following features will be supported.
- Amazon S3 as storage backend
- directory layout `//` like `go get` and [ghq](https://github.com/motemen/ghq) do
- version management like [Capistrano](http://capistranorb.com/)
- limitable network bandwidthThe following features will **not** be supported.
- dependency management, that is supported by popular package managers such as Apt, Yum and Rubygems
# Usage
## Prepareation
- Create S3 bucket for `binrep`.
- Install `binrep` binary, see https://github.com/yuuki/binrep/releases .### Getting the latest version
```sh
$ curl -fsSL https://raw.githubusercontent.com/yuuki/binrep/master/scripts/install_latest_binary | bash /dev/stdin $GOOS $GOARCH | tar --exclude 'README.md' --exclude 'LICENSE' -xzf - -C /usr/local/bin/
```- GOOS: 'linux' or 'darwin'
- GOARCH: '386' or 'amd64'## Set AWS environment
```sh
export AWS_REGION=us-east-1
export AWS_PROFILE=[your profile]
```or
```sh
export AWS_REGION=us-east-1
export AWS_ACCESS_KEY_ID=[your access key]
export AWS_SECRET_ACCESS_KEY=[your secret key]
```## Set backend endpoint
```sh
export BINREP_BACKEND_ENDPOINT='s3://binrep-bucket'
```or `binrep --endpoint 's3://binrep-bucket' ...`
## Commands
### list
```sh
$ binrep list github.com/fujiwara/stretcher/20171013135903/
github.com/fujiwara/stretcher/20171014110009/
github.com/motemen/ghq/20171013140424/
github.com/yuuki/droot/20171017152626/
github.com/yuuki/droot/20171018125535/
github.com/yuuki/droot/20171019204009/
...
```### show
```sh
$ binrep show github.com/yuuki/droot
NAME TIMESTAMP BINNARY1
github.com/yuuki/droot 20171019204009 droot//2e6ccc3
```### push
```sh
$ binrep push github.com/yuuki/droot ./droot
--> Uploading [./droot] to s3://binrep-bucket/github.com/yuuki/droot/20171020152356
Uploaded to s3://binrep-bucket/github.com/yuuki/droot/20171020152356
--> Cleaning up the old releases
Cleaned up 20171017152626
````push` supports to push multiple binary files.
### pull
```sh
$ binrep pull github.com/yuuki/droot /usr/local/bin
--> Downloading s3://binrep-bucket/github.com/yuuki/binrep/20171019204009 to /usr/local/bin
```# Directory layout on S3 bucket
```
s3:///////
--
-- meta.yml
```The example below.
```
s3://binrep-repository/
|-- github.com/
-- yuuki/
-- droot/
-- 20171013080011/
-- droot
-- meta.yml
-- 20171014102929/
-- droot
-- meta.yml
-- prometheus/
-- prometheus/
-- 20171012081234/
-- meta.yml
-- prometheus
-- promtool
|-- ghe.internal/
-- opsteam/
-- tools
-- 20171010071022/
-- ec2_bootstrap
-- ec2_build_ami
-- meta.yml
-- mysql_create_slave_snapshot```
# Terms
- `release`: `////`
# How to release
binrep uses the following tools for the artifact release.
- [goreleaser](https://goreleaser.com/)
- [gobump](https://github.com/motemen/gobump)
- [ghch](https://github.com/Songmu/ghch)```sh
make release
```# License
[The MIT License](./LICENSE).
# Author
[y_uuki](https://github.com/yuuki)