Basics
What is a project
A Stacktape project is a "logical container" into which you deploy your application. Project can contain multiple stages, allowing you to manage different application versions simultaneously. Each stage is an independent stack and therefore an independent copy of your application. This enables you to have development, testing, and production deployments of your application within the same project.
What is a stack
A stack is a product of deployment. It is a specific stage of your project. Stack contains both:
Applications
(your code running in a container, lambda function, etc.) andInfrastructure
(e.g., SQL database, Redis, Kafka, ElasticSearch, etc.).
To deploy your stack, you need to specify:
- Stacktape configuration - this is a blueprint of your application (you can write it in YAML, JSON, or Typescript)
- AWS region - one of 33 available globally
- Stage - stage of your application/project. E.g.
staging
,dev
, orproduction
- Project name
Every Stacktape stack translates to exactly 1 AWS Cloudformation stack.
Configuration
The configuration defines how to:
- build your application
- what infrastructure resources it requires
- what scripts to run during the deployment
- other aspects
The Stacktape configuration is very concise. For example, ~30 lines of Stacktape configuration translates to roughly ~1200 lines of AWS CloudFormation & other configuration files you'd have to write otherwise.
Deployments
Every deployment has multiple phases:
- Package your workloads - lambda functions & containers (if any)
- Create resources for deployment artifacts - ECR image repository and S3 deployment bucket
- Upload deployment artifacts - images & lambda functions
- Perform CloudFormation deployment - creating the rest of the infrastructure resources
If anything fails, Stacktape automatically rolls everything back to the previous working state.
You can evolve your stacks as you go. For example, if you decide to add more resources to it, increase the amount of container memory, etc., simply adjust the configuration and rerun the deployment.
The overwhelming majority of these updates will happen in place - without a disruption to normal use. Some updates require a replacement - entirely new resource is created to replace your existing resource. Stacktape designs your templates in a way so that this almost never happens - and if it does, you'll get notified before performing such update.
To speed up deployments, Stacktape also comes with a hot-swap mode that updates certain resources directly, without using CloudFormation. For example, if the only thing that changed is a lambda function or container code, the deployment will take just a few seconds.