Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev-environments/camel-proxy/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Camel PROXY

Development environment to test integration between APIcast and proxies built
on top of [Camel framework](https://camel.apache.org/components/4.0.x/netty-http-component.html)
on top of [Camel framework](https://camel.apache.org/components/4.8.x/netty-component.html)

This dev environment uses [Camel Netty Proxy example](https://github.com/zregvart/camel-netty-proxy).
Any request that is received using the HTTP PROXY protocol,
Expand Down
17 changes: 16 additions & 1 deletion dev-environments/plain-http-upstream/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,18 @@ Running custom apicast image
make gateway IMAGE_NAME=quay.io/3scale/apicast:latest
```

Traffic between the proxy and upstream can be inspected looking at logs from `example.com` service
Traffic between apicast and upstream can be inspected looking at logs from `example.com` service

```
docker compose -p plain-http-upstream logs -f example.com
```

Traffic between apicast and backend can be inspected looking at logs from `backend` service

```
docker compose -p plain-http-upstream logs -f backend
```

## Testing

`GET` request
Expand All @@ -43,3 +49,12 @@ curl --resolve post.example.com:8080:127.0.0.1 -v -X POST "http://post.example.c
```sh
make clean
```

## Echo API

Using EchoAPI `quay.io/kuadrant/authorino-examples:talker-api` docker image.

Based on Ruby's [rack](https://github.com/rack/rack) / [rackup](https://github.com/rack/rackup/blob/main/lib/rackup.rb)
HTTP server framework uses [WebRick](https://github.com/ruby/webrick) server engine.

Github: https://github.com/Kuadrant/authorino-examples/tree/main/talker-api
4 changes: 2 additions & 2 deletions dev-environments/plain-http-upstream/apicast-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"hosts": ["get.example.com"],
"api_backend": "http://example.com/get",
"backend": {
"endpoint": "http://127.0.0.1:8081",
"endpoint": "http://backend:80",
"host": "backend"
},
"policy_chain": [
Expand All @@ -34,7 +34,7 @@
"hosts": ["post.example.com"],
"api_backend": "http://example.com/post",
"backend": {
"endpoint": "http://127.0.0.1:8081",
"endpoint": "http://backend:80",
"host": "backend"
},
"policy_chain": [
Expand Down
20 changes: 18 additions & 2 deletions dev-environments/plain-http-upstream/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,27 @@ services:
example.com:
image: alpine/socat:1.7.4.4
container_name: example.com
command: "-d -v -d TCP-LISTEN:80,reuseaddr,fork TCP:two.upstream:80"
command: "-d -d -v -d TCP-LISTEN:80,reuseaddr,fork TCP:two.upstream:3000"
expose:
- "80"
restart: unless-stopped
two.upstream:
image: kennethreitz/httpbin
image: quay.io/kuadrant/authorino-examples:talker-api
environment:
PORT: 3000
expose:
- "3000"
backend:
image: alpine/socat:1.7.4.4
container_name: backend
command: "-d -d -v -d TCP-LISTEN:80,reuseaddr,fork TCP:3scale.backend:3000"
expose:
- "80"
restart: unless-stopped
3scale.backend:
image: quay.io/kuadrant/authorino-examples:talker-api
container_name: 3scale.backend
environment:
PORT: 3000
expose:
- "3000"