-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(18.37.0) DEVOPS-11415: adds asg_logical_name arg #44
Conversation
@@ -97,8 +99,9 @@ def get_autoscale_group_name(self): | |||
|
|||
def get_autoscaling_group_name_from_cloudformation(self): | |||
if not self.autoscaling_group: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent the above more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually see a few two space indents in functions across this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have set my spacing to 2 spaces in accordance with the rest of the file.
@@ -97,8 +99,9 @@ def get_autoscale_group_name(self): | |||
|
|||
def get_autoscaling_group_name_from_cloudformation(self): | |||
if not self.autoscaling_group: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually see a few two space indents in functions across this file.
@@ -400,13 +403,16 @@ def get_args(): # pragma: no cover | |||
parser.add_argument('-r', '--ready-wait', action='store', dest='ready_wait', help='Wait time for ec2 instance to be ready', type=int, nargs=2, default=[10, 30]) | |||
parser.add_argument('-H', '--health-wait', action='store', dest='health_wait', help='Wait time for ec2 instance health check', type=int, nargs=2, default=[10, 30]) | |||
parser.add_argument('-o', '--only-new-wait', action='store', dest='only_new_wait', help='Wait time for old ec2 instances to terminate', type=int, nargs=2, default=[10, 30]) | |||
parser.add_argument('-A', '--asg-logical-name', action='store', dest='asg_logical_name', help='ASG Logical Name from CFN', type=str) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm. I don't like these 1-letter arguments. especially with -a already being taken by --ami.
As I understand it, these are not used. I would say use a different letter at least if you want to keep in the 1-letter args.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will approve if you think there is a good reason to leave as is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are valid concerns. Single character arguments are pretty standard. Not sure what you mean by 'not used', these are definitely used, the command from deploy_ami job is /usr/bin/rolling_deploy -f ${FORCE_REDEPLOY} ${DEPLOY_OPTIONS} -e qa -p cos-service -b ${BUILD_NUM} -P dnbi-deploy -a ${AMI} -s ${stack_name}
.
Do you have a recommendation for what to use instead of -A? I ask b/c we use -c/-C and -p/-P already in this script and I chose -A since ASG is capitalized in the logical name so it made sense. I don't mind changing if you have a suggestion for something that would make more sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wow. I assumed the deploy_ami job would have used the longer args so you could understand the difference between -p/-P. Especially since they are in a jenkins job and not something that is being typed repeatedly. I vote for updating that job to use longer args but will approve this now as it is keeping with the existing convention.
6465e71
to
336c764
Compare
@@ -400,13 +403,16 @@ def get_args(): # pragma: no cover | |||
parser.add_argument('-r', '--ready-wait', action='store', dest='ready_wait', help='Wait time for ec2 instance to be ready', type=int, nargs=2, default=[10, 30]) | |||
parser.add_argument('-H', '--health-wait', action='store', dest='health_wait', help='Wait time for ec2 instance health check', type=int, nargs=2, default=[10, 30]) | |||
parser.add_argument('-o', '--only-new-wait', action='store', dest='only_new_wait', help='Wait time for old ec2 instances to terminate', type=int, nargs=2, default=[10, 30]) | |||
parser.add_argument('-A', '--asg-logical-name', action='store', dest='asg_logical_name', help='ASG Logical Name from CFN', type=str) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wow. I assumed the deploy_ami job would have used the longer args so you could understand the difference between -p/-P. Especially since they are in a jenkins job and not something that is being typed repeatedly. I vote for updating that job to use longer args but will approve this now as it is keeping with the existing convention.
https://dunandb.jira.com/browse/DEVOPS-11415
Tested by updating salt state for pip installing License2Deploy to use my branch and highstated a packer agent with these changes:
I updated cos-service_qa_deploy_ami to use the new flag:
![screen shot 2018-08-01 at 11 17 57 am](https://user-images.githubusercontent.com/588833/43540438-98988cc8-957c-11e8-8cbf-69dd5b29aa16.png)
![screen shot 2018-08-01 at 11 18 45 am](https://user-images.githubusercontent.com/588833/43540473-acfe4f9a-957c-11e8-9aa7-ed40cafebc06.png)
Ran the job and saw that instances were launched in the proper ASG, as evidenced by not having Public IPs and today as the launch date:
![screen shot 2018-08-01 at 11 14 33 am](https://user-images.githubusercontent.com/588833/43540306-38493480-957c-11e8-9eb5-39d0532e4b3f.png)
![screen shot 2018-08-01 at 11 15 08 am](https://user-images.githubusercontent.com/588833/43540307-3864b8a4-957c-11e8-880e-0e336813696b.png)