How to manage lots of services in nameko

From @MMmaomao on Sat Apr 07 2018 12:36:23 GMT+0000 (UTC)

Hi,
I’m wondering is there any command like linux when I have lots of services need to be managed.
So I can restart specific service after I update some code. but let some other services still run.
please see below

linux

service mysql start
service mysql restart
service mysql stop

nameko

nameko mysql start
nameko mysql restart
nameko mysql stop



Copied from original issue: https://github.com/nameko/nameko/issues/534

From @mattbennett on Mon Apr 09 2018 08:12:41 GMT+0000 (UTC)

The answer to this question depends on how you’re running your services. Nameko intentionally doesn’t concern itself with this.

I consider it best practice to at least run each service in its own process, e.g.

nameko run service_a
nameko run service_b
$ ps | grep nameko
42649 ttys004    0:01.02 ~/.virtualenvs/nameko/bin/nameko run service_a
42984 ttys005    0:00.72 ~/.virtualenvs/nameko/bin/nameko run service_b
43253 ttys006    0:00.00 grep nameko

Then you can stop and restart service processes independently.

Other recommended patterns would using a process manager (e.g. supervisord) or containers. See https://github.com/nameko/nameko-examples for a nice example of how to package nameko services as docker containers.