This repository was archived by the owner on Jul 2, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 12 files changed +101
-25
lines changed
services-config/supervisor/supervisord.d Expand file tree Collapse file tree 12 files changed +101
-25
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,6 @@ Summary of release changes for Version 2.
66
77CentOS-7 7.5.1804 x86_64 - Redis 4.0.
88
9- ### 2.0.0 - Unreleased
9+ ### 2.0.0 - 2018-11-03
1010
1111- Initial release.
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ RUN ln -sf \
4040 && chgrp redis \
4141 /usr/sbin/redis-server-wrapper \
4242 && sed -i -r \
43+ -e "s~^(logfile ).+$~\1\"\" ~" \
4344 -e "s~^(bind ).+$~\1 0.0.0.0~" \
4445 -e "s~^(# *)?(maxmemory ).+$~\2 {{REDIS_MAXMEMORY}}~" \
4546 -e "s~^(# *)?(maxmemory-policy ).+$~\2 {{REDIS_MAXMEMORY_POLICY}}~" \
@@ -59,8 +60,8 @@ ENV REDIS_AUTOSTART_REDIS_BOOTSTRAP="true" \
5960 REDIS_MAXMEMORY_SAMPLES="5" \
6061 REDIS_OPTIONS="" \
6162 REDIS_TCP_BACKLOG="1024" \
62- SSH_AUTOSTART_SSHD=false \
63- SSH_AUTOSTART_SSHD_BOOTSTRAP=false
63+ SSH_AUTOSTART_SSHD=" false" \
64+ SSH_AUTOSTART_SSHD_BOOTSTRAP=" false"
6465
6566# -----------------------------------------------------------------------------
6667# Set image metadata
Original file line number Diff line number Diff line change @@ -66,14 +66,14 @@ $ docker run \
6666 --detach \
6767 --name redis.pool-1.1.1 \
6868 --publish 6379:6379/tcp \
69+ --sysctl "net.core.somaxconn=2048" \
70+ --sysctl "net.ipv4.ip_local_port_range=1024 65535" \
71+ --sysctl "net.ipv4.route.flush=1" \
6972 --env "REDIS_MAXMEMORY=32mb" \
7073 --env "REDIS_MAXMEMORY_POLICY=allkeys-lru" \
7174 --env "REDIS_MAXMEMORY_SAMPLES=10" \
7275 --env "REDIS_OPTIONS=--loglevel verbose" \
7376 --env "REDIS_TCP_BACKLOG=2048" \
74- --sysctl "net.core.somaxconn=2048" \
75- --sysctl "net.ipv4.ip_local_port_range=1024 65535" \
76- --sysctl "net.ipv4.route.flush=1" \
7777 jdeathe/centos-ssh-redis:2.0.0
7878```
7979
Original file line number Diff line number Diff line change 33define DOCKER_CONTAINER_PARAMETERS
44--name $(DOCKER_NAME ) \
55--restart $(DOCKER_RESTART_POLICY ) \
6+ --sysctl "net.core.somaxconn=$(SYSCTL_NET_CORE_SOMAXCONN ) " \
7+ --sysctl "net.ipv4.ip_local_port_range=$(SYSCTL_NET_IPV4_IP_LOCAL_PORT_RANGE ) " \
8+ --sysctl "net.ipv4.route.flush=$(SYSCTL_NET_IPV4_ROUTE_FLUSH ) " \
69--env "REDIS_AUTOSTART_REDIS_BOOTSTRAP=$(REDIS_AUTOSTART_REDIS_BOOTSTRAP ) " \
710--env "REDIS_AUTOSTART_REDIS_WRAPPER=$(REDIS_AUTOSTART_REDIS_WRAPPER ) " \
811--env "REDIS_MAXMEMORY=$(REDIS_MAXMEMORY ) " \
Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ DOCKER_IMAGE_RELEASE_TAG_PATTERN := ^(1|2|centos-(6-1|7-2))\.[0-9]+\.[0-9]+$
1313# Variables
1414# -----------------------------------------------------------------------------
1515
16+ # Docker --sysctl settings
17+ SYSCTL_NET_CORE_SOMAXCONN ?= 1024
18+ SYSCTL_NET_IPV4_IP_LOCAL_PORT_RANGE ?= 1024 65535
19+ SYSCTL_NET_IPV4_ROUTE_FLUSH ?= 1
20+
1621# Docker image/container settings
1722DOCKER_CONTAINER_OPTS ?=
1823DOCKER_IMAGE_TAG ?= latest
@@ -29,7 +34,7 @@ NO_CACHE ?= false
2934DIST_PATH ?= ./dist
3035
3136# Number of seconds expected to complete container startup including bootstrap.
32- STARTUP_TIME ?= 1
37+ STARTUP_TIME ?= 2
3338
3439# ------------------------------------------------------------------------------
3540# Application container configuration
Original file line number Diff line number Diff line change 22priority = 100
33command = /usr/sbin/redis-server-wrapper
44autostart = %(ENV_REDIS_AUTOSTART_REDIS_WRAPPER)s
5- startsecs = 0
5+ startsecs = 1
66autorestart = true
77redirect_stderr = true
8- stdout_logfile = /var/log/redis-server-wrapper
8+ stdout_logfile = /var/log/redis/redis.log
99stdout_events_enabled = true
1010user = redis
Original file line number Diff line number Diff line change @@ -59,9 +59,12 @@ Environment="REDIS_AUTOSTART_REDIS_BOOTSTRAP=true"
5959Environment ="REDIS_AUTOSTART_REDIS_WRAPPER=true"
6060Environment ="REDIS_MAXMEMORY=64mb"
6161Environment ="REDIS_MAXMEMORY_POLICY=allkeys-lru"
62- Environment ="REDIS_MAXMEMORY_SAMPLES=10 "
62+ Environment ="REDIS_MAXMEMORY_SAMPLES=5 "
6363Environment ="REDIS_OPTIONS="
6464Environment ="REDIS_TCP_BACKLOG=1024"
65+ Environment ="SYSCTL_NET_CORE_SOMAXCONN=1024"
66+ Environment ="SYSCTL_NET_IPV4_IP_LOCAL_PORT_RANGE=1024 65535"
67+ Environment ="SYSCTL_NET_IPV4_ROUTE_FLUSH=1"
6568
6669# Initialisation: Load image from local storage if available, otherwise pull.
6770ExecStartPre =/bin/bash -c \
@@ -91,6 +94,9 @@ ExecStartPre=-/bin/bash -c \
9194ExecStart =/bin/bash -c \
9295 "exec /usr/bin/docker run \
9396 --name %p.%i \
97+ --sysctl \" net.core.somaxconn =${SYSCTL_NET_CORE_SOMAXCONN}\" \
98+ --sysctl \" net.ipv4.ip_local_port_range =${SYSCTL_NET_IPV4_IP_LOCAL_PORT_RANGE}\" \
99+ --sysctl \" net.ipv4.route.flush =${SYSCTL_NET_IPV4_ROUTE_FLUSH}\" \
94100 --env \" REDIS_AUTOSTART_REDIS_BOOTSTRAP =${REDIS_AUTOSTART_REDIS_BOOTSTRAP}\" \
95101 --env \" REDIS_AUTOSTART_REDIS_WRAPPER =${REDIS_AUTOSTART_REDIS_WRAPPER}\" \
96102 --env \" REDIS_MAXMEMORY =${REDIS_MAXMEMORY}\" \
Original file line number Diff line number Diff line change 4040# Common parameters of create and run targets
4141DOCKER_CONTAINER_PARAMETERS=" --name ${DOCKER_NAME} \
4242--restart ${DOCKER_RESTART_POLICY} \
43+ --sysctl \" net.core.somaxconn=${SYSCTL_NET_CORE_SOMAXCONN} \" \
44+ --sysctl \" net.ipv4.ip_local_port_range=${SYSCTL_NET_IPV4_IP_LOCAL_PORT_RANGE} \" \
45+ --sysctl \" net.ipv4.route.flush=${SYSCTL_NET_IPV4_ROUTE_FLUSH} \" \
4346--env \" REDIS_AUTOSTART_REDIS_BOOTSTRAP=${REDIS_AUTOSTART_REDIS_BOOTSTRAP} \" \
4447--env \" REDIS_AUTOSTART_REDIS_WRAPPER=${REDIS_AUTOSTART_REDIS_WRAPPER} \" \
4548--env \" REDIS_MAXMEMORY=${REDIS_MAXMEMORY} \" \
Original file line number Diff line number Diff line change @@ -28,7 +28,12 @@ NO_CACHE="${NO_CACHE:-false}"
2828DIST_PATH=" ${DIST_PATH:- ./ dist} "
2929
3030# Number of seconds expected to complete container startup including bootstrap.
31- STARTUP_TIME=" ${STARTUP_TIME:- 1} "
31+ STARTUP_TIME=" ${STARTUP_TIME:- 2} "
32+
33+ # Docker --sysctl settings
34+ SYSCTL_NET_CORE_SOMAXCONN=" ${SYSCTL_NET_CORE_SOMAXCONN:- 1024} "
35+ SYSCTL_NET_IPV4_IP_LOCAL_PORT_RANGE=" ${SYSCTL_NET_IPV4_IP_LOCAL_PORT_RANGE:- 1024 65535} "
36+ SYSCTL_NET_IPV4_ROUTE_FLUSH=" ${SYSCTL_NET_IPV4_ROUTE_FLUSH:- 1} "
3237
3338# ETCD register service settings
3439REGISTER_ETCD_PARAMETERS=" ${REGISTER_ETCD_PARAMETERS:- } "
Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ readonly SERVICE_UNIT_ENVIRONMENT_KEYS="
1414 REDIS_MAXMEMORY_SAMPLES
1515 REDIS_OPTIONS
1616 REDIS_TCP_BACKLOG
17+ SYSCTL_NET_CORE_SOMAXCONN
18+ SYSCTL_NET_IPV4_IP_LOCAL_PORT_RANGE
19+ SYSCTL_NET_IPV4_ROUTE_FLUSH
1720"
1821readonly SERVICE_UNIT_REGISTER_ENVIRONMENT_KEYS="
1922 REGISTER_ETCD_PARAMETERS
@@ -24,4 +27,4 @@ readonly SERVICE_UNIT_REGISTER_ENVIRONMENT_KEYS="
2427# -----------------------------------------------------------------------------
2528# Variables
2629# -----------------------------------------------------------------------------
27- SERVICE_UNIT_INSTALL_TIMEOUT=${SERVICE_UNIT_INSTALL_TIMEOUT:- 4 }
30+ SERVICE_UNIT_INSTALL_TIMEOUT=${SERVICE_UNIT_INSTALL_TIMEOUT:- 5 }
You can’t perform that action at this time.
0 commit comments