Skip to content

Instantly share code, notes, and snippets.

@nctiggy
Last active October 10, 2025 20:43
Show Gist options
  • Select an option

  • Save nctiggy/9f4d9f3d7e5a9e3640f2844f7028b69d to your computer and use it in GitHub Desktop.

Select an option

Save nctiggy/9f4d9f3d7e5a9e3640f2844f7028b69d to your computer and use it in GitHub Desktop.
#cloud-config
# Sources:
# - /run/initramfs/live/files-iso/config.yaml
# - /oem/agent_upgrade.yaml
# - /oem/stylus_config.yaml
# - cmdline
cosign: false
install:
auto: true
grub-entry-name: Palette eXtended Kubernetes Edge
grub_options:
saved_entry: registration
partitions:
oem:
fs: ext4
size: 5120
passive:
size: 8192
poweroff: true
recovery-system:
size: 10000
system:
size: 8192
reset:
grub-entry-name: Palette eXtended Kubernetes Edge
system:
size: 8192
stages:
after-upgrade:
- commands:
- mkdir -p /usr/local/bin
- '[ -L /usr/local/bin/agent-provider-stylus ] || ln -s /opt/spectrocloud/bin/agent-provider-stylus /usr/local/bin/agent-provider-stylus'
- '[ -L /usr/local/bin/palette-tui ] || ln -s /opt/spectrocloud/bin/palette-tui /usr/local/bin/palette-tui'
- bash /opt/spectrocloud/scripts/content.sh
name: Execute after upgrade commands
- commands:
- grub2-editenv /oem/grubenv unset saved_entry
if: '[ -f /oem/grubenv ]'
name: Unset registration grubenv
boot:
- commands:
- systemctl enable remote-shell.service
- systemctl start remote-shell.service
if: '[ ! -f $STYLUS_ROOT/opt/spectrocloud/state/agent-mode ]'
name: Start remote-shell service on agent-upgrade
- commands:
- systemctl enable spectro-remote-shell.service
- systemctl start spectro-remote-shell.service
if: '[ -f $STYLUS_ROOT/opt/spectrocloud/state/agent-mode ]'
name: Start remote-shell service on agent-upgrade
initramfs:
- users:
kairos:
groups:
- sudo
passwd: kairos
- commands:
- if [ -f $STYLUS_ROOT/oem/.spectrocloud/tui/.configured ]; then mkdir -p $STYLUS_ROOT/opt/spectrocloud/tui/ && rm -rf $STYLUS_ROOT/opt/spectrocloud/tui/.configured && ln -s $STYLUS_ROOT/oem/.spectrocloud/tui/.configured $STYLUS_ROOT/opt/spectrocloud/tui/.configured; fi
- if [ -d $STYLUS_ROOT/oem/.spectrocloud/tui/config ]; then mkdir -p $STYLUS_ROOT/opt/spectrocloud/tui/ && rm -rf $STYLUS_ROOT/opt/spectrocloud/tui/config && ln -s $STYLUS_ROOT/oem/.spectrocloud/tui/config $STYLUS_ROOT/opt/spectrocloud/tui/config; fi
name: support legacy TUI configuration path for soft reset
- if: '[ ! -f /oem/80_stylus.yaml ]'
name: set_inotify_max_values
sysctl:
fs.inotify.max_user_instances: "8192"
fs.inotify.max_user_watches: "524288"
stylus:
site:
edgeHostToken: ***************************
localAdoptedClusterToken: ""
paletteEndpoint: bw-design-group.console.spectrocloud.com
tags:
building: Building 3
city: Abilene
upgrade:
grub-entry-name: Palette eXtended Kubernetes Edge
passive:
size: 8192
recovery-system:
size: 8192
system:
size: 8192
verify: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment