Live data from Hacker News

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

news.ycombinator.com

191–200 of 328 posts

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

#191
My entire stack is in a docker-compose.yml that looks like this:

services:

  certbot 

  haproxy

  db

  api

  client

And gets deployed by a GitLab config file that looks like this:

build:

    stage: build

    script:

        - docker-compose -f docker-compose.yml -f docker-compose.release.yml up -d --remove-orphans --build

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

#192
post #34
post #13

Not 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…

> spooky arcane oldhat sysadmin deploy techniques (scp release to prod hosts, run deploy script I never realised I was using spooky arcane oldhat stuff! I feel wizardly now. My projects (for small clients and myself) basically use this. - A "build.sh" script that does a local build of back end and front end - A "deploy.sh" script that scp's everything to the server (either a digital ocean VPS or an EC2 instance), run…

This is a great setup if you work with a lot of clients. Every client we work with wants everything to run on their infrastructure that they provide, and then they provide the weirdest jankiest setup you could imagine. Because of this I keep everything basic if it cant run on a fresh linux install or less (looking at you docker) then its going to cause issues down the line.

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

#193
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…

Agreed on rollbacks. I think rollbacks are a thing when you don't know the code, or you're too busy to be able to debug. Like when being on-call for a large codebase.

If you're solo, you probably know enough that fix-forward is the way to go. (This assumes the system isn't critical enough that it needs fixing even if you're asleep, but then you would probably not be solo anyway.)

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

#194

ECS gives you pretty much everything K8S gives you, in a fully managed package. Obviously you can't (simply) run ECS in development, but sticking with Docker Compose keeps the semantics close enough, as well as giving you advantage of clean separation from any other code on your machine. CI/Deployment: hosted CI, merged PRs to main branch auto-deploy (I've used both Codeship and Github Actions with ECS) DB: managed R…

Keep in mind you can run EKS in aws to get K8S in a fully managed package as well.

My understanding is that with EKS, you still are responsible for parts of the process that are managed under ECS (for example, firewall and security rules as opposed to leaning on ALB and Target Groups in ECS)

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

#196
I recently started a small project on Azure for something new, but most of my experience is small companies on AWS which is similar.

If you aren’t already comfortable with K8 I wouldn’t use them, there is a learning curve there for sure and not necessary.

I wouldn’t even worry about containers at all unless you are planning on using a managed container service like elasticbeanstalk.

My CI pipeline is almost nothing, just run tests on main and dev commits. I have no deploy pipeline, I choose to actively deploy.

My deployment workflow is a powershell script since I’m on Azure, if it was AWS and I was using plain EC2 instead of a container service I would probably use ansible to avoid having to repeat commands 2-3 times when I deploy something behind a load balancer, but it would be super minimal.

DB backups are super easy to schedule with RDS or similar offerings. For rollback with database changes I would schedule downtime, let your customers know, replace your page with a maintenance banner, do upgrade, test upgrade then repoint site to your running instance.

Overall I echo what many have said, use familiar tools as much as you can, don’t worry about whether what you are doing will scale to even 2-3 people if it costs significant time. Use managed services where possible to save you time, usually the cost isn’t high vs doing it yourself.

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

#198
I'm afraid after Heroku is not enough for you, if you don't use Kubernetes, you may end up inventing one.

If you need a bit more than Heroku:

1. Try Render[0].

2. If it is not enough, go with any Kubernetes you can afford, any docker registry and Pulumi or Pulumi+Helm[1]. For monitoring you can use either NewRelic[2] or Weave Cloud[3].

3. If you find big cloud kubernetes too expensive, need more bandwidth, or are just willing to try more affordable alternative new players, maybe Civo[4] fits the need.

In my case[5], since I've been bootstrapping for three years, a low-budget setup is key to keeping the lights on. Here are a few constraints I need to satisfy permanently-ish:

- My workload is bandwidth-intensive, so EC2 egress is too expensive for my case and my situation.

- It is not that cheap to run 12 micro-services in any of the existing Heroku-ish platforms, also private networking and routing of my app are a bit above "12 factor" at this point.

- I can't afford the same availability as everyone else: I'm in the business of supporting other apps but I don't want to pass down the cost of AWS, so I can't afford to be "down because everyone else in AWS is down".

- I don't know many things, and until I find PMF, keeping a low-cost setup gives me the resilience that I need as a founder.

Therefore to solve my problem I use an unholy combination of Ansible and Pulumi to manage 3 clusters of Kubernetes for both stateful and stateless workloads.

Why am I doing this to myself? I have mad respect for people who can run things in a VPS, use the hosting daily backup, and don't see the need to apply patches because they're behind Cloudflare; I just can't.

More details:

- Dedicated servers, 32GB RAM, 8 Cores, 500GB SSD(RAID 1), /29 ipv4, 30TB of Bandwidth for $70/mo each. XCP-NG[6] as hypervisor.

- To assign public IP to virtual machines, I run a tiny DHCP ubuntu VM managed by Ansible.

- On top of XCP virtual machines, k3s cluster managed with Ansible.

- To manage XCP and virtual machines, I use Xen-Orchestra[7] managed with Ansible.

- Pulumi+AWS ECR builds and pushes docker images, secret and configuration management using paraphrase secret provider.

- Hashicorp Vault backed by Postgres+AWS KMS managed by Ansible.

- Ansible+Pulumi+Helm to self-host Apache Pulsar with ZFS snapshots, a cron-job and rsync.net alerts. WAL-G+AWS S3 to backup and archive Postgres/TimescaleDB managed with Ansible.

- All logs aggregated by Gelf and Fluentbit into a self-hosted instance of Seq[8] managed with Pulumi+Helm.

- Tailscale between all virtual machines

- DNSimple for domains

- Cloudflare for all things except the self-hosted docker registry.

- Github Actions for CI but not a hard a requirement, I can run ops in my local computer when Github Actions is down.

Cost: $210 /mo.

Estimated cost in AWS: $2,800 /mo

[0] https://render.com

[1] https://newrelic.com/platform

[2] https://www.weave.works/product/cloud/

[3] https://www.pulumi.com/docs/reference/pkg/kubernetes/helm/v3...

[4] https://www.civo.com/pricing

[5] https://widemesh.com

[6] https://xcp-ng.org

[7] https://xen-orchestra.com

[8] https://datalust.co/seq

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

#199

Pieter Levels (the guy who made Nomad List) reached $1 000 000 ARR with a single VPS, all his code in an index.php file and using FTP to transfer the latest code to his server... I think if you’re a solo founder you have to accept on day one you’re at a time disadvantage when it comes to the actual hours you’ll spend on moving the business forward vs admin, ops, legal stuff etc etc and so you have to really fight sma…

This!

Exactly my point that I was making here in this thread: https://news.ycombinator.com/item?id=28840902

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

#200
In what specific ways are you beyond Heroku? I call bullshit on that.

I've got a big client who went from 6 infrastructure engineers to zero. They survived for half a year without any real problem. You either pay a company to manage your infrastructure for you or you pay a person. Devops people are expensive.

Things I've done to automate DevOps Make sure you pay attention to automatic testing and deploys with Ci/CD. I like automated deploys on Gitlab. Trigger staging release on merge into main, and deploy prod on merge from main into a deploy branch. Infrastructure as code with Terraform. K8S is more trouble than it is worth (though it is robust after you invest 3 months into getting it tuned right, although a lot of people make critical mistakes in their config, I've seen a half dozen insane mistakes.)

Post reply on HN