Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
243 lines (230 loc) · 20.7 KB
/
Copy pathindex.html
File metadata and controls
243 lines (230 loc) · 20.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Runtime Conditions Profile Guide</title>
<meta name="description" content="Why Runtime Conditions exists, and a complete profile example, in one place." />
<link rel="canonical" href="https://runtimeconditions.io/" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Runtime Conditions Profile Guide" />
<meta property="og:description" content="Why Runtime Conditions exists, and a complete profile example, in one place." />
<meta property="og:url" content="https://runtimeconditions.io/" />
<meta property="og:site_name" content="Runtime Conditions" />
<meta property="og:image" content="https://runtimeconditions.io/assets/social-card.jpg" />
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:alt" content="Runtime Conditions logo: declare what your app needs to run." />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Runtime Conditions Profile Guide" />
<meta name="twitter:description" content="Why Runtime Conditions exists, and a complete profile example, in one place." />
<meta name="twitter:image" content="https://runtimeconditions.io/assets/social-card.jpg" />
<meta name="twitter:image:alt" content="Runtime Conditions logo: declare what your app needs to run." />
<link rel="icon" type="image/svg+xml" href="assets/runtime-conditions-icon.svg" />
<link rel="icon" type="image/png" sizes="32x32" href="assets/icon-32.png" />
<link rel="apple-touch-icon" href="assets/apple-touch-icon.png" />
<link rel="stylesheet" href="assets/styles.css" />
<script src="assets/theme.js"></script>
</head>
<body>
<header class="site-header">
<div class="header-inner">
<a class="brand" href="index.html"><img class="brand-logo" src="assets/runtime-conditions-logo.svg" width="165" height="56" alt="Runtime Conditions"></a>
<nav class="top-links" aria-label="Top links">
<a href="https://github.com/runtimeconditions/spec/blob/main/docs/sixth-draft.md" data-tip="Read the latest draft of the specification" target="_blank" rel="noopener noreferrer"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"/><path d="M14 3v5h5"/><path d="M9 13h6"/><path d="M9 17h6"/></svg><span>Current Draft</span></a>
<a href="https://github.com/runtimeconditions/rc-demos/blob/main/README.md" data-tip="Run Runtime Conditions end to end on your own machine" target="_blank" rel="noopener noreferrer"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="10"/><polygon points="10 8 16 12 10 16 10 8"/></svg><span>Run Demo</span></a>
<a href="reference.html" data-tip="See where each part of this guide comes from in the source repositories"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M3 6l6-3 6 3 6-3v15l-6 3-6-3-6 3z"/><path d="M9 3v15"/><path d="M15 6v15"/></svg><span>Source Map</span></a>
<a href="https://extensions.runtimeconditions.io/" data-tip="Browse every extension and its Go, Python, TypeScript and Java packages" target="_blank" rel="noopener noreferrer"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M21 8l-9-5-9 5 9 5 9-5z"/><path d="M3 8v8l9 5 9-5V8"/><path d="M12 13v8"/></svg><span>Registry</span></a>
<a class="social-link social-github" href="https://github.com/runtimeconditions" data-tip="Browse the Runtime Conditions repositories on GitHub" target="_blank" rel="noopener noreferrer"><svg class="nav-icon" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" focusable="false"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg><span class="visually-hidden">GitHub</span></a>
<a class="social-link social-slack" href="https://cloud-native.slack.com/archives/C0C0R4M65FZ" data-tip="Join the conversation on the CNCF Slack" target="_blank" rel="noopener noreferrer"><svg class="nav-icon" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" focusable="false"><path class="slack-red" d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313z"/><path class="slack-blue" d="M8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312z"/><path class="slack-green" d="M18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312z"/><path class="slack-yellow" d="M15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"/></svg><span class="visually-hidden">Slack</span></a>
</nav>
</div>
</header>
<div class="guide-layout">
<aside class="sidebar" aria-label="Guide chapters">
<p class="sidebar-title">Reader Guide</p>
<ol class="chapter-list">
<li><a aria-current="page" href="index.html"><span class="num">00</span><span>Start here</span></a></li>
<li><a href="concepts.html"><span class="num">01</span><span>Core concepts</span></a></li>
<li><a href="spec.html"><span class="num">02</span><span>Profile shape</span></a></li>
<li><a href="developers.html"><span class="num">03</span><span>Code to profile</span></a></li>
<li><a href="extensions.html"><span class="num">04</span><span>Extensions</span></a></li>
<li><a href="cli.html"><span class="num">05</span><span>rc CLI</span></a></li>
<li><a href="platform.html"><span class="num">06</span><span>Adapters</span></a></li>
<li><a href="demo.html"><span class="num">07</span><span>Run the demo</span></a></li>
<li><a href="reference.html"><span class="num">08</span><span>Reference</span></a></li>
<li><a href="faq.html"><span class="num">09</span><span>FAQ</span></a></li>
</ol>
</aside>
<main class="content">
<p class="chapter-label">Start here</p>
<h1 class="page-title">A guide to Runtime Conditions Profiles.</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.
</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>
<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>
</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>
</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>
<footer class="footer">
<div class="footer-inner">
<div class="footer-brand">
<a class="footer-logo" href="index.html"><img src="assets/runtime-conditions-logo.svg" width="141" height="48" alt="Runtime Conditions"></a>
<p>A machine-readable way for developers to declare what an app needs to run, so the platform can provide it.</p>
<div class="footer-social">
<a class="social-link social-github" href="https://github.com/runtimeconditions" aria-label="Runtime Conditions on GitHub" target="_blank" rel="noopener noreferrer"><svg class="nav-icon" viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true" focusable="false"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg></a>
<a class="social-link social-slack" href="https://cloud-native.slack.com/archives/C0C0R4M65FZ" aria-label="Runtime Conditions on the CNCF Slack" target="_blank" rel="noopener noreferrer"><svg class="nav-icon" viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true" focusable="false"><path class="slack-red" d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313z"/><path class="slack-blue" d="M8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312z"/><path class="slack-green" d="M18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312z"/><path class="slack-yellow" d="M15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"/></svg></a>
</div>
</div>
<nav class="footer-col" aria-label="Guide">
<h2>Guide</h2>
<ul>
<li><a href="index.html">Start here</a></li>
<li><a href="concepts.html">Core concepts</a></li>
<li><a href="spec.html">Profile shape</a></li>
<li><a href="developers.html">Code to profile</a></li>
<li><a href="cli.html">rc CLI</a></li>
<li><a href="faq.html">FAQ</a></li>
</ul>
</nav>
<nav class="footer-col" aria-label="Project">
<h2>Project</h2>
<ul>
<li><a href="https://github.com/runtimeconditions/spec/blob/main/docs/sixth-draft.md" target="_blank" rel="noopener noreferrer">Current draft</a></li>
<li><a href="https://extensions.runtimeconditions.io/" target="_blank" rel="noopener noreferrer">Extension registry</a></li>
<li><a href="https://github.com/runtimeconditions/rc-demos/blob/main/README.md" target="_blank" rel="noopener noreferrer">Run the demo</a></li>
<li><a href="reference.html">Source map</a></li>
</ul>
</nav>
<nav class="footer-col" aria-label="Community">
<h2>Community</h2>
<ul>
<li><a href="https://github.com/runtimeconditions" target="_blank" rel="noopener noreferrer">GitHub</a></li>
<li><a href="https://cloud-native.slack.com/archives/C0C0R4M65FZ" target="_blank" rel="noopener noreferrer">CNCF Slack</a></li>
<li><a href="https://github.com/runtimeconditions/runtimeconditions.github.io/issues" target="_blank" rel="noopener noreferrer">Improve this guide</a></li>
</ul>
</nav>
</div>
<div class="footer-bottom">
<span>© 2026 Runtime Conditions contributors.</span>
<span>Runtime Conditions is seeking adoption by an established parent project.</span>
</div>
</footer>
<script src="assets/syntax.js" defer></script>
</body>
</html>