We default to 4GB RAM, and we use double that value for swap.
Signed-off-by: Zack Cerza <zack@redhat.com>
container_name: "grafana/grafana"
container_cpu_period: 100000
container_cpu_cores: 2
+ # container_memory is in GB
+ container_memory: 4
# version currently only applies to containers
version: 5.0.4
datasource: Local
keep_volumes: true
pull: true
cpu_period: "{{ grafana.container_cpu_period }}"
+ # As of ansible-2.5.2, this module doesn't support the equivalent of the
+ # --cpus flag, so we must use period/quota for now
cpu_quota: "{{ grafana.container_cpu_period * grafana.container_cpu_cores }}"
+ memory: "{{ grafana.container_memory }}GB"
+ memory_swap: "{{ grafana.container_memory * 2 }}GB"
env:
GF_INSTALL_PLUGINS: "{{ grafana.plugins|join(',') }}"
container_name: prom/prometheus
container_cpu_period: 100000
container_cpu_cores: 2
+ # container_memory is in GB
+ container_memory: 4
version: latest
data_dir: /var/lib/cephmetrics
user_id: '65534' # This is the UID used by the prom/prometheus docker image
# As of ansible-2.5.2, this module doesn't support the equivalent of the
# --cpus flag, so we must use period/quota for now
cpu_quota: "{{ prometheus.container_cpu_period * prometheus.container_cpu_cores }}"
+ #memory: 0
+ #memory_swap: 0
+ memory: "{{ prometheus.container_memory }}GB"
+ memory_swap: "{{ prometheus.container_memory * 2 }}GB"
notify: Service handler