未验证 提交 2af2103a 编写于 作者: W Wing 提交者: GitHub

Refine guides (#6741)

上级 aecb1b39
# Using E2E local remote debugging # Using E2E local remote debugging
The E2E remote debugging port of service containers is `5005`. If the developer wants to use remote debugging, he needs to add remote debugging parameters to the start service command, and then expose the port `5005`. The E2E remote debugging port of service containers is `5005`. If the developer wants to use remote debugging, he needs to add remote debugging parameters to the start service command, and then expose the port `5005`.
For example, this is the configuration of a container in the [skywalking/test/e2e/e2e-test/docker/base-compose.yml](https://github.com/apache/skywalking/blob/master/test/e2e/e2e-test/docker/base-compose.yml). [JAVA_OPTS](https://github.com/apache/skywalking/blob/190ca93b6bf48e9d966de5b05cd6490ba54b7266/docker/oap/docker-entrypoint.sh) is a preset variable for passing additional parameters in the AOP service startup command, so we only need to add the JAVA remote debugging parameters `agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005` to the configuration and exposes the port `5005`. For example, this is the configuration of a container in [skywalking/test/e2e/e2e-test/docker/base-compose.yml](https://github.com/apache/skywalking/blob/master/test/e2e/e2e-test/docker/base-compose.yml). [JAVA_OPTS](https://github.com/apache/skywalking/blob/190ca93b6bf48e9d966de5b05cd6490ba54b7266/docker/oap/docker-entrypoint.sh) is a preset variable for passing additional parameters in the AOP service startup command, so we only need to add the JAVA remote debugging parameters `agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005` to the configuration and expose the port `5005`.
```yml ```yml
oap: oap:
image: skywalking/oap:latest image: skywalking/oap:latest
...@@ -16,7 +16,7 @@ oap: ...@@ -16,7 +16,7 @@ oap:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
... ...
``` ```
At last, if the E2E test failed and is retrying, the developer can get the ports mapping in the file `skywalking/test/e2e/e2e-test/remote_real_port` and selects the host port of the corresponding service for remote debugging. For example, At last, if the E2E test fails and is retrying, the developer may get the ports mapping in the file `skywalking/test/e2e/e2e-test/remote_real_port` and select the host port of the corresponding service for remote debugging. For example,
```bash ```bash
#remote_real_port #remote_real_port
...@@ -25,4 +25,4 @@ oap-localhost:32783 ...@@ -25,4 +25,4 @@ oap-localhost:32783
#The remote debugging port on the host is 32782 #The remote debugging port on the host is 32782
provider-localhost:32782 provider-localhost:32782
``` ```
\ No newline at end of file
# How to build project # How to build a project
This document helps people to compile and build the project in your maven and set your IDE. This document will help you compile and build a project in your maven and set your IDE.
## Build Project ## Building the Project
**Because we are using Git submodule, we recommend don't use `GitHub` tag or release page to download source codes for compiling.** **Since we are using Git submodule, we do not recommend using the `GitHub` tag or release page to download source codes for compiling.**
### Maven behind Proxy ### Maven behind the Proxy
If you need to execute build behind the proxy, edit the *.mvn/jvm.config* and put the follow properties: If you need to execute build behind the proxy, edit the *.mvn/jvm.config* and set the follow properties:
```properties ```properties
-Dhttp.proxyHost=proxy_ip -Dhttp.proxyHost=proxy_ip
-Dhttp.proxyPort=proxy_port -Dhttp.proxyPort=proxy_port
...@@ -15,11 +15,11 @@ If you need to execute build behind the proxy, edit the *.mvn/jvm.config* and pu ...@@ -15,11 +15,11 @@ If you need to execute build behind the proxy, edit the *.mvn/jvm.config* and pu
-Dhttp.proxyPassword=password -Dhttp.proxyPassword=password
``` ```
### Build from GitHub ### Building from GitHub
1. Prepare git, JDK8+ and Maven 3.6+ 1. Prepare git, JDK8+, and Maven 3.6+.
1. Clone project 1. Clone the project.
If you want to build a release from source codes, provide a `tag name` by using `git clone -b [tag_name] ...` while cloning. If you want to build a release from source codes, set a `tag name` by using `git clone -b [tag_name] ...` while cloning.
```bash ```bash
git clone --recurse-submodules https://github.com/apache/skywalking.git git clone --recurse-submodules https://github.com/apache/skywalking.git
...@@ -36,18 +36,18 @@ If you need to execute build behind the proxy, edit the *.mvn/jvm.config* and pu ...@@ -36,18 +36,18 @@ If you need to execute build behind the proxy, edit the *.mvn/jvm.config* and pu
1. Run `./mvnw clean package -DskipTests` 1. Run `./mvnw clean package -DskipTests`
1. All packages are in `/dist` (.tar.gz for Linux and .zip for Windows). 1. All packages are in `/dist` (.tar.gz for Linux and .zip for Windows).
### Build from Apache source code release ### Building from Apache source code release
- What is `Apache source code release`? - What is the `Apache source code release`?
For each official Apache release, there is a complete and independent source code tar, which is including all source codes. You could download it from [SkyWalking Apache download page](http://skywalking.apache.org/downloads/). No git related stuff required when compiling this. Just follow these steps. For each official Apache release, there is a complete and independent source code tar, which includes all source codes. You could download it from [SkyWalking Apache download page](http://skywalking.apache.org/downloads/). There is no requirement related to git when compiling this. Just follow these steps.
1. Prepare JDK8+ and Maven 3.6+ 1. Prepare JDK8+ and Maven 3.6+.
1. Run `./mvnw clean package -DskipTests` 1. Run `./mvnw clean package -DskipTests`.
1. All packages are in `/dist`.(.tar.gz for Linux and .zip for Windows). 1. All packages are in `/dist`.(.tar.gz for Linux and .zip for Windows).
### Advanced compile ### Advanced compiling
SkyWalking is a complex maven project, including many modules, which could cause long compiling time. SkyWalking is a complex maven project that has many modules. Therefore, the time to compile may be a bit longer than usual.
If you just want to recompile part of the project, you have following options If you just want to recompile part of the project, you have the following options:
- Compile agent and package - Compile agent and package
> ./mvnw package -Pagent,dist > ./mvnw package -Pagent,dist
...@@ -55,7 +55,7 @@ or ...@@ -55,7 +55,7 @@ or
> make build.agent > make build.agent
If you intend to compile a single one plugin, such as in the dev stage, you could If you intend to compile a single plugin, such as one in the dev stage, you could
> cd plugin_module_dir & mvn clean package > cd plugin_module_dir & mvn clean package
- Compile backend and package - Compile backend and package
...@@ -73,16 +73,16 @@ or ...@@ -73,16 +73,16 @@ or
> make build.ui > make build.ui
### Build docker images ### Building docker images
We can build docker images of `backend` and `ui` with `Makefile` located in root folder. You can build docker images of `backend` and `ui` with `Makefile` located in root folder.
Refer to [Build docker image](../../../docker) for more details. Refer to [Build docker image](../../../docker) for more details.
## Setup your IntelliJ IDEA ## Setting up your IntelliJ IDEA
**NOTICE**: If you clone the codes from GitHub, please make sure that you had finished step 1 to 3 in section **[Build from GitHub](#build-from-github)**, if you download the source codes from the official website of SkyWalking, please make sure that you had followed the steps in section **[Build from Apache source code release](#build-from-apache-source-code-release)**. **NOTE**: If you clone the codes from GitHub, please make sure that you have finished steps 1 to 3 in section **[Build from GitHub](#build-from-github)**. If you download the source codes from the official website of SkyWalking, please make sure that you have followed the steps in section **[Build from Apache source code release](#build-from-apache-source-code-release)**.
1. Import the project as a maven project 1. Import the project as a maven project.
1. Run `./mvnw compile -Dmaven.test.skip=true` to compile project and generate source codes. Because we use gRPC and protobuf. 1. Run `./mvnw compile -Dmaven.test.skip=true` to compile project and generate source codes. The reason is that we use gRPC and protobuf.
1. Set **Generated Source Codes** folders. 1. Set **Generated Source Codes** folders.
* `grpc-java` and `java` folders in **apm-protocol/apm-network/target/generated-sources/protobuf** * `grpc-java` and `java` folders in **apm-protocol/apm-network/target/generated-sources/protobuf**
* `grpc-java` and `java` folders in **oap-server/server-core/target/generated-sources/protobuf** * `grpc-java` and `java` folders in **oap-server/server-core/target/generated-sources/protobuf**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册