8
19 Comments

Ask IH: How do you manage your cloud provider?

I only have experience with Heroku, which makes it very easy to deploy and manage an app, but it gets expensive quickly.

AWS, Digital Ocean, etc. all offer great offers, but they require way more manual management.

How do most indie hackers manage their apps, deploys, ci, etc?

  1. 5

    You have so many options here. I'll answer the question directly as opposed to going over all those options.

    On a quick side note: It sounds to me like you're looking to deploy raw compute resources. This might not be the best option. Consider refactoring your application(s) into microservices and using Google's App Engine -- it's incredibly easily to deploy stuff and free for small apps (including data storage, traffic, email, etc.)

    You've mentioned AWS and Digital Ocean (DO). I'll throw in Azure and Google Compute Platform too: use Terraform, Ansible, and Packer.

    Terraform will abstract away the APIs for all of these providers into code. You write a code base for each provider, you run "terraform apply" and everything is built. It's also an idempotent process, so it can be repeated when things change and only the changes are applied. You can even see the changes to be applied before applying them. It's wonderful and a DevOp's (not so) secret weapon.

    Ansible is the configuration management of the OS and upwards. Terraform did the "physical" stuff, but now it's Ansible's job to configure the OS, install your packages, deploy your application and fire it up. There are thousands of pre-made Ansible roles available on Ansible Galaxy for things like Nginx, Apache, PHP FPM, MySQL, Rails/Ruby, and so on. The quality can be a bit hit and miss, but you'll find something to get you going or learn from.

    Packer should be paired up with Ansible. It will create your AMIs (Amazon Machine Images) and other virtual images for quickly spinning up new VMs of a particular type (nginx web server, app server, etc.) It's not a must, but it is powerful and will save you time.

    All of these code bases should be stored in a (git?) repository and ideally have the CI/CD pipelines going through gitlab.com's free tier, or something similar. Push the code, have some tests done, and then deploy using Terraform.

    Overall this task is complicated and hard (sorry.) You might want to team up with someone who can do the DevOps for you. It's a job in its own right, frankly.

    I'm currently in the process of designing a training program just for people like you: you have an app, but the DevOps is hard. I want to make it easy. Interested? I'm calling it "0 to MVP".

    Good luck and please do reach out if you need help.

    1. 2

      Very detailed answer thanks! I think it answers what I was really wondering: being outside of heroku is a lot of work :)

      1. 1

        I recommend App Engine. It sounds to me as though you're frustrated with Heroku's expensive prices, but you need flexibility and the option to grow. App Engine will offer you this and the free tier is generous.

        (I don't work for or with Google. I'm simply a fan.)

    2. 2

      I can vouch for Mike's knowledge in this area. Personally, I am very much looking forward to his program.

  2. 5

    @excid3 is building https://www.hatchbox.io/ if you're using Ruby on Rails. Your cloud management strategy is truly dependent on what your requirements are. Creating a simple rundown of requirements and a cost/benefit analysis is helpful in these scenarios. This doesn't need to be anything too fancy or extensive just think through it a little bit! It's possible that although Heroku is more expensive up front, you end up saving a TON of time and money in manual labor or time spent optimizing/automating tasks that are otherwise handled by a managed service. The operational complexity can increase drastically when you move to a provider like AWS. I'd recommend executing a slow migration to gain some familiarity with the environment and services if you do decide to move over. If you settle on AWS for example, leverage Elastic Beanstalk (pretty similar to Heroku) for your business critical apps/workloads and consider moving a less critical workload to another AWS service. My overall recommendation is to not make a switch like this before you absolutely have to.

    1. 2

      Lol, posted simultaneously

      1. 1

        LOL! thanks for sharing Hatchbox @vbordo and @grammakov . 😍

      2. 1

        Haha we're on the same wavelength @denis

    2. 1

      yes that makes total sense! No need to switch or anything, I'm looking into different approaches for future projects and was really surprised at all the non-automatic setup required.

  3. 3

    If you are using Rails you can try Hatch - https://www.hatchbox.io/. I never tried it myself, as I prefer setting and maintaining my servers up personally, but the demo is very promising, especially for people who aren't that much into administrating.

  4. 2

    I run all my computing on AWS EC2, deploy with AWS CodeDeploy from GitHub, run static sites on Netlify or S3. I use AWS RDS for fully managed databases.

    Setting up your own servers on EC2 does require some knowledge and as an indie hacker you might want to use a managed environment to save time.

    However, if you do manage your own EC2 servers, you have a lot of flexibility and can save a lot of money. It is surprisingly easy to set things up yourself with a little practice.

  5. 2

    Probably more complicated than what you're looking for but I'm very happy with Docker. I also can't use a PaaS due to the nature of my app (very background-worker intensive) or it would get expensive, fast.

    I use Docker Swarm on GCE. Currently no CI, I just run tests manually before building/deploying with some custom scripts I wrote in Capistrano. Might open-source this one day.

    If you're getting into containerization, I highly recommend Docker Swarm over Kubernetes.

    1. 1

      that's an interesting offering. Wonder if there are other solutions for other languages!

  6. 1

    Jonathan,
    I am definitely not a DevOps guy who gets paid for DevOps work but I've played around with AWS/Ansible/automation.

    With that said, here's how I manage my few AWS EC2 instances.

    -I launch multiple AWS instances using AWS CLI + shell script, explained in detail below:
    https://paulcodr.co/2017/use-shell-script-awscli-to-create-multiple-ec2/
    -Each EC2 instance gets Ansible client configured (done by EC2 provision tool above) so that I can manage the EC2 instance from my Mac.

    It's definitely a hackish hack. But offering it here just as an option.

    If you are interested in learning Ansible, I recommend "Ansible for DevOps" by Jeff Geerling.

    Cheers.

  7. 1

    https://zeit.co for hosting node servers and https://base.run for the database and emails

  8. 1

    Hi! I use a combination of Laravel + Angular or Vue for my apps. So I've been using Laravel Forge to build the servers, and Laravel Envoyer for zero downtime deploys. Both of these solutions support Digital Ocean, Linode and AWS. And then for monitoring, I like New Relic.

  9. 1

    I user ServerPilot for all of the WP/HTML sites I run and it's really nice. https://serverpilot.io/