Earlier quoted context omitted.
If you have any migration, you probably want to rollback them as well
That's sort of pet peeve of mine: Migration are done separate from code deploys. Version 1 of your code runs on schema version 1. Schema version 2 does not make chances that will break code version 1. Code version 2 can utilize the chances made in schema version 2, but you're still able to rollback the code. Each schema migration should also come with its own rollback script. The downside is that you might need three…
Ask HN: Solo-preneurs, how do you DevOps to save time?
201–210 of 328 posts
Re: Ask HN: Solo-preneurs, how do you DevOps to save time?
#202As for rollback, I don't really use rollback. I have a roll-forward strategy. My DB deployments are migrations and so long as there's no data-loss caused by a migration (my migrations are always backwards compatible with the previous version) there's no need to roll back. Azure brings point-in-time restore which can be triggered if necessary.
I think the key is like with anything. There's a learning curve on your toolset. Once you've overcome that hurdle and you know to set up automation for everything from the outset. You build your pipeline shell. You never do anything manually. If you need infrastructure of any form, it's always code-first, included in source control and done the right way. Never do anything manually and rely on your automation to carry you. It seems labour intensive up front, but once you're there, it's sustainable.
It takes discipline not to cut corners. The minute you start to cut corners and get lazy is the path leading to your doom.
Re: Ask HN: Solo-preneurs, how do you DevOps to save time?
#203Not a solo founder, but I do a lot of ops professionally. Unless you have a specific reason, I say it’s best to avoid complicated tooling until later. k8s, ci, etc are all really useful and solve a lot of hard problems, but god are they a bitch to set up and then monitor, fix when something weird happens, secure from nasty people outside, patch when some update becomes necessary, resist the urge to “improve”, etc. Th…
Or just deploy it on Heroku and call it a day?
Re: Ask HN: Solo-preneurs, how do you DevOps to save time?
#204I'm a technical co-founder at Northflank https://northflank.com . A platform to deploy microservices, cron jobs and stateful databases from development to production. I started working on Northflank to make it more simple for developers either solo or in a team to manage and automate DevOps complexity away. We support CI for GitHub, Bitbucket & Gitlab (SaaS and self-hosted) with either Dockerfiles or Buildpacks. We h…
Re: Ask HN: Solo-preneurs, how do you DevOps to save time?
#205Re: Ask HN: Solo-preneurs, how do you DevOps to save time?
#206Re: Ask HN: Solo-preneurs, how do you DevOps to save time?
#207For simple monoliths it's a non-CI method plus scp, for infrastructure-only it's SaltStack and Terraform. For something where the DevOps part is the deliverable, it can go wild pretty fast: GitLab CI with various CI steps (static analysis, building, unit tests, integration tests, browser tests, blob storage of the result), then CD steps depend on what it is that was built; docker images just get pushed to a registry and another async job listens for pushes and does the deploy in Fargate or Kubernetes. For some jobs with larger needs you get into ArgoCD and Kubernetes resource deployments that way.
Essentially it depends on the zoom level:
Zoomed in to the max: just a build.sh or makefile, optionally called by a CI or IDE of your choice so the building is exactly the same no matter what invoked it.
Zoomed out a little: the results of the build need to end up somewhere, sometimes a step in between like a package registry, docker image registry etc.
Zoomed out to level 3: once the deployment gets actually done, the runtime itself is responsible for checking for database migrations, locks, maintenance mode, so that has to be part of the startup. If it's a multi-instance workload it depends on database migrations if there has to be downtime.
Zoomed out to level 4: if it also needs to deploy 'other things', like rules and records to Cloudflare, resources in AWS, resources in K8S and even update some stuff in buckets or DynamoDB, that requires some orchestration and DSL like Terraform, SaltStack, Ansible and application-specific CD like ArgoCD or Flux or even just the aws cli tools to trigger a refresh.
Customer decides how much money they want to spend and that scopes what zoom level they get. Usually depends on how many developers or ops people they have themselves and how involved they want to be and what continuity or guarantees they are looking for. The only thing that is not optional is that everything has to be in Git. If a customer doesn't want that, they cannot be my customer. I'm done living in the 90's.
Re: Ask HN: Solo-preneurs, how do you DevOps to save time?
#208Earlier quoted context omitted.
Heroku is by far the best for this but just to throw in some alternatives: * Digital Ocean Apps -- somewhat finicky but works very similar to Heroku, it gets closer to bare metal so I prefer it * render.com * AWS Elastic Beanstalk -- though setting this up is non-trivial, it is very similar to Heroku with its "set it and forget it" * AWS Container Services -- if you're using Docker * Google App Engine * Supabase -- g…
Also AWS Copilot if you like CLI based tooling, similar to Elastic Beanstalk but easier (at least if you're comfortable making a Dockerfile)