diff --git a/build.sh b/build.sh index d0069d5..583d0cd 100755 --- a/build.sh +++ b/build.sh @@ -6,7 +6,7 @@ repo="$output/ostree-repo" build_repo="$output/ostree-build-repo" git="$PWD" # Set the corresponding backend using "rclone config" -s3_bucket="backblaze:itix-ostree" +s3_bucket="backblaze:itix-coreos" function message() { echo @@ -87,4 +87,18 @@ message "Generating static delta files (though it may fail if there is no parent ostree --repo="$repo" static-delta generate itix/x86_64/coreos/stable message "Mirroring the repository to Backblaze B2..." -rclone sync -P "$repo" "$s3_bucket" +rclone sync -P "$repo" "$s3_bucket/ostree/" || exit 1 + +message "Copying the ISO image to Backblaze B2..." +rclone copy -P "$target"/builds/latest/x86_64/fedora-coreos-*.x86_64.iso "$s3_bucket/iso/itix-coreos.x86_64.iso" || exit 1 + +if [ -d "$git"/ignition/ ]; then + message "Generating and uploading the Ignition files..." + for fcc in "$git"/ignition/*.fcc; do + dir="$(dirname "$fcc")" + basename="$(basename "$fcc" .fcc)" + echo "- $basename" + fcct "$fcc" -o "$dir/$basename.ign" || exit 1 + rclone copy "$dir/$basename.ign" "$s3_bucket/ignition/$basename.ign" || exit 1 + done +fi diff --git a/ignition/.gitignore b/ignition/.gitignore new file mode 100644 index 0000000..69f48e5 --- /dev/null +++ b/ignition/.gitignore @@ -0,0 +1 @@ +*.ign diff --git a/ignition/hp-microserver-gen8.fcc b/ignition/hp-microserver-gen8.fcc new file mode 100644 index 0000000..33f1b56 --- /dev/null +++ b/ignition/hp-microserver-gen8.fcc @@ -0,0 +1,28 @@ +variant: fcos +version: 1.1.0 +storage: + disks: + - device: /dev/sda + # We do not want to wipe the partition table since this is the primary + # device. + wipe_table: false + partitions: + - size_mib: 0 + # Start at 50G so that we leave enough space for the root partition. + start_mib: 50000 + label: var + filesystems: + - path: /var + device: /dev/disk/by-partlabel/var + format: xfs + with_mount_unit: true +passwd: + users: + - name: nicolas + groups: + - wheel + - sudo + ssh_authorized_keys: + - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDK64XJZJIVf0G7lbPrVbe/ll39O1HNcMnkxbJCJ+k4aND/yiyYcUGBpjtYsfkX7ms2jVNFZ5S59tqeddqd2nzeL8R1vcC/CKxFhbCRL6mWkx3ANcsUhgFmdvjemCwcsDwAQQynh+MhhoCpFCU41mM0T9jT2TfuZx1Zt1ATNJeZ3epOfYvYntefu5LsLQ/8W2XDMtoCvgMLCWyiPZKqdpcOZKKDwB/Vat01T9oDV9h8B/SCA7YTm0Y4nJJnnJ3L+Bpt9R9nbjMZc0fe7EIyybbS7T+cleQ35L0oEaGN/sgrzlD+S4yXKFEof4Rv8d5wR1JBKHF+/VHpRMSJNB1VWpL5 nicolas@Mobilix.local" + # mkpasswd --method=yescrypt -s + password_hash: "$y$j9T$/cDRIBoeLOxNIbNykbclK.$1ZiK7FC.vl5r4Bo3bgXYABAjpzFkDhD.agBA73/dnU0" diff --git a/overlay.d/99itix/etc/ostree/remotes.d/itix.conf b/overlay.d/99itix/etc/ostree/remotes.d/itix.conf index d5864f6..03eb554 100644 --- a/overlay.d/99itix/etc/ostree/remotes.d/itix.conf +++ b/overlay.d/99itix/etc/ostree/remotes.d/itix.conf @@ -1,3 +1,3 @@ [remote "itix"] -url=https://f003.backblazeb2.com/file/itix-ostree/ +url=https://f003.backblazeb2.com/file/itix-coreos/ostree/ gpg-verify=false \ No newline at end of file