joonas-fi / joonas-sys

My personal system installation (Ubuntu + programs & conf I use) as code.
https://joonas.fi/
Apache License 2.0
8 stars 1 forks source link

OSTree remote #55

Open joonas-fi opened 4 months ago

joonas-fi commented 4 months ago

Create distribution repo

$ mkdir /tmp/distrepo
$ cd /tmp/distrepo
$ ostree init --mode=archive --repo=. --collection-id=fi.joonas.os
$ ostree pull-local --repo=. /ostree/repo deploy/app/fi.joonas.os/x86_64/stable

NOTE:

Sync to S3

Setup rclone

source secrets-digitalocean.env
cat <<EOF > ~/.config/rclone/rclone.conf
[joonas-os]
type = s3
provider = DigitalOcean
access_key_id = ${AWS_ACCESS_KEY_ID}
secret_access_key = ${AWS_SECRET_ACCESS_KEY}
endpoint = ams3.digitaloceanspaces.com
acl = public-read
EOF

Sync

$ cd /tmp/distrepo
$ rclone copy . joonas-os:/fi-joonas-os/ostree/

Pull to local

$ mkdir /tmp/testrepo
$ cd /tmp/testrepo
$ ostree init --repo=.
$ ostree remote add --repo=. --no-gpg-verify fi.joonas.os https://YOUR_BUCKET.S3_ENDPOINT/ostree/
$ sudo ostree pull --repo=. fi.joonas.os deploy/app/fi.joonas.os/x86_64/stable

Links