In his new article, Daniel Miranda shows how we can use AWS Lambda functions to stop the Runner manager hosted on AWS Fargate when there are no CI/CD jobs to process and start it when a new pipeline is triggered. This configuration can significantly reduce the costs when we have considerable idle times between builds.
It’s always a judgement call but if your team likes GitLab CI there’s an argument for not setting up a duplicate service, especially if you support multiple clouds or on-premise deployments.
As always, the most important thing is to keep an idea of how much you’re spending on your current system and whether limitations are affecting your schedule. Build tools are overhead so you really just want to make sure that whatever you pick isn’t soaking up expensive developer time.
Great to see others using the “start / stop” approach. I had to build a custom setup for our flagship apps that are not in .NET Core yet. It uses Github Actions, on check-in it will start a EC2 VM that is configured with the Github Actions Self Hosted Agent, our build tools and critically previously download Windows Server base images (11gb). Then after the build, Actions will stop the server to save money.
It allows you to fairly trivially break out of the runner and gain root on the under lying host. Privileged mode is basically root access, with a wee bit of research. Actually I need to double check with a colleague but we don’t bother setting up ssh access to a host for k8s, just execute a privileged container and control the host like that.
If you let other teams run jobs on your cluster and you have other software/stuff running there, then anyone can own your cluster through .gitlab-ci.yaml basically
New blog post on using AWS CodeBuild with the GitLab Runner as a workaround for the Docker-inDocker limitation on Fargate. Let us know if this is at all helpful.