Skip to content

Commit cd6876b

Browse files
committed
Add chunk cache configuration to group_vars/all.
Add Reductionist build configuration to group_vars/all to: - Specify the location of the repo - Disable cloning to the repo location, this is useful if the location already exists with changes that you don't want to lose
2 parents 36a655e + 53d2a4e commit cd6876b

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

deployment/group_vars/all

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ reductionist_build_image: false
55
reductionist_src_url: "http://github.com/stackhpc/reductionist-rs"
66
# Source version.
77
reductionist_src_version: "main"
8+
# Location for repo checkout if using a local build.
9+
reductionist_repo_location: "{{ ansible_facts.env.HOME }}/reductionist-rs"
10+
# With the following "reductionist_clone_repo" set true
11+
# an existing checkout in "reductionist_repo_location" will lose any local changes.
12+
reductionist_clone_repo: "true"
813
# Container name.
914
reductionist_name: "reductionist"
1015
# Container image name.
@@ -20,13 +25,24 @@ reductionist_env:
2025
REDUCTIONIST_ENABLE_JAEGER: "{{ (groups['jaeger'] | default([]) | length > 0) | string | lower }}"
2126
REDUCTIONIST_HTTPS: "true"
2227
REDUCTIONIST_PORT: "8081"
28+
REDUCTIONIST_USE_CHUNK_CACHE: "true"
29+
REDUCTIONIST_CHUNK_CACHE_PATH: "{{ reductionist_container_cache_path }}
30+
REDUCTIONIST_CHUNK_CACHE_AGE: "86400"
31+
REDUCTIONIST_CHUNK_CACHE_PRUNE_INTERVAL: "3600"
32+
REDUCTIONIST_CHUNK_CACHE_SIZE_LIMIT: "10GB"
33+
REDUCTIONIST_CHUNK_CACHE_QUEUE_SIZE: "32"
2334
# Path to certificates directory on remote host.
2435
reductionist_remote_certs_path: "{{ ansible_facts.env.HOME }}/certs"
2536
# Path to certificates directory in container.
2637
reductionist_container_certs_path: "/root/.config/reductionist/certs"
38+
# Path to cache directory on remote host.
39+
reductionist_remote_cache_path: "{{ ansible_facts.env.HOME }}/cache"
40+
# Path to cache directory in container.
41+
reductionist_container_cache_path: "/cache"
2742
# List of container volume mounts.
2843
reductionist_volumes:
2944
- "{{ reductionist_remote_certs_path }}:{{ reductionist_container_certs_path }}"
45+
- "{{ reductionist_remote_cache_path }}:{{ reductionist_container_cache_path }}"
3046
# Host on which HAProxy frontend is exposed.
3147
reductionist_host: "{{ hostvars[groups['haproxy'][0]].ansible_facts.default_ipv4.address }}"
3248
# Certificate validity.

deployment/site.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,15 +369,15 @@
369369
- name: Clone reductionist repo
370370
ansible.builtin.git:
371371
repo: "{{ reductionist_src_url }}"
372-
dest: "{{ ansible_env.HOME }}/reductionist-rs"
372+
dest: "{{ reductionist_repo_location }}"
373373
version: "{{ reductionist_src_version }}"
374-
when: reductionist_build_image | bool
374+
when: reductionist_build_image | bool and reductionist_clone_repo | bool
375375

376376
- name: Ensure reductionist image is built
377377
containers.podman.podman_image:
378378
name: "{{ reductionist_image }}"
379379
tag: "{{ reductionist_tag }}"
380-
path: "{{ ansible_env.HOME }}/reductionist-rs"
380+
path: "{{ reductionist_repo_location }}"
381381
when: reductionist_build_image | bool
382382

383383
- name: Ensure reductionist container is running

0 commit comments

Comments
 (0)