From a26b854c3fe47945f0b08bdea086799bd3fc0c43 Mon Sep 17 00:00:00 2001 From: praveenraghav01 Date: Thu, 18 Aug 2022 17:21:44 +0530 Subject: [PATCH 1/2] custom instance storage --- cloudlift/config/service_configuration.py | 8 ++++++-- cloudlift/deployment/service_template_generator.py | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cloudlift/config/service_configuration.py b/cloudlift/config/service_configuration.py index 3acd8ba0..e6976633 100644 --- a/cloudlift/config/service_configuration.py +++ b/cloudlift/config/service_configuration.py @@ -262,8 +262,12 @@ def _default_service_configuration(self): u'container_port': 80, u'health_check_path': u'/elb-check' }, - u'memory_reservation': 250, - u'command': None + u'memory_reservation': 1000, + u'command': None, + u'custom_metrics': { + u'metrics_port': u'8005', + u'metrics_path': u'/metrics' + } } } } diff --git a/cloudlift/deployment/service_template_generator.py b/cloudlift/deployment/service_template_generator.py index 2fba9d99..f8aa4b16 100644 --- a/cloudlift/deployment/service_template_generator.py +++ b/cloudlift/deployment/service_template_generator.py @@ -193,7 +193,6 @@ def _add_service(self, service_name, config): "Image": self.ecr_image_uri + ':' + self.current_version, "Essential": 'true', "LogConfiguration": self._gen_log_config(service_name), - "Memory": int(config['memory_reservation']) + -(-(int(config['memory_reservation']) * 50 )//100), # Celling the value "MemoryReservation": int(config['memory_reservation']), "Cpu": 0 } From bc80ead4f34e6fd7871c840d19e8fc8eafeb5d8e Mon Sep 17 00:00:00 2001 From: Praveen Kumar <18118587+praveenraghav01@users.noreply.github.com> Date: Mon, 5 Dec 2022 10:34:53 +0530 Subject: [PATCH 2/2] added volume type GP3 --- cloudlift/deployment/cluster_template_generator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cloudlift/deployment/cluster_template_generator.py b/cloudlift/deployment/cluster_template_generator.py index f489f148..c6ab23b4 100644 --- a/cloudlift/deployment/cluster_template_generator.py +++ b/cloudlift/deployment/cluster_template_generator.py @@ -536,7 +536,8 @@ def _add_ec2_auto_scaling(self): { "DeviceName": "/dev/xvda", "Ebs": { - "VolumeSize": Ref("InstanceRootVolume") + "VolumeSize": Ref("InstanceRootVolume"), + "VolumeType": "gp3" } } ]