Auto DevOps Challenges when moving design system to Auto DevOps
All steps needed
- Remove
.gitlab-ci.yml
because we don't need this when using auto devops: DylanGriffith/design.gitlab.com@452b59df - Add a K8s cluster on GKE and install tiller + ingress
- Enable autodevops and use suggested nip.io domain
- Updates to package.json to make it compatible:
- Add a stub
yarn test
command as the test step will fail if there is no test command to run: DylanGriffith/design.gitlab.com@6f264f3b - Remove the hardcoded
PORT
fromyarn start
as auto devops deployment expects to provide this port variable: DylanGriffith/design.gitlab.com@b3e778e2 - Ensure
yarn start
results in listening on all interfaces not just loopback as we need to access port 5000 outside of the container. This resulted in constant restarts as the health checker was killing the application: DylanGriffith/design.gitlab.com@b3a43b92
- Add a stub
Things to improve
- We should have better error messages about needing a
yarn test
command. This probably requires changes to herokuish so it gives more useful error messages after running/bin/herokuish buildpack test
. We got this build log but nowhere does it say that it's trying to runyarn test
. It should at least output the command that failed. But further it should tell you how to fix it by adding atest
command to yourpackage.json
- We need to either document or somehow make it automated that
yarn start
will result in listening on all interfaces for you. I thinkHOST=0.0.0.0
probably works for a lot of web frameworks so maybe we can just add this variable to the pod.
Other thoughts
- This application does not need a database so we should set
POSTGRES_ENABLED=false
so we save resources on the cluster and perhaps speed up deployment. Could we detect this automatically? - The pipeline takes a very long time. We can speed up by setting
CONTAINER_SCANNING_DISABLED=true
but then we won't get this feature. It takes 5 minutes currently.
Edited by 🤖 GitLab Bot 🤖