How to parallelize Drist

=> Comment on Mastodon

This article will show you how to make drist faster by using it on multiple

servers at the same time, in a correct way.

What is drist?

It is easily possible to parallelize drist (this works for everything though)

using Makefile. I use this to deploy a configuration on my servers at the same

time, this is way faster.

A simple BSD Make compatible Makefile looks like this:

SERVERS=tor-relay.local srvmail.tld srvmail2.tld

${SERVERS}:

        drist $*

install: ${SERVERS}

.PHONY: all install ${SERVERS}

This create a target for each server in my list which will call drist. Typing

You can also use make tor-relay.local if you don't want make to iterate over

all servers. This doesn't do more than typing drist tor-relay.local in the

example, but your Makefile may do other logic before/after.

If you want to type make to deploy everything instead of make install you

can add the line all: install in the Makefile.

If you use GNU Make (gmake), the file requires a small change:

The part ${SERVERS}: must be changed to ${SERVERS}: %:, I think that gmake

will print a warning but I did not succeed with better result. If you have the

solution to remove the warning, please tell me.

If you are not comfortable with Makefiles, the .PHONY line tells make that

the targets are not valid files.

Make is awesome!

Proxy Information
Original URL
gemini://perso.pw/blog//articles/drist-parallel.gmi
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
141.00034 milliseconds
Gemini-to-HTML Time
0.504014 milliseconds

This content has been proxied by September (ba2dc).