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

Provide systemd unit file in .deb and .rpm packages #4478

Merged
merged 20 commits into from
Jul 24, 2024

Conversation

noisersup
Copy link
Member

@noisersup noisersup commented Jul 19, 2024

Description

Please give some opinions about providing the configuration. I've dropped the EnvironmentFile usage, as it's not a recommended way by systemd team. The configuration can be specified with systemctl edit to contain them directly in the unift file.

Closes #2287.

Readiness checklist

  • I added/updated unit tests (and they pass).
  • I added/updated integration/compatibility tests (and they pass).
  • I added/updated comments and checked rendering.
  • I made spot refactorings.
  • I updated user documentation.
  • I ran task all, and it passed.
  • I ensured that PR title is good enough for the changelog.
  • (for maintainers only) I set Reviewers (@FerretDB/core), Milestone (Next), Labels, Project and project's Sprint fields.
  • I marked all done items in this checklist.

Copy link

codecov bot commented Jul 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.21%. Comparing base (b203258) to head (f8831d7).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4478      +/-   ##
==========================================
- Coverage   73.79%   71.21%   -2.59%     
==========================================
  Files         330      330              
  Lines       22908    22908              
==========================================
- Hits        16906    16313     -593     
- Misses       4764     5365     +601     
+ Partials     1238     1230       -8     

see 31 files with indirect coverage changes

Flag Coverage Δ
filter-true 64.03% <ø> (-2.93%) ⬇️
hana-1 0.00% <ø> (ø)
integration 64.03% <ø> (-2.93%) ⬇️
mongodb-1 5.42% <ø> (ø)
postgresql-1 42.72% <ø> (ø)
postgresql-2 ?
postgresql-3 42.43% <ø> (-0.05%) ⬇️
postgresql-4 44.08% <ø> (+0.07%) ⬆️
postgresql-5 45.44% <ø> (+<0.01%) ⬆️
sqlite-1 41.64% <ø> (+<0.01%) ⬆️
sqlite-2 ?
sqlite-3 41.44% <ø> (ø)
sqlite-4 42.90% <ø> (-0.08%) ⬇️
sqlite-5 44.44% <ø> (ø)
unit 33.56% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@noisersup noisersup changed the title Provide systemd unit Provide systemd unit file in deb and rpm packages Jul 22, 2024
@noisersup noisersup added code/feature Some user-visible feature is not implemented yet do not merge PRs that should not be merged labels Jul 22, 2024
@noisersup noisersup added this to the Next milestone Jul 22, 2024
@noisersup noisersup requested review from a team, rumyantseva and chilagrow July 22, 2024 16:50
@noisersup noisersup marked this pull request as ready for review July 22, 2024 16:50
@noisersup noisersup requested a review from AlekSi as a code owner July 22, 2024 16:51
@noisersup noisersup enabled auto-merge (squash) July 22, 2024 16:51
Copy link
Contributor

@rumyantseva rumyantseva left a comment

Choose a reason for hiding this comment

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

Asked a couple of questions, but I'm not an expert in systemd, so my questions might be irrelevant. I think I need to read something about systemd best practices, could you please share something to learn from?

Copy link
Member

@chilagrow chilagrow left a comment

Choose a reason for hiding this comment

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

How was this tested?

Should FerretDB be run by root user only or non root user?

@chilagrow
Copy link
Member

How was this tested?

Should FerretDB be run by root user only or non root user?

We wouldn't know the user, so ignore my comment.

@AlekSi
Copy link
Member

AlekSi commented Jul 23, 2024

I've dropped the EnvironmentFile usage, as it's not a recommended way by systemd team

What is recommended?

@AlekSi
Copy link
Member

AlekSi commented Jul 23, 2024

https://serverfault.com/a/413408

Ok, we should update the documentation and CHANGELOG.md too

@noisersup noisersup requested a review from ptrfarkas as a code owner July 23, 2024 11:45
Copy link
Member

@AlekSi AlekSi left a comment

Choose a reason for hiding this comment

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

Build fails. Please run task docs-fmt and read the writing guide

build/ferretdb.service Outdated Show resolved Hide resolved
build/ferretdb.service Outdated Show resolved Hide resolved
website/docs/quickstart-guide/deb.md Outdated Show resolved Hide resolved
website/docs/quickstart-guide/deb.md Outdated Show resolved Hide resolved
website/docs/quickstart-guide/rpm.md Outdated Show resolved Hide resolved
website/docs/quickstart-guide/rpm.md Outdated Show resolved Hide resolved
website/docs/quickstart-guide/systemd.md Show resolved Hide resolved
website/docs/quickstart-guide/systemd.md Outdated Show resolved Hide resolved
website/docs/quickstart-guide/systemd.md Outdated Show resolved Hide resolved
@noisersup noisersup added the trust PRs that can access Actions secrets label Jul 23, 2024
Fashander
Fashander previously approved these changes Jul 23, 2024
@noisersup noisersup removed the trust PRs that can access Actions secrets label Jul 23, 2024
@AlekSi AlekSi changed the title Provide systemd unit file in deb and rpm packages Provide systemd unit file in .deb and .rpm packages Jul 23, 2024
@AlekSi AlekSi disabled auto-merge July 23, 2024 18:33
@AlekSi AlekSi enabled auto-merge (squash) July 23, 2024 18:33
build/ferretdb.service Outdated Show resolved Hide resolved
website/docs/quickstart-guide/systemd.md Outdated Show resolved Hide resolved
website/docs/quickstart-guide/systemd.md Outdated Show resolved Hide resolved
@noisersup noisersup requested review from AlekSi and Fashander July 23, 2024 19:12
@chilagrow chilagrow added trust PRs that can access Actions secrets not ready Issues that are not ready to be worked on; PRs that should skip CI and removed not ready Issues that are not ready to be worked on; PRs that should skip CI labels Jul 24, 2024
build/ferretdb.service Show resolved Hide resolved
@AlekSi AlekSi merged commit f859bb1 into FerretDB:main Jul 24, 2024
29 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/feature Some user-visible feature is not implemented yet documentation Something user-visible is badly or not documented trust PRs that can access Actions secrets
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Provide systemd unit file in deb and rpm packages
5 participants