Add .gitignore, clean up build artifacts, add test scripts and configuration files
Some checks failed
Build Simple CLI / build (push) Failing after 1s
Some checks failed
Build Simple CLI / build (push) Failing after 1s
This commit is contained in:
parent
882552f4e7
commit
6aa6d32e1e
12 changed files with 128 additions and 185 deletions
29
.gitignore
vendored
Normal file
29
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
# Build artifacts and large files
|
||||||
|
*.qcow2
|
||||||
|
*.img
|
||||||
|
*.raw
|
||||||
|
*.iso
|
||||||
|
|
||||||
|
# Image filesystem
|
||||||
|
image-fs/
|
||||||
|
|
||||||
|
# Output directory
|
||||||
|
output/
|
||||||
|
|
||||||
|
# Build files
|
||||||
|
build_files/
|
||||||
|
|
||||||
|
# Temporary files
|
||||||
|
*.tmp
|
||||||
|
*.temp
|
||||||
|
*~
|
||||||
|
|
||||||
|
# IDE and editor files
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
|
||||||
|
# OS generated files
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
@ -26,8 +26,16 @@ RUN apt-get update && apt-get install -y \
|
||||||
locales \
|
locales \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
tzdata \
|
tzdata \
|
||||||
|
podman \
|
||||||
|
skopeo \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install particle-os specific packages
|
||||||
|
COPY packages/*.deb /tmp/packages/
|
||||||
|
RUN dpkg -i /tmp/packages/bootc_*.deb /tmp/packages/apt-ostree_*.deb || true && \
|
||||||
|
apt-get install -f -y && \
|
||||||
|
rm -rf /tmp/packages
|
||||||
|
|
||||||
# Configure locale
|
# Configure locale
|
||||||
RUN locale-gen en_US.UTF-8
|
RUN locale-gen en_US.UTF-8
|
||||||
ENV LANG=en_US.UTF-8
|
ENV LANG=en_US.UTF-8
|
||||||
|
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
||||||
{
|
|
||||||
"packages": {
|
|
||||||
"core": {
|
|
||||||
"description": "Core system packages",
|
|
||||||
"packages": [
|
|
||||||
"systemd",
|
|
||||||
"systemd-sysv",
|
|
||||||
"udev",
|
|
||||||
"procps",
|
|
||||||
"util-linux",
|
|
||||||
"mount",
|
|
||||||
"passwd",
|
|
||||||
"login",
|
|
||||||
"bash",
|
|
||||||
"coreutils"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"ostree": {
|
|
||||||
"description": "OSTree and boot management",
|
|
||||||
"packages": [
|
|
||||||
"ostree",
|
|
||||||
"ostree-boot"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"kernel": {
|
|
||||||
"description": "Kernel and boot essentials",
|
|
||||||
"packages": [
|
|
||||||
"linux-image-amd64",
|
|
||||||
"linux-headers-amd64",
|
|
||||||
"initramfs-tools"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"tools": {
|
|
||||||
"description": "Essential command line tools",
|
|
||||||
"packages": [
|
|
||||||
"curl",
|
|
||||||
"wget",
|
|
||||||
"vim",
|
|
||||||
"less",
|
|
||||||
"locales",
|
|
||||||
"ca-certificates",
|
|
||||||
"tzdata"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"development": {
|
|
||||||
"description": "Development tools (optional)",
|
|
||||||
"packages": [
|
|
||||||
"build-essential",
|
|
||||||
"git",
|
|
||||||
"python3",
|
|
||||||
"python3-pip"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"repositories": {
|
|
||||||
"debian": {
|
|
||||||
"url": "http://deb.debian.org/debian",
|
|
||||||
"suite": "trixie",
|
|
||||||
"components": ["main", "contrib", "non-free"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"post_install": [
|
|
||||||
"usr/share/particle-os/firstboot/setup-system.sh",
|
|
||||||
"usr/share/particle-os/firstboot/configure-network.sh"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
4
etc/bootupd.conf
Normal file
4
etc/bootupd.conf
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
[updates]
|
||||||
|
enabled = true
|
||||||
|
registry = "git.raines.xyz"
|
||||||
|
image = "robojerk/particle-os/simple-cli"
|
||||||
1
etc/hostname
Normal file
1
etc/hostname
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
simple-cli
|
||||||
7
etc/hosts
Normal file
7
etc/hosts
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
127.0.0.1 localhost
|
||||||
|
127.0.1.1 simple-cli
|
||||||
|
|
||||||
|
# The following lines are desirable for IPv6 capable hosts
|
||||||
|
::1 localhost ip6-localhost ip6-loopback
|
||||||
|
ff02::1 ip6-allnodes
|
||||||
|
ff02::2 ip6-allrouters
|
||||||
3
etc/ostree/remotes.d/particle-os.conf
Normal file
3
etc/ostree/remotes.d/particle-os.conf
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[remote "particle-os"]
|
||||||
|
url=https://git.raines.xyz/robojerk/particle-os
|
||||||
|
gpg-verify=false
|
||||||
4
etc/systemd/system/default.target
Normal file
4
etc/systemd/system/default.target
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Simple CLI Default Target
|
||||||
|
Requires=multi-user.target
|
||||||
|
AllowIsolate=yes
|
||||||
26
test-boot-full.sh
Executable file
26
test-boot-full.sh
Executable file
|
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Test script to boot the simple-cli image with full BIOS/GRUB visibility (headless)
|
||||||
|
|
||||||
|
echo "Testing simple-cli bootable image with full boot process..."
|
||||||
|
echo "Image: simple-cli.qcow2"
|
||||||
|
echo "Size: $(ls -lh simple-cli.qcow2 | awk '{print $5}')"
|
||||||
|
|
||||||
|
# Test boot with QEMU (full boot process - BIOS, GRUB, kernel)
|
||||||
|
echo "Testing full boot process (headless)..."
|
||||||
|
echo "You should see:"
|
||||||
|
echo "1. QEMU BIOS screen"
|
||||||
|
echo "2. GRUB boot menu (if configured)"
|
||||||
|
echo "3. Kernel loading"
|
||||||
|
echo "4. System boot"
|
||||||
|
echo ""
|
||||||
|
echo "Press Ctrl+C to stop the VM when done testing."
|
||||||
|
|
||||||
|
qemu-system-x86_64 \
|
||||||
|
-m 2G \
|
||||||
|
-smp 2 \
|
||||||
|
-drive file=simple-cli.qcow2,format=qcow2 \
|
||||||
|
-boot c \
|
||||||
|
-nographic \
|
||||||
|
-serial mon:stdio
|
||||||
|
|
||||||
|
echo "Test complete!"
|
||||||
24
test-boot.sh
Executable file
24
test-boot.sh
Executable file
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Test script to boot the simple-cli image (headless)
|
||||||
|
|
||||||
|
echo "Testing simple-cli bootable image..."
|
||||||
|
echo "Image: simple-cli.qcow2"
|
||||||
|
echo "Size: $(ls -lh simple-cli.qcow2 | awk '{print $5}')"
|
||||||
|
|
||||||
|
# Test boot with QEMU (headless with kernel/initrd)
|
||||||
|
echo "Testing boot process (headless with direct kernel boot)..."
|
||||||
|
echo "You should see the kernel boot process directly!"
|
||||||
|
echo "Press Ctrl+C to stop the VM when done testing."
|
||||||
|
|
||||||
|
qemu-system-x86_64 \
|
||||||
|
-m 2G \
|
||||||
|
-smp 2 \
|
||||||
|
-drive file=simple-cli.qcow2,format=qcow2 \
|
||||||
|
-boot c \
|
||||||
|
-nographic \
|
||||||
|
-serial mon:stdio \
|
||||||
|
-append "console=ttyS0 root=/dev/sda1 rw" \
|
||||||
|
-kernel image-fs/boot/vmlinuz-6.12.38+deb13-amd64 \
|
||||||
|
-initrd image-fs/boot/initrd.img-6.12.38+deb13-amd64
|
||||||
|
|
||||||
|
echo "Test complete!"
|
||||||
|
|
@ -1,50 +1,16 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Simple CLI First Boot Setup Script
|
# Simple CLI firstboot setup script
|
||||||
# Based on Aurora's firstboot pattern
|
|
||||||
|
|
||||||
set -euo pipefail
|
echo "Setting up Simple CLI system..."
|
||||||
|
|
||||||
echo "=== Simple CLI First Boot Setup ==="
|
# Set hostname
|
||||||
|
hostnamectl set-hostname simple-cli
|
||||||
# Configure system locale
|
|
||||||
echo "Configuring locale..."
|
|
||||||
locale-gen en_US.UTF-8
|
|
||||||
update-locale LANG=en_US.UTF-8
|
|
||||||
|
|
||||||
# Configure timezone
|
# Configure timezone
|
||||||
echo "Configuring timezone..."
|
timedatectl set-timezone UTC
|
||||||
ln -sf /usr/share/zoneinfo/UTC /etc/localtime
|
|
||||||
|
|
||||||
# Create user directories
|
# Enable systemd services
|
||||||
echo "Setting up user directories..."
|
|
||||||
mkdir -p /home/simple/.config
|
|
||||||
mkdir -p /home/simple/.local/share
|
|
||||||
chown -R simple:simple /home/simple
|
|
||||||
|
|
||||||
# Configure systemd services
|
|
||||||
echo "Configuring systemd services..."
|
|
||||||
systemctl enable systemd-networkd
|
|
||||||
systemctl enable systemd-resolved
|
|
||||||
systemctl enable systemd-timesyncd
|
systemctl enable systemd-timesyncd
|
||||||
|
systemctl enable ostree-remount
|
||||||
|
|
||||||
# Configure networking
|
echo "Simple CLI setup complete"
|
||||||
echo "Configuring networking..."
|
|
||||||
cat > /etc/systemd/network/20-wired.network << EOF
|
|
||||||
[Match]
|
|
||||||
Name=en*
|
|
||||||
|
|
||||||
[Network]
|
|
||||||
DHCP=yes
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# Configure OSTree
|
|
||||||
echo "Configuring OSTree..."
|
|
||||||
mkdir -p /usr/lib/ostree-boot
|
|
||||||
ostree admin init-fs /usr/lib/ostree-boot
|
|
||||||
|
|
||||||
# Set up bootupd
|
|
||||||
echo "Configuring bootupd..."
|
|
||||||
bootupd install
|
|
||||||
|
|
||||||
echo "=== First boot setup complete ==="
|
|
||||||
echo "System is ready for use!"
|
|
||||||
|
|
|
||||||
|
|
@ -1,91 +1,28 @@
|
||||||
# Simple CLI ujust Commands
|
# Simple CLI ujust commands
|
||||||
# Based on Aurora's ujust pattern
|
|
||||||
|
|
||||||
# Show system information
|
# Show system status
|
||||||
info:
|
status:
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
echo "=== Simple CLI System Information ==="
|
echo "=== Simple CLI System Status ==="
|
||||||
|
echo "Hostname: $(hostname)"
|
||||||
echo "OS: $(cat /etc/os-release | grep PRETTY_NAME | cut -d'"' -f2)"
|
echo "OS: $(cat /etc/os-release | grep PRETTY_NAME | cut -d'"' -f2)"
|
||||||
echo "Kernel: $(uname -r)"
|
echo "Kernel: $(uname -r)"
|
||||||
echo "Architecture: $(uname -m)"
|
echo "Uptime: $(uptime)"
|
||||||
echo "Hostname: $(hostname)"
|
|
||||||
echo "Uptime: $(uptime -p)"
|
|
||||||
echo "================================"
|
echo "================================"
|
||||||
|
|
||||||
# Show OSTree status
|
|
||||||
ostree-status:
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
echo "=== OSTree Status ==="
|
|
||||||
ostree status
|
|
||||||
echo "==================="
|
|
||||||
|
|
||||||
# Update system
|
# Update system
|
||||||
update:
|
update:
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
echo "Updating Simple CLI system..."
|
echo "Updating Simple CLI system..."
|
||||||
sudo ostree admin upgrade
|
sudo bootc upgrade
|
||||||
echo "Update complete. Reboot to apply changes."
|
echo "Update complete"
|
||||||
|
|
||||||
# Show package information
|
# Show OSTree status
|
||||||
packages:
|
ostree-status:
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
echo "=== Installed Packages ==="
|
ostree status
|
||||||
dpkg -l | wc -l
|
|
||||||
echo "========================="
|
|
||||||
|
|
||||||
# Show system services
|
# Show bootupd status
|
||||||
services:
|
bootupd-status:
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
echo "=== System Services ==="
|
bootupd status
|
||||||
systemctl list-units --type=service --state=running
|
|
||||||
echo "======================"
|
|
||||||
|
|
||||||
# Show network status
|
|
||||||
network:
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
echo "=== Network Status ==="
|
|
||||||
ip addr show
|
|
||||||
echo "====================="
|
|
||||||
|
|
||||||
# Show disk usage
|
|
||||||
disk:
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
echo "=== Disk Usage ==="
|
|
||||||
df -h
|
|
||||||
echo "================="
|
|
||||||
|
|
||||||
# Show memory usage
|
|
||||||
memory:
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
echo "=== Memory Usage ==="
|
|
||||||
free -h
|
|
||||||
echo "==================="
|
|
||||||
|
|
||||||
# Show process information
|
|
||||||
processes:
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
echo "=== Top Processes ==="
|
|
||||||
ps aux --sort=-%cpu | head -10
|
|
||||||
echo "===================="
|
|
||||||
|
|
||||||
# Show system logs
|
|
||||||
logs:
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
echo "=== Recent System Logs ==="
|
|
||||||
journalctl -n 20 --no-pager
|
|
||||||
echo "========================="
|
|
||||||
|
|
||||||
# Help command
|
|
||||||
help:
|
|
||||||
@echo "Simple CLI ujust Commands:"
|
|
||||||
@echo " info - Show system information"
|
|
||||||
@echo " ostree-status - Show OSTree status"
|
|
||||||
@echo " update - Update system"
|
|
||||||
@echo " packages - Show package count"
|
|
||||||
@echo " services - Show running services"
|
|
||||||
@echo " network - Show network status"
|
|
||||||
@echo " disk - Show disk usage"
|
|
||||||
@echo " memory - Show memory usage"
|
|
||||||
@echo " processes - Show top processes"
|
|
||||||
@echo " logs - Show recent logs"
|
|
||||||
@echo " help - Show this help"
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue