2017-06-16 10:59:01 -07:00
|
|
|
# Building Rook
|
|
|
|
|
|
2021-06-04 13:45:01 -06:00
|
|
|
Rook is composed of a golang project and can be built directly with standard `golang` tools,
|
2017-06-16 10:59:01 -07:00
|
|
|
and storage software (like Ceph) that are built inside containers. We currently support
|
2021-06-04 13:45:01 -06:00
|
|
|
these platforms for building:
|
2017-06-16 10:59:01 -07:00
|
|
|
|
2020-06-08 10:50:50 +02:00
|
|
|
* Linux: most modern distributions should work although most testing has been done on Ubuntu
|
|
|
|
|
* Mac: macOS 10.6+ is supported
|
2017-06-16 10:59:01 -07:00
|
|
|
|
|
|
|
|
## Build Requirements
|
|
|
|
|
|
2021-06-04 13:45:12 -06:00
|
|
|
Recommend 2+ cores, 8+ GB of memory and 128GB of SSD. Inside your build environment (Docker for Mac or a VM), 2+ GB memory is also recommended.
|
2017-06-16 10:59:01 -07:00
|
|
|
|
|
|
|
|
The following tools are need on the host:
|
2020-06-08 10:50:50 +02:00
|
|
|
|
|
|
|
|
* curl
|
|
|
|
|
* docker (1.12+) or Docker for Mac (17+)
|
|
|
|
|
* git
|
|
|
|
|
* make
|
|
|
|
|
* golang
|
2021-12-27 02:00:18 +00:00
|
|
|
* helm
|
2017-06-16 10:59:01 -07:00
|
|
|
|
|
|
|
|
## Build
|
|
|
|
|
|
2018-07-19 12:36:30 -06:00
|
|
|
You can build the Rook binaries and all container images for the host platform by simply running the
|
|
|
|
|
command below. Building in parallel with the `-j` option is recommended.
|
2017-06-16 10:59:01 -07:00
|
|
|
|
2020-06-08 10:50:50 +02:00
|
|
|
```console
|
2022-03-16 17:14:59 -06:00
|
|
|
make -j4 build
|
2018-04-26 15:28:39 +08:00
|
|
|
```
|
2017-06-16 10:59:01 -07:00
|
|
|
|
|
|
|
|
Run `make help` for more options.
|
|
|
|
|
|
2021-06-04 13:45:01 -06:00
|
|
|
## CI Workflow
|
2017-06-16 10:59:01 -07:00
|
|
|
|
2022-02-19 20:29:02 +09:00
|
|
|
Every PR and every merge to master triggers the CI process in GitHub actions.
|
2021-06-04 13:45:01 -06:00
|
|
|
On every commit to PR and master the CI will build, run unit tests, and run integration tests.
|
|
|
|
|
If the build is for master or a release, the build will also be published to
|
|
|
|
|
[dockerhub.com](https://cloud.docker.com/u/rook/repository/list).
|
2017-06-16 10:59:01 -07:00
|
|
|
|
|
|
|
|
## Building for other platforms
|
|
|
|
|
|
2018-07-19 12:36:30 -06:00
|
|
|
You can also run the build for all supported platforms:
|
|
|
|
|
|
2020-06-08 10:50:50 +02:00
|
|
|
```console
|
2018-07-19 12:36:30 -06:00
|
|
|
make -j4 build.all
|
|
|
|
|
```
|