I started to develop a side project (microservice architecture) in coronavirus dates at home. My tech stacks are generally Spring Boot projects on cloud-based (cloud config server, cloud service registry, MongoDB, Redis, Rabbitmq, spring boot rest microservice apps).
I want to apply all DevOps best practices during (trunk-based) development so that I have a GitLab repo for that reason (Gitops) and I want to use Docker for all those services and apps as well.
But I am looking for a platform (like AWS, Heroku, DigitalOcean ) to able to set-up my staging platform that includes tests and my production platform that hosts my all services.
In the first step, I want to install stateful apps (Mongo, Redis) to the platform for staging and integrate my local spring boot apps with that stateful apps during local developments.
So what are the cheapest and most suitable platform for those reasons for my hobby project?
3
Answers
Heroku is a good platform to start with: each app can be deployed directly from GitHub or (more fun) creating/pushing/deploying via the Docker registry. They will be exposed via HTTS and can be configured with Env Variables (ie secrets. There is a free-tier for this and you can create as many apps as you like (they will sleep after some inactivity).
Redis is also supported and free, but it is not persisted: it is a good way to use/exercise it but you need to (re)populate with the data (after every restart).
DBs are not free (this is the case for all providers I think) but not expensive.
Heroku doesnt have a persistent storage, not even a file system (only for tmp files).
The Dashboard is great: you can check deployment and application logs, see the status, etc.. and there is also the CLI (command line) to perform anything you need without using the Dashboard.
I think the developer experience on Heroku is great, definitely a good way to get going without having to worry about cost and usage. After that it is possible to ‘upgrade’ to production-like services (paying for what you need).
What is really important is what you learn can definitely be applied to other cloud services, in case one day you want/need to change.
Good luck!
The question is, how much are you willing to pay? Google Cloud Platform and Amazon Web Services offer great managed database services and then you can run rest of your application serverless, in containers or however you like it. It won’t be free though, but if it’s low traffic service the costs are probably less than a hundred bucks a month. Especially if you’re using Terraform or similar tool to bring your development environment up and destroy it, when it’s not needed, it’s going to be almost free.
If you wanna save money, I can definitely suggest "Hetzner", there you get 2GB 1vCPUs form 2,49 EUR (which is a 1/4 from other services, I know), then you can use them for Docker, Kubernetes, DBs or whatever you like. There are tons of extensions out there, to manage them remotely.
https://www.hetzner.com/de/cloud