Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styx docker environment: add NGINX origins #499

Merged
merged 2 commits into from
Oct 24, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
18 changes: 8 additions & 10 deletions system-tests/docker-test-env/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
version: '3'
services:

httpd-01:
image: httpd:2.4
origin:
image: nginx:stable-alpine
ports:
- "8081:80"
- "9091:8080"
dvlato marked this conversation as resolved.
Show resolved Hide resolved
- "9443:8443"
volumes:
- ./apache-config:/usr/local/apache2/htdocs/
- ./nginx:/etc/nginx/
- ./origin-data:/data/stub-01

toxiproxy:
image: shopify/toxiproxy:latest
depends_on:
- httpd-01
- origin
ports:
- "8474:8474"
volumes:
Expand All @@ -24,7 +25,7 @@ services:
styx:
image: styxcore:latest
depends_on:
- httpd-01
- origin
- toxiproxy
ports:
- "9000:9000"
Expand All @@ -34,9 +35,6 @@ services:
volumes:
- ./styx-config:/styx/config
- ./styx-logs:/styx/logs
links:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About time :)

- httpd-01
- toxiproxy

environment:
- JVM_DEBUG=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:8000
Expand Down
14 changes: 14 additions & 0 deletions system-tests/docker-test-env/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
events {
worker_connections 1024;
}

http {
server {
listen 8080;
listen 8443 ssl;
root /data/stub-01;

ssl_certificate /etc/nginx/testCredentials.crt;
ssl_certificate_key /etc/nginx/testCredentials.key;
}
}
22 changes: 22 additions & 0 deletions system-tests/docker-test-env/nginx/testCredentials.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
-----BEGIN CERTIFICATE-----
dvlato marked this conversation as resolved.
Show resolved Hide resolved
MIIDtTCCAp2gAwIBAgIJANrUnYlczTcjMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV
BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX
aWRnaXRzIFB0eSBMdGQwHhcNMTUwODEzMTAzMTEzWhcNMTUwOTEyMTAzMTEzWjBF
MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50
ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
CgKCAQEAyjLJrVqM2qnjE4zP0kNZs/x+cEuGU8TchkVTbuxrR0pSYxxdYPcUzLOO
fwL2glcY03l4q3HmtCBR6c5SiM2VYbtO9r4vo7frpWXJcKDY2J3ROyQX+ET3m9U3
T2z2L47qSlPgKf03HFN2IKr1CRWui8noypNvQ6dW9Yqv/FBBbldG7bgS5DKZNORD
SFOpFFXP7c6t0WWNMJ1Gh2YZ6zJq1z60gnV5HdcytoEeFL02E2GmwcYLKYi/h0bz
EbwzKSCAuLjlERjDwEotp+rQ3Np8Cegv3T+62r0vnCaWtcR9bgow/6cQPOjuLm49
PGh8XnDBMDkjmvpHrTl3i4Aq72IdOQIDAQABo4GnMIGkMB0GA1UdDgQWBBSo4jBV
/nl7g5sRBWiCtUCCWWMFQTB1BgNVHSMEbjBsgBSo4jBV/nl7g5sRBWiCtUCCWWMF
QaFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV
BAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJANrUnYlczTcjMAwGA1UdEwQF
MAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAF3fkRuzmadO89T9cUiAf1QD3jsjF+vz
Ihq2Q+XMX1e/D1WscJ/EUOSgqp8l7I8+Xeqn1nLW77Dz2VuuAuKu0UVDsKTM/U1q
7jOpg2wEbgwb5ukZ3vLMlFRkHv3/Gi615B/2ltC3DhZuBnOZczwUGWPDvJ7ppLqN
VPV6fsA4vsk4s1biYdnSrB8v5aEtX6+tQQoH+nOCSH3YEHxDHrNiFaqrmW4/2o/0
owb9WaLyK1VvdTnXbK6WGlaSfMjysGsnJozn8ZAqd6fQWzIxW2DSiSf8inc4VlIb
AqW6dcH+Mu/kmnEJtTCFo3KXwzmvq629BacIDZXUjgS+2q28RQ/s8iU=
-----END CERTIFICATE-----
28 changes: 28 additions & 0 deletions system-tests/docker-test-env/nginx/testCredentials.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDKMsmtWozaqeMT
jM/SQ1mz/H5wS4ZTxNyGRVNu7GtHSlJjHF1g9xTMs45/AvaCVxjTeXircea0IFHp
zlKIzZVhu072vi+jt+ulZclwoNjYndE7JBf4RPeb1TdPbPYvjupKU+Ap/TccU3Yg
qvUJFa6LyejKk29Dp1b1iq/8UEFuV0btuBLkMpk05ENIU6kUVc/tzq3RZY0wnUaH
ZhnrMmrXPrSCdXkd1zK2gR4UvTYTYabBxgspiL+HRvMRvDMpIIC4uOURGMPASi2n
6tDc2nwJ6C/dP7ravS+cJpa1xH1uCjD/pxA86O4ubj08aHxecMEwOSOa+ketOXeL
gCrvYh05AgMBAAECggEATflB7tkBgn2LNQnTRtl0KUWQmMt3NKyxAhKP9zGyuR4/
ITtaAz+lRL9ljzNcTq05xKuOTkcxWXsxO4G2ME1fcv3hmKOFCZSuiezzvrw4g2hw
vGbR24r1FaImnzl8wqBRV3J6+pZMf17sKfLjZap30i592Ej82lEY5r2h2iI06VCN
bDOonY6lQ1C+5a/sO6yRRHGdWqi/ppOn9Rh5orp6z5F+Ew+6sBeg3CKCZA4y8izL
xy+Jgseh/UFNoTVFizd1Dnvj5e6fatTlyJiSuA7dSztq0dQ31Whe8JgqTJ2xMEFt
sxSzG3pZZrhNV+4l96l975w/XWK8c7/JdrTnhgJqVQKBgQDmGIQ575JsQ5JS/FLv
spOJes5j7167dCkQXJNN6/Jc+muLq+YZLY9Xk6d2VccReum9qYYDPbwn3W1fJULU
NAi5DKvRpRjKbrCCRNQdZDQpxE2EipFdTJCCIYk4q4s7S/nAX3rzH4oUywxejwb0
/Bse2m4l/zSDEyHlAZhu3oBNtwKBgQDg9kD/TaFFd19OqwIXqQA6JFPOtPCP11go
bJlqps8yetcX5Wv+z0k77MFroeeJTuvpqYMxHTV5dXKX8J42yhf4O6K70yHNcZsf
M5QHXdn/eSpqMtqswC5laKJNKqXeGxv1H36izPLcaov6ICRWl8CS+lpkhELeF7l1
R6+I0n7sjwKBgQDYDx9iU56XgJ/OwtaR84psZt+UoXm/5aSFk5hSbAMJ4a/I2GJZ
NBnMb36pNISX2mXPzXZkZrzeZiLEW/Wz0yR5tvdEBZYQx/2AZWcULjp5GbZ8ha1Y
AYQUXa8/gn1b8cyUIlQOJYiAW+XCiOVMd8pzn0Ic9dX2WqnSIzxipxWtYwKBgQCm
S6NUltBGh62+e496agWu9Te2r+68hhW3HEB0pIa57DCgi4m/vP+H+sYoiHCeAedG
vXYrkkn7VSS2yLpMCiyZ5YuwiKyOMBLZh8k/gNMrlSgThTA9T3t8n1KK9KHUg/mw
w+1a72IAKgr7hVMXZ+qFO+giMds0ThlcZveNjv0gZQKBgCOjIc/7Z1DV5Nvto8Aj
RoLV8FEDf1RBO5oUZH/QJpumpnw2cZk2MDvj9dVf6ccqe/gV4pL3jIzTX6+s15YM
hQF6awc9uwjZ4SVeij5kTL4MygW/vCbAYZgwREQBSqoNN43suoI1laV32fNuMzDK
2tw75OPgFv6YA7+223TyWVIT
-----END PRIVATE KEY-----
2 changes: 2 additions & 0 deletions system-tests/docker-test-env/origin-data/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>Hello, world!</h1>
<h1>ABC</h1>
19 changes: 16 additions & 3 deletions system-tests/docker-test-env/styx-config/origins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,28 @@
# and applies any changes straight away.
#
---
- id: "httpd"
- id: "origin"
path: "/"
healthCheck:
uri: /info.txt
uri: /hello.txt
connectionPool:
maxConnectionsPerHost: 45
maxPendingConnectionsPerHost: 15
connectTimeoutMillis: 1000
pendingConnectionTimeoutMillis: 8000
responseTimeoutMillis: 60000
origins:
- { id: "httpd-01", host: "toxiproxy:80" }
- { id: "origin-01", host: "origin:8080" }

- id: "toxiproxy"
path: "/toxi"
healthCheck:
uri: /hello.txt
connectionPool:
maxConnectionsPerHost: 45
maxPendingConnectionsPerHost: 15
connectTimeoutMillis: 1000
pendingConnectionTimeoutMillis: 8000
responseTimeoutMillis: 60000
origins:
- { id: "toxiproxy-01", host: "toxiproxy:8080" }
6 changes: 3 additions & 3 deletions system-tests/docker-test-env/toxiproxy/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"name": "httpd-01",
"listen": "0.0.0.0:80",
"upstream": "httpd-01:80"
"name": "origin-01",
"listen": "0.0.0.0:8080",
"upstream": "origin:8080"
}
]