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

Add basic support for systemd #761

Merged
merged 3 commits into from
Jul 26, 2023
Merged

Conversation

sharkAndshark
Copy link
Collaborator

No description provided.

@sharkAndshark sharkAndshark changed the title add basic support for systemd Add basic support for systemd Jul 16, 2023
@nyurik
Copy link
Member

nyurik commented Jul 16, 2023

thx @sharkAndshark , can you think of a way to automate testing of the debian packages? Perhaps run some sort of apt install from a local file and test that which martin points to the right dir?

More specifically about this PR - Martin is clearly a service, so integrating it with a service infrastructure makes perfect sense, but it does not really make any sense without some configuration - so should it be disabled by default? Not certain what the best options would be.

@sharkAndshark
Copy link
Collaborator Author

sharkAndshark commented Jul 17, 2023

Hi @nyurik. Something we should consider of per your comment:

test

How and what to test a .deb file in our CI? There are some references I'm still researching on.

the behaviors of martin as a service

  • should not automatically start afeter installation
  • should have a configuration file by default
  • ??

@nyurik
Copy link
Member

nyurik commented Jul 17, 2023

test

How and what to test a .deb file in our CI? There are some references I'm still researching on.

Sorry, my mistake - I just realized you already do that in Integration Tests (with debian package) part, which looks great!

@sharkAndshark
Copy link
Collaborator Author

sharkAndshark commented Jul 25, 2023

Hi @nyurik :)
By now, we could use it like this.

just package-deb
sudo dpkg -i target/debian/martin.deb
just start

Call martin directily

martin postgres://postgres:postgres@localhost:5411/db

We have made a test about this: Intergration test (with debian package) in CI.yml

Call martin as service

# enable martin automatically start 
systemctl enable martin
vim /usr/local/etc/martin/config.yaml
...
systemctl start martin
systemctl status martin

Do you think we need a test for calling marin as a service?

@sharkAndshark sharkAndshark marked this pull request as ready for review July 25, 2023 10:11
Copy link
Member

@nyurik nyurik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, thanks!

@nyurik
Copy link
Member

nyurik commented Jul 25, 2023

P.S. We could add a simple check if a specific file exists in CI after debian package install - up to you

@sharkAndshark sharkAndshark merged commit 09a47e0 into maplibre:main Jul 26, 2023
18 checks passed
@sharkAndshark sharkAndshark deleted the systemd branch October 27, 2023 12:25
lefuturiste pushed a commit to lefuturiste/martin that referenced this pull request Aug 26, 2024
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

Successfully merging this pull request may close these issues.

2 participants