Sign inSign up

blippar/git2etcd

By blippar

•Updated over 8 years ago

Mirrors the contents of a git repository into etcd key-value store. Inspired from git2consul.

Image
2

4.1K

blippar/git2etcd repository overview

⁠git2etcd

Go Report Card GoDoc GitHub release LICENSE

Simple binary to sync a Git repository with an etcd config. Built and tested with Go 1.4+

⁠Installing

⁠Docker
docker pull blippar/git2etcd
⁠Manually
go get github.com/blippar/git2etcd

⁠Configuring

KeyDescriptionDefault
host.listenHost to listen to""
host.portPort to listen to"4242"
host.hookName of the Webhook endpoint"hook"
repo.urlURL of the repo to sync"https://github.com/blippar/git2etcd.git"
repo.branchBranch of the repo to sync"master"
repo.pathPath where to clone the repo"data/"
repo.synccycleNumber of seconds between 2 automatic syncs (if 0, never syncs)3600
etcd.hostsList of etcd hosts["http://127.0.0.1:2379"]
auth.typeType of authentication for Gitn/a
auth.ssh.keyPath to the SSH private key (if ssh auth type)n/a
auth.ssh.publicPath to the SSH public key (if ssh auth type)n/a
auth.http.usernameUsername (if http auth type)n/a
auth.http.passwordPassword (if http auth type)n/a
⁠JSON file

You can use a JSON config file that you would put either in current folder or in a folder you can precise with the -conf_dir flag.

{
  "host": {
    "listen": "",
    "port": "4242",
    "hook": "hook"
  },
  "repo": {
    "url": "[email protected]:blippar/git2etcd.git",
    "branch": "master",
    "path": "/opt/git2etcd/repo"
  },
  "etcd": {
    "hosts": [
      "http://127.0.0.1:2379"
    ]
  },
  "auth": {
    "type": "ssh",
    "ssh": {
      "key": "/home/user/.ssh/id_rsa"
    }
  }
}

I don't speak JSON !

Well, you can use TOML, YAML, HCL ...

⁠Env vars

Who needs a file when you can use environment variables ? host.port can be G2E_HOST_POST and so on.

⁠Contributing

We'd love to get your feedback with issues⁠ or even pull requests⁠.

⁠Authors

Tag summary

Content type

Image

Digest

Size

17.1 MB

Last updated

over 8 years ago

docker pull blippar/git2etcd