سؤال

I like AWS OpsWorks but one big drawback I am facing now is boot time: nodes are booting super slowly.

In my case, for a t1.micro instance, it takes like 10 minutes before my cookbook can start running (although from EC2 console view, the instance should be ready after about 2 minutes: it can be accessed via SSH after this short period). You can also refer to this topic.

I tried using custom AMI but ran into another problem: the node kept booting forever. But that might be my fault while creating the AMI.

Back to the original question, how can I improve this boot time of OpsWorks nodes?

هل كانت مفيدة؟

المحلول

In my case, using m1.small, I followed this doc to create a custom AMI.

I think the reason it kept booting forever is the opsworks-agent files are still there. See step 4 under To create a custom AMI from an AWS OpsWorks instance, you'd need to stop agent and delete it's files.

The complete cycle improved from ~25 minutes down to ~10 minutes. By the ~11th minute, it's on LB health checks stage.

Hope that helps.

نصائح أخرى

(Can't comment. Need 50pts) I don't get it. If you remove the agent, what is the point of using OpsWorks? The agent allows you to update the instance and add recipes as needed. Not to mention add instances based on predefined configurations. Am I missing something?

If your instance will not start check my answer here:

AWS Opworks Instances not starting when created from Custom AMI on EC2

maybe will solve your problem...

Although is not clearly specified on this thread it looks like you were creating the custom AMI from either the Amazon linux or the Ubuntu instances that are already offered. In my case (being the reason why I ended up here), I created the custom AMI directly from a regular EC2 instance and still, after almost 14 hours the instance would not start. I made sure I removed any other configuration that could be blocking us like, ELB/VLC configurations and custom recipes. The instance is basically stuck on the setup stage.

One of the possible reasons why it would get stuck on booting is because a custom AMI that is created from an image that has an Opworks agent that should be linked to that image only. Look at the documentation here: http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html But that is not my case.

I will try with a predefined Amazon image and go from there.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top