question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make it possible to start/stop/restart individual services

See original GitHub issue

What should we add or change to make your life better?

I’m using Tye to run a couple of infrastructure containers (SEQ, Postgres, Cassandra, RabbitMQ, etc), a couple of our services as containers and the service(s) I’m currently working on as csproj(s). About ~20 services all in all.

I jump a lot between branches (code reviews, fixes here and there, etc) and most of the time I want to keep a base set of containers running sine they hardly ever change between revisions. But, I would like to be able to stop, start and restart specific services (both containers and csprojs) on demand.

Restarting Tye entirely can take a long time, when maybe all I really want is to restart a single service or change the version of an image. I have tried to use watch where that is applicable, but unfortunately that causes VS to hang depending on what parts of the code that changes (a common lib for example). And it doesn’t work when changing image versions.

I think there are a couple of different commands that would help me in my daily work. All of these would require that Tye can run in detached mode:

  1. tye run <service name>. Would make it possible to add a specific service to the current Tye instance.
  2. tye stop <service name>. Would stop a specific service.
  3. tye restart <service name>. Would restart a specific service.

I wanted to see how feasible this is with the current architecture of Tye, so I did a small PoC where I made it possible to restart a single (csproj) service from the Dashboard. You can have a look at it here. It seems to be working fine, but would require a bit of refactoring, it’s not the prettiest solution at the moment.

I would love to spend more time on this and make a proper PR, and I really think it would add a lot of value.

Why is this important to you?

Tye has really simplified my daily workflow, in that it lets me run a combination of containers and csprojs together. I also really like that I can configure them and easily decide what to run in a single file.

Unfortunately, jumping around between branches forces me to restart Tye entirely between each run, which takes a lot of time.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:31
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

15reactions
jkotalikcommented, Jan 15, 2021

Thanks for the feedback @jooooel . Your scenarios is definitely not unique, and the suggestion you have seems promising.

We have a few ideas around improving the inner loop speed in tye, especially around running multiple times. One idea we are thinking about is a daemon mode where tye is always running and commands to tye run would just add them to the daemon. That way in your example, you could arbitrarily start and stop specific services accordingly. This also would allow you to have things always running in the background without having them restart on each execution of tye run.

I could see it looking like this:

  • tye run is the same as today, ctrl-C to kill all things that are started with tye run
  • tye start does tye run but returns after all projects/images are started
  • tye stop stops images and projects that are already running
  • tye restart does the restart

Also, all of these could be specified for a specific service.

0reactions
malisancubecommented, Apr 27, 2023

This would be a very nice feature. I’ve found that using tye, I need to continuously stop all services to see the new updates.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I grant start/stop/restart permissions on a service to ...
Clarification: I don't want to grant the ability to start/stop/restart ALL services to a given user or group - I want to be...
Read more >
How to start, stop, and restart services in Linux
We'll be working with Linux, but all of the commands for starting, stopping and restarting Linux services can be run on CentOS, Ubuntu,...
Read more >
Operating Ceph Services | Administration Guide
3, “Identifying Individual Services” to learn more about services identification. To start/stop/restart the osd.1 service, run: root # systemctl start ceph-osd@ ...
Read more >
iis - IUSR should be able to start/stop/restart a certain service
You can reconfigure a service's ACL either via software (typically during the service installation) or using the sc sdset command-line tool.
Read more >
Start/Stop/Restart Services Using Systemctl in Linux
The command restart serves for restarting the service in execution. Stop and then start one or more units specified on the command line....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found