etcd example with Butane configs

31 views
Skip to first unread message

Aaron D Borden

unread,
Jan 3, 2023, 3:51:32 AM1/3/23
to Flatcar Container Linux User
Hey folks,

I'm new to Flatcar, Matchbox, Container Linux Config, and Butane. Getting a bit tripped up and finally figured out my CLC in Matchbox is being transpiled as Butane which silently drops the `etcd` property. Is there an example of how to configure etcd with Butane?

Kai Lüke

unread,
Jan 3, 2023, 5:21:19 AM1/3/23
to Aaron D Borden, Flatcar Container Linux User
Hi,

we tried to move away from etcd as first example, I would recommend
the nginx example from the quickstart guide:
https://www.flatcar.org/docs/latest/installing/
Currently the docs are in a half-migrated/inconsistent state…

To your question, in Butane you would directly do what the transpiled
Ignition config does when etcd is specified in the CLC config.
Enable etcd-member.service and define a service unit drop-in with a
name like 20-clct-etcd-member.conf that contains your customizations.
Here a drop-in that sets the version of the container image and the
etcd arguments:
[Service]
Environment="ETCD_IMAGE_TAG=v3.0.15"
ExecStart=
ExecStart=/usr/lib/coreos/etcd-wrapper --name="myhost"
--listen-peer-urls="http://1.2.3.4:2380"
--listen-client-urls="http://0.0.0.0:2379"
--initial-advertise-peer-urls="http://1.2.3.4:2380"
--initial-cluster="myhost=http://1.2.3.4:2380"
--advertise-client-urls="http://1.2.3.4:2379"
These options are coming from the example in
https://www.flatcar.org/docs/latest/provisioning/cl-config/examples/#etcd
after replacing the variables with concrete values and pasting it in
docker run --rm -i ghcr.io/flatcar/ct:latest
More details about the CLC transpilation can be found in
https://www.flatcar.org/docs/latest/provisioning/cl-config/#config-transpiler
(It supports variables but with Butane you would directly do what the
generated Ignition does)

Regards,
Kai
> --
> You received this message because you are subscribed to the Google Groups "Flatcar Container Linux User" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to flatcar-linux-u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/flatcar-linux-user/f993c1f2-6c33-4e5e-9f4a-6768b82f4a2an%40googlegroups.com.



--
Kinvolk GmbH | Adalbertstr.6a, 10999 Berlin | tel: +491755589364

Geschäftsführer/Directors: Benjamin Owen Orndorff

Registergericht/Court of registration: Amtsgericht Charlottenburg

Registernummer/Registration number: HRB 171414 B

Ust-ID-Nummer/VAT ID number: DE302207000

Mathieu Tortuyaux

unread,
Jan 3, 2023, 5:21:39 AM1/3/23
to Aaron D Borden, Flatcar Container Linux User
Hi Aaron,

Butane does not have any helper like `etcd`, `locksmith` or `flannel` to generate the Ignition configuration. You have to define them by yourself. The idea is to enable the `etcd-member.service` and to add a systemd drop-in configuration to provide the etcd options (like IP) provided by a metadata service.
Container Linux Config transpiler was generating automagically these configs based on the platform.


Don't hesitate to join the Matrix channel (#flatcar:matrix.org) if you need more direct interaction.

Regards,

Mathieu Tortuyaux (@tormath1)


On Tue, 3 Jan 2023 at 09:51, 'Aaron D Borden' via Flatcar Container Linux User <flatcar-l...@googlegroups.com> wrote:
Hey folks,

I'm new to Flatcar, Matchbox, Container Linux Config, and Butane. Getting a bit tripped up and finally figured out my CLC in Matchbox is being transpiled as Butane which silently drops the `etcd` property. Is there an example of how to configure etcd with Butane?

--

Aaron D Borden

unread,
Jan 5, 2023, 12:28:39 AM1/5/23
to Kai Lüke, Flatcar Container Linux User
Thanks all, I appreciate the examples. I was able to get etcd working.

--
Aaron D Borden
Human and hacker
Reply all
Reply to author
Forward
0 new messages