Skip to content

Commit 9b79573

Browse files
committed
Checking in base code before renaming from Atym to ocre
1 parent 8acc225 commit 9b79573

54 files changed

Lines changed: 874 additions & 9 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

_config.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ destination: _site
1212
favicon_ico: "/assets/images/favicon.png"
1313
logo: "/assets/images/logo.png"
1414
# Misc
15-
heading_anchors: true
1615
enable_copy_code_button: true
1716
permalink: pretty
1817

18+
# Heading anchors/TOC
19+
heading_anchors: true
20+
toc: true
21+
1922
### Defaults paths/content types
2023
defaults:
2124
- scope:
@@ -98,6 +101,8 @@ aux_links:
98101
# Back to top link
99102
back_to_top: true
100103
back_to_top_text: "Back to top"
104+
# Enable or disable the previous/next buttons (may need to update all pages with "nav_order" to work)
105+
#show_previous_next: true
101106

102107
# Copyright/license stuff
103108
footer_content: 'Copyright &copy; 2024 Contributors to Project Ocre, which has been established as <a href="https://lfedge.org/projects/ocre"> Project Ocre a Series of LF Projects</a>, LLC. Distributed by an <a href="https://github.com/project-ocre/project-ocre.github.io/blob/main/LICENSE.txt">Apache 2.0 License.</a>'
177 KB
Loading
82.9 KB
Loading
203 KB
Loading
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
layout: default
3+
title: Binary Objects (Optional)
4+
parent: Components
5+
nav_order: 2
6+
---
7+
8+
Atym containers can optionally include binary objects as part of the container image. These are additional resources that can be referenced by the WebAssembly module during execution.
9+
10+
Common use cases for binary objects include:
11+
12+
* Storing images or sound files
13+
* Incorporating pre-trained AI/ML models
14+
* Including any other form of binary data required by the application
15+
16+
This feature allows developers to package necessary non-executable resources alongside their application code, enhancing the container's functionality and self-sufficiency while maintaining a clear separation between executable code and static data.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
layout: default
3+
title: Container Configuration
4+
parent: Components
5+
nav_order: 1
6+
---
7+
8+
9+
The container configuration defines how a container should be run on the device. It provides essential metadata that dictates the behavior of the container, including parameters like environment variables, entry points, and permissions. These configurations ensure that containers operate within defined constraints and have access only to necessary system resources.
10+
11+
---
12+
13+
### Example:
14+
```json
15+
{
16+
"architecture": "amd64",
17+
"os": "nubix",
18+
"config": {
19+
"Entrypoint": "on_init",
20+
"Environment": [
21+
"VAR1=value1",
22+
"VAR2=value2"
23+
],
24+
"Permissions": [
25+
"filesystem",
26+
"http",
27+
"i2c",
28+
"gpio"
29+
]
30+
}
31+
}
32+
```
33+
### Configuration Parameters
34+
35+
The elements within the container configuration are defined as follows:
36+
37+
#### Required:
38+
- `architecture` (*string*): CPU architecture of the binaries in this image; this value MUST be set to **wasm**. This parameter also supports an optional variant value. For example, `thumbv4`.
39+
- `os` (*string*): Operating system which this image is built to run on; this MUST be **nubix**.
40+
- `config` (*object*): Specifies the parameters used for execution
41+
- `EntryPoint`: The WASM function to call on container start.
42+
- `Environment`: Array of variables to set in the container environment.
43+
- `Permissions`: Aarray of permissions granted to the container.
44+
45+
#### Optional:
46+
- `os.version`: Specify version of the operating system.
47+
- `os.features` Specify os-specific features.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
layout: default
3+
title: Components
4+
parent: Containers
5+
has_children: true
6+
nav_order: 0
7+
---
8+
9+
# Container Components
10+
11+
Atym containers are designed to bring cloud-native principles to embedded devices, combining efficiency with flexibility. Each container is a self-contained unit that encapsulates an application and its dependencies, structured to optimize performance and resource usage on constrained hardware.
12+
13+
![](atym_container.png)
14+
15+
An Atym container consists of **three** main elements, which are defined and organized within a **[Container Image Manifest](../container_image_manifest/)**:
16+
17+
- **[WebAssembly Module:](../components/webassembly_module/)** The core executable portion of the container, compiled from the developer's chosen language.
18+
- **[Container Configuration:](../components/container_configuration/)** Metadata including the application name, execution properties, variables, and permissions.
19+
- **[Binary Objects:](../components/binary_objects/)** Optional resources that can be referenced by the WebAssembly module. Examples include machine learning models, configuration files, or any other data needed by the application.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
layout: default
3+
title: WebAssembly Modules
4+
parent: Components
5+
nav_order: 0
6+
---
7+
8+
# WebAssembly Modules
9+
10+
Atym containers use [WebAssembly (WASM)](https://webassembly.org/) modules as the format for executable code. These modules are stateless binaries compiled to run on the WASM virtual machine.
11+
12+
Modules can either be pure WebAssembly or Ahead-of-Time (AOT) compiled binaries optimized for a specific platform target. In general, the Atym Orchestration Hub will automatically AOT compile modules on-demand based on the architecture of the deployment target. However, there are instances where a pure WASM binary may be preferred.
13+
14+
**Note:** Currently, only a single WASM module is supported per container image. However, we are exploring extending this to support multiple modules and/or components via the WebAssembly Component Model.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
layout: default
3+
title: Container Image Manifest
4+
parent: Containers
5+
nav_order: 1
6+
---
7+
8+
9+
The Container Image Manifest is a crucial component of Atym containers, providing a comprehensive description of the container's structure and contents. It serves as the blueprint that defines and references the three main elements of an Atym container described in the [Components](../components/index.md) section. The manifest ensures that all components can be correctly deployed and executed by the [Atym Runtime](../../runtime).
10+
11+
Atym container images follow the [Open Container Initiative (OCI)](https://opencontainers.org/) format where possible, with some modifications to support the needs of constrained, embedded devices. The manifest format is modeled after the [OCI Image Manifest](https://github.com/opencontainers/image-spec/blob/main/manifest.md) format and conforms to the [Wasm OCI Artifact](https://tag-runtime.cncf.io/wgs/wasm/deliverables/wasm-oci-artifact/) layout specifications. This structure ensures that all components of the container are properly defined, versioned, and can be efficiently managed in resource-constrained environments.
12+
13+
---
14+
15+
### Example
16+
17+
Here's an example of an Atym Container Image Manifest:
18+
19+
```json
20+
{
21+
"schemaVersion": 2,
22+
"mediaType": "application/vnd.oci.image.manifest.v1+json",
23+
"config": {
24+
"mediaType": "application/vnd.atym.image.config.v1+json",
25+
"digest": "sha256:32b81b11f15ea9c198d59e143b2a5f15446b50b8954ce2e6cfab959988271c78",
26+
"size": 341
27+
},
28+
"layers": [
29+
{
30+
"mediaType": "application/vnd.atym.image.v1.wasm",
31+
"digest": "sha256:6d61671e8d62f5e77ed054c2d3df4dc9b31e3c74fee7d478f3f2bbdc99a6f256",
32+
"size": 330
33+
},
34+
{
35+
"mediaType": "application/vnd.atym.image.v1.blob",
36+
"digest": "sha256:201ef6570d2967b299cf5ab8f946f061d5db523c106bc90f72729693b798f431",
37+
"size": 709
38+
}
39+
]
40+
}
41+
```
42+
43+
### Configuration Parameters
44+
45+
The elements within the container configuration are defined as follows:
46+
47+
#### Required:
48+
- `schemaVersion` (*int*): Image manifest schema version; per the OCI Image Spec this
49+
MUST be **2**.
50+
- `mediaType` (*string*): Required type of this manifest file. For Atym containers, this MUST be
51+
**application/vnd.nubixio.image.manifest.v1+json**.
52+
- `config` (*object*): References the configuration object for this container image. Schema follows the [OCI Content Descriptor schema](https://github.com/opencontainers/image-spec/blob/main/descriptor.md). It has the
53+
following restrictions:
54+
- `mediaType` must be set to **application/vnd.nubixio.image.config.v1+json**.
55+
- `layers` (*array*): List of elements that comprise this container image. Each layer is a descriptor. One and only one layer MUST be of type **application/vnd.nubixio.image.layer.v1.wasm** or **application/vnd.nubixio.image.layer.v1.wasm+aot**.
314 KB
Loading

0 commit comments

Comments
 (0)