Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 8 additions & 122 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,137 +42,23 @@
</aside>

<main class="content">
<p class="chapter-label">Start here</p>
<h1 class="page-title">A guide to Runtime Conditions Profiles.</h1>
<p class="chapter-label">Preview test</p>
<h1 class="page-title">Congrats, the preview workflow is working! 🎉</h1>
<p class="intro">
Runtime Conditions lets developers declare what an app needs to run, such as an API, a database, or a cache, in a machine-readable format. Start with a complete example, then see how a profile is written, how to generate one from your code with the <code>rc</code> CLI, and how a platform turns it into running infrastructure.
If you can read this, the <code>/preview</code> command built this pull request and served it from a temporary link. This page only exists in a test pull request and will never be merged.
</p>

<section class="section">
<h2>The short version</h2>
<p class="short">Here is the whole idea in six steps, using the example below.</p>
<h2>What this shows</h2>
<ol class="step-list">
<li><span class="step-num">1</span><div><strong>First, your app needs something.</strong><span>Maybe your app calls an HTTP API and a Redis cache.</span></div></li>
<li><span class="step-num">2</span><div><strong>With RC: you declare it in your code.</strong><span>A few lines using a package we provide. They do nothing when your app runs.</span></div></li>
<li><span class="step-num">3</span><div><strong>A tool reads your code.</strong><span>A profiler for Go, Java, Python, or TypeScript. Your app is never started.</span></div></li>
<li><span class="step-num">4</span><div><strong>Out comes a profile, automatically.</strong><span>A YAML file with names like <code>TODOS_API_URL</code> and <code>REDIS_URL</code>, and no passwords.</span></div></li>
<li><span class="step-num">5</span><div><strong>The platform team reads it.</strong><span>Now they know what to provide, with no guessing.</span></div></li>
<li><span class="step-num">6</span><div><strong>And it just works.</strong><span>In the example below, Redis is created, the API is checked, and both URLs reach your app.</span></div></li>
<li><span class="step-num">1</span><div><strong>A maintainer asked for a preview.</strong><span>The <code>/preview</code> comment was accepted because it came from someone with write access.</span></div></li>
<li><span class="step-num">2</span><div><strong>The site was built from this pull request.</strong><span>This page is the pull request's version of the home page, not the live site.</span></div></li>
<li><span class="step-num">3</span><div><strong>The link is temporary.</strong><span>It closes on its own when the time is up. Comment <code>/preview</code> again to open a new one.</span></div></li>
</ol>
</section>

<section class="section">
<h2>Example first</h2>
<div class="example">
<div class="example-title">
<span>A complete profile document</span>
<a href="developers.html">Where this comes from</a>
</div>
<pre><code>apiVersion: runtimeconditions.io/v1alpha1
kind: RuntimeConditionsProfile # Describes what a workload needs at runtime.

metadata:
name: request-logger-http

# The application these requirements belong to.
workload:
uri: github.com/runtimeconditions/rc-demos/apps/request-logger-http
version: v0.1.0

# Extensions define the Condition vocabulary and its validation rules.
# These cover integration requirements and environment-variable configuration.
extensions:
- https://runtimeconditions.io/extensions/rc/common-integrations:v1alpha2
- https://runtimeconditions.io/extensions/rc/env-configuration:v1alpha2

# Each Condition describes one runtime requirement.
conditions:
- name: todos-api
kind: api # Requirement category defined by the integration extension.
interface: # Describes the capabilities the application needs.
type: http
spec:
format: openapi
# A catalog reference to the API contract, not its deployed service URL.
uri: catalog://api/default/todos-api
version: 1.0.0
operations:
- method: GET
path: /todos/{id} # The API operation this application needs.
configuration: # Describes how connection information reaches the application.
env:
- property: baseUrl # The connection property being requested.
name: TODOS_API_URL # Variable name, not its deployed value.

- name: request-cache
kind: cache
interface:
type: key_value
engine: redis # Requires Redis; the Profile does not provision it.
configuration:
# Alternative configuration forms: URL, OR hostname AND port together.
# A platform adapter must understand and fulfill the selected form.
alternatives:
- env:
- property: url
name: REDIS_URL
- env:
- property: hostname
name: REDIS_HOST
- property: port
name: REDIS_PORT</code></pre>
</div>
<div class="note">
<p>The profile names the workload, declares the extensions needed to interpret its vocabulary, and lists runtime Conditions. It does not contain service URLs, Redis hostnames, credentials, or target-environment choices.</p>
<p>The rest of the site is unchanged, so the other chapters in the sidebar should open as usual.</p>
</div>
</section>

<section class="section">
<h2>Why this exists</h2>
<figure class="figure">
<picture>
<source srcset="assets/runtime-conditions-in-a-nutshell.webp" type="image/webp">
<img src="assets/runtime-conditions-in-a-nutshell.jpg" width="1600" height="893" loading="lazy" alt="Two panels at a shipping port. Without a label, a standard container of ice cream sits unplugged and melting while a worker looks confused, because nobody knows what it needs. With a Runtime Conditions label that says keep at minus 18 degrees and plug into power, the worker plugs it in and the ice cream stays frozen. Container means your app, label means the Runtime Conditions Profile, and port means the platform that provides the database, cache and queue.">
</picture>
<figcaption>
Docker solved how to ship the box. It didn't solve what the box needs when it arrives. Today, platforms guess, and a wrong guess only shows up once the app is running. Runtime Conditions writes the needs on the label, so nobody has to guess, and anything missing is caught at deployment, before it reaches users.
</figcaption>
</figure>
<p class="short">The knowledge about what an app needs usually lives in one person's head. Here is what changes when it is written down once.</p>
<div class="table-wrap">
<table>
<thead><tr><th></th><th>Without a profile</th><th>With a Runtime Conditions Profile</th></tr></thead>
<tbody>
<tr><td><strong>Where the needs live</strong></td><td>A developer's head, a Slack thread, an old wiki page</td><td>One YAML file, written from declarations in your code</td></tr>
<tr><td><strong>A new developer joins</strong></td><td>Someone explains it all again, from memory</td><td>They read the profile and know what the app needs</td></tr>
<tr><td><strong>The answer was in a chat</strong></td><td>It scrolled away months ago, if anyone can find it</td><td>It lives with the code, in the same repository</td></tr>
<tr><td><strong>The app changes</strong></td><td>Someone has to remember to update the wiki</td><td>The declaration changes in the same commit as the code</td></tr>
<tr><td><strong>Who works it out</strong></td><td>A platform engineer, by hand, piece by piece</td><td>Tools read it</td></tr>
<tr><td><strong>When a mistake shows up</strong></td><td>After release, in front of real users</td><td>When the profile is checked, with a clear reason</td></tr>
<tr><td><strong>The next environment (test, then production)</strong></td><td>Work it out again, a little differently each time</td><td>Every environment reads the same file</td></tr>
</tbody>
</table>
</div>
</section>

<section class="section">
<h2>Read in order</h2>
<div class="two-col">
<div class="mini-card">
<h3>First half: what the profile is</h3>
<p>Read chapters 1-5 to understand Conditions, profile shape, profiler output, extension vocabulary and packages, and the <code>rc</code> CLI.</p>
</div>
<div class="mini-card">
<h3>Second half: how it gets used</h3>
<p>Read chapters 6-8 to understand platform adapters, the working Kratix demo, and where each source file lives.</p>
</div>
</div>
</section>

<nav class="page-nav" aria-label="Page navigation">
<span></span>
<a class="page-nav-next" href="concepts.html"><small>Next</small><span>Core concepts</span></a>
</nav>
</main>
</div>

Expand Down