summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorchris meyers <chris.meyers.fsu@gmail.com>2020-04-01 22:09:57 +0200
committerchris meyers <chris.meyers.fsu@gmail.com>2020-04-06 14:35:12 +0200
commit7433aab258fd093d4c2de855ef3196b02e68f6d3 (patch)
treead1b905f2dc0fc87a230d3f46f1c4eb30f04ce36 /tools
parentuse memcached unix domain socket rather than tcp (diff)
downloadawx-7433aab258fd093d4c2de855ef3196b02e68f6d3.tar.xz
awx-7433aab258fd093d4c2de855ef3196b02e68f6d3.zip
switch memcached from tcp to unix domain socket
Diffstat (limited to 'tools')
-rw-r--r--tools/clusterdevel/roles/minishift/templates/configmap.yml.j29
-rw-r--r--tools/docker-compose-cluster.yml7
-rw-r--r--tools/docker-compose.yml7
-rwxr-xr-xtools/docker-compose/bootstrap_development.sh1
4 files changed, 12 insertions, 12 deletions
diff --git a/tools/clusterdevel/roles/minishift/templates/configmap.yml.j2 b/tools/clusterdevel/roles/minishift/templates/configmap.yml.j2
index 88d5b1d74f..74d0cb1fe8 100644
--- a/tools/clusterdevel/roles/minishift/templates/configmap.yml.j2
+++ b/tools/clusterdevel/roles/minishift/templates/configmap.yml.j2
@@ -91,15 +91,6 @@ data:
'ROUTING': 'awx.main.routing.channel_routing',
'CONFIG': {'url': BROKER_URL}}
}
- CACHES = {
- 'default': {
- 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
- 'LOCATION': '{}:{}'.format("localhost", "11211")
- },
- 'ephemeral': {
- 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
- },
- }
---
apiVersion: v1
kind: ConfigMap
diff --git a/tools/docker-compose-cluster.yml b/tools/docker-compose-cluster.yml
index b4454f9adf..c26382fdad 100644
--- a/tools/docker-compose-cluster.yml
+++ b/tools/docker-compose-cluster.yml
@@ -30,6 +30,7 @@ services:
volumes:
- "../:/awx_devel"
- "./redis/redis_socket_ha_1:/var/run/redis/"
+ - "./memcached/:/var/run/memcached"
ports:
- "5899-5999:5899-5999"
awx-2:
@@ -48,6 +49,7 @@ services:
volumes:
- "../:/awx_devel"
- "./redis/redis_socket_ha_2:/var/run/redis/"
+ - "./memcached/:/var/run/memcached"
ports:
- "7899-7999:7899-7999"
awx-3:
@@ -67,6 +69,7 @@ services:
volumes:
- "../:/awx_devel"
- "./redis/redis_socket_ha_3:/var/run/redis/"
+ - "./memcached/:/var/run/memcached"
ports:
- "8899-8999:8899-8999"
redis_1:
@@ -103,5 +106,9 @@ services:
image: postgres:10
container_name: tools_postgres_1
memcached:
+ user: ${CURRENT_UID}
image: memcached:alpine
container_name: tools_memcached_1
+ command: ["-s", "/var/run/memcached/memcached.sock", "-a", "0666"]
+ volumes:
+ - "./memcached/:/var/run/memcached"
diff --git a/tools/docker-compose.yml b/tools/docker-compose.yml
index 3b9428fc27..61a2d9b9ef 100644
--- a/tools/docker-compose.yml
+++ b/tools/docker-compose.yml
@@ -33,6 +33,7 @@ services:
- "../:/awx_devel"
- "../awx/projects/:/var/lib/awx/projects/"
- "./redis/redis_socket_standalone:/var/run/redis/"
+ - "./memcached/:/var/run/memcached"
privileged: true
# A useful container that simply passes through log messages to the console
# helpful for testing awx/tower logging
@@ -50,10 +51,12 @@ services:
environment:
POSTGRES_HOST_AUTH_METHOD: trust
memcached:
+ user: ${CURRENT_UID}
image: memcached:alpine
container_name: tools_memcached_1
- ports:
- - "11211:11211"
+ command: ["-s", "/var/run/memcached/memcached.sock", "-a", "0666"]
+ volumes:
+ - "./memcached/:/var/run/memcached"
redis:
image: redis:latest
container_name: tools_redis_1
diff --git a/tools/docker-compose/bootstrap_development.sh b/tools/docker-compose/bootstrap_development.sh
index 0210203949..00642d5528 100755
--- a/tools/docker-compose/bootstrap_development.sh
+++ b/tools/docker-compose/bootstrap_development.sh
@@ -3,7 +3,6 @@ set +x
# Wait for the databases to come up
ansible -i "127.0.0.1," -c local -v -m wait_for -a "host=postgres port=5432" all
-ansible -i "127.0.0.1," -c local -v -m wait_for -a "host=memcached port=11211" all
ansible -i "127.0.0.1," -c local -v -m wait_for -a "path=/var/run/redis/redis.sock" all
# In case AWX in the container wants to connect to itself, use "docker exec" to attach to the container otherwise