We are experimenting with a new way for running our applications for KWS.
- Use ECS instead of BeanStalk
- Goal to have more options on how to run app containers
- Goal to have faster deployments
- Use infrastructure as code
- Goal to have a clear trail and history of changes and the reason why it was done
- Start using shared infrastructure
- Goal to reduce costs
- Goal to improve collaboration with becketal
Our test project for this is the geotransform api. https://git.tools.kws-cultivent.de/cultivent/geotransform-api The repo now includes a cloudformation template for each environment we are running. the cf stacks are deployed by manual gitlab ci jobs. This way changes on the infrastructure are also done with merge requests and peer-reviewed. The ecs uses fargate spot as the launch type. Mostly because it was so easy and not because it was a requirement. This way the entire setup uses way less permissions and we could create a user for the gitlab ci process with only ne needed permissions.
Some parts of the setup are not part of this repo/stacks (ECS Cluster and Application Load Balancer). The idea is to set them up once and use them with multiple environments. As a start we created the https://git.tools.kws-cultivent.de/cultivent/shared repo for this and also manage them using a cf stack. This could potentially be managed by becketal and we could open merge request with change proposals. This way it could also include resources like roles where we do not have permissions for. We could see them and better debug in the case of a problem but changes could only be made by becketal.