-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add a procfile for background jobs #809
Conversation
1af3ec9
to
a542f48
Compare
adbd91a
to
e7ec590
Compare
README.md
Outdated
daemon processes run continuously. you can use `eye info` in an ssh session to view status information: | ||
```sh | ||
$ eye info | ||
|
||
traject | ||
workers | ||
earthworks-stage-indexer_0 .... up (12:07, 0%, 73Mb, <1218016>) | ||
folio_dev_indexer_0 ........... up (14:34, 6%, 137Mb, <1386323>) | ||
marc_bodoni_dev_indexer_0 ..... up (12:07, 0%, 2731Mb, <1223573>) | ||
marc_morison_dev_indexer_0 .... up (12:07, 0%, 1253Mb, <1223963>) | ||
sw_dev_indexer_0 .............. up (12:07, 0%, 75Mb, <1224054>) | ||
sw_dev_indexer_1 .............. up (12:07, 0%, 73Mb, <1224303>) | ||
sw_preview_stage_indexer_0 .... up (12:07, 0%, 73Mb, <1224638>) | ||
sw_preview_stage_indexer_1 .... up (12:07, 0%, 73Mb, <1224861>) | ||
``` | ||
you can stop and start daemons with e.g. `eye stop sw_dev_indexer`. note that it may take some time for all the processes to start and stop. for more information on eye, use `eye help` or see the [eye wiki](https://github.com/kostya/eye/wiki). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we replace this with the equivalent systemd command to check service status? I imagine it's sudo systemctl status traject
or something like that, but would be good to document. also copying the systemctl start
/stop
commands here would be nice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there really is an equivalency. systemctl status traject.target
is only going to show:
sudo systemctl status traject.target
● traject.target
Loaded: loaded (/lib/systemd/system/traject.target; enabled; vendor preset: enabled)
Active: active since Mon 2023-05-08 14:02:26 PDT; 1 day 19h ago
May 08 14:02:26 sw-indexing-stage-a.stanford.edu systemd[1]: Reached target traject.target.
that isn't going to give any of the information that eye provided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like list-dependencies
will do this (sort of):
sudo systemctl list-dependencies traject.target
traject.target
● ├─traject-earthworks_stage_indexer.1.service
● ├─traject-folio_dev_indexer.1.service
● ├─traject-folio_dev_indexer.2.service
● ├─traject-folio_dev_indexer.3.service
● ├─traject-folio_dev_indexer.4.service
● ├─traject-folio_dev_indexer.5.service
● ├─traject-folio_dev_indexer.6.service
● ├─traject-folio_dev_indexer.7.service
● ├─traject-folio_dev_indexer.8.service
● ├─traject-marc_bodoni_dev_indexer.1.service
● ├─traject-marc_morison_dev_indexer.1.service
● ├─traject-sw_dev_indexer.1.service
● ├─traject-sw_dev_indexer.2.service
● ├─traject-sw_preview_stage_indexer.1.service
● └─traject-sw_preview_stage_indexer.2.service
at least you get the green dot for the ones that are running, which seems useful enough to document.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have sudo access to that. How do you?
sudo systemctl list-dependencies traject.target
[sudo] password for indexer:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just ksu
ed first 🤷🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, well, then the sudo isn't going to do anything. Anyways, I made a PR to add sudo for that command in puppet. I didn't know about list-dependencies
so thanks for brining that to my attention.
2. a daemon run by [eye](https://github.com/kostya/eye) consumes data from the kafka topic and invokes traject | ||
2. Systemd runs the various traject services |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't the services still do the same thing? i think it's useful to note that they are consuming data from kafka to send to traject
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It its traject itself that is acting as a kafka consumer. But the traject service it can have any input you configure it to have. Systemd knows nothing about kafka, so I didn't think that belongs here.
Fixes #643