You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-184
Original file line number
Diff line number
Diff line change
@@ -3,183 +3,9 @@
3
3

4
4
5
5
This is a prototype compatibility checking tool. Right now our aim is to use in the context of
6
-
[these build matrices](https://github.com/rse-ops/lammps-matrix) for LAMMPS and these prototype [specifications](https://github.com/supercontainers/compspec) that are based off of [Proposal C](https://github.com/opencontainers/wg-image-compatibility/pull/8) of the Compatibility Working Group. This is experimental because all of that is subject (and likely) to change.
7
-
8
-
## Design
9
-
10
-
The design is based on the prototype from that pull request, shown below.
This has a better structure for inspecting easily (only the top of the file is shown):
120
-
121
-
<details>
122
-
123
-
<summary>Kernel JSON output</summary>
124
-
125
-
```json
126
-
{
127
-
"extractors": {
128
-
"kernel": {
129
-
"sections": {
130
-
"boot": {
131
-
"BOOT_IMAGE": "/boot/vmlinuz-6.1.0-1028-oem",
132
-
"quiet": "",
133
-
"ro": "",
134
-
"root": "UUID",
135
-
"splash": "",
136
-
"vt.handoff": "7"
137
-
},
138
-
"config": {
139
-
"CONFIG_104_QUAD_8": "m",
140
-
"CONFIG_60XX_WDT": "m",
141
-
"CONFIG_64BIT": "y",
142
-
"CONFIG_6LOWPAN": "m"
143
-
}
144
-
}
145
-
}
146
-
}
147
-
}
148
-
```
149
-
150
-
</details>
151
-
152
-
An extractor is made up of sections, and you can ask for parsing just a specific one.
153
-
154
-
```bash
155
-
./bin/compspec extract --name kernel[config]
156
-
```
157
-
```console
158
-
⭐️ Running extract...
159
-
--Result for kernel
160
-
-- Section boot
161
-
root: UUID
162
-
ro:
163
-
quiet:
164
-
splash:
165
-
vt.handoff: 7
166
-
BOOT_IMAGE: /boot/vmlinuz-6.1.0-1028-oem
167
-
Extraction has run!
168
-
```
169
-
170
-
To ask for more than one, it's a comma separated list.
171
-
172
-
```bash
173
-
./bin/compspec extract --name kernel[config,boot]
174
-
```
175
-
176
-
The ordering of your list is honored.
177
-
178
-
## Developer
179
-
180
-
Note that there is a [developer environment](.devcontainer) that provides a consistent version of Go, etc.
181
-
However, it won't work with all extractors. Note that for any command that uses a plugin (e.g., `extract` and `check`)
6
+
[these build matrices](https://github.com/rse-ops/lammps-matrix) for LAMMPS and these prototype [specifications](https://github.com/supercontainers/compspec) that are based off of [Proposal C](https://github.com/opencontainers/wg-image-compatibility/pull/8) of the Compatibility Working Group. This is experimental because all of that is subject (and likely) to change. This project is under development, and you can see our [docs](docs) for early documentation.
182
7
8
+
- ⭐️ [Documentation](docs) ⭐️
183
9
184
10
### Limitations
185
11
@@ -188,6 +14,8 @@ However, it won't work with all extractors. Note that for any command that uses
188
14
189
15
## TODO
190
16
17
+
- metadata namespace and exposure: someone writing a spec to create an artifact needs to know the extract namespace (and what is available) for the mapping.
18
+
- tests: matrix that has several different flavors of builds, generating compspec json output to validate generation and correctness
191
19
- likely we want a common configuration file to take an extraction -> check recipe
192
20
- need to develop check plugin family
193
21
- todo thinking around manifest.yaml that has listing of images / artifacts
@@ -197,16 +25,8 @@ However, it won't work with all extractors. Note that for any command that uses
197
25
A `*` indicates required for the work / prototype I want to do
198
26
199
27
- power usage data [valorium](https://ipo.llnl.gov/sites/default/files/2023-08/Final_variorum-rnd-100-award.pdf)
The compatibility tool is responsible for extracting information about a system, and comparing the host metadata to a contender container image to determine if it is compatible. This is a two step process that includes:
4
+
5
+
1. Extracting metadata about the container image at build time
6
+
2. Extracting metadata about the host at image selection time, and comparing against a set of contender container images to select the best one.
7
+
8
+
## Definitions
9
+
10
+
### Extractor
11
+
12
+
An **extractor** is a core plugin that knows how to retrieve metadata about a host. An extractor is ususally going to be run for two cases:
13
+
14
+
1. During CI to extract (and save) metadata about a particular build to put in a compatibility artifact.
15
+
2. During image selection to extract information about the host to compare to.
16
+
17
+
Examples extractors could be "library" or "system."
18
+
19
+
### Section
20
+
21
+
A **section** is a group of metadata within an extractor. For example, within "library" a section is for "mpi." This allows a user to specify running the `--name library[mpi]` extractor to ask for the mpi section of the library family. Another example is under kernel.
22
+
The user might want to ask for more than one group to be extracted and might ask for `--name kernel[boot,config]`. Section basically provides more granularity to an extractor namespace. For the above two examples, the metadata generated would be organized like:
23
+
24
+
```
25
+
library
26
+
mpi.<attribute>
27
+
kernel
28
+
config.<attribute>
29
+
boot.<attribute>
30
+
```
31
+
32
+
For the above, right now I am implementing extractors generally, or "wild-westy" in the sense that the namespace is oriented toward the extractor name and sections it owns (e.g., no community namespaces like archspec, spack, opencontainers, etc). This is subject to change depending on the design the working group decides on.
33
+
34
+
### Creator
35
+
36
+
A creator is a plugin that is responsible for creating an artifact that includes some extracted metadata. The creator is agnostic to what it it being asked to generate in the sense that it just needs a mapping. The mapping will be from the extractor namespace to the compatibility artifact namespace. For our first prototype, this just means asking for particular extractor attributes to map to a set of annotations that we want to dump into json. To start there should only be one creator plugin needed, however if there are different structures of artifacts needed, I could imagine more. An example creation specification for a prototype experiment where we care about architecture, MPI, and GPU is provided in [examples](examples).
37
+
38
+
## Overview
39
+
40
+
The design is based on the prototype from that pull request, shown below.
0 commit comments