Created
June 2, 2023 20:49
-
-
Save miabbott/8e495da3660b2ae6f8dfa655a3061abf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Initial ostree commit | |
| $ composer-cli blueprints show minimal92 | |
| name = "minimal92" | |
| description = "minimal rhel for edge blueprint" | |
| version = "1.0.1" | |
| packages = [] | |
| modules = [] | |
| groups = [] | |
| distro = "rhel-92" | |
| $ composer-cli compose start-ostree minimal92 edge-commit | |
| $ composer-cli compose image 73dea4d0-ecd4-45c7-aa36-322b1d10c20d | |
| $ sudo mkdir -p /var/srv/httpd | |
| $ sudo tar -xf 73dea4d0-ecd4-45c7-aa36-322b1d10c20d-commit.tar -C /var/srv/httpd | |
| $ ostree --repo=/var/srv/httpd/repo refs | |
| rhel/9/x86_64/edge | |
| $ ostree --repo=/var/srv/httpd/repo rev-parse rhel/9/x86_64/edge | |
| 7092bfd77f2e0ebe719981330315bc3a4c1ab04b2737d0b51f38dd18cb593fba | |
| $ ostree --repo=/var/srv/httpd/repo log rhel/9/x86_64/edge | |
| commit 7092bfd77f2e0ebe719981330315bc3a4c1ab04b2737d0b51f38dd18cb593fba | |
| ContentChecksum: d70740a953b2604d461e8fdb30fa038198621776eb9b51ec77dcf5a924ae464a | |
| Date: 2023-06-02 13:33:19 +0000 | |
| Version: 9.2 | |
| (no subject) | |
| $ sudo firewall-cmd --add-port 8080/tcp --permanent | |
| success | |
| $ sudo podman run --name ostree-nginx -d -v /var/srv/httpd:/usr/share/nginx/html:z -p 8080:80 docker.io/nginx | |
| $ curl http://localhost:8080/repo/config | |
| [core] | |
| repo_version=1 | |
| mode=archive-z2 | |
| ## Creating installer ISO | |
| $ composer-cli blueprints show iso92 | |
| name = "iso92" | |
| description = "blueprint to create RHEL for Edge ISO" | |
| version = "2.0.0" | |
| packages = [] | |
| modules = [] | |
| groups = [] | |
| distro = "rhel-92" | |
| [customizations] | |
| [[customizations.user]] | |
| name = "core" | |
| password = "$6$IuPqY4kIZ8ctjtZZ$8nWHjJuVUKfARIdlKSNR77G8meEi0Xm.B9qitNRVs7mXEK//4iDYAT6OckysPZUPgiZ7bijDhmv4Tpx.qirHC/" | |
| key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDLtDAJ0j2YY4NWSHE+tohIP/ohcmZrPhfAywgf4UNa4xVE43feUABlUa9/EEU8BdWPN562hTUsJ1pdWvalDSEBmaMK4bhB4MhnSvzRRYFbW/fssfXMWfQoiIJ+x5X07VgEgV8sMFs99sjWhmRnvI7b35vZPxQYN7qDpTJqsKQl4E0o2ezyeRGi/LAlFTI27SL647tvJkqvnhPV+Psv4jC9Gb4JJxpTn+AwdbEHMp0Fa2aZGl8smYcWf8ygPnciWEQJ+w+s25JbCA7DkV7EvaOfQD6wLdgjIdfLLtGXFzEGyzaIfK3yYRI4Uit5DMdtoDIjrvHISzS/JwuNVCMp1ThCjLhA8lQFi6fHKMPehuYXHNo5az3DMnpclY0y7utFlVd47hKB/r/gE0WiexUQWQj4lwgvdPpcUDk/pifjJ2yuq6MFwSZ0kgFm+D5bt55NosxpZLvCKlbOc9f3m0wh0bkSrMnsyUTfGAKVboTax+QOdGCjzY/JZQu+p6KEPwpAI3L/0DYJv5RYkcUtnZBwSCoPrFe0KYVT14EAGI8opBL8NybTAmK/Sbm09u5WWr3biYqYrfbYXbKvgDYyCjU6n4nvCc2wKbtnAUsSz+ZiMy8Vd63uWvi+51ye7QL1uTWf5WvwJ9/bmbLVKeuc43u/6OU+SeRsincz2JYgOrIdQTI07Q==" | |
| groups = ["wheel"] | |
| $ composer-cli compose start-ostree --url http://localhost:8080/repo iso92 edge-installer | |
| $ composer-cli compose image bf94d0b3-a622-4eff-a4cd-3d6b97a17697 | |
| ## On the installed host | |
| [core@localhost ~]$ rpm-ostree status | |
| State: idle | |
| Deployments: | |
| ● rhel:rhel/9/x86_64/edge | |
| Version: 9.2 (2023-06-02T13:33:19Z) | |
| Commit: 7092bfd77f2e0ebe719981330315bc3a4c1ab04b2737d0b51f38dd18cb593fba | |
| [core@localhost ~]$ ostree remote list -u | |
| rhel file:///run/install/repo/ostree/repo | |
| [core@localhost ~]$ sudo ostree remote delete rhel | |
| We trust you have received the usual lecture from the local System | |
| Administrator. It usually boils down to these three things: | |
| #1) Respect the privacy of others. | |
| #2) Think before you type. | |
| #3) With great power comes great responsibility. | |
| [sudo] password for core: | |
| [core@localhost ~]$ sudo ostree remote add --no-gpg-verify rhel http://192.168.122.226:8080/repo | |
| ### Create an update | |
| $ cat minimal92.toml | |
| name = "minimal92" | |
| description = "minimal rhel for edge blueprint" | |
| version = "1.0.2" | |
| distro = "rhel-92" | |
| [[packages]] | |
| name = "strace" | |
| version = "*" | |
| $ composer-cli blueprints push minimal92.toml | |
| $ composer-cli compose start-ostree --ref rhel/9/x86_64/edge --url http://localhost:8080/repo minimal92 edge-commit | |
| ## ostree pull-local | |
| $ sudo mkdir -p /var/srv/tmp-repo | |
| $ composer-cli compose image 71e3ec68-5f6e-464c-8ab9-d3aead6e15b0 | |
| $ sudo tar -xf 71e3ec68-5f6e-464c-8ab9-d3aead6e15b0-commit.tar -C /var/srv/tmp-repo/stage | |
| $ ostree --repo=/var/srv/tmp-repo/stage/repo log rhel/9/x86_64/edge | |
| commit cc739e4a1674d5f778b0c5714f9e8bb14a92810467da99470223f9cd091be5e2 | |
| Parent: 7092bfd77f2e0ebe719981330315bc3a4c1ab04b2737d0b51f38dd18cb593fba | |
| ContentChecksum: f8ff78eb6c5e95f9863686e537ff3477cce3590cd7df5612557bba725831c703 | |
| Date: 2023-06-02 18:04:06 +0000 | |
| Version: 9.2 | |
| (no subject) | |
| << History beyond this commit not fetched >> | |
| $ sudo ostree --repo=/var/srv/httpd/repo pull-local /var/srv/tmp-repo/stage/repo | |
| $ sudo ostree --repo=/var/srv/httpd/repo static-delta generate --from=7092bfd77f2e0ebe719981330315bc3a4c1ab04b2737d0b51f38dd18cb593fba --to=cc739e4a1674d5f778b0c5714f9e8bb14a92810467da99470223f9cd091be5e2 | |
| Generating static delta: | |
| From: 7092bfd77f2e0ebe719981330315bc3a4c1ab04b2737d0b51f38dd18cb593fba | |
| To: cc739e4a1674d5f778b0c5714f9e8bb14a92810467da99470223f9cd091be5e2 | |
| modified: 8 | |
| new reachable: metadata=27 content regular=20 symlink=5 | |
| rollsum for 74baaabedbedab11376a42e5518b1c10eb39a908791ccafe67678b5f46910218 -> b4b0e43cc5fe9738d8b1eba4cddc21e5bfe07afba3a6c35acb8b323ac2075d0b; crcs=7305 bufs=10716 total=10963 matchsize=85229966 | |
| rollsum for 1/8 modified | |
| processing bsdiff: [0/7] | |
| processing bsdiff: [1/7] | |
| processing bsdiff: [2/7] | |
| processing bsdiff: [3/7] | |
| processing bsdiff: [4/7] | |
| processing bsdiff: [5/7] | |
| part 1 n:32 compressed:3565485 uncompressed:135236726 | |
| processing bsdiff: [6/7] | |
| part 2 n:19 compressed:1561913 uncompressed:3726554 | |
| uncompressed=138963280 compressed=5127398 loose=2016013 | |
| rollsum=1 objects, 85229966 bytes | |
| bsdiff=7 objects | |
| $ sudo ostree --repo=/var/srv/httpd/repo summary -u | |
| [core@rhel91-image-builder ~]$ sudo ostree --repo=/var/srv/httpd/repo summary -v | |
| * rhel/9/x86_64/edge | |
| Latest Commit (16.0 kB): | |
| cc739e4a1674d5f778b0c5714f9e8bb14a92810467da99470223f9cd091be5e2 | |
| Version (ostree.commit.version): 9.2 | |
| Timestamp (ostree.commit.timestamp): 2023-06-02T14:04:06-04 | |
| Repository Mode (ostree.summary.mode): archive-z2 | |
| Last-Modified (ostree.summary.last-modified): 2023-06-02T14:42:11-04 | |
| Has Tombstone Commits (ostree.summary.tombstone-commits): No | |
| Static Deltas (ostree.static-deltas): {'7092bfd77f2e0ebe719981330315bc3a4c1ab04b2737d0b51f38dd18cb593fba-116c522d3d418bf13c1febca2f08c7e01510dd563612f972b57c3c2d8b7c3c8d': <[byte 0xb7, 0xa4, 0xd5, 0x4d, 0xe9, 0x86, 0x0c, 0x66, 0xb7, 0x59, 0xcd, 0xb3, 0x56, 0x71, 0x60, 0xc0, 0x71, 0x18, 0x7e, 0x28, 0xc2, 0xfe, 0x21, 0xa4, 0x14, 0x9b, 0x42, 0x41, 0x22, 0xb5, 0x18, 0xce]>, '7092bfd77f2e0ebe719981330315bc3a4c1ab04b2737d0b51f38dd18cb593fba-cc739e4a1674d5f778b0c5714f9e8bb14a92810467da99470223f9cd091be5e2': <[byte 0x14, 0x00, 0x4e, 0x55, 0xb5, 0x57, 0xf4, 0xe7, 0x20, 0x66, 0xe3, 0xbc, 0xcd, 0xed, 0x37, 0xfa, 0x65, 0xa5, 0xc1, 0x78, 0xcb, 0x29, 0x57, 0xc7, 0x84, 0x46, 0xf5, 0x54, 0x97, 0xfe, 0xb0, 0x02]>} | |
| ostree.summary.indexed-deltas: true | |
| $ sudo chcon -R -t container_file_t /var/srv/httpd/repo/ | |
| ## on the edge device | |
| $ sudo rpm-ostree upgrade --check | |
| 2 metadata, 0 content objects fetched; 15 KiB transferred in 0 seconds; 0 bytes content written | |
| Note: --check and --preview may be unreliable. See https://github.com/coreos/rpm-ostree/issues/1579 | |
| AvailableUpdate: | |
| Version: 9.2 (2023-06-02T18:04:06Z) | |
| Commit: cc739e4a1674d5f778b0c5714f9e8bb14a92810467da99470223f9cd091be5e2 | |
| Diff: 3 added | |
| $ sudo rpm-ostree upgrade | |
| ⠚ Writing objects: 1... | |
| 2 delta parts, 2 loose fetched; 5024 KiB transferred in 1 seconds; 0 bytes content written | |
| Writing objects: 1... done | |
| Staging deployment... done | |
| Freed: 47.0 MB (pkgcache branches: 0) | |
| Added: | |
| elfutils-default-yama-scope-0.188-3.el9.noarch | |
| elfutils-libs-0.188-3.el9.x86_64 | |
| strace-5.18-2.el9.x86_64 | |
| Run "systemctl reboot" to start a reboot | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment