Live data from Hacker News

Ask HN: Solo-preneurs, how do you DevOps to save time?

news.ycombinator.com

121–130 of 328 posts

Re: Ask HN: Solo-preneurs, how do you DevOps to save time?

#121
Don't:

- Manage your own DBs for production. I used to manage my own but now I use IaaS for it. It's worth the extra cost even if your budget is low since it lowers your risk and lets you move faster. AWS Aurora is awesome but expensive. There's a SaaS/IaaS out there for most DBs. And they handle the backups!

- Use Kubernetes. k8s is awesome, I love it, but it is a beast and probably overkill for your solo ops team that is also multitasking.

- Manually SSH / rsync / scp directly onto prod.

Do:

- Version control (Git) everything

- Use containers where it makes sense (I use Docker when I'm not using Serverless). It keeps your dev and prod in sync and helps with immutable deployments (see later points)

- Use Infrastructure as Code

- Use Github actions to do your deploys

- Use immutable deployments. More time to setup but makes rollbacks easier and if you never hot patch production you can't create a unique state that can't be restored.

Finally, (and possibly controversially): use serverless where you can (I personally use AWS Lambda, S3, and Cloudfront).

My personal flow:

- All my infrastructure is in a parameterized CloudFormation template.

- The template is checked into Git with the service code.

- After CI runs the tests, CD builds my serverless functions and uploads the zip.

- Then it runs the cloudformation template.

The same flow also works for Docker except "uploads the zip" becomes "pushes the container"

Using this setup I can tear down and build up my setup in minutes, making it easy (and cheaper) to separate dev and production.

Re: Ask HN: Solo-preneurs, how do you DevOps to save time?

#122
I have worked mainly on ops/infra professionally the past few years and will strongly with the idea to avoid any complicated tool - i.e Kubernetes nowadays.

I create my small/bootstrap projects the following way:

1- create a free tier AWS account - can work with any VPS/server really, but with AWS you can get it 100% free :)

2- create some Ansible provision/setup/deploy scripts

3- create some bash scripts to wrap this all

Create the Ansible scripts:

1- Provision script, consisting of 1 EC2 instance, 1 RDS and the security groups. Store the IPs/adresses of the newly created instances.

2- Setup script, basic instance config, packages, app/project repo, you name it

3- Deploy script, to run every time I want to update the app, mainly just doing a git pull on the instance and some database backup/migrations (although on RDS backups aren't always necessary)

I get these Ansible scripts wrapped into basic bash scripts, provide my AWS credentials via the AWS cli to keep it safe, few extra creds with Ansible vaults, SSH keys, publish in a Github [private] repo and I'm all set.

It took me a couple of days to get fully operational and I was learning Ansible at the same time so it can really be done with basic features. Now it's done, I can reuse the same skeleton for every new project in a couple of hours!

I find this solution extremely resilient. That's basically free hosting for personal projects. Every year, just need to run the script again when free-tier expire, and can change hosting provider anytime or upgrade the instance type if I decide to get a project publicly released. A small extra Ansible task to write for migrating the data and that's it!

Re: Ask HN: Solo-preneurs, how do you DevOps to save time?

#124

Don't: - Manage your own DBs for production. I used to manage my own but now I use IaaS for it. It's worth the extra cost even if your budget is low since it lowers your risk and lets you move faster. AWS Aurora is awesome but expensive. There's a SaaS/IaaS out there for most DBs. And they handle the backups! - Use Kubernetes. k8s is awesome, I love it, but it is a beast and probably overkill for your solo ops team t…

> Using this setup I can tear down and build up my setup in minutes [...]

Until you decide to move away from AWS. ;-)

Nevermind, ignoring the potential lock-in there are many pros to this setup.

Re: Ask HN: Solo-preneurs, how do you DevOps to save time?

#125
I decided to take a few years off work to just build on what I'd like. Perhaps in a startup studio model, so I have a bias for having something that is easily reusable, and that uses tech someone else can pick up and run with easily. I'll probably be in the business of dev/infra tooling.

Currently going with a container image as the minimal deployable unit that gets put on top of a clean up to date OS. For me that's created with a Dockerfile using Alpine image variants. In a way I could see someone's rsync as an ok equivalent, but I'd do versioned symlinked directories so I can easily roll back if necessary if I went with this method. Something like update-alternatives or UIUC Encap/Epk: https://www.ks.uiuc.edu/Development/Computers/docs/sysadmin/.... Anyone remember that? I guess the modern version of Epkg with dependencies these days is https://docs.brew.sh/Homebrew-on-Linux. :-) Or maybe Nixpkgs: https://github.com/NixOS/nixpkgs?

Deployment-wise I've already done the Bash script writing thing to help a friend automate his deployment to EC2 instance. For myself I was going to start using boto3, but just went ahead and learned Terraform instead. So now my scripts are just simple wrappers for Docker/Terraform that build, push, or deploy that work with AWS ECS Fargate or DigitalOcean Kubernetes.

No CI/CD yet. DBs/backups I'll tackle next as I want to make sure I can install or failover to a new datacenter without much difficulty.

Re: Ask HN: Solo-preneurs, how do you DevOps to save time?

#126
My web app is hosted on a server on Hetzner Cloud. I don't use Docker.

For:

* Database: PostgreSQL installed through apt in the same server: https://github.com/sirodoht/mataroa/blob/master/docs/server-...

* Backups: MinIO-upload to an S3-compatible object storage: https://github.com/sirodoht/mataroa/blob/master/backup-datab...

* CI: Github Actions + sr.ht builds: https://github.com/sirodoht/mataroa/blob/master/.github/work... + https://github.com/sirodoht/mataroa/blob/master/.build.yml

* CD: (not exactly CD but...) ssh + git pull + uWSGI reload: https://github.com/sirodoht/mataroa/blob/master/deploy.sh

* Rollbacks: git revert HEAD + ./deploy.sh

* Architecture pattern: stick to the monolith; avoid to deploy another service at all costs; eg. we need to send multiple emails? not celery, that would mean hosting a redis/rabbitmq. We already have a database so let's use that. We can also use Django management commands and cron: https://github.com/sirodoht/mataroa/blob/5bb46e05524d99c346c... + https://github.com/sirodoht/mataroa/blob/master/main/managem...

Re: Ask HN: Solo-preneurs, how do you DevOps to save time?

#127
post #57

I scaled to millions of users as a solo founder and still run the whole show myself. AMA if you like. Here is what works for me: CI: From the terminal, I run my tests and commit to git. Deployments: rsync Rollbacks: Never did one. If something breaks, I fix it and rsync the fix to production. DB: MariaDB k8s: I don't use it. Computers are very fast these days. A cheap single VPS will get you a long way. Nightmare: No…

How do you host your DB? Do you use managed DB service?

Re: Ask HN: Solo-preneurs, how do you DevOps to save time?

#128
post #124

Don't: - Manage your own DBs for production. I used to manage my own but now I use IaaS for it. It's worth the extra cost even if your budget is low since it lowers your risk and lets you move faster. AWS Aurora is awesome but expensive. There's a SaaS/IaaS out there for most DBs. And they handle the backups! - Use Kubernetes. k8s is awesome, I love it, but it is a beast and probably overkill for your solo ops team t…

> Using this setup I can tear down and build up my setup in minutes [...] Until you decide to move away from AWS. ;-) Nevermind, ignoring the potential lock-in there are many pros to this setup.

I've been using 10+ years and have definitely considered that a lot over the years. It's a valid point. I used to be concerned with that, but now I think that is not a big issue for two reasons:

1. Vendor lockin when you are a startup should be a low priority in my opinion. Your priority should be moving fast and getting customers.

2. To expand on 1. It's not really vendor lockin, the only things vendor specific are your infrastructure templates and interface code. Rewriting the interface for another cloud provider takes a fraction of the time of rewriting your codebase (source: I've done it many times).

To come full circle to the question, one thing you should probably not do as a solo-prenuer is concern yourself pre-maturely with vendor lockin at the expense of getting a working product.

Edit/Example: The code for interfacing with AWS Aurora is the same as any other MySQL or PostgreSQL code except for authentication. Switching to a non-IaaS database WILL take time but no more time than rolling your own. So your choices are not "lock in" or "freedom".., it's, spend lots of time setting up databases now or later when you have proven your business model (and potentially never)

Edit 2: This is an anecdote certainly but... of the dozens of startups I've worked on and with, some of which have grown pretty large. The only vendor lock-ins I've ever found to be issues have been with software frameworks (especially ERPs). Never infrastructure. I used to be worried about infrastructure lockin, now I prioritize product market fit.

Re: Ask HN: Solo-preneurs, how do you DevOps to save time?

#129
post #92
post #22

Lots and lots of best practice exists specifically to help teams , and especially teams with some normal amount of turnover. The problems of a solo dev are very different than a dev on a team. Knowledge silos don't exist. Distributed expertise doesn't exist. There's no one to mentor, no shared vision to maintain, no intertia to combat. I consult on big complicated team projects. I also manage multiple solo projects.…

> I pay a service to manage backups so I can walk away from a solo project for months and know it's ticking away. Any recommendation of such service?

Snapshooter
Post reply on HN