Last active
January 12, 2025 17:48
-
-
Save goncalossilva/677967e0eae426c755da13c0fefa9362 to your computer and use it in GitHub Desktop.
Butane file for a basic Fedora CoreOS + Portainer installation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variant: fcos | |
version: 1.5.0 | |
passwd: | |
users: | |
- name: core | |
ssh_authorized_keys: | |
- ssh-rsa ... | |
storage: | |
disks: | |
- device: /dev/disk/by-id/coreos-boot-disk | |
wipe_table: false | |
partitions: | |
- number: 4 | |
label: root | |
size_mib: 8192 | |
resize: true | |
- size_mib: 0 | |
label: var | |
filesystems: | |
- path: /var | |
device: /dev/disk/by-partlabel/var | |
format: xfs | |
with_mount_unit: true | |
files: | |
- path: /etc/hostname | |
mode: 0644 | |
contents: | |
inline: | | |
marika | |
- path: /etc/sysctl.d/99-custom.conf | |
contents: | |
inline: | | |
net.core.rmem_max=4194304 | |
net.core.wmem_max=1048576 | |
- path: /etc/sysconfig/docker | |
overwrite: true | |
contents: | |
inline: | | |
OPTIONS="--selinux-enabled \ | |
--log-driver=journald \ | |
--live-restore \ | |
--init-path /usr/libexec/docker/docker-init \ | |
--userland-proxy-path /usr/libexec/docker/docker-proxy \ | |
" | |
- path: /etc/modprobe.d/i915.conf | |
contents: | |
inline: | | |
options i915 enable_guc=2 | |
systemd: | |
units: | |
- name: docker-portainer.service | |
enabled: true | |
contents: |- | |
[Unit] | |
Description=Portainer Admin Container | |
After=docker.service | |
Requires=docker.service network.target network-online.target | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
TimeoutStartSec=0 | |
ExecStartPre=-/usr/bin/docker stop %n | |
ExecStartPre=-/usr/bin/docker rm %n | |
ExecStartPre=/usr/bin/docker pull portainer/portainer-ce | |
ExecStartPre=mkdir -p /var/mounts/portainer/data | |
# Privileged mode is required for binding to local socket to work due to SELINUX (https://github.com/portainer/portainer/issues/849) | |
ExecStart=/usr/bin/docker run --ulimit nofile=65536 --privileged=true -d -p 2000:9000 --name %n --restart always -v /var/run/docker.sock:/var/run/docker.sock -v /var/mounts/portainer/data:/data portainer/portainer-ce | |
ExecStop=/usr/bin/docker stop -t 15 %n | |
[Install] | |
WantedBy=multi-user.target | |
- name: var-mnt-media.mount | |
enabled: true | |
contents: | | |
[Unit] | |
Description=Mount media directory | |
[Mount] | |
What=gideon.lan:/volume1/Media | |
Where=/var/mnt/media | |
Type=nfs4 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment