Source Build Guide
How to build the clickhouse-operator from source code
For organizations who prefer to build the software directly from source code, they can compile the clickhouse-operator and install it into a Docker container through the following process.
Binary Build
Binary Build Requirements
go-lang
compiler: Go.- Go
mod
Package Manager. - The source code from the clickhouse-operator repository. This can be downloaded with Go with the command
go get github.com/altinity/clickhouse-operator
.
Binary Build Instructions
- Switch working dir to
src/github.com/altinity/clickhouse-operator
. - Link all packages with the command:
go mod tidy
. - Build the sources with
go build -o ./clickhouse-operator cmd/operator/main.go
.
This creates the clickhouse-operator
binary. This binary is only used within a kubernetes environment.
Docker Image Build and Usage
Docker Build Requirements
kubernetes
: https://kubernetes.io/docker
: https://www.docker.com/- Complete the Binary Build Instructions
Docker Build Instructions
-
Switch working dir to
src/github.com/altinity/clickhouse-operator
-
Build docker image with
docker
:docker build -t altinity/clickhouse-operator ./
-
Register freshly build
docker
image insidekubernetes
environment with the following:docker save altinity/clickhouse-operator | (eval $(minikube docker-env) && docker load)
-
Install
clickhouse-operator
as described in either the Basic Build or Custom Build.
Feedback
Was this page helpful?
Glad to hear it!
Sorry to hear that. We'll track this issue and see how we can improve.
Last modified 2021.02.01: Kubernetes guides. (1153e4d)