-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Since version 2.5.0 has been released, we could add docs for 2.5.0 for official website, such as download links and building commands: - https://github.com/apache/incubator-pegasus/releases/tag/v2.5.0 - https://cwiki.apache.org/confluence/display/PEGASUS/Apache+Pegasus+2.5.0+Release+Notes
- Loading branch information
Showing
10 changed files
with
314 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,6 +94,7 @@ sass: | |
latest_pegasus_version: master | ||
pegasus_versions: | ||
- master | ||
- 2.5.0 | ||
- 2.4.0 | ||
- 2.3.0 | ||
- 2.2.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
permalink: 2.5.0/docs/build/compile-by-docker/ | ||
redirect_from: | ||
- 2.5.0/docs/build/compile-by-docker/ | ||
version: 2.5.0 | ||
--- | ||
|
||
## Download the docker image | ||
|
||
Pegasus encapsulates the building environments into [docker images](https://hub.docker.com/r/apache/pegasus/tags?page=1&name=env), you can build directly based on these environments. | ||
|
||
For example, you can use the image based on `Ubuntu 20.04`: | ||
```bash | ||
docker pull apache/pegasus:build-env-ubuntu2004-v2.5 | ||
``` | ||
|
||
## Compilation | ||
|
||
Please refer to [Downloads](/docs/downloads) to fetch the sources under a directory (`/your/local/apache-pegasus-source`). Then run the following command: | ||
|
||
If you want to run tests, you should build Pegasus by the following command: | ||
|
||
```bash | ||
docker run -v /your/local/apache-pegasus-source:/root/pegasus \ | ||
apache/pegasus:build-env-ubuntu2004-v2.5 \ | ||
/bin/bash -c "cd /root/pegasus; ./run.sh build --test -c --clear_thirdparty -j $(nproc)" | ||
``` | ||
|
||
If you want to build Pegasus without runing tests, just execute the following command: | ||
|
||
```bash | ||
docker run -v /your/local/apache-pegasus-source:/root/pegasus \ | ||
apache/pegasus:build-env-ubuntu2004-v2.5 \ | ||
/bin/bash -c "cd /root/pegasus; ./run.sh build -c --clear_thirdparty -j $(nproc)" | ||
``` | ||
|
||
The output of compilation will be placed under `build/latest/output/` of the source directory. It includes `bin`, `include` and `lib`. | ||
|
||
## Run tests | ||
|
||
```bash | ||
docker run -v /your/local/apache-pegasus-source:/root/pegasus \ | ||
apache/pegasus:build-env-ubuntu2004-v2.5 \ | ||
/bin/bash -c "cd /root/pegasus; ./run.sh test" | ||
``` | ||
|
||
## Packaging | ||
|
||
Package server binaries for deployment: | ||
|
||
```bash | ||
docker run -v /your/local/apache-pegasus-source:/root/pegasus \ | ||
apache/pegasus:build-env-ubuntu2004-v2.5 \ | ||
/bin/bash -c "./run.sh pack_server" | ||
``` | ||
|
||
Package client libraries for C/C++ development: | ||
|
||
```bash | ||
docker run -v /your/local/apache-pegasus-source:/root/pegasus \ | ||
apache/pegasus:build-env-ubuntu2004-v2.5 \ | ||
/bin/bash -c "./run.sh pack_client" | ||
``` | ||
|
||
Package toolset which includes various tools (shell, bench): | ||
|
||
```bash | ||
docker run -v /your/local/apache-pegasus-source:/root/pegasus \ | ||
apache/pegasus:build-env-ubuntu2004-v2.5 \ | ||
/bin/bash -c "./run.sh pack_tools" | ||
``` | ||
|
||
If this is your first time compiling Pegasus, it's recommended to try [onebox](/overview/onebox). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
permalink: 2.5.0/docs/build/compile-from-source/ | ||
redirect_from: | ||
- 2.5.0/docs/build/compile-from-source/ | ||
version: 2.5.0 | ||
--- | ||
|
||
Since 2.4.0, Pegasus supports to build both on Linux and macOS. Please don't hesitate to contact us via [Github Issues]({{ site.pegasus_github_url }}/issues) when you encountered any problem. | ||
|
||
## Requirements | ||
|
||
- GCC 5.4.0+ | ||
- CMake 3.11.0+ | ||
|
||
## Linux environment | ||
|
||
You can refer to the docker images to install dependencies and set environment variables. For example: | ||
- [CentOS 7](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/centos7/Dockerfile) | ||
- [Ubuntu 18.04](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/ubuntu1804/Dockerfile) | ||
- [Ubuntu 20.04](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/ubuntu2004/Dockerfile) | ||
- [Ubuntu 22.04](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/ubuntu2204/Dockerfile) | ||
|
||
## Compilation | ||
|
||
Please refer to [Downloads](/docs/downloads) to fetch the sources。 | ||
|
||
If you want to run tests, you should build Pegasus by the following command: | ||
|
||
```bash | ||
./run.sh build --test -c --clear_thirdparty -j $(nproc) | ||
``` | ||
|
||
If you want to build Pegasus without runing tests, just execute the following command: | ||
|
||
```bash | ||
./run.sh build -c --clear_thirdparty -j $(nproc) | ||
``` | ||
|
||
The output of compilation will be placed under `build/latest/output/` of the source directory. It includes `bin`, `include` and `lib`. | ||
|
||
## Run tests | ||
|
||
```bash | ||
./run.sh test | ||
``` | ||
|
||
## Packaging | ||
|
||
Package server binaries for development: | ||
|
||
```bash | ||
./run.sh pack_server | ||
``` | ||
|
||
Package client libraries for C/C++ development: | ||
|
||
```bash | ||
./run.sh pack_client | ||
``` | ||
|
||
Package toolset which includes various tools (shell, bench): | ||
|
||
```bash | ||
./run.sh pack_tools | ||
``` | ||
|
||
If this is your first time compiling Pegasus, it's recommended to try [onebox](/overview/onebox). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.