Understand Java Spring Boot pipeline concept

Hi
Following are snippet from build.sh from Example

aws cloudformation deploy --template-file .template.yml
–stack-name java-spring-boot --capabilities CAPABILITY_IAM
–parameter-overrides “AppImage={JAVA_NAME_TAG}" \ "ProxyImage={NGINX_NAME_TAG}”

Say I run this in Production, also there is template.yml there, does this mean it will recreate all the resources that currently already created & running early? I mean if this part of continuous deploy source code e.g Application Load Balancer, ECS cluster, etc.

Hi @ateh

Not sure if I understand you correctly. Are you looking for a way to deploy two environments? One for testing and one for prod? If so, choose two different names for --stack-name and run the command twice and you are fine.

E.g.:

aws cloudformation deploy --template-file .template.yml
–stack-name java-spring-boot-test --capabilities CAPABILITY_IAM
–parameter-overrides “AppImage={JAVA_NAME_TAG}" \ "ProxyImage={NGINX_NAME_TAG}”

aws cloudformation deploy --template-file .template.yml
–stack-name java-spring-boot-prod --capabilities CAPABILITY_IAM
–parameter-overrides “AppImage={JAVA_NAME_TAG}" \ "ProxyImage={NGINX_NAME_TAG}”

Hi @michael

Yes. Im kinda confuse when should I run those command in “continuous deployment” part. When I run again as per you example:

aws cloudformation deploy --template-file .template.yml
–stack-name java-spring-boot-prod --capabilities CAPABILITY_IAM
–parameter-overrides “AppImage={JAVA_NAME_TAG}" \ "ProxyImage={NGINX_NAME_TAG}”

I suppose it will create another stack name - java-spring-boot-prod? or it will update to it?

When you run the command the first time it will create a new stack java-spring-boot-prod. For all subsequent runs it will update the existing stack java-spring-boot-prod.

1 Like

Hi @michael
Understand that now.
Thanks a lots!

You are welcome @ateh

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.