zalando-stups / senza

Deploy immutable application stacks and create and execute AWS CloudFormation templates in a sane way
https://pypi.python.org/pypi/stups-senza
Other
96 stars 72 forks source link

Support Elastigroup for all commands #517

Open lmineiro opened 6 years ago

lmineiro commented 6 years ago

Some command line options don't work with Spotinst Elastigroups, only native Auto Scaling Groups.

The commands that seem to work:

The commands that still don't work or don't offer Elastigroup:

pc-alves commented 6 years ago

Scale updated to support Elastigroup

dmytro-vynokurov commented 5 years ago

@lmineiro @pc-alves are there any plans on adding support for the instances command to work with ElastiGroup?

lmineiro commented 5 years ago

The current workaround is to use the --all flag and grep for your specific application. For example:

senza instances --all | grep myapp

Hopefully gives you the same as:

senza instances myapp

This will eventually be implemented, but since there's a reasonable workaround it doesn't have a high priority currently

dmytro-vynokurov commented 5 years ago

@lmineiro thanks for answering. Reason why I'm asking is that the workaround you mentioned sometimes is quite slow. It takes up to 20sec to run senza instances --all when running from office network and one of my colleagues noticed this time to grow up to 40sec when running from home. At the same time running senza inst $APPLICATION never takes longer than a couple of seconds.

lmineiro commented 5 years ago

According to my own experiments, the time the command takes, even without --all, varies a lot and can be very slow at times.

My test using the stack reference:

$ time senza instances skipper
Stack Name│Ver.│Resource ID│Instance ID        │Public IP     │Private IP   │State  │LB Status│Launched
<28 instances listed>
real    0m23.177s
user    0m2.429s
sys 0m0.265s

Followed almost immediately by the same query with --all

$ time senza instances skipper --all
Stack Name│Ver.│Resource ID│Instance ID        │Public IP     │Private IP   │State  │LB Status│Launched
<the same 28 instances listed>
real    0m15.200s
user    0m2.342s
sys 0m0.244s

As you can see, both are very slow, and using the stack reference was even slower for me.

The proposed workaround is exactly that - just a workaround until we're confident that something like https://github.com/zalando-stups/senza/pull/547 is an acceptable solution.

dmytro-vynokurov commented 5 years ago

@lmineiro thank you for the explanation. Then I guess we'll stick to the workaround until senza gets updated

lmineiro commented 5 years ago

@dmytro-vynokurov please update senza to latest (2.1.130) and try it out

dmytro-vynokurov commented 5 years ago

@lmineiro done. It works. Thanks a lot for implementing this :smile: