|
2 | 2 |
|
3 | 3 | This document explains how to setup your dev environment.
|
4 | 4 |
|
| 5 | +## Prerequisites |
| 6 | +- [dep][dep_tool] version v0.5.0+ |
| 7 | +- [git][git_tool] |
| 8 | +- [go][go_tool] version v1.10+ |
| 9 | + |
5 | 10 | ## Download Operator SDK
|
6 | 11 |
|
7 |
| -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. |
| 12 | +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. |
8 | 13 |
|
9 | 14 | ## Vendor dependencies
|
10 | 15 |
|
11 |
| -We use [dep](https://github.com/golang/dep) to manage dependencies. |
12 | 16 | Run the following in the project root directory to update the vendored dependencies:
|
13 | 17 |
|
14 | 18 | ```sh
|
15 | 19 | $ cd $GOPATH/src/github.com/operator-framework/operator-sdk
|
16 |
| -$ dep ensure |
| 20 | +$ make dep |
17 | 21 | ```
|
18 | 22 |
|
19 | 23 | ## Build the Operator SDK CLI
|
20 | 24 |
|
21 |
| -Requirement: |
22 |
| -- Go 1.9+ |
23 |
| - |
24 | 25 | Build the Operator SDK CLI `operator-sdk` binary:
|
25 | 26 |
|
26 | 27 | ```sh
|
27 |
| -# TODO: replace this with the ./build script. |
28 |
| -$ go install github.com/operator-framework/operator-sdk/commands/operator-sdk |
| 28 | +$ make install |
29 | 29 | ```
|
30 | 30 |
|
31 | 31 | ## Testing
|
32 | 32 |
|
33 | 33 | Run unit tests:
|
34 | 34 |
|
35 | 35 | ```sh
|
36 |
| -TODO: use ./test script |
| 36 | +$ make test/unit |
| 37 | +``` |
| 38 | + |
| 39 | +Run all tests: |
| 40 | + |
| 41 | +```sh |
| 42 | +$ make test |
37 | 43 | ```
|
38 | 44 |
|
39 |
| -[fork_guide]:https://help.github.com/articles/fork-a-repo/ |
| 45 | +**Note:** running all tests requires: |
| 46 | +- [docker][docker_tool] version 17.03+ |
| 47 | +- [kubectl][kubectl_tool] version v1.11.0+ |
| 48 | +- Access to a kubernetes v.1.11.0+ cluster |
| 49 | + |
| 50 | +See the project [README][sdk_readme] for more details. |
| 51 | + |
| 52 | +[dep_tool]:https://golang.github.io/dep/docs/installation.html |
| 53 | +[git_tool]:https://git-scm.com/downloads |
| 54 | +[go_tool]:https://golang.org/dl/ |
| 55 | +[repo_sdk]:https://github.com/operator-framework/operator-sdk |
| 56 | +[fork_guide]:https://help.github.com/articles/fork-a-repo/ |
| 57 | +[docker_tool]:https://docs.docker.com/install/ |
| 58 | +[kubectl_tool]:https://kubernetes.io/docs/tasks/tools/install-kubectl/ |
| 59 | +[sdk_readme]:../../README.md |
0 commit comments