mirror of https://github.com/ceph/ceph-ansible.git
container: introduce resource limitation for containers
This can be controlled via 2 options: * ceph_$DAEMON_docker_memory_limit * ceph_$DAEMON_docker_cpu_limit All daemons default to 1GB for memory and 1 CPU by default. Recommendations from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations Signed-off-by: Sébastien Han <seb@redhat.com>pull/1859/head
parent
b6c1a0c68f
commit
2fa151b9e8
|
@ -25,6 +25,13 @@ dummy:
|
||||||
# DOCKER #
|
# DOCKER #
|
||||||
##########
|
##########
|
||||||
|
|
||||||
|
# Resource limitation
|
||||||
|
# For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
|
||||||
|
# Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
|
||||||
|
# These options can be passed using the 'ceph_mds_docker_extra_env' variable.
|
||||||
|
#ceph_mds_docker_memory_limit: 1g
|
||||||
|
#ceph_mds_docker_cpu_limit: 1
|
||||||
|
|
||||||
#ceph_mds_docker_extra_env: -e CLUSTER={{ cluster }} -e MDS_NAME={{ ansible_hostname }}
|
#ceph_mds_docker_extra_env: -e CLUSTER={{ cluster }} -e MDS_NAME={{ ansible_hostname }}
|
||||||
#ceph_config_keys: [] # DON'T TOUCH ME
|
#ceph_config_keys: [] # DON'T TOUCH ME
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,13 @@ dummy:
|
||||||
# DOCKER #
|
# DOCKER #
|
||||||
##########
|
##########
|
||||||
|
|
||||||
|
# Resource limitation
|
||||||
|
# For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
|
||||||
|
# Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
|
||||||
|
# These options can be passed using the 'ceph_mgr_docker_extra_env' variable.
|
||||||
|
#ceph_mgr_docker_memory_limit: 1g
|
||||||
|
#ceph_mgr_docker_cpu_limit: 1
|
||||||
|
|
||||||
#ceph_mgr_docker_extra_env: -e CLUSTER={{ cluster }} -e MGR_NAME={{ ansible_hostname }}
|
#ceph_mgr_docker_extra_env: -e CLUSTER={{ cluster }} -e MGR_NAME={{ ansible_hostname }}
|
||||||
#ceph_config_keys: [] # DON'T TOUCH ME
|
#ceph_config_keys: [] # DON'T TOUCH ME
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ dummy:
|
||||||
# The value for 'key' can be a pre-generated key,
|
# The value for 'key' can be a pre-generated key,
|
||||||
# e.g key: "AQDC2UxZH4yeLhAAgTaZb+4wDUlYOsr1OfZSpQ=="
|
# e.g key: "AQDC2UxZH4yeLhAAgTaZb+4wDUlYOsr1OfZSpQ=="
|
||||||
# By default, keys will be auto-generated.
|
# By default, keys will be auto-generated.
|
||||||
#
|
#
|
||||||
# To have have ansible setfacl the generated key, set the acls var like so:
|
# To have have ansible setfacl the generated key, set the acls var like so:
|
||||||
# acls: ["u:nova:r--", "u:cinder:r--", "u:glance:r--", "u:gnocchi:r--"]
|
# acls: ["u:nova:r--", "u:cinder:r--", "u:glance:r--", "u:gnocchi:r--"]
|
||||||
#openstack_keys:
|
#openstack_keys:
|
||||||
|
@ -115,6 +115,13 @@ dummy:
|
||||||
##########
|
##########
|
||||||
#ceph_mon_docker_subnet: "{{ public_network }}"# subnet of the monitor_interface
|
#ceph_mon_docker_subnet: "{{ public_network }}"# subnet of the monitor_interface
|
||||||
|
|
||||||
|
# Resource limitation
|
||||||
|
# For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
|
||||||
|
# Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
|
||||||
|
# These options can be passed using the 'ceph_mon_docker_extra_env' variable.
|
||||||
|
#ceph_mon_docker_memory_limit: 1g
|
||||||
|
#ceph_mon_docker_cpu_limit: 1
|
||||||
|
|
||||||
# ceph_mon_docker_extra_env:
|
# ceph_mon_docker_extra_env:
|
||||||
#
|
#
|
||||||
# Use this variable to add extra env configuration to run your mon container.
|
# Use this variable to add extra env configuration to run your mon container.
|
||||||
|
|
|
@ -226,6 +226,13 @@ dummy:
|
||||||
|
|
||||||
#ceph_config_keys: [] # DON'T TOUCH ME
|
#ceph_config_keys: [] # DON'T TOUCH ME
|
||||||
|
|
||||||
|
# Resource limitation
|
||||||
|
# For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
|
||||||
|
# Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
|
||||||
|
# These options can be passed using the 'ceph_osd_docker_extra_env' variable.
|
||||||
|
#ceph_osd_docker_memory_limit: 1g
|
||||||
|
#ceph_osd_docker_cpu_limit: 1
|
||||||
|
|
||||||
# PREPARE DEVICE
|
# PREPARE DEVICE
|
||||||
#
|
#
|
||||||
# WARNING /!\ DMCRYPT scenario ONLY works with Docker version 1.12.5 and above
|
# WARNING /!\ DMCRYPT scenario ONLY works with Docker version 1.12.5 and above
|
||||||
|
|
|
@ -23,6 +23,7 @@ dummy:
|
||||||
# NOTE: deprecated generic local user id for pre-Luminous releases
|
# NOTE: deprecated generic local user id for pre-Luminous releases
|
||||||
#ceph_rbd_mirror_local_user: "admin"
|
#ceph_rbd_mirror_local_user: "admin"
|
||||||
|
|
||||||
|
|
||||||
#################
|
#################
|
||||||
# CONFIGURATION #
|
# CONFIGURATION #
|
||||||
#################
|
#################
|
||||||
|
@ -41,10 +42,19 @@ dummy:
|
||||||
# /etc/ceph/<remote_cluster>.client.<remote_user>.keyring
|
# /etc/ceph/<remote_cluster>.client.<remote_user>.keyring
|
||||||
#ceph_rbd_mirror_remote_user: ""
|
#ceph_rbd_mirror_remote_user: ""
|
||||||
|
|
||||||
|
|
||||||
##########
|
##########
|
||||||
# DOCKER #
|
# DOCKER #
|
||||||
##########
|
##########
|
||||||
|
|
||||||
|
# Resource limitation
|
||||||
|
# For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
|
||||||
|
# Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
|
||||||
|
# These options can be passed using the 'ceph_rbd_mirror_docker_extra_env' variable.
|
||||||
|
#ceph_rbd_mirror_docker_memory_limit: 1g
|
||||||
|
#ceph_rbd_mirror_docker_cpu_limit: 1
|
||||||
|
|
||||||
|
#ceph_rbd_mirror_docker_extra_env:
|
||||||
#ceph_config_keys: [] # DON'T TOUCH ME
|
#ceph_config_keys: [] # DON'T TOUCH ME
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,13 @@ dummy:
|
||||||
# DOCKER #
|
# DOCKER #
|
||||||
##########
|
##########
|
||||||
|
|
||||||
|
# Resource limitation
|
||||||
|
# For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
|
||||||
|
# Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
|
||||||
|
# These options can be passed using the 'ceph_rgw_docker_extra_env' variable.
|
||||||
|
#ceph_rgw_docker_memory_limit: 1g
|
||||||
|
#ceph_rgw_docker_cpu_limit: 1
|
||||||
|
|
||||||
#ceph_rgw_docker_extra_env:
|
#ceph_rgw_docker_extra_env:
|
||||||
#ceph_config_keys: [] # DON'T TOUCH ME
|
#ceph_config_keys: [] # DON'T TOUCH ME
|
||||||
#rgw_config_keys: "/" # DON'T TOUCH ME
|
#rgw_config_keys: "/" # DON'T TOUCH ME
|
||||||
|
|
|
@ -22,6 +22,15 @@
|
||||||
monitor_name: "{{ ansible_fqdn }}"
|
monitor_name: "{{ ansible_fqdn }}"
|
||||||
when: mon_use_fqdn
|
when: mon_use_fqdn
|
||||||
|
|
||||||
|
- name: get docker version
|
||||||
|
command: docker --version
|
||||||
|
changed_when: false
|
||||||
|
always_run: yes
|
||||||
|
register: docker_version
|
||||||
|
|
||||||
|
- set_fact:
|
||||||
|
docker_version: "{{ docker_version.stdout.split(' ')[2] }}"
|
||||||
|
|
||||||
- name: check if a cluster is already running
|
- name: check if a cluster is already running
|
||||||
command: "docker ps -q -a --filter='ancestor={{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'"
|
command: "docker ps -q -a --filter='ancestor={{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'"
|
||||||
register: ceph_health
|
register: ceph_health
|
||||||
|
|
|
@ -17,6 +17,13 @@ copy_admin_key: false
|
||||||
# DOCKER #
|
# DOCKER #
|
||||||
##########
|
##########
|
||||||
|
|
||||||
|
# Resource limitation
|
||||||
|
# For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
|
||||||
|
# Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
|
||||||
|
# These options can be passed using the 'ceph_mds_docker_extra_env' variable.
|
||||||
|
ceph_mds_docker_memory_limit: 1g
|
||||||
|
ceph_mds_docker_cpu_limit: 1
|
||||||
|
|
||||||
ceph_mds_docker_extra_env: -e CLUSTER={{ cluster }} -e MDS_NAME={{ ansible_hostname }}
|
ceph_mds_docker_extra_env: -e CLUSTER={{ cluster }} -e MDS_NAME={{ ansible_hostname }}
|
||||||
ceph_config_keys: [] # DON'T TOUCH ME
|
ceph_config_keys: [] # DON'T TOUCH ME
|
||||||
|
|
||||||
|
|
|
@ -7,20 +7,26 @@ EnvironmentFile=-/etc/environment
|
||||||
ExecStartPre=-/usr/bin/docker stop ceph-mds-{{ ansible_hostname }}
|
ExecStartPre=-/usr/bin/docker stop ceph-mds-{{ ansible_hostname }}
|
||||||
ExecStartPre=-/usr/bin/docker rm ceph-mds-{{ ansible_hostname }}
|
ExecStartPre=-/usr/bin/docker rm ceph-mds-{{ ansible_hostname }}
|
||||||
ExecStart=/usr/bin/docker run --rm --net=host \
|
ExecStart=/usr/bin/docker run --rm --net=host \
|
||||||
{% if not containerized_deployment_with_kv -%}
|
--memory={{ ceph_mds_docker_memory_limit }} \
|
||||||
-v /var/lib/ceph:/var/lib/ceph \
|
{% if docker_version.split('.')[0] | version_compare('13', '>=') -%}
|
||||||
-v /etc/ceph:/etc/ceph \
|
--cpus={{ ceph_mds_docker_cpu_limit }} \
|
||||||
{% else -%}
|
{% else -%}
|
||||||
-e KV_TYPE={{kv_type}} \
|
--cpu-quota={{ ceph_mds_docker_cpu_limit * 100000 }} \
|
||||||
-e KV_IP={{kv_endpoint}} \
|
{% endif -%}
|
||||||
-e KV_PORT={{kv_port}} \
|
{% if not containerized_deployment_with_kv -%}
|
||||||
{% endif -%}
|
-v /var/lib/ceph:/var/lib/ceph \
|
||||||
-v /etc/localtime:/etc/localtime:ro \
|
-v /etc/ceph:/etc/ceph \
|
||||||
-e CEPH_DAEMON=MDS \
|
{% else -%}
|
||||||
-e CEPHFS_CREATE=1 \
|
-e KV_TYPE={{kv_type}} \
|
||||||
{{ ceph_mds_docker_extra_env }} \
|
-e KV_IP={{kv_endpoint}} \
|
||||||
--name=ceph-mds-{{ ansible_hostname }} \
|
-e KV_PORT={{kv_port}} \
|
||||||
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
|
{% endif -%}
|
||||||
|
-v /etc/localtime:/etc/localtime:ro \
|
||||||
|
-e CEPH_DAEMON=MDS \
|
||||||
|
-e CEPHFS_CREATE=1 \
|
||||||
|
{{ ceph_mds_docker_extra_env }} \
|
||||||
|
--name=ceph-mds-{{ ansible_hostname }} \
|
||||||
|
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
|
||||||
ExecStopPost=-/usr/bin/docker stop ceph-mds-{{ ansible_hostname }}
|
ExecStopPost=-/usr/bin/docker stop ceph-mds-{{ ansible_hostname }}
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10s
|
RestartSec=10s
|
||||||
|
|
|
@ -3,6 +3,13 @@
|
||||||
# DOCKER #
|
# DOCKER #
|
||||||
##########
|
##########
|
||||||
|
|
||||||
|
# Resource limitation
|
||||||
|
# For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
|
||||||
|
# Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
|
||||||
|
# These options can be passed using the 'ceph_mgr_docker_extra_env' variable.
|
||||||
|
ceph_mgr_docker_memory_limit: 1g
|
||||||
|
ceph_mgr_docker_cpu_limit: 1
|
||||||
|
|
||||||
ceph_mgr_docker_extra_env: -e CLUSTER={{ cluster }} -e MGR_NAME={{ ansible_hostname }}
|
ceph_mgr_docker_extra_env: -e CLUSTER={{ cluster }} -e MGR_NAME={{ ansible_hostname }}
|
||||||
ceph_config_keys: [] # DON'T TOUCH ME
|
ceph_config_keys: [] # DON'T TOUCH ME
|
||||||
|
|
||||||
|
|
|
@ -7,19 +7,25 @@ EnvironmentFile=-/etc/environment
|
||||||
ExecStartPre=-/usr/bin/docker stop ceph-mgr-{{ ansible_hostname }}
|
ExecStartPre=-/usr/bin/docker stop ceph-mgr-{{ ansible_hostname }}
|
||||||
ExecStartPre=-/usr/bin/docker rm ceph-mgr-{{ ansible_hostname }}
|
ExecStartPre=-/usr/bin/docker rm ceph-mgr-{{ ansible_hostname }}
|
||||||
ExecStart=/usr/bin/docker run --rm --net=host \
|
ExecStart=/usr/bin/docker run --rm --net=host \
|
||||||
{% if not containerized_deployment_with_kv -%}
|
--memory={{ ceph_mgr_docker_memory_limit }} \
|
||||||
-v /var/lib/ceph:/var/lib/ceph \
|
{% if docker_version.split('.')[0] | version_compare('13', '>=') -%}
|
||||||
-v /etc/ceph:/etc/ceph \
|
--cpus={{ ceph_mgr_docker_cpu_limit }} \
|
||||||
{% else -%}
|
{% else -%}
|
||||||
-e KV_TYPE={{kv_type}} \
|
--cpu-quota={{ ceph_mgr_docker_cpu_limit * 100000 }} \
|
||||||
-e KV_IP={{kv_endpoint}} \
|
{% endif -%}
|
||||||
-e KV_PORT={{kv_port}} \
|
{% if not containerized_deployment_with_kv -%}
|
||||||
{% endif -%}
|
-v /var/lib/ceph:/var/lib/ceph \
|
||||||
-v /etc/localtime:/etc/localtime:ro \
|
-v /etc/ceph:/etc/ceph \
|
||||||
-e CEPH_DAEMON=MGR \
|
{% else -%}
|
||||||
{{ ceph_mgr_docker_extra_env }} \
|
-e KV_TYPE={{kv_type}} \
|
||||||
--name=ceph-mgr-{{ ansible_hostname }} \
|
-e KV_IP={{kv_endpoint}} \
|
||||||
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
|
-e KV_PORT={{kv_port}} \
|
||||||
|
{% endif -%}
|
||||||
|
-v /etc/localtime:/etc/localtime:ro \
|
||||||
|
-e CEPH_DAEMON=MGR \
|
||||||
|
{{ ceph_mgr_docker_extra_env }} \
|
||||||
|
--name=ceph-mgr-{{ ansible_hostname }} \
|
||||||
|
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
|
||||||
ExecStopPost=-/usr/bin/docker stop ceph-mgr-{{ ansible_hostname }}
|
ExecStopPost=-/usr/bin/docker stop ceph-mgr-{{ ansible_hostname }}
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10s
|
RestartSec=10s
|
||||||
|
|
|
@ -92,7 +92,7 @@ openstack_pools:
|
||||||
# The value for 'key' can be a pre-generated key,
|
# The value for 'key' can be a pre-generated key,
|
||||||
# e.g key: "AQDC2UxZH4yeLhAAgTaZb+4wDUlYOsr1OfZSpQ=="
|
# e.g key: "AQDC2UxZH4yeLhAAgTaZb+4wDUlYOsr1OfZSpQ=="
|
||||||
# By default, keys will be auto-generated.
|
# By default, keys will be auto-generated.
|
||||||
#
|
#
|
||||||
# To have have ansible setfacl the generated key, set the acls var like so:
|
# To have have ansible setfacl the generated key, set the acls var like so:
|
||||||
# acls: ["u:nova:r--", "u:cinder:r--", "u:glance:r--", "u:gnocchi:r--"]
|
# acls: ["u:nova:r--", "u:cinder:r--", "u:glance:r--", "u:gnocchi:r--"]
|
||||||
openstack_keys:
|
openstack_keys:
|
||||||
|
@ -107,6 +107,13 @@ openstack_keys:
|
||||||
##########
|
##########
|
||||||
ceph_mon_docker_subnet: "{{ public_network }}"# subnet of the monitor_interface
|
ceph_mon_docker_subnet: "{{ public_network }}"# subnet of the monitor_interface
|
||||||
|
|
||||||
|
# Resource limitation
|
||||||
|
# For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
|
||||||
|
# Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
|
||||||
|
# These options can be passed using the 'ceph_mon_docker_extra_env' variable.
|
||||||
|
ceph_mon_docker_memory_limit: 1g
|
||||||
|
ceph_mon_docker_cpu_limit: 1
|
||||||
|
|
||||||
# ceph_mon_docker_extra_env:
|
# ceph_mon_docker_extra_env:
|
||||||
#
|
#
|
||||||
# Use this variable to add extra env configuration to run your mon container.
|
# Use this variable to add extra env configuration to run your mon container.
|
||||||
|
|
|
@ -7,37 +7,43 @@ EnvironmentFile=-/etc/environment
|
||||||
ExecStartPre=-/usr/bin/docker rm ceph-mon-%i
|
ExecStartPre=-/usr/bin/docker rm ceph-mon-%i
|
||||||
ExecStartPre=$(command -v mkdir) -p /etc/ceph /var/lib/ceph/mon
|
ExecStartPre=$(command -v mkdir) -p /etc/ceph /var/lib/ceph/mon
|
||||||
ExecStart=/usr/bin/docker run --rm --name ceph-mon-%i --net=host \
|
ExecStart=/usr/bin/docker run --rm --name ceph-mon-%i --net=host \
|
||||||
{% if not containerized_deployment_with_kv -%}
|
--memory={{ ceph_mon_docker_memory_limit }} \
|
||||||
-v /var/lib/ceph:/var/lib/ceph \
|
{% if docker_version.split('.')[0] | version_compare('13', '>=') -%}
|
||||||
-v /etc/ceph:/etc/ceph \
|
--cpus={{ ceph_mon_docker_cpu_limit }} \
|
||||||
{% else -%}
|
{% else -%}
|
||||||
-e KV_TYPE={{kv_type}} \
|
--cpu-quota={{ ceph_mon_docker_cpu_limit * 100000 }} \
|
||||||
-e KV_IP={{kv_endpoint}}\
|
{% endif -%}
|
||||||
-e KV_PORT={{kv_port}} \
|
{% if not containerized_deployment_with_kv -%}
|
||||||
{% endif -%}
|
-v /var/lib/ceph:/var/lib/ceph \
|
||||||
-v /etc/localtime:/etc/localtime:ro \
|
-v /etc/ceph:/etc/ceph \
|
||||||
{% if mon_docker_privileged -%}
|
{% else -%}
|
||||||
--privileged \
|
-e KV_TYPE={{kv_type}} \
|
||||||
{% endif -%}
|
-e KV_IP={{kv_endpoint}}\
|
||||||
{% if mon_docker_net_host -%}
|
-e KV_PORT={{kv_port}} \
|
||||||
--net=host \
|
{% endif -%}
|
||||||
{% endif -%}
|
-v /etc/localtime:/etc/localtime:ro \
|
||||||
-e CEPH_DAEMON=MON \
|
{% if mon_docker_privileged -%}
|
||||||
-e CEPH_PUBLIC_NETWORK={{ ceph_mon_docker_subnet }} \
|
--privileged \
|
||||||
-e IP_VERSION={{ ip_version[-1:] }} \
|
{% endif -%}
|
||||||
{% if monitor_address is defined and monitor_address != '0.0.0.0' %}
|
{% if mon_docker_net_host -%}
|
||||||
{% if ip_version == 'ipv4' -%}
|
--net=host \
|
||||||
-e MON_IP={{ monitor_address }} \
|
{% endif -%}
|
||||||
{% elif ip_version == 'ipv6' -%}
|
-e CEPH_DAEMON=MON \
|
||||||
-e MON_IP=[{{ monitor_address }}] \
|
-e CEPH_PUBLIC_NETWORK={{ ceph_mon_docker_subnet }} \
|
||||||
{% endif -%}
|
-e IP_VERSION={{ ip_version[-1:] }} \
|
||||||
{% elif ip_version == 'ipv4' -%}
|
{% if monitor_address is defined and monitor_address != '0.0.0.0' %}
|
||||||
-e MON_IP={{ hostvars[inventory_hostname]['ansible_' + monitor_interface][ip_version]['address'] }} \
|
{% if ip_version == 'ipv4' -%}
|
||||||
{% elif ip_version =='ipv6' -%}
|
-e MON_IP={{ monitor_address }} \
|
||||||
-e MON_IP=[{{ hostvars[inventory_hostname]['ansible_' + monitor_interface][ip_version][0]['address'] }}] \
|
{% elif ip_version == 'ipv6' -%}
|
||||||
{% endif -%}
|
-e MON_IP=[{{ monitor_address }}] \
|
||||||
{{ ceph_mon_docker_extra_env }} \
|
{% endif -%}
|
||||||
{{ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
|
{% elif ip_version == 'ipv4' -%}
|
||||||
|
-e MON_IP={{ hostvars[inventory_hostname]['ansible_' + monitor_interface][ip_version]['address'] }} \
|
||||||
|
{% elif ip_version =='ipv6' -%}
|
||||||
|
-e MON_IP=[{{ hostvars[inventory_hostname]['ansible_' + monitor_interface][ip_version][0]['address'] }}] \
|
||||||
|
{% endif -%}
|
||||||
|
{{ ceph_mon_docker_extra_env }} \
|
||||||
|
{{ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
|
||||||
ExecStopPost=-/usr/bin/docker stop ceph-mon-%i
|
ExecStopPost=-/usr/bin/docker stop ceph-mon-%i
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10s
|
RestartSec=10s
|
||||||
|
|
|
@ -218,6 +218,13 @@ lvm_volumes: []
|
||||||
|
|
||||||
ceph_config_keys: [] # DON'T TOUCH ME
|
ceph_config_keys: [] # DON'T TOUCH ME
|
||||||
|
|
||||||
|
# Resource limitation
|
||||||
|
# For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
|
||||||
|
# Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
|
||||||
|
# These options can be passed using the 'ceph_osd_docker_extra_env' variable.
|
||||||
|
ceph_osd_docker_memory_limit: 1g
|
||||||
|
ceph_osd_docker_cpu_limit: 1
|
||||||
|
|
||||||
# PREPARE DEVICE
|
# PREPARE DEVICE
|
||||||
#
|
#
|
||||||
# WARNING /!\ DMCRYPT scenario ONLY works with Docker version 1.12.5 and above
|
# WARNING /!\ DMCRYPT scenario ONLY works with Docker version 1.12.5 and above
|
||||||
|
|
|
@ -54,6 +54,12 @@ expose_partitions $1
|
||||||
--net=host \
|
--net=host \
|
||||||
--privileged=true \
|
--privileged=true \
|
||||||
--pid=host \
|
--pid=host \
|
||||||
|
--memory={{ ceph_osd_docker_memory_limit }} \
|
||||||
|
{% if docker_version.split('.')[0] | version_compare('13', '>=') -%}
|
||||||
|
--cpus={{ ceph_osd_docker_cpu_limit }} \
|
||||||
|
{% else -%}
|
||||||
|
--cpu-quota={{ ceph_osd_docker_cpu_limit * 100000 }} \
|
||||||
|
{% endif -%}
|
||||||
-v /dev:/dev \
|
-v /dev:/dev \
|
||||||
-v /etc/localtime:/etc/localtime:ro \
|
-v /etc/localtime:/etc/localtime:ro \
|
||||||
-v /var/lib/ceph:/var/lib/ceph \
|
-v /var/lib/ceph:/var/lib/ceph \
|
||||||
|
|
|
@ -15,6 +15,7 @@ copy_admin_key: false
|
||||||
# NOTE: deprecated generic local user id for pre-Luminous releases
|
# NOTE: deprecated generic local user id for pre-Luminous releases
|
||||||
ceph_rbd_mirror_local_user: "admin"
|
ceph_rbd_mirror_local_user: "admin"
|
||||||
|
|
||||||
|
|
||||||
#################
|
#################
|
||||||
# CONFIGURATION #
|
# CONFIGURATION #
|
||||||
#################
|
#################
|
||||||
|
@ -33,10 +34,19 @@ ceph_rbd_mirror_remote_cluster: ""
|
||||||
# /etc/ceph/<remote_cluster>.client.<remote_user>.keyring
|
# /etc/ceph/<remote_cluster>.client.<remote_user>.keyring
|
||||||
ceph_rbd_mirror_remote_user: ""
|
ceph_rbd_mirror_remote_user: ""
|
||||||
|
|
||||||
|
|
||||||
##########
|
##########
|
||||||
# DOCKER #
|
# DOCKER #
|
||||||
##########
|
##########
|
||||||
|
|
||||||
|
# Resource limitation
|
||||||
|
# For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
|
||||||
|
# Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
|
||||||
|
# These options can be passed using the 'ceph_rbd_mirror_docker_extra_env' variable.
|
||||||
|
ceph_rbd_mirror_docker_memory_limit: 1g
|
||||||
|
ceph_rbd_mirror_docker_cpu_limit: 1
|
||||||
|
|
||||||
|
ceph_rbd_mirror_docker_extra_env:
|
||||||
ceph_config_keys: [] # DON'T TOUCH ME
|
ceph_config_keys: [] # DON'T TOUCH ME
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,17 +7,24 @@ EnvironmentFile=-/etc/environment
|
||||||
ExecStartPre=-/usr/bin/docker stop ceph-rbd-mirror-{{ ansible_hostname }}
|
ExecStartPre=-/usr/bin/docker stop ceph-rbd-mirror-{{ ansible_hostname }}
|
||||||
ExecStartPre=-/usr/bin/docker rm ceph-rbd-mirror-{{ ansible_hostname }}
|
ExecStartPre=-/usr/bin/docker rm ceph-rbd-mirror-{{ ansible_hostname }}
|
||||||
ExecStart=/usr/bin/docker run --rm --net=host \
|
ExecStart=/usr/bin/docker run --rm --net=host \
|
||||||
{% if not containerized_deployment_with_kv -%}
|
--memory={{ ceph_rbd_mirorr_docker_memory_limit }} \
|
||||||
-v /etc/ceph:/etc/ceph \
|
{% if docker_version.split('.')[0] | version_compare('13', '>=') -%}
|
||||||
{% else -%}
|
--cpus={{ ceph_rbd_mirror_docker_cpu_limit }} \
|
||||||
-e KV_TYPE={{kv_type}} \
|
{% else -%}
|
||||||
-e KV_IP={{kv_endpoint}} \
|
--cpu-quota={{ ceph_rbd_mirorr_docker_cpu_limit * 100000 }} \
|
||||||
-e KV_PORT={{kv_port}} \
|
{% endif -%}
|
||||||
{% endif -%}
|
{% if not containerized_deployment_with_kv -%}
|
||||||
-v /etc/localtime:/etc/localtime:ro \
|
-v /etc/ceph:/etc/ceph \
|
||||||
-e CEPH_DAEMON=RBD_MIRROR \
|
{% else -%}
|
||||||
--name=ceph-rbd-mirror-{{ ansible_hostname }} \
|
-e KV_TYPE={{kv_type}} \
|
||||||
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
|
-e KV_IP={{kv_endpoint}} \
|
||||||
|
-e KV_PORT={{kv_port}} \
|
||||||
|
{% endif -%}
|
||||||
|
-v /etc/localtime:/etc/localtime:ro \
|
||||||
|
-e CEPH_DAEMON=RBD_MIRROR \
|
||||||
|
--name=ceph-rbd-mirror-{{ ansible_hostname }} \
|
||||||
|
{{ ceph_rbd_mirror_docker_extra_env }} \
|
||||||
|
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
|
||||||
ExecStopPost=-/usr/bin/docker stop ceph-rbd-mirror-{{ ansible_hostname }}
|
ExecStopPost=-/usr/bin/docker stop ceph-rbd-mirror-{{ ansible_hostname }}
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10s
|
RestartSec=10s
|
||||||
|
|
|
@ -49,6 +49,13 @@ rgw_pull_proto: "http"
|
||||||
# DOCKER #
|
# DOCKER #
|
||||||
##########
|
##########
|
||||||
|
|
||||||
|
# Resource limitation
|
||||||
|
# For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
|
||||||
|
# Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
|
||||||
|
# These options can be passed using the 'ceph_rgw_docker_extra_env' variable.
|
||||||
|
ceph_rgw_docker_memory_limit: 1g
|
||||||
|
ceph_rgw_docker_cpu_limit: 1
|
||||||
|
|
||||||
ceph_rgw_docker_extra_env:
|
ceph_rgw_docker_extra_env:
|
||||||
ceph_config_keys: [] # DON'T TOUCH ME
|
ceph_config_keys: [] # DON'T TOUCH ME
|
||||||
rgw_config_keys: "/" # DON'T TOUCH ME
|
rgw_config_keys: "/" # DON'T TOUCH ME
|
||||||
|
|
|
@ -7,6 +7,12 @@ EnvironmentFile=-/etc/environment
|
||||||
ExecStartPre=-/usr/bin/docker stop ceph-rgw-{{ ansible_hostname }}
|
ExecStartPre=-/usr/bin/docker stop ceph-rgw-{{ ansible_hostname }}
|
||||||
ExecStartPre=-/usr/bin/docker rm ceph-rgw-{{ ansible_hostname }}
|
ExecStartPre=-/usr/bin/docker rm ceph-rgw-{{ ansible_hostname }}
|
||||||
ExecStart=/usr/bin/docker run --rm --net=host \
|
ExecStart=/usr/bin/docker run --rm --net=host \
|
||||||
|
--memory={{ ceph_rgw_docker_memory_limit }} \
|
||||||
|
{% if docker_version.split('.')[0] | version_compare('13', '>=') -%}
|
||||||
|
--cpus={{ ceph_rgw_docker_cpu_limit }} \
|
||||||
|
{% else -%}
|
||||||
|
--cpu-quota={{ ceph_rgw_docker_cpu_limit * 100000 }} \
|
||||||
|
{% endif -%}
|
||||||
{% if not containerized_deployment_with_kv -%}
|
{% if not containerized_deployment_with_kv -%}
|
||||||
-v /var/lib/ceph:/var/lib/ceph \
|
-v /var/lib/ceph:/var/lib/ceph \
|
||||||
-v /etc/ceph:/etc/ceph \
|
-v /etc/ceph:/etc/ceph \
|
||||||
|
|
Loading…
Reference in New Issue