<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Lennart Poettering &#8211; Noise</title>
	<atom:link href="https://noise.getoto.net/author/lennart-poettering/feed/" rel="self" type="application/rss+xml" />
	<link>https://noise.getoto.net</link>
	<description>The collective thoughts of the interwebz</description>
	<lastBuildDate>Mon, 26 Jan 2026 23:00:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>Introducing Amutable</title>
		<link>https://noise.getoto.net/2026/01/27/introducing-amutable/</link>
		
		<dc:creator><![CDATA[Lennart Poettering]]></dc:creator>
		<pubDate>Mon, 26 Jan 2026 23:00:00 +0000</pubDate>
				<category><![CDATA[misc]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=eb63eb276d7d3fbf659fdcdc3450088b</guid>

					<description><![CDATA[Today, we announce Amutable, our ✨ new ✨ company. We –
@blixtra@hachyderm.io,
@brauner@mastodon.social,
@davidstrauss@mastodon.social,
@rodrigo_rata@mastodon.social,
@michaelvogt@mastodon.social,
@pothos@fosstodon.org,
@zbyszek@fosstodon.org,
@daandeme...]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>Mastodon Stories for systemd v259</title>
		<link>https://noise.getoto.net/2025/12/31/mastodon-stories-for-systemd-v259/</link>
		
		<dc:creator><![CDATA[Lennart Poettering]]></dc:creator>
		<pubDate>Tue, 30 Dec 2025 23:00:00 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=4b3d34521b53f9a6cb86c1a9d24bf6a0</guid>

					<description><![CDATA[On Dec 17 we released systemd v259 into the wild.
In the weeks leading up to that release (and since then) I have posted
a series of serieses of posts to Mastodon about key new features in
this release, under the
#systemd259
hash tag. In case you aren'...]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>Mastodon Stories for systemd v258</title>
		<link>https://noise.getoto.net/2025/11/18/mastodon-stories-for-systemd-v258/</link>
		
		<dc:creator><![CDATA[Lennart Poettering]]></dc:creator>
		<pubDate>Mon, 17 Nov 2025 23:00:00 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=24e756beb42a7fbbaa12eb31209fb990</guid>

					<description><![CDATA[Already on Sep 17 we released systemd v258 into the wild.
In the weeks leading up to that release I have posted a series of
serieses of posts to Mastodon about key new features in this release,
under the #systemd258 hash
tag. It was my intention to pos...]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>ASG! 2025 CfP Closes Tomorrow!</title>
		<link>https://noise.getoto.net/2025/06/12/asg-2025-cfp-closes-tomorrow/</link>
		
		<dc:creator><![CDATA[Lennart Poettering]]></dc:creator>
		<pubDate>Wed, 11 Jun 2025 22:00:00 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=3a91a59804124117584d6843d481e41e</guid>

					<description><![CDATA[The All Systems Go! 2025 Call for Participation Closes Tomorrow!
The Call for Participation (CFP) for All Systems Go!
2025 will close tomorrow, on 13th of
June! We’d like to invite you to submit your proposals for
consideration to the CFP submission
si...]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>Announcing systemd v257</title>
		<link>https://noise.getoto.net/2024/12/17/announcing-systemd-v257/</link>
		
		<dc:creator><![CDATA[Lennart Poettering]]></dc:creator>
		<pubDate>Mon, 16 Dec 2024 23:00:00 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=11b450a3fb19a2e895b3394b9befda55</guid>

					<description><![CDATA[Last week we released systemd v257 into the wild.
In the weeks leading up to this release (and the week after) I have
posted a series of serieses of posts to Mastodon about key new
features in this release, under the
#systemd257 hash tag. In
case you a...]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>Announcing systemd v256</title>
		<link>https://noise.getoto.net/2024/06/12/announcing-systemd-v256/</link>
		
		<dc:creator><![CDATA[Lennart Poettering]]></dc:creator>
		<pubDate>Tue, 11 Jun 2024 22:00:00 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=76c54669f80731b7c43d6d8f80206dcb</guid>

					<description><![CDATA[Yesterday evening we released systemd v256 into the wild. While other projects,
such as Firefox
are just about to leave the 7bit world and enter 8bit territory, we already
entered 9bit version territory! For details about the release, see our
announcem...]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>A re-introduction to mkosi &#8212; A Tool for Generating OS Images</title>
		<link>https://noise.getoto.net/2024/01/10/a-re-introduction-to-mkosi-a-tool-for-generating-os-images/</link>
		
		<dc:creator><![CDATA[Lennart Poettering]]></dc:creator>
		<pubDate>Tue, 09 Jan 2024 23:00:00 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=cbefd740451f1f5cb652828ab20df183</guid>

					<description><![CDATA[
This is a guest post written by Daan De Meyer, systemd and mkosi
maintainer

Almost 7 years ago, Lennart first
wrote
about mkosi on this blog. Some years ago, I took over development and
there's been a huge amount of changes and improvements since the...]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>ASG! 2019 CfP Re-Opened!</title>
		<link>https://noise.getoto.net/2019/07/15/asg-2019-cfp-re-opened/</link>
		
		<dc:creator><![CDATA[Lennart Poettering]]></dc:creator>
		<pubDate>Sun, 14 Jul 2019 22:00:00 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=225f4debe66f47befed06c36b08183bf</guid>

					<description><![CDATA[The All Systems Go! 2019 Call for Participation Re-Opened for ONE DAY!
Due to popular request we have re-opened the Call for Participation
(CFP) for All Systems Go!  2019 for one
day. It will close again TODAY, on 15 of July 2019, midnight Central
Euro...]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>Walkthrough for Portable Services in Go</title>
		<link>https://noise.getoto.net/2019/04/03/walkthrough-for-portable-services-in-go/</link>
		
		<dc:creator><![CDATA[Lennart Poettering]]></dc:creator>
		<pubDate>Tue, 02 Apr 2019 22:00:00 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=678c7a43dc016abfb45977b0a33daa08</guid>

					<description><![CDATA[<h1>Portable Services Walkthrough (Go Edition)</h1>
<p>A few months ago I posted <a href="http://0pointer.net/blog/walkthrough-for-portable-services.html">a blog story with a walkthrough of systemd
Portable
Services</a>. The
example service given was written in C, and the image was built with
<a href="https://github.com/systemd/mkosi"><code>mkosi</code></a>. In this blog story I'd
like to revisit the exercise, but this time focus on a different
aspect: modern programming languages like Go and Rust push users a lot
more towards static linking of libraries than the usual dynamic
linking preferred by C (at least in the way C is used by traditional
Linux distributions).</p>
<p>Static linking means we can greatly simplify image building: if we
don't have to link against shared libraries during runtime we don't
have to include them in the portable service image. And that means
pretty much all need for building an image from a Linux distribution
of some kind goes away as we'll have next to no dependencies that
would require us to rely on a distribution package manager or
distribution packages. In fact, as it turns out, we only need as few
as three files in the portable service image to be fully functional.</p>
<p>So, let's have a closer look how such an image can be put
together. All of the following is available in <a href="https://github.com/systemd/portable-walkthrough-go">this git
repository</a>.</p>
<h2>A Simple Go Service</h2>
<p>Let's start with a simple Go service, an HTTP service that simply
counts how often a page from it is requested. Here are the sources:
<a href="https://github.com/systemd/portable-walkthrough-go/blob/master/main.go">main.go</a>
— note that I am not a seasoned Go programmer, hence please be
gracious.</p>
<p>The service implements systemd's socket activation protocol, and thus
can receive bound TCP listener sockets from systemd, using the
<code>$LISTEN_PID</code> and <code>$LISTEN_FDS</code> environment variables.</p>
<p>The service will store the counter data in the directory indicated in
the <code>$STATE_DIRECTORY</code> environment variable, which happens to be an
environment variable current systemd versions set based on the
<a href="https://www.freedesktop.org/software/systemd/man/systemd.exec.html#RuntimeDirectory="><code>StateDirectory=</code></a>
setting in service files.</p>
<h1>Two Simple Unit Files</h1>
<p>When a service shall be managed by systemd a unit file is
required. Since the service we are putting together shall be socket
activatable, we even have two:
<a href="https://github.com/systemd/portable-walkthrough-go/blob/master/portable-walkthrough-go.service"><code>portable-walkthrough-go.service</code></a>
(the description of the service binary itself) and
<a href="https://github.com/systemd/portable-walkthrough-go/blob/master/portable-walkthrough-go.socket"><code>portable-walkthrough-go.socket</code></a>
(the description of the sockets to listen on for the service).</p>
<p>These units are not particularly remarkable: the <code>.service</code> file
primarily contains the command line to invoke and a <code>StateDirectory=</code>
setting to make sure the service when invoked gets its own private
state directory under <code>/var/lib/</code> (and the <code>$STATE_DIRECTORY</code>
environment variable is set to the resulting path). The <code>.socket</code> file
simply lists 8088 as TCP/IP port to listen on.</p>
<h1>An OS Description File</h1>
<p>OS images (and that includes portable service images) generally should
include an
<a href="https://www.freedesktop.org/software/systemd/man/os-release.html"><code>os-release</code></a>
file. Usually, that is provided by the distribution. Since we are
building an image without any distribution let's write our <a href="https://github.com/systemd/portable-walkthrough-go/blob/master/os-release">own
version of such a
file</a>. Later
on we can use the <code>portablectl inspect</code> command to have a look at this
metadata of our image.</p>
<h1>Putting it All Together</h1>
<p>The four files described above are already every file we need to build
our image. Let's now put the portable service image together. For that
I've written a
<a href="https://github.com/systemd/portable-walkthrough-go/blob/master/Makefile"><code>Makefile</code></a>. It
contains two relevant rules: the first one builds the static binary
from the Go program sources. The second one then puts together a
<code>squashfs</code> file system combining the following:</p>
<ol>
<li>The compiled, statically linked service binary</li>
<li>The two systemd unit files</li>
<li>The <code>os-release</code> file</li>
<li>A couple of empty directories such as <code>/proc/</code>, <code>/sys/</code>, <code>/dev/</code>
   and so on that need to be over-mounted with the respective kernel
   API file system. We need to create them as empty directories here
   since Linux insists on directories to exist in order to over-mount
   them, and since the image we are building is going to be an
   immutable read-only image (<code>squashfs</code>) these directories cannot be
   created dynamically when the portable image is mounted.</li>
<li>Two empty files <code>/etc/resolv.conf</code> and <code>/etc/machine-id</code> that can
   be over-mounted with the same files from the host.</li>
</ol>
<p>And that's already it. After a quick <code>make</code> we'll have our portable
service image <code>portable-walkthrough-go.raw</code> and are ready to go.</p>
<h1>Trying it out</h1>
<p>Let's now attach the portable service image to our host system:</p>
<div class="highlight"><pre><span></span><code><span class="err">#</span><span class="w"> </span><span class="n">portablectl</span><span class="w"> </span><span class="n">attach</span><span class="w"> </span><span class="p">.</span><span class="o">/</span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span><span class="p">.</span><span class="n">raw</span>
<span class="p">(</span><span class="n">Matching</span><span class="w"> </span><span class="n">unit</span><span class="w"> </span><span class="n">files</span><span class="w"> </span><span class="k">with</span><span class="w"> </span><span class="k">prefix</span><span class="w"> </span><span class="s1">'portable-walkthrough-go'</span><span class="p">.)</span>
<span class="n">Created</span><span class="w"> </span><span class="n">directory</span><span class="w"> </span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">systemd</span><span class="o">/</span><span class="k">system</span><span class="p">.</span><span class="n">attached</span><span class="p">.</span>
<span class="n">Created</span><span class="w"> </span><span class="n">directory</span><span class="w"> </span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">systemd</span><span class="o">/</span><span class="k">system</span><span class="p">.</span><span class="n">attached</span><span class="o">/</span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span><span class="p">.</span><span class="n">socket</span><span class="p">.</span><span class="n">d</span><span class="p">.</span>
<span class="n">Written</span><span class="w"> </span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">systemd</span><span class="o">/</span><span class="k">system</span><span class="p">.</span><span class="n">attached</span><span class="o">/</span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span><span class="p">.</span><span class="n">socket</span><span class="p">.</span><span class="n">d</span><span class="o">/</span><span class="mi">20</span><span class="o">-</span><span class="n">portable</span><span class="p">.</span><span class="n">conf</span><span class="p">.</span>
<span class="n">Copied</span><span class="w"> </span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">systemd</span><span class="o">/</span><span class="k">system</span><span class="p">.</span><span class="n">attached</span><span class="o">/</span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span><span class="p">.</span><span class="n">socket</span><span class="p">.</span>
<span class="n">Created</span><span class="w"> </span><span class="n">directory</span><span class="w"> </span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">systemd</span><span class="o">/</span><span class="k">system</span><span class="p">.</span><span class="n">attached</span><span class="o">/</span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span><span class="p">.</span><span class="n">service</span><span class="p">.</span><span class="n">d</span><span class="p">.</span>
<span class="n">Written</span><span class="w"> </span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">systemd</span><span class="o">/</span><span class="k">system</span><span class="p">.</span><span class="n">attached</span><span class="o">/</span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span><span class="p">.</span><span class="n">service</span><span class="p">.</span><span class="n">d</span><span class="o">/</span><span class="mi">20</span><span class="o">-</span><span class="n">portable</span><span class="p">.</span><span class="n">conf</span><span class="p">.</span>
<span class="n">Created</span><span class="w"> </span><span class="n">symlink</span><span class="w"> </span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">systemd</span><span class="o">/</span><span class="k">system</span><span class="p">.</span><span class="n">attached</span><span class="o">/</span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span><span class="p">.</span><span class="n">service</span><span class="p">.</span><span class="n">d</span><span class="o">/</span><span class="mi">10</span><span class="o">-</span><span class="n">profile</span><span class="p">.</span><span class="n">conf</span><span class="w"> </span><span class="err">→</span><span class="w"> </span><span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">systemd</span><span class="o">/</span><span class="n">portable</span><span class="o">/</span><span class="n">profile</span><span class="o">/</span><span class="k">default</span><span class="o">/</span><span class="n">service</span><span class="p">.</span><span class="n">conf</span><span class="p">.</span>
<span class="n">Copied</span><span class="w"> </span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">systemd</span><span class="o">/</span><span class="k">system</span><span class="p">.</span><span class="n">attached</span><span class="o">/</span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span><span class="p">.</span><span class="n">service</span><span class="p">.</span>
<span class="n">Created</span><span class="w"> </span><span class="n">symlink</span><span class="w"> </span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">portables</span><span class="o">/</span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span><span class="p">.</span><span class="n">raw</span><span class="w"> </span><span class="err">→</span><span class="w"> </span><span class="o">/</span><span class="n">home</span><span class="o">/</span><span class="n">lennart</span><span class="o">/</span><span class="n">projects</span><span class="o">/</span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span><span class="o">/</span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span><span class="p">.</span><span class="n">raw</span><span class="p">.</span>
</code></pre></div>

<p>The portable service image is now attached to the host, which means we
can now go and start it (or even enable it):</p>
<div class="highlight"><pre><span></span><code><span class="err">#</span><span class="w"> </span><span class="n">systemctl</span><span class="w"> </span><span class="k">start</span><span class="w"> </span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span><span class="p">.</span><span class="n">socket</span>
</code></pre></div>

<p>Let's see if our little web service works, by doing an HTTP request on port 8088:</p>
<div class="highlight"><pre><span></span><code># curl localhost:8088
Hello! You are visitor #1!
</code></pre></div>

<p>Let's try this again, to check if it counts correctly:</p>
<div class="highlight"><pre><span></span><code># curl localhost:8088
Hello! You are visitor #2!
</code></pre></div>

<p>Nice! It worked. Let's now stop the service again, and detach the image again:</p>
<div class="highlight"><pre><span></span><code><span class="err">#</span><span class="w"> </span><span class="n">systemctl</span><span class="w"> </span><span class="n">stop</span><span class="w"> </span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span><span class="p">.</span><span class="n">service</span><span class="w"> </span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span><span class="p">.</span><span class="n">socket</span>
<span class="err">#</span><span class="w"> </span><span class="n">portablectl</span><span class="w"> </span><span class="n">detach</span><span class="w"> </span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span>
<span class="n">Removed</span><span class="w"> </span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">systemd</span><span class="o">/</span><span class="k">system</span><span class="p">.</span><span class="n">attached</span><span class="o">/</span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span><span class="p">.</span><span class="n">service</span><span class="p">.</span>
<span class="n">Removed</span><span class="w"> </span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">systemd</span><span class="o">/</span><span class="k">system</span><span class="p">.</span><span class="n">attached</span><span class="o">/</span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span><span class="p">.</span><span class="n">service</span><span class="p">.</span><span class="n">d</span><span class="o">/</span><span class="mi">10</span><span class="o">-</span><span class="n">profile</span><span class="p">.</span><span class="n">conf</span><span class="p">.</span>
<span class="n">Removed</span><span class="w"> </span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">systemd</span><span class="o">/</span><span class="k">system</span><span class="p">.</span><span class="n">attached</span><span class="o">/</span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span><span class="p">.</span><span class="n">service</span><span class="p">.</span><span class="n">d</span><span class="o">/</span><span class="mi">20</span><span class="o">-</span><span class="n">portable</span><span class="p">.</span><span class="n">conf</span><span class="p">.</span>
<span class="n">Removed</span><span class="w"> </span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">systemd</span><span class="o">/</span><span class="k">system</span><span class="p">.</span><span class="n">attached</span><span class="o">/</span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span><span class="p">.</span><span class="n">service</span><span class="p">.</span><span class="n">d</span><span class="p">.</span>
<span class="n">Removed</span><span class="w"> </span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">systemd</span><span class="o">/</span><span class="k">system</span><span class="p">.</span><span class="n">attached</span><span class="o">/</span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span><span class="p">.</span><span class="n">socket</span><span class="p">.</span>
<span class="n">Removed</span><span class="w"> </span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">systemd</span><span class="o">/</span><span class="k">system</span><span class="p">.</span><span class="n">attached</span><span class="o">/</span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span><span class="p">.</span><span class="n">socket</span><span class="p">.</span><span class="n">d</span><span class="o">/</span><span class="mi">20</span><span class="o">-</span><span class="n">portable</span><span class="p">.</span><span class="n">conf</span><span class="p">.</span>
<span class="n">Removed</span><span class="w"> </span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">systemd</span><span class="o">/</span><span class="k">system</span><span class="p">.</span><span class="n">attached</span><span class="o">/</span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span><span class="p">.</span><span class="n">socket</span><span class="p">.</span><span class="n">d</span><span class="p">.</span>
<span class="n">Removed</span><span class="w"> </span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">portables</span><span class="o">/</span><span class="n">portable</span><span class="o">-</span><span class="n">walkthrough</span><span class="o">-</span><span class="k">go</span><span class="p">.</span><span class="n">raw</span><span class="p">.</span>
<span class="n">Removed</span><span class="w"> </span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">systemd</span><span class="o">/</span><span class="k">system</span><span class="p">.</span><span class="n">attached</span><span class="p">.</span>
</code></pre></div>

<p>And there we go, the portable image file is detached from the host again.</p>
<h2>A Couple of Notes</h2>
<ol>
<li>
<p>Of course, this is a simplistic example: in real life services will
   be more than one compiled file, even when statically linked. But
   you get the idea, and it's very easy to extend the example above to
   include any additional, auxiliary files in the portable service
   image.</p>
</li>
<li>
<p>The service is very nicely sandboxed during runtime: while it runs
   as regular service on the host (and you thus can watch its logs or
   do resource management on it like you would do for all other
   systemd services), it runs in a very restricted environment under a
   dynamically assigned UID that ceases to exist when the service is
   stopped again.</p>
</li>
<li>
<p>Originally I wanted to make the service not only socket activatable
   but also implement exit-on-idle, i.e. add a logic so that the
   service terminates on its own when there's no ongoing HTTP
   connection for a while. I couldn't figure out how to do this
   race-freely in Go though, but I am sure an interested reader might
   want to add that? By combining socket activation with exit-on-idle
   we can turn this project into an excercise of putting together an
   extremely resource-friendly and robust service architecture: the
   service is started only when needed and terminates when no longer
   needed. This would allow to pack services at a much higher density
   even on systems with few resources.</p>
</li>
<li>
<p>While the basic concepts of portable services have been around
   since systemd 239, it's best to try the above with systemd 241 or
   newer since the portable service logic received a number of fixes
   since then.</p>
</li>
</ol>
<h2>Further Reading</h2>
<p>A low-level document introducing Portable Services is <a href="https://systemd.io/PORTABLE_SERVICES">shipped along
with systemd</a>.</p>
<p>Please have a look at the <a href="http://0pointer.net/blog/walkthrough-for-portable-services.html">blog story from a few months
ago</a>
that did something very similar with a service written in C.</p>
<p>There are also relevant manual pages:
<a href="https://www.freedesktop.org/software/systemd/man/portablectl.html"><code>portablectl(1)</code></a>
and
<a href="https://www.freedesktop.org/software/systemd/man/systemd-portabled.service.html"><code>systemd-portabled(8)</code></a>.</p>]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>ASG! 2018 Tickets</title>
		<link>https://noise.getoto.net/2018/09/11/asg-2018-tickets/</link>
		
		<dc:creator><![CDATA[Lennart Poettering]]></dc:creator>
		<pubDate>Mon, 10 Sep 2018 22:00:00 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=c16b0c99b8e59d02e90b9c7f7fd46fc4</guid>

					<description><![CDATA[All Systems Go! 2018 Tickets Selling Out Quickly!
Buy your tickets for All Systems Go!
2018 soon, they are quickly selling out!
The conference takes place on September 28-30, in Berlin, Germany, in
a bit over two weeks.
Why should you attend? If you ar...]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>ASG! 2018 CfP Closes TODAY</title>
		<link>https://noise.getoto.net/2018/07/30/asg-2018-cfp-closes-today/</link>
		
		<dc:creator><![CDATA[Lennart Poettering]]></dc:creator>
		<pubDate>Sun, 29 Jul 2018 22:00:00 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=53da3f8daa4f325d9fc3f7fe138fdb40</guid>

					<description><![CDATA[The All Systems Go! 2018 Call for Participation Closes TODAY!
The Call for Participation (CFP) for All Systems Go!
2018 will close TODAY, on 30th of
July! We’d like to invite you to submit your proposals for
consideration to the CFP submission
site qui...]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>ASG! 2018 CfP Closes Soon</title>
		<link>https://noise.getoto.net/2018/07/23/asg-2018-cfp-closes-soon/</link>
		
		<dc:creator><![CDATA[Lennart Poettering]]></dc:creator>
		<pubDate>Sun, 22 Jul 2018 22:00:00 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=5aaa4c19990161ade25ae9862613b497</guid>

					<description><![CDATA[The All Systems Go! 2018 Call for Participation Closes in One Week!
The Call for Participation (CFP) for All Systems Go!
2018 will close in one week, on 30th of
July! We’d like to invite you to submit your proposals for
consideration to the CFP submiss...]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>Walkthrough for Portable Services</title>
		<link>https://noise.getoto.net/2018/06/27/walkthrough-for-portable-services/</link>
		
		<dc:creator><![CDATA[Lennart Poettering]]></dc:creator>
		<pubDate>Tue, 26 Jun 2018 22:00:00 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=f89b59abf3e5c39a0fe8b82ad3b7e5c1</guid>

					<description><![CDATA[<h1>Portable Services with systemd v239</h1>
<p><a href="https://lists.freedesktop.org/archives/systemd-devel/2018-June/040879.html">systemd
v239</a>
contains a great number of new features. One of them is first class
support for <a href="https://systemd.io/PORTABLE_SERVICES">Portable
Services</a>. In this blog story
I'd like to shed some light on what they are and why they might be
interesting for your application.</p>
<h2>What are "Portable Services"?</h2>
<p>The "Portable Service" concept takes inspiration from classic
<code>chroot()</code> environments as well as container management and brings a
number of their features to more regular system service management.</p>
<p>While the definition of what a "container" really is is hotly debated,
I figure people can generally agree that the "container" concept
primarily provides two major features:</p>
<ol>
<li>
<p>Resource bundling: a container generally brings its own file system
   tree along, bundling any shared libraries and other resources it
   might need along with the main service executables.</p>
</li>
<li>
<p>Isolation and sand-boxing: a container operates in a name-spaced
   environment that is relatively detached from the host. Besides
   living in its own file system namespace it usually also has its own
   user database, process tree and so on. Access from the container to
   the host is limited with various security technologies.</p>
</li>
</ol>
<p>Of these two concepts the first one is also what traditional UNIX
<code>chroot()</code> environments are about.</p>
<p>Both resource bundling and isolation/sand-boxing are concepts systemd
has implemented to varying degrees for a longer time. Specifically,
<a href="https://www.freedesktop.org/software/systemd/man/systemd.exec.html#RootDirectory="><code>RootDirectory=</code></a>
and
<a href="https://www.freedesktop.org/software/systemd/man/systemd.exec.html#RootImage="><code>RootImage=</code></a>
have been around for a long time, and so have been the various
<a href="https://www.freedesktop.org/software/systemd/man/systemd.exec.html#Sandboxing">sand-boxing
features</a>
systemd provides. The Portable Services concept builds on that,
putting these features together in a new, integrated way to make them
more accessible and usable.</p>
<h2>OK, so what precisely is a "Portable Service"?</h2>
<p>Much like a container image, a portable service on disk can be just a
directory tree that contains service executables and all their
dependencies, in a hierarchy resembling the normal Linux directory
hierarchy. A portable service can also be a raw disk image, containing
a file system containing such a tree (which can be mounted via a
loop-back block device), or multiple file systems (in which case they
need to follow the <a href="https://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/">Discoverable Partitions
Specification</a>
and be located within a GPT partition table). Regardless whether the
portable service on disk is a simple directory tree or a raw disk
image, let's call this concept the portable service <em>image</em>.</p>
<p>Such images can be generated with any tool typically used for the
purpose of installing OSes inside some directory, for example <code>dnf
--installroot=</code> or <code>debootstrap</code>. There are very few requirements made
on these trees, except the following two:</p>
<ol>
<li>
<p>The tree should carry <a href="https://www.freedesktop.org/software/systemd/man/systemd.unit.html">systemd unit
   files</a>
   for relevant services in them.</p>
</li>
<li>
<p>The tree should carry
<a href="https://www.freedesktop.org/software/systemd/man/os-release.html"><code>/usr/lib/os-release</code></a>
(or <code>/etc/os-release</code>) OS release information.</p>
</li>
</ol>
<p>Of course, as you might notice, OS trees generated from any of today's
big distributions generally qualify for these two requirements without
any further modification, as pretty much all of them adopted
<code>/usr/lib/os-release</code> and tend to ship their major services with
systemd unit files.</p>
<p>A portable service image generated like this can be "attached" or
"detached" from a host:</p>
<ol>
<li>
<p>"Attaching" an image to a host is done through the new
   <a href="https://www.freedesktop.org/software/systemd/man/portablectl.html"><code>portablectl
   attach</code></a>
   command. This command dissects the image, reading the <code>os-release</code>
   information, and searching for unit files in them. It then copies
   relevant unit files out of the images and into
   <code>/etc/systemd/system/</code>. After that it augments any copied service
   unit files in two ways: a drop-in adding a <code>RootDirectory=</code> or
   <code>RootImage=</code> line is added in so that even though the unit files
   are now available on the host when started they run the referenced
   binaries from the image. It also symlinks in a second drop-in which
   is called a "profile", which is supposed to carry additional
   security settings to enforce on the attached services, to ensure
   the right amount of sand-boxing.</p>
</li>
<li>
<p>"Detaching" an image from the host is done through <code>portable
   detach</code>. It reverses the steps above: the unit files copied out are
   removed again, and so are the two drop-in files generated for them.</p>
</li>
</ol>
<p>While a portable service is attached its relevant unit files are made
available on the host like any others: they will appear in <code>systemctl
list-unit-files</code>, you can enable and disable them, you can start them
and stop them. You can extend them with <code>systemctl edit</code>. You can
introspect them. You can apply resource management to them like to any
other service, and you can process their logs like any other service
and so on. That's because they really <em>are</em> native systemd services,
except that they have 'twist' if you so will: they have tougher
security by default and store their resources in a root directory or
image.</p>
<p>And that's already the essence of what Portable Services are.</p>
<p>A couple of interesting points:</p>
<ol>
<li>
<p>Even though the focus is on shipping <em>service</em> unit files in
   portable service images, you can actually ship timer units, socket
   units, target units, path units in portable services too. This
   means you can very naturally do time, socket and path based
   activation. It's also entirely fine to ship multiple service units
   in the same image, in case you have more complex applications.</p>
</li>
<li>
<p>This concept introduces zero new metadata. Unit files are an
   existing concept, as are <code>os-release</code> files, and — in case you opt
   for raw disk images — GPT partition tables are already established
   too. This also means existing tools to generate images can be
   reused for building portable service images to a large degree as no
   completely new artifact types need to be generated.</p>
</li>
<li>
<p>Because the Portable Service concepts introduces zero new metadata
   and just builds on existing security and resource bundling
   features of systemd it's implemented in a set of distinct tools,
   relatively disconnected from the rest of systemd. Specifically, the
   main user-facing command is
   <a href="https://www.freedesktop.org/software/systemd/man/portablectl.html"><code>portablectl</code></a>,
   and the actual operations are implemented in
   <a href="https://www.freedesktop.org/software/systemd/man/systemd-portabled.service.html"><code>systemd-portabled.service</code></a>. If
   you so will, portable services are a true add-on to systemd, just
   making a specific work-flow nicer to use than with the basic
   operations systemd otherwise provides. Also note that
   <code>systemd-portabled</code> provides bus APIs accessible to any program
   that wants to interface with it, <code>portablectl</code> is just one tool
   that happens to be shipped along with systemd.</p>
</li>
<li>
<p>Since Portable Services are a feature we only added very recently
   we wanted to keep some freedom to make changes still. Due to that
   we decided to install the <code>portablectl</code> command into
   <code>/usr/lib/systemd/</code> for now, so that it does not appear in <code>$PATH</code>
   by default. This means, for now you have to invoke it with a full
   path: <code>/usr/lib/systemd/portablectl</code>. We expect to move it into
   <code>/usr/bin/</code> very soon though, and make it a fully supported
   interface of systemd.</p>
</li>
<li>
<p>You may wonder which unit files contained in a portable service
   image are the ones considered "relevant" and are actually copied
   out by the <code>portablectl attach</code> operation. Currently, this is
   derived from the image name. Let's say you have an image stored in
   a directory <code>/var/lib/portables/foobar_4711/</code> (or alternatively in
   a raw image <code>/var/lib/portables/foobar_4711.raw</code>). In that case the
   unit files copied out match the pattern <code>foobar*.service</code>,
   <code>foobar*.socket</code>, <code>foobar*.target</code>, <code>foobar*.path</code>,
   <code>foobar*.timer</code>.</p>
</li>
<li>
<p>The Portable Services concept does not define any specific method
   how images get on the deployment machines, that's entirely up to
   administrators. You can just <code>scp</code> them there, or <code>wget</code> them. You
   could even package them as RPMs and then deploy them with <code>dnf</code> if
   you feel adventurous.</p>
</li>
<li>
<p>Portable service images can reside in any directory you
   like. However, if you place them in <code>/var/lib/portables/</code> then
   <code>portablectl</code> will find them easily and can show you a list of
   images you can attach and suchlike.</p>
</li>
<li>
<p>Attaching a portable service image can be done persistently, so
   that it remains attached on subsequent boots (which is the default),
   or it can be attached only until the next reboot, by passing
   <code>--runtime</code> to <code>portablectl</code>.</p>
</li>
<li>
<p>Because portable service images are ultimately just regular OS
   images, it's natural and easy to build a single image that can be
   used in three different ways:</p>
<ol>
<li>
<p>It can be attached to any host as a portable service image.</p>
</li>
<li>
<p>It can be booted as OS container, for example in a container
   manager like <a href="https://www.freedesktop.org/software/systemd/man/systemd-nspawn.html"><code>systemd-nspawn</code></a>.</p>
</li>
<li>
<p>It can be booted as host system, for example on bare metal or
   in a VM manager.</p>
</li>
</ol>
<p>Of course, to qualify for the latter two the image needs to
contain more than just the service binaries, the <code>os-release</code> file
and the unit files. To be bootable an OS container manager such as
<code>systemd-nspawn</code> the image needs to contain an init system of some
form, for example
<a href="https://www.freedesktop.org/software/systemd/man/systemd.html"><code>systemd</code></a>. To
be bootable on bare metal or as VM it also needs a boot loader of
some form, for example
<a href="https://www.freedesktop.org/software/systemd/man/systemd-boot.html"><code>systemd-boot</code></a>.</p>
</li>
</ol>
<h2>Profiles</h2>
<p>In the previous section the "profile" concept was briefly
mentioned. Since they are a major feature of the Portable Services
concept, they deserve some focus. A "profile" is ultimately just a
pre-defined drop-in file for unit files that are attached to a
host. They are supposed to mostly contain sand-boxing and security
settings, but may actually contain any other settings, too. When a
portable service is attached a suitable profile has to be selected. If
none is selected explicitly, the default profile called <code>default</code> is
used. systemd ships with four different profiles out of the box:</p>
<ol>
<li>
<p>The
<a href="https://github.com/systemd/systemd/blob/master/src/portable/profile/default/service.conf"><code>default</code></a>
profile provides a medium level of security. It contains settings to
drop capabilities, enforce system call filters, restrict many kernel
interfaces and mount various file systems read-only.</p>
</li>
<li>
<p>The
<a href="https://github.com/systemd/systemd/blob/master/src/portable/profile/strict/service.conf"><code>strict</code></a>
profile is similar to the <code>default</code> profile, but generally uses the
most restrictive sand-boxing settings. For example networking is turned
off and access to <code>AF_NETLINK</code> sockets is prohibited.</p>
</li>
<li>
<p>The
<a href="https://github.com/systemd/systemd/blob/master/src/portable/profile/trusted/service.conf"><code>trusted</code></a>
profile is the least strict of them all. In fact it makes almost no
restrictions at all. A service run with this profile has basically
full access to the host system.</p>
</li>
<li>
<p>The
<a href="https://github.com/systemd/systemd/blob/master/src/portable/profile/nonetwork/service.conf"><code>nonetwork</code></a>
profile is mostly identical to <code>default</code>, but also turns off network access.</p>
</li>
</ol>
<p>Note that the profile is selected at the time the portable service
image is attached, and it applies to all service files attached, in
case multiple are shipped in the same image. Thus, the sand-boxing
restriction to enforce are selected by the administrator attaching the
image and not the image vendor.</p>
<p>Additional profiles can be defined easily by the administrator, if
needed. We might also add additional profiles sooner or later to be
shipped with systemd out of the box.</p>
<h2>What's the use-case for this? If I have containers, why should I bother?</h2>
<p>Portable Services are primarily intended to cover use-cases where code
should more feel like "extensions" to the host system rather than live
in disconnected, separate worlds. The profile concept is
supposed to be tunable to the exact right amount of integration or
isolation needed for an application.</p>
<p>In the container world the concept of "super-privileged containers"
has been touted a lot, i.e. containers that run with full
privileges. It's precisely that use-case that portable services are
intended for: extensions to the host OS, that default to isolation,
but can optionally get as much access to the host as needed, and can
naturally take benefit of the full functionality of the host. The
concept should hence be useful for all kinds of low-level system
software that isn't shipped with the OS itself but needs varying
degrees of integration with it. Besides servers and appliances this
should be particularly interesting for IoT and embedded devices.</p>
<p>Because portable services are just a relatively small extension to the
way system services are otherwise managed, they can be treated like
regular service for almost all use-cases: they will appear along
regular services in all tools that can introspect systemd unit data,
and can be managed the same way when it comes to logging, resource
management, runtime life-cycles and so on.</p>
<p>Portable services are a very generic concept. While the original
use-case is OS extensions, it's of course entirely up to you and other
users to use them in a suitable way of your choice.</p>
<h2>Walkthrough</h2>
<p>Let's have a look how this all can be used. We'll start with building
a portable service image from scratch, before we attach, enable and
start it on a host.</p>
<h3>Building a Portable Service image</h3>
<p>As mentioned, you can use any tool you like that can create OS trees
or raw images for building Portable Service images, for example
<code>debootstrap</code> or <code>dnf --installroot=</code>. For this example walkthrough
run we'll use <a href="https://github.com/systemd/mkosi"><code>mkosi</code></a>, which is
ultimately just a fancy wrapper around <code>dnf</code> and <code>debootstrap</code> but
makes a number of things particularly easy when repetitively building
images from source trees.</p>
<p>I have pushed everything necessary to reproduce this walkthrough
locally to <a href="https://github.com/systemd/portable-walkthrough">a GitHub
repository</a>. Let's check it out:</p>
<div class="highlight"><pre><span></span><code>$<span class="w"> </span>git<span class="w"> </span>clone<span class="w"> </span>https://github.com/systemd/portable-walkthrough.git
</code></pre></div>

<p>Let's have a look in the repository:</p>
<ol>
<li>
<p>First of all,
   <a href="https://github.com/systemd/portable-walkthrough/blob/master/walkthroughd.c"><code>walkthroughd.c</code></a>
   is the main source file of our little service. To keep things
   simple it's written in C, but it could be in any language of your
   choice. The daemon as implemented won't do much: it just starts up
   and waits for <code>SIGTERM</code>, at which point it will shut down. It's
   ultimately useless, but hopefully illustrates how this all fits
   together. The C code has no dependencies besides libc.</p>
</li>
<li>
<p><a href="https://github.com/systemd/portable-walkthrough/blob/master/walkthroughd.service"><code>walkthroughd.service</code></a>
   is a systemd unit file that starts our little daemon. It's a simple
   service, hence the unit file is trivial.</p>
</li>
<li>
<p><a href="https://github.com/systemd/portable-walkthrough/blob/master/Makefile"><code>Makefile</code></a>
   is a short make build script to build the daemon binary. It's
   pretty trivial, too: it just takes the C file and builds a binary
   from it. It can also install the daemon. It places the binary in
   <code>/usr/local/lib/walkthroughd/walkthroughd</code> (why not in
   <code>/usr/local/bin</code>? because it's not a user-facing binary but a system
   service binary), and its unit file in
   <code>/usr/local/lib/systemd/walkthroughd.service</code>. If you want to test
   the daemon on the host we can now simply run <code>make</code> and then
   <code>./walkthroughd</code> in order to check everything works.</p>
</li>
<li>
<p><a href="https://github.com/systemd/portable-walkthrough/blob/master/mkosi.default"><code>mkosi.default</code></a>
   is file that tells <code>mkosi</code> how to build the image. We opt for a
   Fedora-based image here (but we might as well have used Debian
   here, or any other supported distribution). We need no particular
   packages during runtime (after all we only depend on libc), but
   during the build phase we need gcc and make, hence these are the
   only packages we list in <code>BuildPackages=</code>.</p>
</li>
<li>
<p><a href="https://github.com/systemd/portable-walkthrough/blob/master/mkosi.build"><code>mkosi.build</code></a>
   is a shell script that is invoked during mkosi's build logic. All
   it does is invoke <code>make</code> and <code>make install</code> to build and install
   our little daemon, and afterwards it extends the
   distribution-supplied <code>/etc/os-release</code> file with an additional
   field that describes our portable service a bit.</p>
</li>
</ol>
<p>Let's now use this to build the portable service image. For that we
use the <a href="https://github.com/systemd/mkosi">mkosi</a> tool. It's
sufficient to invoke it without parameter to build the first image: it
will automatically discover <code>mkosi.default</code> and <code>mkosi.build</code> which
tells it what to do. (Note that if you work on a project like this for
a longer time, <code>mkosi -if</code> is probably the better command to use, as
it that speeds up building substantially by using an incremental build
mode). <code>mkosi</code> will download the necessary RPMs, and put them all
together. It will build our little daemon inside the image and after
all that's done it will output the resulting image:
<code>walkthroughd_1.raw</code>.</p>
<p>Because we opted to build a GPT raw disk image in <code>mkosi.default</code> this
file is actually a raw disk image containing a GPT partition
table. You can use <code>fdisk -l walkthroughd_1.raw</code> to enumerate the
partition table. You can also use <code>systemd-nspawn -i
walkthroughd_1.raw</code> to explore the image quickly if you need.</p>
<h2>Using the Portable Service Image</h2>
<p>Now that we have a portable service image, let's see how we can
attach, enable and start the service included within it.</p>
<p>First, let's attach the image:</p>
<div class="highlight"><pre><span></span><code><span class="gp"># </span>/usr/lib/systemd/portablectl<span class="w"> </span>attach<span class="w"> </span>./walkthroughd_1.raw
<span class="gp gp-VirtualEnv">(Matching unit files with prefix 'walkthroughd'.)</span>
<span class="go">Created directory /etc/systemd/system/walkthroughd.service.d.</span>
<span class="go">Written /etc/systemd/system/walkthroughd.service.d/20-portable.conf.</span>
<span class="go">Created symlink /etc/systemd/system/walkthroughd.service.d/10-profile.conf → /usr/lib/systemd/portable/profile/default/service.conf.</span>
<span class="go">Copied /etc/systemd/system/walkthroughd.service.</span>
<span class="go">Created symlink /etc/portables/walkthroughd_1.raw → /home/lennart/projects/portable-walkthrough/walkthroughd_1.raw.</span>
</code></pre></div>

<p>The command will show you exactly what is has been doing: it just
copied the main service file out, and added the two drop-ins, as
expected.</p>
<p>Let's see if the unit is now available on the host, just like a regular unit, as promised:</p>
<div class="highlight"><pre><span></span><code><span class="gp"># </span>systemctl<span class="w"> </span>status<span class="w"> </span>walkthroughd.service
<span class="go">● walkthroughd.service - A simple example service</span>
<span class="go">   Loaded: loaded (/etc/systemd/system/walkthroughd.service; disabled; vendor preset: disabled)</span>
<span class="go">  Drop-In: /etc/systemd/system/walkthroughd.service.d</span>
<span class="go">           └─10-profile.conf, 20-portable.conf</span>
<span class="go">   Active: inactive (dead)</span>
</code></pre></div>

<p>Nice, it worked. We see that the unit file is available and that
systemd correctly discovered the two drop-ins. The unit is neither
enabled nor started however. Yes, attaching a portable service image
doesn't imply enabling nor starting. It just means the unit files
contained in the image are made available to the host. It's up to the
administrator to then enable them (so that they are automatically
started when needed, for example at boot), and/or start them (in case
they shall run right-away).</p>
<p>Let's now enable and start the service in one step:</p>
<div class="highlight"><pre><span></span><code><span class="gp"># </span>systemctl<span class="w"> </span><span class="nb">enable</span><span class="w"> </span>--now<span class="w"> </span>walkthroughd.service
<span class="go">Created symlink /etc/systemd/system/multi-user.target.wants/walkthroughd.service → /etc/systemd/system/walkthroughd.service.</span>
</code></pre></div>

<p>Let's check if it's running:</p>
<div class="highlight"><pre><span></span><code><span class="gp"># </span>systemctl<span class="w"> </span>status<span class="w"> </span>walkthroughd.service
<span class="go">● walkthroughd.service - A simple example service</span>
<span class="go">   Loaded: loaded (/etc/systemd/system/walkthroughd.service; enabled; vendor preset: disabled)</span>
<span class="go">  Drop-In: /etc/systemd/system/walkthroughd.service.d</span>
<span class="go">           └─10-profile.conf, 20-portable.conf</span>
<span class="go">   Active: active (running) since Wed 2018-06-27 17:55:30 CEST; 4s ago</span>
<span class="go"> Main PID: 45003 (walkthroughd)</span>
<span class="go">    Tasks: 1 (limit: 4915)</span>
<span class="go">   Memory: 4.3M</span>
<span class="go">   CGroup: /system.slice/walkthroughd.service</span>
<span class="go">           └─45003 /usr/local/lib/walkthroughd/walkthroughd</span>

<span class="go">Jun 27 17:55:30 sigma walkthroughd[45003]: Initializing.</span>
</code></pre></div>

<p>Perfect! We can see that the service is now enabled and running. The daemon is running as PID 45003.</p>
<p>Now that we verified that all is good, let's stop, disable and detach the service again:</p>
<div class="highlight"><pre><span></span><code><span class="gp"># </span>systemctl<span class="w"> </span>disable<span class="w"> </span>--now<span class="w"> </span>walkthroughd.service
<span class="go">Removed /etc/systemd/system/multi-user.target.wants/walkthroughd.service.</span>
<span class="gp"># </span>/usr/lib/systemd/portablectl<span class="w"> </span>detach<span class="w"> </span>./walkthroughd_1.raw
<span class="go">Removed /etc/systemd/system/walkthroughd.service.</span>
<span class="go">Removed /etc/systemd/system/walkthroughd.service.d/10-profile.conf.</span>
<span class="go">Removed /etc/systemd/system/walkthroughd.service.d/20-portable.conf.</span>
<span class="go">Removed /etc/systemd/system/walkthroughd.service.d.</span>
<span class="go">Removed /etc/portables/walkthroughd_1.raw.</span>
</code></pre></div>

<p>And finally, let's see that it's really gone:</p>
<div class="highlight"><pre><span></span><code><span class="gp"># </span>systemctl<span class="w"> </span>status<span class="w"> </span>walkthroughd
<span class="go">Unit walkthroughd.service could not be found.</span>
</code></pre></div>

<p>Perfect! It worked!</p>
<p>I hope the above gets you started with Portable Services. If you have
further questions, please contact <a href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel">our mailing
list</a>.</p>
<h2>Further Reading</h2>
<p>A more low-level document explaining details is <a href="https://systemd.io/PORTABLE_SERVICES">shipped
along with systemd</a>.</p>
<p>There are also relevant manual pages:
<a href="https://www.freedesktop.org/software/systemd/man/portablectl.html"><code>portablectl(1)</code></a>
and
<a href="https://www.freedesktop.org/software/systemd/man/systemd-portabled.service.html"><code>systemd-portabled(8)</code></a>.</p>
<p>For further information about <code>mkosi</code> see <a href="https://github.com/systemd/mkosi">its homepage</a>.</p>]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>All Systems Go! 2018 CfP Open</title>
		<link>https://noise.getoto.net/2018/05/21/all-systems-go-2018-cfp-open/</link>
		
		<dc:creator><![CDATA[Lennart Poettering]]></dc:creator>
		<pubDate>Sun, 20 May 2018 22:00:00 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=1bb072a53b58936470a419ed9ab3819a</guid>

					<description><![CDATA[The All Systems Go! 2018 Call for Participation is Now Open!
The Call for Participation (CFP) for All Systems Go!
2018 is now open. We’d like to invite you
to submit your proposals for consideration to the CFP submission
site.

The CFP will close on Ju...]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>All Systems Go! 2017 Videos Online!</title>
		<link>https://noise.getoto.net/2017/10/24/all-systems-go-2017-videos-online/</link>
		
		<dc:creator><![CDATA[Lennart Poettering]]></dc:creator>
		<pubDate>Mon, 23 Oct 2017 22:00:00 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=afc550948cfbf205ecd151175b750271</guid>

					<description><![CDATA[For those living under a rock, the videos from everybody's favourite
Userspace Linux Conference All Systems Go!
2017 are now available online.
All videos
The videos for my own two talks are available here:
Synchronizing Images with
casync
(Slides)
Cont...]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>Attending and Speaking at GNOME.Asia 2017 Summit</title>
		<link>https://noise.getoto.net/2017/10/24/attending-and-speaking-at-gnome-asia-2017-summit/</link>
		
		<dc:creator><![CDATA[Lennart Poettering]]></dc:creator>
		<pubDate>Mon, 23 Oct 2017 22:00:00 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=473865e83d8ed38f576ed3a9b7736d21</guid>

					<description><![CDATA[The GNOME.Asia Summit 2017 organizers
invited to me to speak at their conference in Chongqing/China, and it
was an excellent event! Here's my brief report:

Because we arrived one day early in Chongqing, my GNOME friends Sri,
Matthias, Jonathan, David ...]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>IP Accounting and Access Lists with systemd</title>
		<link>https://noise.getoto.net/2017/10/09/ip-accounting-and-access-lists-with-systemd/</link>
		
		<dc:creator><![CDATA[Lennart Poettering]]></dc:creator>
		<pubDate>Sun, 08 Oct 2017 22:00:00 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=e14568792cbc079426146257bc3cde27</guid>

					<description><![CDATA[TL;DR: systemd now can do per-service IP traffic accounting, as well
as access control for IP address ranges.
Last Friday we released systemd
235. I
already blogged about its Dynamic User feature in
detail, but
there's one more piece of new functionali...]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>Dynamic Users with systemd</title>
		<link>https://noise.getoto.net/2017/10/06/dynamic-users-with-systemd/</link>
		
		<dc:creator><![CDATA[Lennart Poettering]]></dc:creator>
		<pubDate>Thu, 05 Oct 2017 22:00:00 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=59a0479572b7114f58f3b49f33efad25</guid>

					<description><![CDATA[TL;DR: you may now configure systemd to dynamically allocate a UNIX
user ID for service processes when it starts them and release it when
it stops them. It's pretty secure, mixes well with transient services,
socket activated services and service templ...]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>All Systems Go! 2017 Schedule Published</title>
		<link>https://noise.getoto.net/2017/09/27/all-systems-go-2017-schedule-published/</link>
		
		<dc:creator><![CDATA[Lennart Poettering]]></dc:creator>
		<pubDate>Tue, 26 Sep 2017 22:00:00 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=cdd6e87b4c72940d2f5a657b891054f6</guid>

					<description><![CDATA[The All Systems Go! 2017 schedule has been published!
I am happy to announce that we have published the All Systems Go! 2017 schedule!
We are very happy with the large number and the quality of the
submissions we got, and the resulting schedule is exce...]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>All Systems Go! 2017 CfP Closes Soon!</title>
		<link>https://noise.getoto.net/2017/08/30/all-systems-go-2017-cfp-closes-soon/</link>
		
		<dc:creator><![CDATA[Lennart Poettering]]></dc:creator>
		<pubDate>Tue, 29 Aug 2017 22:00:00 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=e0e606cedc5d54831ba26f5517545423</guid>

					<description><![CDATA[The All Systems Go! 2017 Call for Participation is Closing on September 3rd!
Please make sure to get your presentation proprosals forAll Systems Go! 2017 in now! The CfP closes on sunday!

In case you haven't heard about All Systems Go! yet, here's a q...]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Object Caching 25/240 objects using Memcached
Page Caching using Disk: Enhanced 
Lazy Loading (feed)
Database Caching using Memcached

Served from: noise.getoto.net @ 2026-02-09 01:45:56 by W3 Total Cache
-->