GitHub's ops focused Elasticsearch library
Перейти к файлу
Nicholas Canzoneri 8cf6c8baf9 Add a shared backup volume so that integration tests can test snapshots/backups 2018-12-05 14:39:28 -05:00
cmd/vulcanizer Convert drain/fill api endpoints to return errors 2018-09-14 15:03:56 -04:00
integration_data Add a shared backup volume so that integration tests can test snapshots/backups 2018-12-05 14:39:28 -05:00
script Add a shared backup volume so that integration tests can test snapshots/backups 2018-12-05 14:39:28 -05:00
vendor Implement the first few commands in the command line app and update the README with the current implementation status 2018-08-23 10:55:01 -04:00
.gitignore - Changed all t.FatalF to st.Errorf. We shouldn't fatal error on tests, just unless they are setup/teardown type of issues. 2018-08-29 17:26:43 -06:00
Brewfile Add initial codefiles 2018-08-13 11:24:15 -04:00
CODE_OF_CONDUCT.md Add a code of conduct 2018-08-13 10:44:03 -04:00
CONTRIBUTING.md Finalize the name of the package as vulcanizer 2018-08-21 16:34:03 -04:00
Gopkg.lock Implement the first few commands in the command line app and update the README with the current implementation status 2018-08-23 10:55:01 -04:00
Gopkg.toml Implement the first few commands in the command line app and update the README with the current implementation status 2018-08-23 10:55:01 -04:00
LICENSE Initial commit 2018-08-13 10:33:30 -04:00
README.md Add a roadmap document for future releases. 2018-09-19 10:58:14 -04:00
ROADMAP.md Update roadmap doc 2018-10-29 16:59:11 -04:00
es.go Add 10 min timeout for deleting snapshots 2018-10-29 16:44:35 -04:00
es_test.go Add methods to delete snapshots and verify repositories 2018-10-11 11:56:54 -04:00
integration_test.go Add a shared backup volume so that integration tests can test snapshots/backups 2018-12-05 14:39:28 -05:00
util.go Make helper function non-exported 2018-09-14 15:05:54 -04:00
util_test.go Add test for combineErrors helper method 2018-09-17 10:13:03 -04:00

README.md

vulcanizer

GitHub's ops focused Elasticsearch library

This project is a golang library for interacting with an Elasticsearch cluster. It's goal is to provide a high level API to help with common tasks that are associated with operating an Elasticsearch cluster such as querying health status of the cluster, migrating data off of nodes, updating cluster settings, etc.

This project does not aim to be a fully-featured API client for querying or indexing to Elasticsearch.

Go API

You can perform custom operations in your Go application.

import "github.com/github/vulcanizer"

v = vulcanizer.NewClient("localhost", 9200)
oldSetting, newSetting, err := v.SetSetting("indices.recovery.max_bytes_per_sec", "1000mb")

Command line application

This project produces a vulcanizer binary that is a command line application that can be used to manage your Elasticsearch cluster.

$ vulcanizer -h
Usage:
  vulcanizer [command]

Available Commands:
  allocation  Set shard allocation on the cluster.
  drain       Drain a server or see what servers are draining.
  fill        Fill servers with data, removing shard allocation exclusion rules.
  health      Display the health of the cluster.
  help        Help about any command
  indices     Display the indices of the cluster.
  nodes       Display the nodes of the cluster.
  setting     Interact with cluster settings.
  settings    Display all the settings of the cluster.
  snapshot    Interact with a specific snapshot.
  snapshots   Display the snapshots of the cluster.

Flags:
  -c, --cluster string      Cluster to connect to defined in config file
  -f, --configFile string   Configuration file to read in (default to "~/.vulcanizer.yaml")
  -h, --help                help for vulcanizer
      --host string         Host to connect to (default "localhost")
  -p, --port int            Port to connect to (default 9200)

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

Roadmap and future releases

The proposed future for vulcanizer can be found in our ROADMAP.

Configuration and connection information

All commands take --cluster <name> to look up information in a configuration file in ~/.vulcanizer.yaml. The configuration should be in the form of

local:
  host: localhost
  port: 9200
staging:
  host: 10.10.2.1
  port: 9201
production:
  host: 10.10.1.1
  port: 9202

Alternatively, all commands take --host and --port for the connection information.

For example:

# Query for cluster health on the "local" cluster
vulcanizer health --cluster local

# Query for nodes against the node 10.10.2.1 and port 9202
vulcanizer nodes --host 10.10.2.1 --port 9202

Development

./script/build will compile the project and install the vulcanizer binary to $GOPATH/bin.

./script/test will run the tests in the project.

Supported Elasticsearch versions

To be determined

Name

Vulcanization is the process of making rubber more elastic, so vulcanizer is the library that makes Elasticsearch easier to work with!

Project status

This project is under active development.

Contributing

This repository is open to contributions. Please also see code of conduct

To get up and running, install the project into your $GOPATH and run the set up scripts.

go get github.com/github/vulcanizer

cd $GOPATH/src/github.com/github/vulcanizer

./script/bootstrap
./script/test

And the test suite should execute correctly.

License

This project is released under the MIT LICENSE. Please note it includes 3rd party dependencies release under their own licenses; these are found under vendor. When using the GitHub logos, be sure to follow the GitHub logo guidelines.

Authors

Authored by GitHub Engineering