Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run in production? #1997

Open
pavel-d opened this issue Jan 21, 2023 · 6 comments
Open

How to run in production? #1997

pavel-d opened this issue Jan 21, 2023 · 6 comments

Comments

@pavel-d
Copy link

pavel-d commented Jan 21, 2023

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.

@asim
Copy link
Member

asim commented Jan 21, 2023

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.

@pavel-d
Copy link
Author

pavel-d commented Jan 21, 2023

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 and bar
  • Scale service foo to X instances, service bar 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)

@asim
Copy link
Member

asim commented Jan 21, 2023

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.

@incognito-bob
Copy link

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?

@asim
Copy link
Member

asim commented Jan 23, 2023

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.

@felixd
Copy link
Contributor

felixd commented Feb 25, 2023

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants