Giter Site home page Giter Site logo

syncer's Introduction

Syncer

go-test go-report license release download last-release

Features

  • Support many-to-many registry synchronization
  • Support many-to-many git repository synchronization
  • Look forward to more features with anticipation

Install

install with homebrew

brew install mr5356/brew/syncer

install with binary

you can download the latest binary release here

install form source

git clone https://github.com/MR5356/syncer.git
cd syncer
make all

Usage

[root@toodo ~] ./syncer -h

Usage:
  syncer [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  git         A git repo sync tool
  help        Help about any command
  image       A registry image sync tool

Flags:
  -d, --debug     enable debug mode
  -h, --help      help for syncer
  -v, --version   version for syncer

Use "syncer [command] --help" for more information about a command.

Commands

image

[root@toodo ~] ./syncer image -h

A registry image sync tool implement by Go.

Complete code is available at https://github.com/Mr5356/syncer

Usage:
  syncer image [flags]

Flags:
  -c, --config string   config file path
  -d, --debug           enable debug mode
  -h, --help            help for image
  -p, --proc int        process num (default 10)
  -r, --retries int     retries num (default 3)
  -v, --version         version for image

config file example

Configuration files support yaml and JSON formats

auth:
  registry.cn-hangzhou.aliyuncs.com:
    username: your_name
    password: your_password
    insecure: false
  docker.io:
    username: your_name
    password: your_password
    insecure: false
# 镜像同步任务列表
images:
  # 该镜像的所有标签将会进行同步
  registry.cn-hangzhou.aliyuncs.com/toodo/alpine: registry.cn-hangzhou.aliyuncs.com/toodo/test
  # 该镜像会同步到目标仓库,并使用新的tag
  alpine@sha256:1fd62556954250bac80d601a196bb7fd480ceba7c10e94dd8fd4c6d1c08783d5: registry.cn-hangzhou.aliyuncs.com/toodo/test:alpine-latest
  # 该镜像会同步至多个目标仓库,如果目标镜像没有填写tag,将会使用源镜像tag
  alpine:latest:
    - hub1.test.com/library/alpine
    - hub2.test.com/library/alpine
# 最大并行数量
proc: 3
# 最大失败重试次数
retries: 3

run image sync tool

[root@toodo ~] ./syncer image -c config.yaml

git

[root@toodo ~] ./syncer git -h

A git repo sync tool implement by Go.

Complete code is available at https://github.com/Mr5356/syncer

Usage:
  syncer git [flags]

Flags:
  -c, --config string               config file path
  -d, --debug                       enable debug mode
  -h, --help                        help for git
      --privateKeyFile string       private key file
      --privateKeyPassword string   private key file password
  -p, --proc int                    process num (default 10)
  -r, --retries int                 retries num (default 3)
  -v, --version                     version for git

config file example

Configuration files support yaml and JSON formats

# 最大并行数量
proc: 5
# 最大失败重试次数
retries: 3
# 私钥文件地址
privateKeyFile: /etc/.ssh/known_hosts
# 私钥密码
privateKeyPassword: "password"

# 仓库同步任务列表
repos:
  # 将仓库同步到目标仓库
  [email protected]:DockerContainerService/git-syncer.git: [email protected]:MR5356/syncer-1.git
  # 将仓库同步到多个目标仓库
  [email protected]:MR5356/syncer.git: 
    - [email protected]:MR5356/syncer-1.git
    - [email protected]:MR5356/syncer-1.git

run git sync tool

[root@toodo ~] ./syncer git -c config.yaml

Star History

Star History Chart

syncer's People

Contributors

mr5356 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.