Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PE-4692: update template for user-data #227

Closed
wants to merge 1 commit into from
Closed
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
110 changes: 109 additions & 1 deletion user-data.template
Original file line number Diff line number Diff line change
@@ -1,14 +1,51 @@
#cloud-config

# Optional: Configurations for the edge host
install:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add some comment about install section

bind_mounts:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few additional examples for bind mounts.

# bind mount for rook-ceph
  - /var/lib/ceph
  - /var/lib/osd
  - /var/lib/rook

# bind mount for longhorn
  - /var/lib/longhorn

# bind mount for calico
  - /var/lib/calico

# bind mount for portworx
  - /etc/pwx
  - /var/lib/osd
  - /var/cores

# bind mount for tailscale
  - /var/lib/tailscale

# bind mount for ubuntu advantage
  - /var/lib/ubuntu-advantage

# bind mount for wpa_supplicant?
  - /var/lib/wpa

TODO: Check if we can always keep these bind mounts in user-data and mention it in template

- /axone
partitions:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please mention a bit about persistent partition and the defaults too in comments

persistent:
size: 75000
fs: ext4
extra-partitions:
- name: data
size: 0
fs: ext4
label: DATA_PARTITION
poweroff: true
reboot: false
grub_options:
extra_cmdline: "mitigations=auto"

stages:
initramfs:
# Optional: Creating a user for the edge host
- users:
kairos:
groups:
- sudo
passwd: kairos
- name: "Mount DATA_PARTITION under /opt/localpath-provisioner"
commands:
- mkdir -p /opt/localpath-provisioner
- mount -o rw /dev/disk/by-label/DATA_PARTITION /opt/localpath-provisioner

stylus:
site:
# host for hubble api to register device.
paletteEndpoint: api.spectrocloud.com

# newly added field to use for auto registration
edgeHostToken: aUAxxxxxxxxx0ChYCrO

disableAutoRegister: false

# projectUid <Optional :need to provide if token is not generated using project id>
projectName: stores

projectUid: 12345677788

# tags which will be assigned to devices as labels. These are examples
tags:
key1: value1
Expand All @@ -26,6 +63,33 @@ stylus:
# QR code will appear only of the device is not registered on Palette
registrationURL: https://edge-registration-app.vercel.app/

hostName: "machine1"
prefix: "US"

# If the site.name is not specified, the optional field is used to identify the edge ID. Stylus will check each
# entry in this key to generate the product UID. Preferences are given in the following order:
# site.name > site.deviceUIDPath > device serial number > random id
# Each entry consists of two fields: the file name and an optional regex to filter its content.
deviceUIDPaths:
- name: /etc/palette/metadata-regex
regex: "edge.*"
- name: /etc/palette/metadata-no-regex


# Optional field to assign labels. Default value for delimiter is,\n” and separator is “=”.
# Skipped when disableAutoRegister is true
tagsFromFile:
fileName: "/etc/palette/tags.txt"
delimiter: ";"
separator: ":"

# Optional field to assign labels. The script must be a bash script and must return labels in JSON format.
# timeout specified as seconds will ensure that the script will not run forever. Default timeout is 60 seconds.
# Skipped when disableAutoRegister is true
tagsFromScript:
scriptName: "/etc/palette/tags.sh"
timeout: 5

# Optional
network:
# configures http_proxy
Expand Down Expand Up @@ -66,4 +130,48 @@ stylus:
domain: registry.example.com
username: bob
password: ####
insecure: false
insecure: false

# Optional: configurations for 2-node setup
twoNode:
livenessSeconds: 60
healthCheckScript: "command"
enable: true

# Optional: field to enable or disable the Palette TUI, defaults to false if not specified.
# Refer to the documentation for more information: https://docs.spectrocloud.com/clusters/edge/edge-configuration/installer-reference/#initial-configuration
includeTui: true

# Optional: field to enable or disable the password update via local UI.
# If set to true, the password update option will be disabled in the local UI. Defaults to false if not specified
disablePasswordUpdate: true

# Optional: fields to set the log level
debug: true
trace: true

# Optional: field to to set the installation mode, defaults to 'connected' if not specified.
# Can be set to 'connected' or 'airgap'
installationMode: airgap

# Optional: configurations for Harbor PVC
harborPVC:
registrySize: 30
jobServiceSize: 5
databaseSize: 20
redisSize: 5
trivySize: 5

# Optional: Configure Local UI port. Defaults to 5080 if not specified,
localUI:
port: 5080

env:
Key: value

providerCredentials:
registry: registry.example.com
username: bob
password: ####
encodedPassword: false
certificates: ""