Add docker logs rotation for all nodes

Related-Prod: https://mirantis.jira.com/browse/PRODX-6408
Change-Id: I203a0f210d9e31c4bdcf8305ec833500d10546d4
diff --git a/de/heat-templates/scripts/instance_boot.sh b/de/heat-templates/scripts/instance_boot.sh
index 765aee7..e4b6485 100644
--- a/de/heat-templates/scripts/instance_boot.sh
+++ b/de/heat-templates/scripts/instance_boot.sh
@@ -134,13 +134,18 @@
     retry 10 "Failed to install docker" install_retry
 }
 
-function update_docker_network {
+function prepare_docker_config {
     mkdir -p /etc/docker
     cat <<EOF > /etc/docker/daemon.json
 {
   "default-address-pools": [
     { "base": "${DOCKER_DEFAULT_ADDRESS_POOL}", "size": ${DOCKER_DEFAULT_ADDRESS_SIZE} }
-  ]
+  ],
+  "log-driver": "json-file",
+  "log-opts": {
+    "max-size": "1g",
+    "max-file": "3"
+  }
 }
 EOF
 
@@ -477,7 +482,7 @@
         disable_rp_filter
         network_config
         prepare_network
-        update_docker_network
+        prepare_docker_config
         install_required_packages
         configure_atop
         workaround_default_forward_policy
@@ -500,7 +505,7 @@
         disable_rp_filter
         network_config
         prepare_network
-        update_docker_network
+        prepare_docker_config
         install_required_packages
         configure_atop
         workaround_default_forward_policy
@@ -520,7 +525,7 @@
         disable_rp_filter
         network_config
         prepare_network
-        update_docker_network
+        prepare_docker_config
         install_required_packages
         configure_atop
         workaround_default_forward_policy
@@ -539,7 +544,7 @@
         disable_rp_filter
         network_config
         prepare_network
-        update_docker_network
+        prepare_docker_config
         install_required_packages
         configure_atop
         install_docker