micro
micro copied to clipboard
How to run in production?
Hi @asim, I was going to give the framework a try and deploy few simple services to my own dev k8s cluster, but it I can't seem to find any instructions/recommendation on how to do that (neither on Github nor on https://micro.dev). I saw some mentions of k8s runtime but nothing specific in docs.
I'd appreciate if you could point me to the right direction.
There's currently no good deployment doc for kubernetes. There used to be a helm chart but it was deprecated. We have an image that will run on k8s and use it for M3O.com but no guides at this point. You can find the pulumi code in github.com/M3O/M3O. There an image in cmd/micro-platform in this repo.
Thanks for the quick reply. Is there any guidance how to deploy it on prod without k8s then? I'm trying to do something simple:
- Create service
foo
andbar
- Scale service
foo
to X instances, servicebar
to Y instances - Make sure that services are started after server reboots
It's not clear how to do that via micro server
. I've also tried to compile service as a separate binary, but it's not clear how to run it (it just returns Internal Server Error
on start)
You can deploy it on digitalocean using this 1-click deployment here. Services should be started back up after micro starts again. There's no instance scaling unless you're running on k8s.
So you are saying that if I start a kubernetes job with an image pulled from dockerhub (micro/micro) there might be some issues while deploying?
I have successfully deployed the microservices but am unable to login to the micro server. I get "Invalid token provided", could it be the wrong image?
The docker image on dockerhub is no longer updated. See the readme for GitHub for where the image is now. In all honesty I stopped trying to deploy micro to kubernetes long ago. We'd need new instructions to deploy the platform image which depends on etcd, redis, postgres and other things. The only way we'd get on kubernetes again otherwise is by some simpler version of Micro.
@asim, @pavel-d made really good question. As a person who did not use micro
before on production it's really hard to make it stratight to point. I am still strugling how to run it on production server correctly.
Point noted, will think about it for the future