Skip to content

Add systemd config to codebase #2014

Open

Description

@anatol

Systemd is getting popular in Linux world and it would be great if rethinkdb team own config files for it and install using 'make install'.

Linux Arch has system config that works great. It mimics multi-instance database from debian init system, but you can change to single database if you want.

Here is the systemd config files from Linux Arch:

https://projects.archlinux.org/svntogit/community.git/tree/trunk/rethinkdb.service?h=packages/rethinkdb
https://projects.archlinux.org/svntogit/community.git/tree/trunk/rethinkdb-tmpfile.conf?h=packages/rethinkdb

And it is where the Arch package installs it

  install -Dm644 "$srcdir"/rethinkdb-tmpfile.conf "$pkgdir"/usr/lib/tmpfiles.d/rethinkdb.conf
  install -Dm644 "$srcdir"/rethinkdb.service "$pkgdir"/usr/lib/systemd/system/[email protected]

Activity

  1. coffeemug commented on Feb 25, 2014

    @coffeemug
    Contributor

    @AtnNn -- what do you think?

  2. neumino commented on Feb 25, 2014

    @neumino
    Member

    Yep, everyone is moving to systemd.

    We provide the same systemd config file in our docs as the Arch package -- http://www.rethinkdb.com/docs/cluster-on-startup/
    So instead of having users copy/paste the systemd file, we should put it in the repo.
    Having it install with make install seems like a good idea too.

    Also @anatol, congrats on becoming an Arch trusted user!

  3. anatol commented on Feb 25, 2014

    @anatol
    ContributorAuthor

    Thank you!

    BTW rethinkdb has been moved to [community] Arch repository. It means it is a binary package now and much easier to install than before. The new installation instruction is sudo pacman -S rethinkdb

  4. neumino commented on Feb 25, 2014

    @neumino
    Member

    Yep, updating the Arch install page now.

  5. self-assigned this
    on Feb 25, 2014
  6. added this to the subsequent milestone on Feb 25, 2014
  7. AtnNn commented on Feb 25, 2014

    @AtnNn
    Member

    This is a very good idea. Moving to subsequent.

  8. thelinuxlich commented on Aug 1, 2014

    @thelinuxlich

    +1

  9. anatol commented on Aug 27, 2014

    @anatol
    ContributorAuthor

    So what do you think about providing systemd support out of box?

    Another question related to the service. Arch systemd service provides multiple instances similar to what debian service does. Would it be better to provide simpler one-instance service? I can write and test such file for you. Is multiple-rethinkdb-instances the default usage use-case?

  10. coffeemug commented on Aug 27, 2014

    @coffeemug
    Contributor

    Thanks @anatol. /cc @AtnNn -- what do you think we should do?

  11. AtnNn commented on Sep 5, 2014

    @AtnNn
    Member

    So what do you think about providing systemd support out of box?

    I think we should do it. It should be relatively straightforward to bundle the systemd config you link to into rethinkdb.

    Multiple instances are not the most common use case, but I think it should be supported.

  12. anatol commented on Sep 5, 2014

    @anatol
    ContributorAuthor

    Multiple instances are not the most common use case, but I think it should be supported.

    As a package maintainer I suggest to keep systemd service simple (i.e. one-instance version) especially as it is common case. User can always make multiple-instance version of the service that is a two line change.

  13. AtnNn commented on Sep 5, 2014

    @AtnNn
    Member

    @anatol I agree. But considering that multiple instances are supported by the rc script and that, as you mention, it is only a two line difference, supporting it in the systemd config would help users switching from one to the other.

  14. 27 remaining items

  15. modified the milestones: , 2.3 on Nov 19, 2015
  16. modified the milestones: , subsequent on Apr 7, 2016
  17. mikemaccana commented on Apr 9, 2016

    @mikemaccana

    Regarding /usr/lib/systemd/system/[email protected] - why the trailing at symbol? or should it be @instance-name.service ?

  18. anatol commented on Apr 9, 2016

    @anatol
    ContributorAuthor

    It is so called instantiated service that allow to run multiple instances of rethinkdb http://0pointer.de/blog/projects/instances.html

    It might be better to use simpler non-instantiated service file as a default option. But the instantiated one added to Arch to match current init script http://www.rethinkdb.com/docs/start-on-startup/

  19. mikemaccana commented on Apr 15, 2016

    @mikemaccana

    Forgot to add: thanks @anatol !

  20. ncraike commented on Oct 23, 2017

    @ncraike

    How is this progressing? Is there anything I can do to help out?

  21. ArKam commented on Oct 24, 2017

    @ArKam

    My two cents on this topic, just goes with the not instanciated as a default as now a day, more and more multiple instances will happen within containerized environment plus we (the users) will naturally try to dumbly launch it with a systemctl enable rethinkdb.service

    Plus, this is how MariaDB and MySQL are solving this issue, they provide a sane non-templatized default service and so let the user know that it is possible to call a different unit using templatized units within the documentation.

  22. cervajs commented on Oct 24, 2017

    @cervajs

    +1

  23. FranklinYu commented on Aug 24, 2018

    @FranklinYu

    Agree what @ArKam said. Multiple-instance deployment nowadays would typically be either in containers or in virtual machines, because those users are typically enterprises that can afford (or even already have) such infrastructure. Clusterization is complicated and no DevOps should count on a magic one-liner to get everything ready.

  24. zedtux commented on Feb 1, 2022

    @zedtux

    One day, maybe 😍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions