1

Trying to figure out how to scale the app created with boxfuse. First I simply run the app with:

$ boxfuse run <myapp> -env=prod

Then I try to scale it, as shown in this 'slim' documentation (https://cloudcaptain.sh/docs/commandline/scale.html) on the webpage:

$ boxfuse scale <myapp> -env=prod -capacity=3:t2.micro

I get a:

WARNING: Unable to scale non-existent auto-scaling group for <ip>
Successfully scaled <myapp> to 3 t2.micro instances in prod

I'm new to AWS and haven't created any auto-scaling group there. I see I can do that, but then it forces me to first create a launch configuration where I need to specify the AMI. It looks to me that boxfuse command is supposed to take care of all of that. Am I missing something?

ps. When I pass to scale to '2' instances, nothing happens. The command exists as if it had nothing to do

Axel Fontaine
  • 34,542
  • 16
  • 106
  • 137
dominikz
  • 411
  • 4
  • 8

1 Answers1

1

Sorry about the confusing error messages. We will be improving those. To scale a single instance application, you can only scale vertically (= change the type of instance, but not the number of instances) Example:

boxfuse scale myapp -env=prod -capacity=t2.small

For load balanced apps you can scale both horizontally (the number of instances) and vertically (the type of instances). Example:

boxfuse scale myapp -env=prod -capacity=3:t2.small

Update: The documentation is now available at https://cloudcaptain.sh/docs/commandline/scale.html

Axel Fontaine
  • 34,542
  • 16
  • 106
  • 137
  • Thank you very much for a swift response. However, I'd like to ask you for further explanations. As I've said, I'm not an AWS expert. Following on what you have written, I have created a load balancer in AWS and assigned my previously created instance (via 'boxfuse run') to this load balancer. I've then tried to follow with 'boxfuse scale ...'. But got exactly the same message as reported previously (non-existent auto-scaling group). Can you tell me what am I doing wrong, or maybe better what exact documentation should I read to understand how to configure horizontal scaling? – dominikz Jul 28 '15 at 13:51
  • Create a load balanced (instead of single instance) app in the Boxfuse Console. Boxfuse will then automatically create a load balancer, auto scaling groups and everything else for you. You will then also be able to scale horizontally. We'll look at improving the docs and writing a comprehensive blog post about this soon. – Axel Fontaine Jul 28 '15 at 14:02
  • Of course, how could I miss that from boxfuse.conf! I've been reading it so many times. But I do still have a problem. Changed 'apptype=load-balanced' and 'capacity=2:t2.micro' in boxfuse.conf. Ran 'boxfuse run -env=prod' for my jar file. It completed successfuly (re-generating new AMI and uploading it to AWS), but still a single instance there and no load balancer. – dominikz Jul 28 '15 at 15:05
  • It is currently not possible to change the type of existing apps. You have to delete the app in the console first. The next boxfuse run invocation will recreate it as load-balanced. You will then be able to scale it as described above. – Axel Fontaine Jul 28 '15 at 15:14
  • 1
    Works like charm! I was even able to press the 'scale' button on boxfuse.com website, rather than use the console for scaling. Great work! (In case you were interested I learned about your solution during Geecon 2015 in Krakow) – dominikz Jul 29 '15 at 08:36
  • Thanks for letting me know. It always interesting to find out :-) And have fun deploying effortlessly on AWS :-) P.S.: don't hesitate to ask additional questions if anything is unclear. If you hit any issues or have suggestions, we also have a public issue tracker: https://github.com/boxfuse/boxfuse-issues/issues – Axel Fontaine Jul 29 '15 at 09:10