diff options
author | Scott Dodson <sdodson@redhat.com> | 2017-12-20 09:30:17 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-20 09:30:17 -0500 |
commit | a5de165b8e7113631a30ef0e4a20b5f74db073f0 (patch) | |
tree | e617e6e099562437ece02ed432afccb61d6318b8 /roles | |
parent | 33450f75b336744615c066a34d7391cc9996af18 (diff) | |
parent | 5c6af565bfae851b493c8b4670d56f69016de3bb (diff) | |
download | openshift-a5de165b8e7113631a30ef0e4a20b5f74db073f0.tar.gz openshift-a5de165b8e7113631a30ef0e4a20b5f74db073f0.tar.bz2 openshift-a5de165b8e7113631a30ef0e4a20b5f74db073f0.tar.xz openshift-a5de165b8e7113631a30ef0e4a20b5f74db073f0.zip |
Merge pull request #6524 from kwoodson/docker_storage_setup_overlay
Adding support for docker-storage-setup on overlay
Diffstat (limited to 'roles')
-rw-r--r-- | roles/container_runtime/defaults/main.yml | 14 | ||||
-rw-r--r-- | roles/container_runtime/tasks/docker_storage_setup_overlay.yml | 10 | ||||
-rw-r--r-- | roles/container_runtime/templates/docker_storage_setup.j2 | 12 |
3 files changed, 36 insertions, 0 deletions
diff --git a/roles/container_runtime/defaults/main.yml b/roles/container_runtime/defaults/main.yml index 6ab0456bc..3e4b0c2b8 100644 --- a/roles/container_runtime/defaults/main.yml +++ b/roles/container_runtime/defaults/main.yml @@ -55,6 +55,20 @@ openshift_docker_is_node_or_master: "{{ True if inventory_hostname in (groups['o docker_alt_storage_path: /var/lib/containers/docker docker_default_storage_path: /var/lib/docker +docker_storage_path: "{{ docker_default_storage_path }}" +docker_storage_size: 40G +docker_storage_setup_options: + vg: docker_vg + data_size: 99%VG + storage_driver: overlay2 + root_lv_name: docker-root-lv + root_lv_size: 100%FREE + root_lv_mount_path: "{{ docker_storage_path }}" +docker_storage_extra_options: +- "--storage-opt overlay2.override_kernel_check=true" +- "--storage-opt overlay2.size={{ docker_storage_size }}" +- "--graph={{ docker_storage_path}}" + # Set local versions of facts that must be in json format for container-daemon.json # NOTE: When jinja2.9+ is used the container-daemon.json file can move to using tojson diff --git a/roles/container_runtime/tasks/docker_storage_setup_overlay.yml b/roles/container_runtime/tasks/docker_storage_setup_overlay.yml new file mode 100644 index 000000000..782c002e3 --- /dev/null +++ b/roles/container_runtime/tasks/docker_storage_setup_overlay.yml @@ -0,0 +1,10 @@ +--- +- name: Setup the docker-storage for overlay + template: + src: docker_storage_setup.j2 + dest: /etc/sysconfig/docker-storage-setup + owner: root + group: root + mode: 0664 + when: + - container_runtime_docker_storage_type == 'overlay2' diff --git a/roles/container_runtime/templates/docker_storage_setup.j2 b/roles/container_runtime/templates/docker_storage_setup.j2 new file mode 100644 index 000000000..b056087e0 --- /dev/null +++ b/roles/container_runtime/templates/docker_storage_setup.j2 @@ -0,0 +1,12 @@ +# Edit this file to override any configuration options specified in +# /usr/lib/docker-storage-setup/docker-storage-setup. +# +# For more details refer to "man docker-storage-setup" +DEVS={{ container_runtime_docker_storage_setup_device }} +VG={{ docker_storage_setup_options.vg }} +DATA_SIZE={{ docker_storage_setup_options.data_size }} +STORAGE_DRIVER="{{ docker_storage_setup_options.storage_driver }}" +CONTAINER_ROOT_LV_NAME="{{ docker_storage_setup_options.root_lv_name }}" +CONTAINER_ROOT_LV_SIZE="{{ docker_storage_setup_options.root_lv_size }}" +CONTAINER_ROOT_LV_MOUNT_PATH="{{ docker_storage_setup_options.root_lv_mount_path }}" +EXTRA_STORAGE_OPTIONS="{{ docker_storage_extra_options | join(' ') }}" |