-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docs #3
Conversation
bc3e595
to
d370c83
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial pass
README.md
Outdated
main, non-exported code | ||
|
||
base/ | ||
`base/` | ||
Contains distro-agnostic code. Each package here targets only one Ignition | ||
spec verions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s,verions,version,g
@@ -15,27 +20,27 @@ versions of the base and distro components that compose it. However a major | |||
or minor bump of either component necesitates a corresponding bump in the fcos | |||
config version. | |||
|
|||
internal/ | |||
`internal/` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that changing these from bullets has removed the line-break + tab on the descriptions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While that wasn't intentional, I think I'm ok with how it renders.
docs/examples.md
Outdated
- key1 | ||
``` | ||
|
||
This example modifies the existing `core` user, giving it a known password hash (this will enable login via password), and setting its ssh key. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Ignition docs have the description of the example above the example, should we follow that pattern?
docs/examples.md
Outdated
- key3 | ||
``` | ||
|
||
This example will create two users, `user1` and `user2`. The first user has a password set and two ssh public keys authorized to log in as the user. The second user doesn't have a password set (so log in via password will be disabled), but have one ssh key. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s,but have one ssh key,but has one ssh key,g
docs/examples.md
Outdated
- key3 | ||
``` | ||
|
||
This example will create two users, `user1` and `user2`. The first user has a password set and two ssh public keys authorized to log in as the user. The second user doesn't have a password set (so log in via password will be disabled), but have one ssh key. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might read better to use the actual usernames instead of first user or second user.
docs/getting-started.md
Outdated
@@ -0,0 +1,37 @@ | |||
# Getting started | |||
|
|||
fcct is a tool that will consume a Fedora CoreOS Config and produce a JSON file that can be given to a Fedora CoreOS machine when it first boots to set the machine up. Using this config, a machine can be told to create users, create filesystems, set up the network, install systemd units, and more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe configure the machine
instead of set the machine up
?
docs/getting-started.md
Outdated
|
||
To see some examples for what else ct can do, head over to the [examples][3]. | ||
|
||
[1]: configuration-v1_0.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: use named anchors over numbered ones for ease of maintenance later on when potentially referencing the same section
docs/getting-started.md
Outdated
|
||
Fedora CoreOS Configs are YAML files conforming to fcct's schema. For more information on the schema, take a look at [doc/configuration-v1_0.md][1]. | ||
|
||
As a simple example, let's use ct to set the authorized ssh key for the core user on a Fedora CoreOS machine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s,ct,fcct,g
docs/getting-started.md
Outdated
{"ignition":{"config":{"replace":{"source":null,"verification":{}}},"security":{"tls":{}},"timeouts":{},"version":"3.0.0"},"passwd":{"users":[{"name":"core","sshAuthorizedKeys":["ssh-rsa ssh-rsa AAAAB3NzaC1yc..."]}]},"storage":{},"systemd":{}} | ||
``` | ||
|
||
We can see that it produces a JSON file. This file isn't intended to be human-friendly, and will definitely be a pain to read/edit (especially if you have multi-line things like systemd units). Luckily, you shouldn't have to care about this file! Just provide it to a booting Fedora CoreOS machine and Ignition, the utility inside of Fedora CoreOS that receives this file, will know what to do with it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth turning Ignition into a link to the repo?
docs/getting-started.md
Outdated
|
||
The method by which this file is provided to a Fedora CoreOS machine depends on the environment in which the machine is running. For instructions on a given provider, head over to the [list of supported platforms for Ignition][2]. | ||
|
||
To see some examples for what else ct can do, head over to the [examples][3]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s,ct,fcct,g
docs/configuration-v1_0.md
Outdated
The Fedora CoreOS configuration is a YAML document conforming to the following specification, with **_italicized_** entries being optional: | ||
|
||
* **variant** (string): must be `fcos` | ||
* **version** (string): the sematic version of the spec for this document. This document is for version `1.0.0` and generates Ignition configs with version `3.0.0`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
semantic
docs/configuration-v1_0.md
Outdated
|
||
The Fedora CoreOS configuration is a YAML document conforming to the following specification, with **_italicized_** entries being optional: | ||
|
||
* **variant** (string): must be `fcos` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing period for consistency
docs/getting-started.md
Outdated
|
||
Fedora CoreOS Configs are YAML files conforming to `fcct`'s schema. For more information on the schema, take a look at [doc/configuration-v1_0.md][spec]. | ||
|
||
As a simple example, let's use `fcct` to set the authorized ssh key for the core user on a Fedora CoreOS machine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
core
user
docs/getting-started.md
Outdated
|
||
As a simple example, let's use `fcct` to set the authorized ssh key for the core user on a Fedora CoreOS machine. | ||
|
||
```yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yaml fedora-coreos-config
|
||
In this above file, you'll want to set the `ssh-rsa AAAAB3NzaC1yc...` line to be your ssh public key (which is probably the contents of `~/.ssh/id_rsa.pub`, if you're on Linux). | ||
|
||
If we take this file and give it to `fcct`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we start by explaining how to download it?
docs/getting-started.md
Outdated
|
||
The method by which this file is provided to a Fedora CoreOS machine depends on the environment in which the machine is running. For instructions on a given provider, head over to the [list of supported platforms for Ignition][supported-platforms]. | ||
|
||
To see some examples for what else `ct` can do, head over to the [examples][examples]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fcct
docs/examples.md
Outdated
@@ -0,0 +1,184 @@ | |||
# Examples | |||
|
|||
Here you can find a bunch of simple examples for using fcct, with some explanations about what they do. The examples here are in no way comprehensive, for a full list of all the options present in ct check out the [configuration specification][spec]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
present in fcct
docs/examples.md
Outdated
- key1 | ||
``` | ||
|
||
This example will create two users, `user1` and `user2`. The `user1` has a password set and two ssh public keys authorized to log in as the user. `user2` doesn't have a password set (so log in via password will be disabled), but has one ssh key. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
login via password
docs/examples.md
Outdated
|
||
## Users and groups | ||
|
||
This example modifies the existing `core` user, giving it a known password hash (this will enable login via password), and setting its ssh key. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're disabling password auth by default (coreos/fedora-coreos-tracker#138) so these won't actually work.
docs/examples.md
Outdated
version: 1.0.0 | ||
systemd: | ||
units: | ||
- name: etcd-member.service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use a service we ship in the OS.
Fixed, added blurb on downloading/verifying fcct (although there's no releases to download yet), dropped everything related to password login, and swapped the example dropin to something useful (autologin on ttyS0) |
docs/getting-started.md
Outdated
@@ -0,0 +1,50 @@ | |||
# Getting started | |||
|
|||
`fcct`, the Fedora CoreOS Config Transpiler is a tool that consumes a Fedora CoreOS Config and produces an Ignition config, which is a JSON document that can be given to a Fedora CoreOS machine when it first boots. Using this config, a machine can be told to create users, create filesystems, set up the network, install systemd units, and more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Transpiler,
docs/examples.md
Outdated
- name: autologin.conf | ||
contents: | | ||
[Service] | ||
TTYVTDisallocate=no |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad indentation.
This is just the Ignition doc with irrelevant bits removed and version and variant added.
This is mostly copied from the CL getting started guide.
Add some example fcc files
Add an explainer blurb that points to better docs, convert to markdown.
Fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
cc @bgilbert @arithx