From db245628ec15b05f33dd50923cf43558c996ffae Mon Sep 17 00:00:00 2001 From: DeDe Morton Date: Wed, 31 May 2017 01:46:02 -0700 Subject: [PATCH] Remove duplicated content about contributing to beats (#4424) --- CONTRIBUTING.md | 111 +--------------------------- docs/devguide/contributing.asciidoc | 25 +++---- 2 files changed, 13 insertions(+), 123 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 834af9dc68e7..d9f728a1791a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,112 +11,7 @@ There are many ways to contribute, from writing tutorials or blog posts, improving the documentation, submitting bug reports and feature requests or writing code for implementing a whole new protocol. -If you have a bugfix or new feature that you would like to contribute, please -start by opening a topic on the [forums](https://discuss.elastic.co/c/beats). -It may be that somebody is already working on it, or that there are particular -issues that you should know about before implementing the change. +If you want to contribute to the Beats project, you can start by reading +the [contributing guidelines](https://www.elastic.co/guide/en/beats/devguide/current/beats-contributing.html) +in the _Beats Developer Guide_. -We enjoy working with contributors to get their code accepted. There are many -approaches to fixing a problem and it is important to find the best approach -before writing too much code. - -The process for contributing to any of the Elastic repositories is similar. - -## Contribution Steps - -1. Please make sure you have signed our [Contributor License - Agreement](https://www.elastic.co/contributor-agreement/). We are not - asking you to assign copyright to us, but to give us the right to distribute - your code without restriction. We ask this of all contributors in order to - assure our users of the origin and continuing existence of the code. You - only need to sign the CLA once. -2. Send a pull request! Push your changes to your fork of the repository and - [submit a pull - request](https://help.github.com/articles/using-pull-requests). In the pull - request, describe what your changes do and mention any bugs/issues related - to the pull request. - - -## Adding a new Beat - -If you want to create a new Beat, please read our [developer -guide](https://www.elastic.co/guide/en/beats/libbeat/current/new-beat.html). -You don't need to submit the code to this repository. Most new Beats start in -their own repository and just make use of the libbeat packages. After you have -a working Beat that you'd like to share with others, open a PR to add it to our -list of [community -Beats](https://github.com/elastic/beats/blob/master/libbeat/docs/communitybeats.asciidoc). - -## Setting up your dev environment - -The Beats are Go programs, so install the latest version of -[golang](http://golang.org/) if you don't have it already. The current Go version -used for development is Golang 1.8.3. - -The location where you clone is important. Please clone under the source -directory of your `GOPATH`. If you don't have `GOPATH` already set, you can -simply set it to the `go` directory in your home (`export GOPATH=$HOME/go`). - - $ mkdir -p ${GOPATH}/src/github.com/elastic - $ cd ${GOPATH}/src/github.com/elastic - $ git clone https://github.com/elastic/beats.git - -Note: If you have multiple go paths use `${GOPATH%%:*}`instead of `${GOPATH}`. - -Then you can compile a particular Beat by using the Makefile. For example, for -Packetbeat: - - $ cd beats/packetbeat - $ make - -Some of the Beats might have extra development requirements, in which case you'll find a -CONTRIBUTING.md file in the Beat directory. - -We use an [EditorConfig](http://editorconfig.org/) file in the beats repository to standardise -how different editors handle whitespace, line endings, and other coding styles in our files. Most popular editors have a -[plugin](http://editorconfig.org/#download) for EditorConfig and we strongly recommend that you install it. - -## Update scripts - -The Beats use a variety of scripts based on Python to generate configuration files -and documentation. The command used for this is: - - $ make update - -This command has the following dependencies: - -* Python >=2.7.9 -* [virtualenv](https://virtualenv.pypa.io/en/latest/) for Python - -Virtualenv can be installed with the command `easy_install virtualenv` or `pip install virtualenv`. -More details can be found [here](https://virtualenv.pypa.io/en/latest/installation.html). - - -## Testing - -You can run the whole testsuite with the following command: - - $ make testsuite - -Running the testsuite has the following requirements: - -* Python >=2.7.9 -* Docker >=1.12 -* Docker-compose >= 1.11 - - -## Documentation - -The documentation for each Beat is located under {beatname}/docs and is based on asciidoc. After changing the docs, -you should verify that the docs are still building to avoid breaking the automated docs build. To build the docs run -`make docs`. If you want to preview the docs for a specific Beat, run `make docs-preview` -inside the folder for the Beat. This will automatically open your browser with the docs for preview. - - -## Dependencies - -To manage the `vendor/` folder we use -[govendor](https://github.com/kardianos/govendor). Please see -the govendor documentation on how to add or update vendored dependencies. - -In most cases `govendor fetch your/dependency@version +out` will get the job done. diff --git a/docs/devguide/contributing.asciidoc b/docs/devguide/contributing.asciidoc index 0c0db2305d84..592915cf743b 100644 --- a/docs/devguide/contributing.asciidoc +++ b/docs/devguide/contributing.asciidoc @@ -1,17 +1,6 @@ [[beats-contributing]] == Contributing to Beats -IMPORTANT: Please post all questions and issues first on -https://discuss.elastic.co/c/beats[https://discuss.elastic.co/c/beats] -before opening a Github Issue. - -The Beats are open source and we love to receive contributions from our -community — you! - -There are many ways to contribute, from writing tutorials or blog posts, -improving the documentation, submitting bug reports and feature requests, or -writing code that implements a whole new protocol, module, or Beat. - If you have a bugfix or new feature that you would like to contribute, please start by opening a topic on the https://discuss.elastic.co/c/beats[forums]. It may be that somebody is already working on it, or that there are particular @@ -43,7 +32,7 @@ related to the pull request. If you want to create a new Beat, please read <>. You don't need to submit the code to this repository. Most new Beats start in their own repository and just make use of the libbeat packages. After you have a working Beat that -you'd like to share with others, open a PR to add it to our list of +you'd like to share with others, open a PR to add it to our list of https://github.com/elastic/beats/blob/master/libbeat/docs/communitybeats.asciidoc[community Beats]. @@ -57,7 +46,7 @@ used for development is Golang {go-version}. The location where you clone is important. Please clone under the source directory of your `GOPATH`. If you don't have `GOPATH` already set, you can -simply set it to your home directory (`export GOPATH=$HOME`). +simply set it to the `go` directory in your home (`export GOPATH=$HOME/go`). [source,shell] -------------------------------------------------------------------------------- @@ -77,8 +66,14 @@ cd beats/packetbeat make -------------------------------------------------------------------------------- -Some of the Beats might have extra development requirements, in which case you'll find a -CONTRIBUTING.md file in the Beat directory. +Some of the Beats might have extra development requirements, in which case +you'll find a CONTRIBUTING.md file in the Beat directory. + +We use an http://editorconfig.org/[EditorConfig] file in the beats repository +to standardise how different editors handle whitespace, line endings, and other +coding styles in our files. Most popular editors have a +http://editorconfig.org/#download[plugin] for EditorConfig and we strongly +recommend that you install it. [float] [[update-scripts]]