#cloud-config autoinstall: version: 1 # ── Locale & keyboard ────────────────────────── locale: en_IN.UTF-8 keyboard: layout: us # ── Network: DHCP on first ethernet ─────────── # Final network config is set by the web setup UI (browser on port 80) network: network: version: 2 ethernets: any-en: dhcp4: true match: name: "en*" any-eth: dhcp4: true match: name: "eth*" # ── Storage: LVM using ALL disk space ───────── storage: layout: name: lvm match: size: largest # ── Identity ────────────────────────────────── identity: hostname: aiserver username: cezen # Password: Cezen@2024! password: "$6$5Fl7QFkT0PyKbGzm$bTzPjRy7wY.z9dzWjTlwK91WGYrtQUH.Bf5Alp1WsQY7o7JaKBNFrX2vlsDu9z3XZs2cZBN8tSZcNpBW2tuVt0" # ── SSH ─────────────────────────────────────── ssh: install-server: true allow-pw: true # ── Base packages ───────────────────────────── packages: - git - curl - wget - python3 - python3-pip - avahi-daemon # ── Late commands ───────────────────────────── late-commands: # Extend LVM to use 100% of available disk space - lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv || true - resize2fs /dev/ubuntu-vg/ubuntu-lv || true # Allow cezen passwordless sudo (needed for install.sh) - echo "cezen ALL=(ALL) NOPASSWD:ALL" > /target/etc/sudoers.d/cezen - chmod 440 /target/etc/sudoers.d/cezen # Install the Cezen AI payload from the ISO first. Fall back to Git only # when building from older media that does not contain /cdrom/cezen-aipackage. - mkdir -p /target/opt/aipackage - cp -a /cdrom/cezen-aipackage/. /target/opt/aipackage/ || git clone https://cgit.cezentech.com/jinojose/aipackage.git /target/opt/aipackage # Deploy the web setup server - mkdir -p /target/opt/cezen - cp /target/opt/aipackage/autoinstall/websetup/server.py /target/opt/cezen/websetup.py - chmod +x /target/opt/cezen/websetup.py # Set hostname to cezenai so it's reachable as cezenai.local via mDNS - echo "cezenai" > /target/etc/hostname - sed -i 's/aiserver/cezenai/g' /target/etc/hosts || true # Create cezen-setup web UI systemd service - | cat > /target/etc/systemd/system/cezen-setup.service << 'EOF' [Unit] Description=Cezen AI Suite — Web Setup UI After=network-online.target avahi-daemon.service Wants=network-online.target ConditionPathExists=!/opt/cezen/.setup-done [Service] Type=simple ExecStart=/usr/bin/python3 /opt/cezen/websetup.py Restart=on-failure RestartSec=5 [Install] WantedBy=multi-user.target EOF - curtin in-target -- systemctl enable cezen-setup.service - curtin in-target -- systemctl enable avahi-daemon.service # ── Skip confirmations ───────────────────────── user-data: disable_root: false