Skip to content

Commit

Permalink
doc: update doc for ignition flag usage
Browse files Browse the repository at this point in the history
it updates the doc to explain how the ignition flag is used. It also adds a new section under contrib where to store an example of configuration and link to the ignition website for more details about specification, mime type and other examples.
  • Loading branch information
Luca Stocchi authored and Luca Stocchi committed Oct 21, 2024
1 parent 95ea6a3 commit acae500
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
9 changes: 9 additions & 0 deletions contrib/ignition/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Ignition

Ignition uses a JSON configuration file to define the desired changes. The format of this config is specified in detail [here](https://coreos.github.io/ignition/specs/), and its [MIME type](http://www.iana.org/assignments/media-types/application/vnd.coreos.ignition+json) is registered with IANA.

`myconfig.json` file provides an example of configuration that adds a new `testuser`, creates a new file to `/etc/myapp` with the content listed in the same `files` section and add a systemd unit drop-in to modify the existing service `systemd-journald` and sets its environment variable SYSTEMD_LOG_LEVEL to debug.

### Examples

More examples can be found at https://coreos.github.io/ignition/examples/
31 changes: 31 additions & 0 deletions contrib/ignition/myconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"ignition": {
"version": "3.0.0"
},
"passwd": {
"users": [
{
"name": "testuser",
"sshAuthorizedKeys": [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO43Z9aRPvvj1zMib/Hh4oWX+MuOPXdFChFMaWfishLj"
]
}
]
},
"storage": {
"files": [{
"path": "/etc/someconfig",
"mode": 420,
"contents": { "source": "data:,example%20file%0A" }
}]
},
"systemd": {
"units": [{
"name": "systemd-journald.service",
"dropins": [{
"name": "debug.conf",
"contents": "[Service]\nEnvironment=SYSTEMD_LOG_LEVEL=debug"
}]
}]
}
}
15 changes: 15 additions & 0 deletions doc/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -460,3 +460,18 @@ Proper use of this flag may look similar to the following section of a command:
```bash
--device virtio-input,keyboard --device virtio-input,pointing --device virtio-gpu,width=1920,height=1080 --gui
```

### Ignition

#### Description

The `--ignition` option allows you to specify a configuration file for Ignition. Vfkit will open a vsock connection between the host and the guest and start a lightweight HTTP server to push the configuration file to Ignition.

You can find example configurations and more details about Ignition at https://coreos.github.io/ignition/

#### Example

This command provisions the configuration file to Ignition on the guest
```
--ignition configuration-path
```

0 comments on commit acae500

Please sign in to comment.