Skip to content

doc/dev/developer_guide.md: update dev guide #740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 15, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 30 additions & 10 deletions doc/dev/developer_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,58 @@

This document explains how to setup your dev environment.

## Prerequisites
- [dep][dep_tool] version v0.5.0+
- [git][git_tool]
- [go][go_tool] version v1.10+

## Download Operator SDK

Go to https://github.com/operator-framework/operator-sdk and follow the [fork guide][fork_guide] to fork, clone, and setup the local operator-sdk repository.
Go to the [Operator SDK repo][repo_sdk] and follow the [fork guide][fork_guide] to fork, clone, and setup the local operator-sdk repository.

## Vendor dependencies

We use [dep](https://github.com/golang/dep) to manage dependencies.
Run the following in the project root directory to update the vendored dependencies:

```sh
$ cd $GOPATH/src/github.com/operator-framework/operator-sdk
$ dep ensure
$ make dep
```

## Build the Operator SDK CLI

Requirement:
- Go 1.9+

Build the Operator SDK CLI `operator-sdk` binary:

```sh
# TODO: replace this with the ./build script.
$ go install github.com/operator-framework/operator-sdk/commands/operator-sdk
$ make install
```

## Testing

Run unit tests:

```sh
TODO: use ./test script
$ make test/unit
```

Run all tests:

```sh
$ make test
```

[fork_guide]:https://help.github.com/articles/fork-a-repo/
**Note:** running all tests requires:
- [docker][docker_tool] version 17.03+
- [kubectl][kubectl_tool] version v1.11.0+
- Access to a kubernetes v.1.11.0+ cluster

See the project [README][sdk_readme] for more details.

[dep_tool]:https://golang.github.io/dep/docs/installation.html
[git_tool]:https://git-scm.com/downloads
[go_tool]:https://golang.org/dl/
[repo_sdk]:https://github.com/operator-framework/operator-sdk
[fork_guide]:https://help.github.com/articles/fork-a-repo/
[docker_tool]:https://docs.docker.com/install/
[kubectl_tool]:https://kubernetes.io/docs/tasks/tools/install-kubectl/
[sdk_readme]:../../README.md