Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions docs/config/microshift-starter.ks
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ if ! subscription-manager status >& /dev/null ; then
fi

# Configure systemd journal service to persist logs between boots and limit their size to 1G
mkdir -p /var/log/journal/
sed -i 's/.*Storage=.*/Storage=auto/g' /etc/systemd/journald.conf
sed -i 's/.*SystemMaxUse=.*/SystemMaxUse=1G/g' /etc/systemd/journald.conf
sed -i 's/.*RuntimeMaxUse=.*/RuntimeMaxUse=1G/g' /etc/systemd/journald.conf
sudo mkdir -p /etc/systemd/journald.conf.d
cat <<EOF | sudo tee /etc/systemd/journald.conf.d/microshift.conf &>/dev/null
[Journal]
Storage=persistent
SystemMaxUse=1G
RuntimeMaxUse=1G
EOF

%end
13 changes: 8 additions & 5 deletions docs/greenboot.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Serviceability of Edge Devices is often limited or non-existent, which makes it
challenging to troubleshoot device problems following a failed software or
operating system upgrade.
operating system upgrade.

To mitigate these problems, MicroShift uses [greenboot](https://github.com/fedora-iot/greenboot),
the Generic Health Check Framework for `systemd` on `rpm-ostree` based systems.
Expand Down Expand Up @@ -105,8 +105,11 @@ and setting limits on the maximal journal data size.

Run the following commands to configure the journal data persistency and limits.
```bash
sudo mkdir -p /var/log/journal/
sudo sed -i 's/.*Storage=.*/Storage=auto/g' /etc/systemd/journald.conf
sudo sed -i 's/.*SystemMaxUse=.*/SystemMaxUse=1G/g' /etc/systemd/journald.conf
sudo sed -i 's/.*RuntimeMaxUse=.*/RuntimeMaxUse=1G/g' /etc/systemd/journald.conf
sudo mkdir -p /etc/systemd/journald.conf.d
cat <<EOF | sudo tee /etc/systemd/journald.conf.d/microshift.conf &>/dev/null
[Journal]
Storage=persistent
SystemMaxUse=1G
RuntimeMaxUse=1G
EOF
```
15 changes: 9 additions & 6 deletions scripts/image-builder/config/kickstart.ks.template
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ network --bootproto=dhcp --device=link --activate --onboot=on
# For example, a 20GB disk would be partitioned in the following way:
#
# NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
# sda 8:0 0 20G 0 disk
# sda 8:0 0 20G 0 disk
# ├─sda1 8:1 0 200M 0 part /boot/efi
# ├─sda1 8:1 0 800M 0 part /boot
# └─sda2 8:2 0 19G 0 part
# └─sda2 8:2 0 19G 0 part
# └─rhel-root 253:0 0 10G 0 lvm /sysroot
#
zerombr
Expand Down Expand Up @@ -66,10 +66,13 @@ firewall-offline-cmd --zone=trusted --add-source=169.254.169.1
echo -e 'export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig' >> /root/.profile

# Configure systemd journal service to persist logs between boots and limit their size to 1G
mkdir -p /var/log/journal/
sed -i 's/.*Storage=.*/Storage=auto/g' /etc/systemd/journald.conf
sed -i 's/.*SystemMaxUse=.*/SystemMaxUse=1G/g' /etc/systemd/journald.conf
sed -i 's/.*RuntimeMaxUse=.*/RuntimeMaxUse=1G/g' /etc/systemd/journald.conf
sudo mkdir -p /etc/systemd/journald.conf.d
cat <<EOF | sudo tee /etc/systemd/journald.conf.d/microshift.conf &>/dev/null
[Journal]
Storage=persistent
SystemMaxUse=1G
RuntimeMaxUse=1G
EOF

# Make sure all the Ethernet network interfaces are connected automatically
for uuid in $(nmcli -f uuid,type,autoconnect connection | awk '$2 == "ethernet" && $3 == "no" {print $1}') ; do
Expand Down