Skip to content

Commit 6849cdc

Browse files
committed
Added initial version of build documentation.
Signed-off-by: Diana Arroyo <darroyo@us.ibm.com>
1 parent 81dc022 commit 6849cdc

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

doc/build/build.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Multi-Cluster-App-Deployer Controller Build Instructions
2+
3+
This document will show how to build the `Multi-Cluster-App-Deployer` Kubernetes Controller that operates on on an AppWrapper kubernetes custom resource definition. It is for [master](https://github.com/IBM/multi-cluster-app-dispatcher/tree/master) branch.
4+
5+
## 1. Pre-condition
6+
7+
### Docker Environment
8+
9+
To build `Multi-Cluster-App-Deployer`, a running Docker env. must be available. Here is a document on [Getting Started with Docker](https://www.docker.com/get-started).
10+
11+
### Clone Multi-Cluster-App-Deployer Git Repo
12+
13+
Clone this repo in your local environement:
14+
15+
```
16+
$ git clone git@github.com:IBM/multi-cluster-app-dispatcher.git
17+
Cloning into 'multi-cluster-app-dispatcher'...
18+
Checking connectivity... done.
19+
Checking out files: 100% (####/####), done.
20+
$
21+
```
22+
23+
## 2. Building the Multi-Cluster-App-Deployer Controller
24+
25+
### Build the Executables
26+
27+
Run the build script `build.sh`:
28+
```
29+
$ cd multi-cluster-app-dispatcher/deployment/
30+
dianaarroyosmbp:deployment darroyo$ ./build.sh
31+
...
32+
+ cd ..
33+
+ make generate-code
34+
Compiling deepcopy-gen
35+
Generating deepcopy
36+
go build -o _output/bin/deepcopy-gen ./cmd/deepcopy-gen/
37+
_output/bin/deepcopy-gen -i ./pkg/apis/controller/v1alpha1/ -O zz_generated.deepcopy
38+
+ make kar-controller
39+
mkdir -p _output/bin
40+
CGO_ENABLED=0 GOARCH=amd64 go build -o _output/bin/kar-controllers ./cmd/kar-controllers/
41+
$
42+
```
43+
44+
Ensure the executables: `deepcopy-gen`, `kar-controllers` are created in the target output directory:
45+
```
46+
$ ls ../_output/bin/
47+
deepcopy-gen kar-controllers
48+
$
49+
```

0 commit comments

Comments
 (0)