-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build: Simplify Docker layout, fix Envoy, and upgrade tests (#2774)
It seems the Envoy apts have gone missing breaking out build, so instead of relying on the install let's docker compose their image as a proxy against the Redis supervisor instance as a simpler and faster-to-start setup that also works. This rearranged some things to simplify the Docker story overall. A move to AzDO or just GitHub builds would simplify everything further, but we need to figure out Windows testing against a Docker setup in CI. Note: we still can't use Linux containers on a Windows GitHub Actions host (actions/runner#904), so this remains much more complicated and not-really-testing-the-real-thing in the Windows front.
- Loading branch information
1 parent
e208905
commit 3701b50
Showing
26 changed files
with
130 additions
and
138 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
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
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,6 @@ | ||
FROM envoyproxy/envoy:v1.31-latest | ||
|
||
COPY envoy.yaml /etc/envoy/envoy.yaml | ||
RUN chmod go+r /etc/envoy/envoy.yaml | ||
|
||
EXPOSE 7015 |
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,35 @@ | ||
admin: | ||
address: { socket_address: { protocol: TCP, address: 0.0.0.0, port_value: 8001 } } | ||
static_resources: | ||
listeners: | ||
- name: redis_listener | ||
address: { socket_address: { protocol: TCP, address: 0.0.0.0, port_value: 7015 } } | ||
filter_chains: | ||
- filters: | ||
- name: envoy.filters.network.redis_proxy | ||
typed_config: | ||
"@type": type.googleapis.com/envoy.extensions.filters.network.redis_proxy.v3.RedisProxy | ||
stat_prefix: envoy_redis_stats | ||
settings: | ||
op_timeout: 3s | ||
dns_cache_config: | ||
name: dynamic_forward_proxy_cache_config | ||
dns_lookup_family: V4_ONLY | ||
prefix_routes: | ||
catch_all_route: | ||
cluster: redis_cluster | ||
clusters: | ||
- name: redis_cluster | ||
connect_timeout: 3s | ||
type: STRICT_DNS | ||
dns_lookup_family: V4_ONLY | ||
load_assignment: | ||
cluster_name: redis_cluster | ||
endpoints: | ||
- lb_endpoints: | ||
- endpoint: { address: { socket_address: { address: redis, port_value: 7000 } } } | ||
- endpoint: { address: { socket_address: { address: redis, port_value: 7001 } } } | ||
- endpoint: { address: { socket_address: { address: redis, port_value: 7002 } } } | ||
- endpoint: { address: { socket_address: { address: redis, port_value: 7003 } } } | ||
- endpoint: { address: { socket_address: { address: redis, port_value: 7004 } } } | ||
- endpoint: { address: { socket_address: { address: redis, port_value: 7005 } } } |
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,23 @@ | ||
FROM redis:7.4-rc1 | ||
|
||
COPY --from=configs ./Basic /data/Basic/ | ||
COPY --from=configs ./Failover /data/Failover/ | ||
COPY --from=configs ./Cluster /data/Cluster/ | ||
COPY --from=configs ./Sentinel /data/Sentinel/ | ||
COPY --from=configs ./Certs /Certs/ | ||
|
||
RUN chown -R redis:redis /data | ||
RUN chown -R redis:redis /Certs | ||
|
||
COPY docker-entrypoint.sh /usr/local/bin/ | ||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh | ||
|
||
RUN apt-get -y update && apt-get install supervisor -y | ||
|
||
RUN apt-get clean | ||
|
||
ADD supervisord.conf /etc/ | ||
|
||
ENTRYPOINT ["docker-entrypoint.sh"] | ||
|
||
EXPOSE 6379 6380 6381 6382 6383 6384 7000 7001 7002 7003 7004 7005 7010 7011 26379 26380 26381 |
File renamed without changes.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,16 +1,28 @@ | ||
version: '2.6' | ||
version: '2.7' | ||
|
||
services: | ||
redis: | ||
build: | ||
context: . | ||
image: stackexchange/redis-tests:latest | ||
context: .docker/Redis | ||
additional_contexts: | ||
configs: . | ||
platform: linux | ||
ports: | ||
- 6379-6384:6379-6384 | ||
- 7000-7006:7000-7006 | ||
- 7010-7011:7010-7011 | ||
- 7015:7015 | ||
- 26379-26381:26379-26381 | ||
- 6379-6384:6379-6384 # Misc | ||
- 7000-7006:7000-7006 # Cluster | ||
- 7010-7011:7010-7011 # Sentinel Controllers | ||
- 26379-26381:26379-26381 # Sentinel Data | ||
sysctls : | ||
net.core.somaxconn: '511' | ||
envoy: | ||
build: | ||
context: .docker/Envoy | ||
platform: linux | ||
environment: | ||
loglevel: warning | ||
depends_on: | ||
redis: | ||
condition: service_started | ||
ports: | ||
- 7015:7015 # Cluster | ||
- 8001:8001 # Admin |
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
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.