Skip to content

Commit 3624ad8

Browse files
authored
Update quick-start-guide.md
1 parent fc95517 commit 3624ad8

File tree

1 file changed

+69
-51
lines changed

1 file changed

+69
-51
lines changed

docs/quick-start-guide.md

Lines changed: 69 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -4,62 +4,14 @@ For a more detailed guide on how to use, compose, and work with `SparkAppliction
44
[User Guide](user-guide.md).
55

66
## Table of Contents
7-
1. [Build and Installation](#build-and-installation)
7+
1. [Installation](#installation)
88
2. [Configuration](#configuration)
99
3. [Upgrade](#upgrade)
1010
4. [Running the Examples](#running-the-examples)
1111
5. [Using the Initializer](#using-the-initializer)
12+
6. [Build](#build)
1213

13-
## Build and Installation
14-
15-
To get the Spark Operator, run the following commands:
16-
17-
```bash
18-
$ mkdir -p $GOPATH/src/k8s.io
19-
$ cd $GOPATH/src/k8s.io
20-
$ git clone git@github.com:GoogleCloudPlatform/spark-on-k8s-operator.git
21-
```
22-
23-
The Spark Operator uses [dep](https://golang.github.io/dep/) for dependency management. Please install `dep` following
24-
the instruction on the website if you don't have it available locally. To install the dependencies, run the following
25-
command:
26-
27-
```bash
28-
$ dep ensure
29-
```
30-
31-
To update the dependencies, run the following command:
32-
33-
```bash
34-
$ dep ensure -update
35-
```
36-
37-
Before building the Spark Operator the first time, run the following commands to get the required Kubernetes code
38-
generators:
39-
40-
```bash
41-
$ go get -u k8s.io/code-generator/cmd/deepcopy-gen
42-
$ go get -u k8s.io/code-generator/cmd/defaulter-gen
43-
```
44-
45-
To build the Spark Operator, run the following command:
46-
47-
```bash
48-
$ make build
49-
```
50-
51-
To build a Docker image of the Spark Operator, run the following command:
52-
53-
```bash
54-
$ make image-tag=<image tag> image
55-
```
56-
57-
To push the Docker image to Docker Hub, run the following command:
58-
console
59-
60-
```bash
61-
$ make image-tag=<image tag> push
62-
```
14+
## Installation
6315

6416
To install the Spark Operator on a Kubernetes cluster, run the following command:
6517

@@ -212,3 +164,69 @@ Currently the following annotations are supported:
212164
|`sparkoperator.k8s.io/hadoopConfigMap`|Name of the Kubernetes ConfigMap storing Hadoop configuration files (to which `HADOOP_CONF_DIR` applies)|
213165
|`sparkoperator.k8s.io/configMap.[ConfigMapName]`|Mount path of the ConfigMap named `ConfigMapName`|
214166
|`sparkoperator.k8s.io/GCPServiceAccount.[SeviceAccountSecretName]`|Mount path of the secret storing GCP service account credentials (typically a JSON key file) named `SeviceAccountSecretName`|
167+
168+
## Build
169+
170+
In case you want to build the Spark Operator from the source code, e.g., to test a fix or a feature you write, you can do so following the instructions below.
171+
172+
To get the Spark Operator, run the following commands:
173+
174+
```bash
175+
$ mkdir -p $GOPATH/src/k8s.io
176+
$ cd $GOPATH/src/k8s.io
177+
$ git clone git@github.com:GoogleCloudPlatform/spark-on-k8s-operator.git
178+
```
179+
180+
The Spark Operator uses [dep](https://golang.github.io/dep/) for dependency management. Please install `dep` following
181+
the instruction on the website if you don't have it available locally. To install the dependencies, run the following
182+
command:
183+
184+
```bash
185+
$ dep ensure
186+
```
187+
188+
To update the dependencies, run the following command:
189+
190+
```bash
191+
$ dep ensure -update
192+
```
193+
194+
Before building the Spark Operator the first time, run the following commands to get the required Kubernetes code
195+
generators:
196+
197+
```bash
198+
$ go get -u k8s.io/code-generator/cmd/client-gen
199+
$ go get -u k8s.io/code-generator/cmd/deepcopy-gen
200+
$ go get -u k8s.io/code-generator/cmd/defaulter-gen
201+
```
202+
203+
To update the auto-generated code, run the followin command:
204+
205+
```bash
206+
$ hack/update-codegen.sh
207+
```
208+
209+
To verify auto-generated code, run the following command:
210+
211+
```bash
212+
$ hack/verify-codegen.sh
213+
```
214+
215+
To build the Spark Operator, run the following command:
216+
217+
```bash
218+
$ make build
219+
```
220+
221+
To build a Docker image of the Spark Operator, run the following command:
222+
223+
```bash
224+
$ make image-tag=<image tag> image
225+
```
226+
227+
To push the Docker image to Docker Hub, run the following command:
228+
console
229+
230+
```bash
231+
$ make image-tag=<image tag> push
232+
```

0 commit comments

Comments
 (0)