cloudstax / firecamp

Serverless Platform for the stateful services
https://www.cloudstax.io
Apache License 2.0
209 stars 20 forks source link

firecamp-autoscalegroup.template does not use AMI ID specified in the parent template (firecamp-existingvpc.template) #9

Closed jazzl0ver closed 6 years ago

jazzl0ver commented 6 years ago

Please, fix

JuniusLuo commented 6 years ago

Thanks! The AMI ID mapping should be in firecamp-autoscalegroup.template. So we don't need to define the mapping in multiple places, firecamp-master.template and firecamp-existingvpc.template.

The AMI ID in firecamp-existingvpc.template is not used. Will remove it. Saw you created a pull request. If you want to remove it in your patch, it would be great.

jazzl0ver commented 6 years ago

Why are you going to remove it? How to create FireCamp stack in the existing VPC if you delete it?

JuniusLuo commented 6 years ago

The autoscalegroup template is shared by both existingvpc and master templates. The EC2 instance ImageId is not passed from the existingvpc template to the autoscalegroup template. Instead, the autoscalegroup template will select the ImageId based on the region and "NodeAMIOS" (default Amazon Linux AMI). The existingvpc template will call the autoscalgroup template to actually create the EC2 instances.

The other option is the existingvpc template selects the ImageId and passes to the autoscalegroup template. But the master template has to select the ImageId and passes to the autoscalegroup template as well. The AMI region map will be duplicated in the existingvpc and mater templates.

jazzl0ver commented 6 years ago

Got it. At first I decided you gonna delete existingvpc template. Thanks!

cloudstax commented 6 years ago

The fix from @jazzl0ver was merged.