@@ -97,19 +97,20 @@ def heading(text, size=Pt(18), color=None):
9797 heading ("Build-time" ),
9898 bullet ("Conan 2.x — package manager + lockfiles (§13)" ),
9999 bullet ("CMake + Ninja — presets, hermetic builds" ),
100- bullet ("gcc-toolset-14 or Clang 18 — C++23, sanitizers, LTO/PGO (§5)" ),
100+ bullet ("gcc/gcc-c++ 14.3.1 or Clang 18 — C++23, sanitizers, LTO/PGO (§5)" ),
101101 heading ("Runtime" , color = C .ACCENT_BLUE ),
102102 bullet ("Podman 5.x rootless — podman compose, slirp4netns" ),
103103 bullet ("OCI runtime: crun + conmon — applies cgroup v2 + user namespace" ),
104- bullet ("Base images: UBI 9 / ubi-micro / scratch — multi-stage in §4" ),
104+ bullet ("Base images: UBI 10 / ubi-micro / scratch — multi-stage in §4" ),
105105 bullet ("Load generators: hey (HTTP), ghz (gRPC)" ),
106106 bullet ("Observability: otel-lgtm (§10) — all-in-one Grafana stack" ),
107107 ],
108108 diagram = f"{ DG } /01-prerequisites-toolchain.jpg" ,
109109 notes = (
110110 "Two columns. On the left, build-time: Conan manages "
111111 "dependencies and produces lockfiles; CMake plus Ninja drives "
112- "the build; either GCC 14 from gcc-toolset or Clang 18 does "
112+ "the build; either GCC 14 (base gcc/gcc-c++, 14.3.1) or "
113+ "Clang 18 does "
113114 "the actual compilation. Standard hermetic build flow.\n \n "
114115 "On the right, runtime: Podman 5 rootless runs the container; "
115116 "crun and conmon apply the cgroup v2 limits and the user "
@@ -468,9 +469,10 @@ def heading(text, size=Pt(18), color=None):
468469 "final image except the bytes you explicitly copy.\n \n "
469470 "Three variants we'll measure in Demo 1: single-stage "
470471 "naive (the anti-pattern, builder and runtime in one "
471- "image, 689 MB); ubi-multistage (builder is ubi9, runtime "
472- "is ubi9-minimal, 114 MB); ubi-micro (builder is ubi9, "
473- "runtime is ubi9-micro with static libstdc++, 26 MB). "
472+ "image, 689 MB); ubi-multistage (builder is ubi10/ubi, "
473+ "runtime is ubi10/ubi-minimal, 114 MB); ubi-micro (builder "
474+ "is ubi10/ubi, runtime is ubi10/ubi-micro with static "
475+ "libstdc++, 26 MB). "
474476 "Twenty-six-fold size reduction; same C++ source code; "
475477 "same runtime performance for our HTTP echo service. The "
476478 "only thing you trade is debug surface — ubi-micro has "
@@ -480,7 +482,7 @@ def heading(text, size=Pt(18), color=None):
480482 title = "Demo 1 — three variants, measured" ,
481483 stats = [
482484 ("689 MB" , "single-stage naive\n (builder + runtime)" , C .ACCENT_RED ),
483- ("114 MB" , "ubi-multistage\n (ubi9 + ubi9 -minimal)" , C .ACCENT_ORANGE ),
485+ ("114 MB" , "ubi-multistage\n (ubi10/ubi + ubi10/ubi -minimal)" , C .ACCENT_ORANGE ),
484486 ("26 MB" , "ubi-micro\n (static libstdc++)" , C .ACCENT_GREEN ),
485487 ("4-5%" , "PGO improvement\n at p99 (on top of LTO)" , C .ACCENT_CYAN ),
486488 ],
@@ -1638,9 +1640,9 @@ def heading(text, size=Pt(18), color=None):
16381640 "type, compiler flags, and configuration options. "
16391641 "Anyone running `cmake --preset release` gets the same "
16401642 "build configuration.\n \n "
1641- "Third, the Containerfile pins the base image. UBI 9 "
1642- "with a specific digest hash, not just 'ubi9 :latest'. "
1643- "If Red Hat ships a new ubi9 image, you don't pick it "
1643+ "Third, the Containerfile pins the base image. UBI 10 "
1644+ "with a specific digest hash, not just 'ubi10/ubi :latest'. "
1645+ "If Red Hat ships a new ubi10 image, you don't pick it "
16441646 "up until you explicitly update the digest.\n \n "
16451647 "All three together: given a git commit, you can "
16461648 "rebuild bit-identical binaries six months from now. "
@@ -1991,26 +1993,28 @@ def heading(text, size=Pt(18), color=None):
19911993},
19921994
19931995# ============================================================================
1994- # §16 — Appendix A: Conan + UBI 9 perl
1996+ # §16 — Appendix A: Conan + UBI's minimal perl
19951997# ============================================================================
19961998{
19971999 "num" : 16 ,
19982000 "label" : "Section 16" ,
1999- "title" : "Appendix A — Conan, autotools, UBI 9 's minimal perl" ,
2000- "tagline" : "The survival guide for from-source dependency builds on UBI 9 " ,
2001+ "title" : "Appendix A — Conan, autotools, UBI's minimal perl" ,
2002+ "tagline" : "The survival guide for from-source dependency builds on UBI" ,
20012003 "divider_notes" : (
20022004 "Brief appendix. Read this one before you attempt your own Conan "
2003- "+ UBI 9 + autotools-using-dep build. The tutorial's demo-04 "
2004- "took six rounds of build failures to converge, and every one "
2005- "of them was the same underlying issue: UBI 9's minimal perl is "
2006- "missing modules that autotools' configure scripts assume are "
2007- "present."
2005+ "+ UBI + autotools-using-dep build. The tutorial's demo-04 "
2006+ "took six rounds of build failures to converge. That war story "
2007+ "played out on UBI 9; the tutorial now targets UBI 10 and the "
2008+ "recipe below is updated to match — but the trap is a property "
2009+ "of UBI's deliberate minimalism, not of any one release: UBI's "
2010+ "minimal perl is missing modules that autotools' configure "
2011+ "scripts assume are present."
20082012 ),
20092013 "slides" : [
20102014 dict (kind = "content" ,
20112015 title = "The fifteen perl modules that autotools wants" ,
20122016 body = [
2013- para ("UBI 9 's perl-interpreter is the minimal subset. Any autotools-based "
2017+ para ("UBI's perl-interpreter is the minimal subset. Any autotools-based "
20142018 "Conan build (libcurl, c-ares, openssl, nghttp2, etc.) will fail until "
20152019 "these are installed:" ),
20162020 dict (text = "" , size = Pt (8 )),
@@ -2024,20 +2028,20 @@ def heading(text, size=Pt(18), color=None):
20242028 bullet ("perl-Thread-Queue" ),
20252029 dict (text = "" , size = Pt (6 )),
20262030 heading ("Simplifying alternatives" , color = C .ACCENT_ORANGE ),
2027- bullet ("Use ubi9 (not ubi9 -minimal) for the builder stage — includes full perl" ),
2031+ bullet ("Use ubi10/ubi (not ubi10/ubi -minimal) for the builder stage — includes full perl" ),
20282032 bullet ("Use a pre-built ConanCenter binary if your platform has one" ),
20292033 bullet ("Or maintain a 'fat builder' base image with all 15 modules baked in" ),
20302034 ],
20312035 notes = (
20322036 "Fifteen perl modules. I'll spare you the bug history "
20332037 "and just give you the list. If you're doing a Conan "
2034- "from-source build on UBI 9 -minimal of anything that "
2038+ "from-source build on ubi10/ubi -minimal of anything that "
20352039 "uses autotools — libcurl, c-ares, openssl, nghttp2, "
20362040 "and most C libraries from the 90s — you need these "
20372041 "fifteen modules.\n \n "
20382042 "Three simplifying alternatives. First and easiest: "
2039- "use the full ubi9 image for the builder stage. The "
2040- "runtime image can still be ubi9 -minimal or ubi9 -micro. "
2043+ "use the full ubi10/ubi image for the builder stage. The "
2044+ "runtime image can still be ubi10/ubi -minimal or ubi10/ubi -micro. "
20412045 "Multi-stage means the builder bulk doesn't ship to "
20422046 "production. The perl modules are in the builder "
20432047 "only.\n \n "
@@ -2051,19 +2055,21 @@ def heading(text, size=Pt(18), color=None):
20512055 "consistency across teams, no per-team rediscovery."
20522056 )),
20532057 dict (kind = "content-code" ,
2054- title = "Worked example — libcurl from source on UBI 9 " ,
2058+ title = "Worked example — libcurl from source on UBI 10 " ,
20552059 body = [
20562060 para ("The Containerfile fragment that actually works:" ),
20572061 ],
2058- code = """# Builder stage — full UBI 9 with the 15 perl modules
2059- FROM registry.redhat.io/ubi9:9.4 AS builder
2062+ code = """# Builder stage — full UBI 10 with the 15 perl modules.
2063+ # gcc/gcc-c++ (14.3.1) come straight from the base appstream —
2064+ # no software collection, no `scl enable`; CRB is on by default.
2065+ FROM registry.access.redhat.com/ubi10/ubi:10.2 AS builder
20602066
20612067RUN dnf install -y perl-Carp perl-Data-Dumper perl-Errno \\
20622068 perl-Getopt-Long perl-Pod-Simple perl-PathTools \\
20632069 perl-File-Path perl-File-Temp perl-Digest-MD5 \\
20642070 perl-Encode perl-MIME-Base64 perl-Scalar-List-Utils \\
20652071 perl-Storable perl-Text-ParseWords perl-Thread-Queue \\
2066- gcc-toolset-14 cmake ninja-build python3-pip && \\
2072+ gcc gcc-c++ cmake ninja-build python3-pip && \\
20672073 pip install conan==2.* && dnf clean all
20682074
20692075WORKDIR /src
@@ -2075,24 +2081,27 @@ def heading(text, size=Pt(18), color=None):
20752081 cmake --build --preset release
20762082
20772083# Runtime: minimal, no perl, no compiler — just the binary
2078- FROM registry.redhat.io/ubi9 -micro:9.4
2084+ FROM registry.access. redhat.com/ubi10/ubi -micro:10.2
20792085COPY --from=builder /src/build/release/svc /usr/local/bin/svc
20802086ENTRYPOINT ["/usr/local/bin/svc"]""" ,
20812087 notes = (
20822088 "The Containerfile fragment that actually works for "
2083- "libcurl-from-source on UBI 9 . Builder stage installs "
2089+ "libcurl-from-source on UBI 10 . Builder stage installs "
20842090 "the fifteen perl modules, plus the toolchain and "
2085- "Conan 2. Then `conan install --build=missing` works "
2091+ "Conan 2. On UBI 10 the compiler is just base "
2092+ "gcc/gcc-c++ 14.3.1 — no gcc-toolset software "
2093+ "collection to enable. Then `conan install "
2094+ "--build=missing` works "
20862095 "because the dependency's configure script can find "
20872096 "all the perl modules it needs.\n \n "
2088- "Runtime stage is ubi9 -micro, no perl at all, no "
2097+ "Runtime stage is ubi10/ubi -micro, no perl at all, no "
20892098 "compiler. Just the binary we copy from the builder. "
20902099 "Final image is tens of megabytes, not hundreds. "
20912100 "Builder image is large but only exists in your build "
20922101 "cache, not in production registries.\n \n "
20932102 "This appendix exists because every team that goes "
2094- "from Ubuntu to UBI 9 hits this. The Ubuntu base "
2095- "images include a fuller perl by default; UBI 9 is "
2103+ "from Ubuntu to UBI hits this. The Ubuntu base "
2104+ "images include a fuller perl by default; UBI is "
20962105 "more aggressive about minimization. The first time "
20972106 "your Conan build fails on a missing perl-Errno "
20982107 "module is when you realize what's going on. Save "
0 commit comments