Skip to content

Commit

Permalink
decoupling r4e and fiot
Browse files Browse the repository at this point in the history
  • Loading branch information
say-paul committed Sep 7, 2023
1 parent b13dc89 commit 9fd761d
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 240 deletions.
5 changes: 2 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ func init() {
RegisterTranslator("r4e", "1.0.0", iot1_0.ToIgn3_3Bytes)
RegisterTranslator("r4e", "1.1.0", iot1_1.ToIgn3_4Bytes)
RegisterTranslator("r4e", "1.2.0-experimental", iot1_2_exp.ToIgn3_5Bytes)
RegisterTranslator("fiot", "1.0.0", iot1_0.ToIgn3_3Bytes)
RegisterTranslator("fiot", "1.1.0", iot1_1.ToIgn3_4Bytes)
RegisterTranslator("fiot", "1.2.0-experimental", iot1_2_exp.ToIgn3_5Bytes)
RegisterTranslator("fiot", "1.0.0", iot1_1.ToIgn3_4Bytes)
RegisterTranslator("fiot", "1.1.0-experimental", iot1_2_exp.ToIgn3_5Bytes)
RegisterTranslator("rhcos", "0.1.0", unsupportedRhcosVariant)
}

Expand Down
19 changes: 11 additions & 8 deletions docs/config-fiot-v1_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ The Fedora-iot configuration is a YAML document conforming to the following spec
<div id="spec-docs"></div>

* **variant** (string): used to differentiate configs for different operating systems. Must be `%VARIANT%` for this specification.
* **version** (string): the semantic version of the spec for this document. This document is for version `%VERSION%` and generates Ignition configs with version `3.3.0`.
* **version** (string): the semantic version of the spec for this document. This document is for version `%VERSION%` and generates Ignition configs with version `3.4.0`.
* **_ignition_** (object): metadata about the configuration itself.
* **_config_** (object): options related to the configuration.
* **_merge_** (list of objects): a list of the configs to be merged to the current config.
* **_source_** (string): the URL of the config. Supported schemes are `http`, `https`, `tftp`, `s3`, `gs`, and [`data`](https://tools.ietf.org/html/rfc2397). When using `http`, it is advisable to use the verification option to ensure the contents haven't been modified. Mutually exclusive with `inline` and `local`.
* **_source_** (string): the URL of the config. Supported schemes are `http`, `https`, `tftp`, `s3`, `arn`, `gs`, and [`data`](https://tools.ietf.org/html/rfc2397). When using `http`, it is advisable to use the verification option to ensure the contents haven't been modified. Mutually exclusive with `inline` and `local`.
* **_inline_** (string): the contents of the config. Mutually exclusive with `source` and `local`.
* **_local_** (string): a local path to the contents of the config, relative to the directory specified by the `--files-dir` command-line argument. Mutually exclusive with `source` and `inline`.
* **_compression_** (string): the type of compression used on the config (null or gzip). Compression cannot be used with S3.
Expand All @@ -27,7 +27,7 @@ The Fedora-iot configuration is a YAML document conforming to the following spec
* **_verification_** (object): options related to the verification of the config.
* **_hash_** (string): the hash of the config, in the form `<type>-<value>` where type is either `sha512` or `sha256`. If `compression` is specified, the hash describes the decompressed config.
* **_replace_** (object): the config that will replace the current.
* **_source_** (string): the URL of the config. Supported schemes are `http`, `https`, `tftp`, `s3`, `gs`, and [`data`](https://tools.ietf.org/html/rfc2397). When using `http`, it is advisable to use the verification option to ensure the contents haven't been modified. Mutually exclusive with `inline` and `local`.
* **_source_** (string): the URL of the config. Supported schemes are `http`, `https`, `tftp`, `s3`, `arn`, `gs`, and [`data`](https://tools.ietf.org/html/rfc2397). When using `http`, it is advisable to use the verification option to ensure the contents haven't been modified. Mutually exclusive with `inline` and `local`.
* **_inline_** (string): the contents of the config. Mutually exclusive with `source` and `local`.
* **_local_** (string): a local path to the contents of the config, relative to the directory specified by the `--files-dir` command-line argument. Mutually exclusive with `source` and `inline`.
* **_compression_** (string): the type of compression used on the config (null or gzip). Compression cannot be used with S3.
Expand All @@ -42,7 +42,7 @@ The Fedora-iot configuration is a YAML document conforming to the following spec
* **_security_** (object): options relating to network security.
* **_tls_** (object): options relating to TLS when fetching resources over `https`.
* **_certificate_authorities_** (list of objects): the list of additional certificate authorities (in addition to the system authorities) to be used for TLS verification when fetching over `https`. All certificate authorities must have a unique `source`, `inline`, or `local`.
* **_source_** (string): the URL of the certificate bundle (in PEM format). The bundle can contain multiple concatenated certificates. Supported schemes are `http`, `https`, `tftp`, `s3`, `gs`, and [`data`](https://tools.ietf.org/html/rfc2397). When using `http`, it is advisable to use the verification option to ensure the contents haven't been modified. Mutually exclusive with `inline` and `local`.
* **_source_** (string): the URL of the certificate bundle (in PEM format). The bundle can contain multiple concatenated certificates. Supported schemes are `http`, `https`, `tftp`, `s3`, `arn`, `gs`, and [`data`](https://tools.ietf.org/html/rfc2397). When using `http`, it is advisable to use the verification option to ensure the contents haven't been modified. Mutually exclusive with `inline` and `local`.
* **_inline_** (string): the contents of the certificate bundle (in PEM format). The bundle can contain multiple concatenated certificates. Mutually exclusive with `source` and `local`.
* **_local_** (string): a local path to the contents of the certificate bundle (in PEM format), relative to the directory specified by the `--files-dir` command-line argument. The bundle can contain multiple concatenated certificates. Mutually exclusive with `source` and `inline`.
* **_compression_** (string): the type of compression used on the certificate bundle (null or gzip). Compression cannot be used with S3.
Expand All @@ -60,7 +60,7 @@ The Fedora-iot configuration is a YAML document conforming to the following spec
* **path** (string): the absolute path to the file.
* **_overwrite_** (boolean): whether to delete preexisting nodes at the path. `contents` must be specified if `overwrite` is true. Defaults to false.
* **_contents_** (object): options related to the contents of the file.
* **_source_** (string): the URL of the file. Supported schemes are `http`, `https`, `tftp`, `s3`, `gs`, and [`data`](https://tools.ietf.org/html/rfc2397). When using `http`, it is advisable to use the verification option to ensure the contents haven't been modified. If source is omitted and a regular file already exists at the path, Ignition will do nothing. If source is omitted and no file exists, an empty file will be created. Mutually exclusive with `inline` and `local`.
* **_source_** (string): the URL of the file. Supported schemes are `http`, `https`, `tftp`, `s3`, `arn`, `gs`, and [`data`](https://tools.ietf.org/html/rfc2397). When using `http`, it is advisable to use the verification option to ensure the contents haven't been modified. If source is omitted and a regular file already exists at the path, Ignition will do nothing. If source is omitted and no file exists, an empty file will be created. Mutually exclusive with `inline` and `local`.
* **_inline_** (string): the contents of the file. Mutually exclusive with `source` and `local`.
* **_local_** (string): a local path to the contents of the file, relative to the directory specified by the `--files-dir` command-line argument. Mutually exclusive with `source` and `inline`.
* **_compression_** (string): the type of compression used on the file (null or gzip). Compression cannot be used with S3.
Expand All @@ -70,7 +70,7 @@ The Fedora-iot configuration is a YAML document conforming to the following spec
* **_verification_** (object): options related to the verification of the file.
* **_hash_** (string): the hash of the file, in the form `<type>-<value>` where type is either `sha512` or `sha256`. If `compression` is specified, the hash describes the decompressed file.
* **_append_** (list of objects): list of fragments to be appended to the file. Follows the same structure as `contents`.
* **_source_** (string): the URL of the fragment. Supported schemes are `http`, `https`, `tftp`, `s3`, `gs`, and [`data`](https://tools.ietf.org/html/rfc2397). When using `http`, it is advisable to use the verification option to ensure the contents haven't been modified. Mutually exclusive with `inline` and `local`.
* **_source_** (string): the URL of the fragment. Supported schemes are `http`, `https`, `tftp`, `s3`, `arn`, `gs`, and [`data`](https://tools.ietf.org/html/rfc2397). When using `http`, it is advisable to use the verification option to ensure the contents haven't been modified. Mutually exclusive with `inline` and `local`.
* **_inline_** (string): the contents of the fragment. Mutually exclusive with `source` and `local`.
* **_local_** (string): a local path to the contents of the fragment, relative to the directory specified by the `--files-dir` command-line argument. Mutually exclusive with `source` and `inline`.
* **_compression_** (string): the type of compression used on the fragment (null or gzip). Compression cannot be used with S3.
Expand All @@ -79,7 +79,7 @@ The Fedora-iot configuration is a YAML document conforming to the following spec
* **_value_** (string): the header contents.
* **_verification_** (object): options related to the verification of the fragment.
* **_hash_** (string): the hash of the fragment, in the form `<type>-<value>` where type is either `sha512` or `sha256`. If `compression` is specified, the hash describes the decompressed fragment.
* **_mode_** (integer): the file's permission mode. Setuid/setgid/sticky bits are not supported. If not specified, the permission mode for files defaults to 0644 or the existing file's permissions if `overwrite` is false, `contents` is unspecified, and a file already exists at the path.
* **_mode_** (integer): the file's permission mode. Setuid/setgid/sticky bits are supported. If not specified, the permission mode for files defaults to 0644 or the existing file's permissions if `overwrite` is false, `contents` is unspecified, and a file already exists at the path.
* **_user_** (object): specifies the file's owner.
* **_id_** (integer): the user ID of the owner.
* **_name_** (string): the user name of the owner.
Expand All @@ -89,7 +89,7 @@ The Fedora-iot configuration is a YAML document conforming to the following spec
* **_directories_** (list of objects): the list of directories to be created. Every file, directory, and link must have a unique `path`.
* **path** (string): the absolute path to the directory.
* **_overwrite_** (boolean): whether to delete preexisting nodes at the path. If false and a directory already exists at the path, Ignition will only set its permissions. If false and a non-directory exists at that path, Ignition will fail. Defaults to false.
* **_mode_** (integer): the directory's permission mode. Setuid/setgid/sticky bits are not supported. If not specified, the permission mode for directories defaults to 0755 or the mode of an existing directory if `overwrite` is false and a directory already exists at the path.
* **_mode_** (integer): the directory's permission mode. Setuid/setgid/sticky bits are supported. If not specified, the permission mode for directories defaults to 0755 or the mode of an existing directory if `overwrite` is false and a directory already exists at the path.
* **_user_** (object): specifies the directory's owner.
* **_id_** (integer): the user ID of the owner.
* **_name_** (string): the user name of the owner.
Expand All @@ -116,14 +116,17 @@ The Fedora-iot configuration is a YAML document conforming to the following spec
* **_enabled_** (boolean): whether or not the service shall be enabled. When true, the service is enabled. When false, the service is disabled. When omitted, the service is unmodified. In order for this to have any effect, the unit must have an install section.
* **_mask_** (boolean): whether or not the service shall be masked. When true, the service is masked by symlinking it to `/dev/null`. When false, the service is unmasked by deleting the symlink to `/dev/null` if it exists.
* **_contents_** (string): the contents of the unit. Mutually exclusive with `contents_local`.
* **_contents_local_** (string): a local path to the contents of the unit, relative to the directory specified by the `--files-dir` command-line argument. Mutually exclusive with `contents`.
* **_dropins_** (list of objects): the list of drop-ins for the unit. Every drop-in must have a unique `name`.
* **name** (string): the name of the drop-in. This must be suffixed with ".conf".
* **_contents_** (string): the contents of the drop-in. Mutually exclusive with `contents_local`.
* **_contents_local_** (string): a local path to the contents of the drop-in, relative to the directory specified by the `--files-dir` command-line argument. Mutually exclusive with `contents`.
* **_passwd_** (object): describes the desired additions to the passwd database.
* **_users_** (list of objects): the list of accounts that shall exist. All users must have a unique `name`.
* **name** (string): the username for the account.
* **_password_hash_** (string): the hashed password for the account.
* **_ssh_authorized_keys_** (list of strings): a list of SSH keys to be added as an SSH key fragment at `.ssh/authorized_keys.d/ignition` in the user's home directory. All SSH keys must be unique.
* **_ssh_authorized_keys_local_** (list of strings): a list of local paths to SSH key files, relative to the directory specified by the `--files-dir` command-line argument, to be added as SSH key fragments at `.ssh/authorized_keys.d/ignition` in the user's home directory. All SSH keys must be unique. Each file may contain multiple SSH keys, one per line.
* **_uid_** (integer): the user ID of the account.
* **_gecos_** (string): the GECOS field of the account.
* **_home_dir_** (string): the home directory of the account.
Expand Down
4 changes: 2 additions & 2 deletions docs/config-fiot-v1_2-exp.md → docs/config-fiot-v1_1-exp.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# This file is automatically generated from internal/doc and Ignition's
# config/doc. Do not edit.
title: Fedora-iot v1.2.0-experimental
title: Fedora-iot v1.1.0-experimental
parent: Configuration specifications
nav_order: 250
---

# Fedora-iot Specification v1.2.0-experimental
# Fedora-iot Specification v1.1.0-experimental

**Note: This configuration is experimental and has not been stabilized. It is subject to change without warning or announcement.**

Expand Down
Loading

0 comments on commit 9fd761d

Please sign in to comment.