ywxzm03 opened a new pull request, #148:
URL: https://github.com/apache/dubbo-go-pixiu-samples/pull/148
**What this PR does**:
Completes the `https` Pixiu sample as a runnable and verifiable HTTPS ->
Pixiu -> Dubbo provider -> Zookeeper chain.
Aligned with the expected behavior described in the issue, this PR:
- Aligns the cluster referenced by `conf.yaml` routes with the cluster
defined in `conf.yaml`:
- Uses `test_dubbo` for both `route.cluster` and `clusters[].name`.
- Aligns the Dubbo integration `clusterName` in `api_config.yaml` with the
Pixiu cluster config:
- Keeps `clusterName` as `test_dubbo`.
- Makes it match the Pixiu cluster defined in `conf.yaml`.
- Builds a clear main path across the HTTPS listener, API resource path,
Dubbo integration, and Zookeeper registry:
- Updates the API path to `/api/v1/test-dubbo/:interface` (aligned with
the new http->dubbo configuration style in `dubbo-go-pixiu`: the legacy
`opt.application` mapping has been removed from Dubbo sample options;
`dubbogo/simple/proxy` was also migrated to the same path shape in 4374696).
- Switches the HTTPS sample from a static endpoint to Zookeeper-based
Dubbo service discovery.
- Adds a Dubbo provider that registers `com.dubbogo.pixiu.UserService`.
- Uses Docker Compose to start Pixiu, the Dubbo provider, Zookeeper, and
the local certificate initialization task together.
- Adds a verifiable entry point to prove that HTTPS requests can reach the
Dubbo provider:
- Adds an HTTPS request script.
- Adds an integration test.
- Adds an `integrate_test.sh https` path that starts Docker Compose and
runs the HTTPS integration test.
**Which issue(s) this PR fixes**:
Fixes #147
**Special notes for your reviewer**:
- This sample runs Pixiu in Docker instead of starting it directly on the
host. Pixiu v1.1.0 uses autocert for the HTTPS listener and binds the standard
HTTPS port `443`. Since `443` is a privileged port on macOS/Linux, a normal
user process cannot reliably bind it in local or CI environments. The sample
therefore lets Pixiu listen on `443` inside the container and maps it to host
port `8443`.
- This sample also avoids relying on real ACME certificate issuance.
ACME/autocert normally requires a publicly reachable domain and external
validation, which is not suitable for a local sample. The Compose setup
generates a self-signed certificate cache for `sample.domain.com` and mounts it
into Pixiu's autocert cache directory. The test client and `request.sh`
intentionally use insecure TLS verification for this local sample path.
- The Dubbo provider also runs inside Docker Compose. This keeps Pixiu, the
provider, and Zookeeper on the same Docker network, so the provider address
registered in Zookeeper is directly reachable by Pixiu. If the provider ran on
the host while Pixiu ran in a container, the provider could register a
host-local or otherwise unreachable address, causing Pixiu to discover the
service but fail to connect.
**Does this PR introduce a user-facing change?**:
```release-note
Complete the HTTPS Pixiu Dubbo sample chain with Dockerized Pixiu, Dubbo
provider, Zookeeper registry setup, and integration test.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]