Skip to content
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

Merged
merged 4 commits into from
Jul 10, 2019
Merged

Add docs #3

merged 4 commits into from
Jul 10, 2019

Conversation

ajeddeloh
Copy link
Contributor

@ajeddeloh ajeddeloh force-pushed the add-docs branch 3 times, most recently from bc3e595 to d370c83 Compare July 8, 2019 23:22
Copy link
Contributor

@arithx arithx left a 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.
Copy link
Contributor

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/`
Copy link
Contributor

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.

Copy link
Contributor Author

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.
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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.

@@ -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.
Copy link
Contributor

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?


To see some examples for what else ct can do, head over to the [examples][3].

[1]: configuration-v1_0.md
Copy link
Contributor

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


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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s,ct,fcct,g

{"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.
Copy link
Contributor

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?


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].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s,ct,fcct,g

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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

semantic


The Fedora CoreOS configuration is a YAML document conforming to the following specification, with **_italicized_** entries being optional:

* **variant** (string): must be `fcos`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing period for consistency


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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

core user


As a simple example, let's use `fcct` to set the authorized ssh key for the core user on a Fedora CoreOS machine.

```yaml
Copy link
Contributor

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`:
Copy link
Contributor

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?


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].
Copy link
Contributor

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].
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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
Copy link
Contributor

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.

@ajeddeloh
Copy link
Contributor Author

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)

@@ -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.
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bad indentation.

Andrew Jeddeloh added 4 commits July 10, 2019 12:53
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.
@ajeddeloh
Copy link
Contributor Author

Fixed

Copy link
Contributor

@bgilbert bgilbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ajeddeloh ajeddeloh merged commit 0e3ecf0 into master Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants