Skip to content

Instantly share code, notes, and snippets.

@lavagetto
Created April 23, 2018 11:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lavagetto/796c3b69177db22b957895c641e73ff9 to your computer and use it in GitHub Desktop.
Save lavagetto/796c3b69177db22b957895c641e73ff9 to your computer and use it in GitHub Desktop.
mcrouter ssl test
# Dockerfile
from docker-registry.wikimedia.org/wikimedia-stretch:latest
RUN apt-get update && apt-get -y install mcrouter && rm -rf /var/lib/apt/lists/* \
&& mkdir -p /etc/mcrouter
VOLUME ["/etc/mcrouter"]
CMD ["/usr/bin/mcrouter", "--ssl-port", "11210", "--pem-cert-path=/etc/mcrouter/cert.pem", "--pem-key-path=/etc/mcrouter/key.pem", "--pem-ca-path=/etc/mcrouter/ca.pem", "-f", "/etc/mcrouter/config.json", "--port", "11211"]
# Instance one - memcacheds are exposed on the local IP at ports 20200 and 20201
## config.json
{
"pools": {
"test": {
"servers": [
"$IP:20200:ascii:plain",
"$IP:20201:ascii:plain"
]
}
},
"route": "PoolRoute|test"
}
# Instance two - the ssl port for instance 1 is exposed on port 11210
## config.json
{
"pools": {
"test": {
"servers": [
"$IP:11210:ascii:ssl",
]
}
},
"route": "PoolRoute|test"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment