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

DOCTEAM-1338:Setting up a systemd service-article #315

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

Amrita42
Copy link
Contributor

@Amrita42 Amrita42 commented Mar 22, 2024

Description

The scope of this PR is to cover the scope of "Setting up a systemd service" as defined in https://jira.suse.com/browse/DOCTEAM-1338

Reviewers
Please dont review now , will tag in slack when ready.

Reused (Review not required as this topics have been reviewed and are being re-used multiple times)

  • What is systemd?
  • Structure of a unit file
  • Unit file types
  • Unit dependencies and order

Review required

  • Creating a Linux service with systemd
  • Editing a systemd unit file
  • Debugging a systemd service

@Amrita42 Amrita42 changed the title DOCTEAM-1338: assembly and dc file [WIP]DOCTEAM-1338: assembly and dc file Mar 22, 2024
@Amrita42 Amrita42 changed the title [WIP]DOCTEAM-1338: assembly and dc file [WIP]DOCTEAM-1338:Setting up a systemd service Mar 28, 2024
@Amrita42 Amrita42 added WIP Work in progress. Do not merge! smartdocs labels Mar 28, 2024
@Amrita42 Amrita42 changed the title [WIP]DOCTEAM-1338:Setting up a systemd service [WIP]DOCTEAM-1338:Setting up a systemd service-article Mar 28, 2024
@Amrita42 Amrita42 self-assigned this Apr 4, 2024
@Amrita42
Copy link
Contributor Author

@Amrita42 Amrita42 changed the title [WIP]DOCTEAM-1338:Setting up a systemd service-article DOCTEAM-1338:Setting up a systemd service-article Oct 30, 2024
Copy link
Contributor

@taroth21 taroth21 left a comment

Choose a reason for hiding this comment

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

@Amrita42 : Many thanks, well done! Sorry for the large number of comments and suggestions but the majority of them is about updating the metadata and adjusting some structures to the latest template updates (I provide those as suggestions).

Comment on lines +6 to +12
PROFCONDITION="suse-product"
PROFOS="generic"
#PROFCONDITION="suse-product;beta"
#PROFCONDITION="community-project"

STYLEROOT="/usr/share/xml/docbook/stylesheet/suse2022-ns"
FALLBACK_STYLEROOT="/usr/share/xml/docbook/stylesheet/suse-ns"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
PROFCONDITION="suse-product"
PROFOS="generic"
#PROFCONDITION="suse-product;beta"
#PROFCONDITION="community-project"
STYLEROOT="/usr/share/xml/docbook/stylesheet/suse2022-ns"
FALLBACK_STYLEROOT="/usr/share/xml/docbook/stylesheet/suse-ns"
## Profiling
PROFOS="PRODUCT"
#PROFCONDITION="PRODUCTNUMBER"
#STRUCTID="STRUCTURE-ID"
#PROFARCH="x86_64;zseries;power;aarch64"
DOCBOOK5_RNG_URI="urn:x-suse:rng:v2:geekodoc-flat"
STYLEROOT="/usr/share/xml/docbook/stylesheet/suse2022-ns"
FALLBACK_STYLEROOT="/usr/share/xml/docbook/stylesheet/suse-ns"

Copy link
Contributor

Choose a reason for hiding this comment

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

Updating to latest template

<merge>
<title>Setting up a &systemd; service</title>
<revhistory xml:id="rh-setting-up-systemd">
<revision><date>2024-03-20</date>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<revision><date>2024-03-20</date>
<revision><date>2024-11-27</date>

<revision><date>2024-03-20</date>
<revdescription>
<para>
Initial version.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Initial version.
Initial version

Copy link
Contributor

Choose a reason for hiding this comment

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

<phrase>&power;</phrase>
</meta>
<meta name="productname" its:translate="no">
<!-- enter product name and version --><productname version="15-SP5">&sles;</productname>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<!-- enter product name and version --><productname version="15-SP5">&sles;</productname>
<!-- enter product name and version --><productname version="15 SP6">&sles;</productname>

Comment on lines +119 to +127
<dm:docmanager xmlns:dm="urn:x-suse:ns:docmanager">
<dm:bugtracker>
<dm:url>https://bugzilla.suse.com/enter_bug.cgi</dm:url>
<dm:component>Smart Docs</dm:component>
<dm:product>Documentation</dm:product>
<dm:assignee>[email protected]</dm:assignee>
</dm:bugtracker>
<dm:translation>yes</dm:translation>
</dm:docmanager>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<dm:docmanager xmlns:dm="urn:x-suse:ns:docmanager">
<dm:bugtracker>
<dm:url>https://bugzilla.suse.com/enter_bug.cgi</dm:url>
<dm:component>Smart Docs</dm:component>
<dm:product>Documentation</dm:product>
<dm:assignee>[email protected]</dm:assignee>
</dm:bugtracker>
<dm:translation>yes</dm:translation>
</dm:docmanager>
<dm:docmanager xmlns:dm="urn:x-suse:ns:docmanager">
<dm:bugtracker>
<dm:url>https://bugzilla.suse.com/enter_bug.cgi</dm:url>
<dm:product>SUSE Linux Enterprise Server 16.0</dm:product>
<dm:component>Documentation</dm:component>
<dm:assignee>[email protected]</dm:assignee>
</dm:bugtracker>
<dm:translation>yes</dm:translation>
</dm:docmanager>

Copy link
Contributor

Choose a reason for hiding this comment

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

Using the latest template for Bugzilla pointers (see https://github.com/openSUSE/doc-kit/blob/main/smart-doc/articles/assembly.asm.xml#L111 for reference)

</listitem>
</varlistentry>
</variablelist>
<para>The <command>sysctemctl edit </command> command by default opens a unit file snippet, for example:</para>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<para>The <command>sysctemctl edit </command> command by default opens a unit file snippet, for example:</para>
<para>The <command>systemctl edit </command> command by default opens a unit file snippet, for example:</para>

xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:trans="http://docbook.org/ns/transclusion">
<info>
Copy link
Contributor

@taroth21 taroth21 Nov 18, 2024

Choose a reason for hiding this comment

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

Content-wise, most of this file is indeed a reference (even if it includes some instructions, which means that the reference purpose is mixed up a bit). However, the title suggests otherwise - as a reader, under the headline 'Editing foo bar' I would have expected tasks and step-by-step procedures.

I leave it up to you how to handle that. From my perspective, you could:

  • Rewrite the topic to a task (and keep the title). In that case you could probably split the topic up into the following procedures
    • Adding directives and overriding files
    • Customizing existing unit files completely
    • Removing custom changes to unit file
  • Keep the topic as a reference but adjust the title so if reflects what to expect (maybe rephrase to something like 'The sysctemctl edit command')

<term><filename>/usr/lib/systemd/system/</filename></term>
<listitem>
<para>
When the package is installed, &systemd; unit files reside here.
Copy link
Contributor

Choose a reason for hiding this comment

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

the package? which one? the systemd package?

</abstract>
</info>
<para>There are three main directories where unit files are stored on the system: </para>
<variablelist>
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe already mention here which directory takes precedence in case two 'versions' of one file exist.

<screen>&prompt.root;<command>systemctl</command> start apache2
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.</screen>
<itemizedlist>
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it's a personal preference of mine, but I would use a variabelist here (instead of an itemizedlist with listitems). That way, you could highlight the 'goal' for each debug action in the variablelist title (you could mostly use as titles what you now have as first para of each listitem). That makes it easier for the readers to skim through the titles to find the debug action they are interested in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
smartdocs WIP Work in progress. Do not merge!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants