zalando-stups / senza

Deploy immutable application stacks and create and execute AWS CloudFormation templates in a sane way

Home Page:https://pypi.python.org/pypi/stups-senza

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support Elastigroup for all commands

lmineiro opened this issue · comments

commented

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

The commands that seem to work:

  • create
  • list
  • domains
  • dump
  • events
  • health
  • images
  • resources
  • traffic
  • update
  • scale - Implemented in #525
  • patch - implemented in #530
  • respawn-instances - implemented in #530
  • instances - implemented in #547
  • status - implemented in #554

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

  • init - no knowledge about Elastigroups

Scale updated to support Elastigroup

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

commented

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

@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.

commented

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 #547 is an acceptable solution.

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

commented

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

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