Skip to content

Commit

Permalink
new butane variant fedora-iot
Browse files Browse the repository at this point in the history
this is same as r4e variant
Docs added to include the new variant
Release notes updated with the new feature

Signed-off-by: Sayan Paul <[email protected]>
  • Loading branch information
say-paul committed Sep 6, 2023
1 parent f100629 commit b13dc89
Show file tree
Hide file tree
Showing 7 changed files with 529 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ 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("rhcos", "0.1.0", unsupportedRhcosVariant)
}

Expand Down
143 changes: 143 additions & 0 deletions docs/config-fiot-v1_0.md

Large diffs are not rendered by default.

146 changes: 146 additions & 0 deletions docs/config-fiot-v1_1.md

Large diffs are not rendered by default.

148 changes: 148 additions & 0 deletions docs/config-fiot-v1_2-exp.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ key](https://getfedora.org/security/).
openshift 4.14.0-exp)_
- Require `storage.filesystems.path` to start with `/etc` or `/var` if
`with_mount_unit` is true _(fcos 1.6.0-exp, openshift 4.14.0-exp)_
- Add new variant `fiot` for fedora-iot

### Bug fixes

Expand Down
78 changes: 78 additions & 0 deletions docs/upgrading-fiot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
title: Fedora-iot
parent: Upgrading configs
nav_order: 4
---

# Upgrading Fedora iot configs

Occasionally, changes are made to Fedora-iot Butane configs (those that specify `variant: fiot`) that break backward compatibility. While this is not a concern for running machines, since Ignition only runs one time during first boot, it is a concern for those who maintain configuration files. This document serves to detail each of the breaking changes and tries to provide some reasoning for the change. This does not cover all of the changes to the spec - just those that need to be considered when migrating from one version to the next.

{: .no_toc }

1. TOC
{:toc}

## From Version 1.0.0 to Version 1.1.0

There are no breaking changes between versions 1.0.0 and 1.1.0 of the `fiot` configuration specification. Any valid 1.0.0 configuration can be updated to a 1.1.0 configuration by changing the version string in the config.

The following is a list of notable new features.

### Special mode bits supported

The `mode` field of the `files` and `directories` sections now respects the setuid, setgid, and sticky bits. Previous spec versions ignore these bits.

<!-- butane-config -->
```yaml
variant: fiot
version: 1.1.0
storage:
files:
- path: /usr/local/bin/setuid
mode: 04755
contents:
source: https://rootkit.example.com/setuid
directories:
- path: /var/local/tmp
mode: 01777
```
### AWS S3 access point ARN support
The sections which allow fetching a remote URL now accept AWS S3 access point ARNs (`arn:aws:s3:<region>:<account>:accesspoint/<accesspoint>/object/<path>`) in the `source` field.

<!-- butane-config -->
```yaml
variant: fiot
version: 1.1.0
storage:
files:
- path: /etc/example
mode: 0644
contents:
source: arn:aws:s3:us-west-1:123456789012:accesspoint/test/object/some/path
```

### Local SSH key and systemd unit references

SSH keys and systemd units are now embeddable via file references to local files. The specified path is relative to a local _files-dir_, specified with the `-d`/`--files-dir` option to Butane. If no _files-dir_ is specified, this functionality is unavailable.

<!-- butane-config -->
```yaml
variant: fiot
version: 1.1.0
systemd:
units:
- name: example.service
contents_local: example.service
- name: example-drop-in.service
dropins:
- name: example-drop-in.conf
contents_local: example.conf
passwd:
users:
- name: core
ssh_authorized_keys_local:
- id_rsa.pub
```
10 changes: 10 additions & 0 deletions internal/doc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,16 @@ func generate(dir string) error {
{"1.1.0", iot1_1.Config{}},
},
},
{
"Fedora-iot",
"fiot",
[]version{
// inverse order of website navbar
{"1.2.0-experimental", iot1_2_exp.Config{}},
{"1.0.0", iot1_0.Config{}},
{"1.1.0", iot1_1.Config{}},
},
},
}

// parse and snakify Ignition components
Expand Down

0 comments on commit b13dc89

Please sign in to comment.