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

docs: autoinstall tutorial #1708

Merged
merged 15 commits into from Jul 13, 2023
Merged

Conversation

dbungert
Copy link
Collaborator

@dbungert dbungert commented Jul 7, 2023

I think much of this content should be moved into other sections, but as a start I'm bringing in the existing autoinstall doc into rst format. I couldn't help with some editorial improvements along the way, if that becomes a problem I'll resplit.

Deviations from existing autoinstall doc:

  • quick start page not listed yet, we don't have that in rst yet
  • reference to autoinstall-generator dropped - that project needs some help
  • Interactions between Autoinstall and Cloud-init section rewritten
  • possible future direction section dropped, we should consider a proper roadmap but it surely doesn't need to be in a tutorial

Note that the docs are written assuming that they are housing all ubuntu install documentation, but is only starting with autoinstall. I don't know if that will be awkward when we cut over.

Copy link
Collaborator

@mwhudson mwhudson left a comment

Choose a reason for hiding this comment

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

Looks like a good start

doc/tutorial/intro-to-autoinstall.rst Outdated Show resolved Hide resolved
Copy link
Member

@ogayot ogayot left a comment

Choose a reason for hiding this comment

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

nice work!

A minimal autoinstall configuration is:

.. code-block:: yaml

Copy link
Member

Choose a reason for hiding this comment

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

I'm a bit torn on providing examples without the #cloud-config + autoinstall key when we explicitly suggest to use the cloud-init approach. I know it's boilerplate so we probably don't want to repeat the same thing over and over in the examples.

Maybe a little reminder before or after the examples for people tempted to copy-paste? Something like:

/!\ Remember to add the #cloud-config header and place the configuration within an autoinstall section if you are using the cloud-init approach.

#cloud-config
autoinstall:
  < place the autoinstall configuration here >

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A goal I have for the doc overhaul is to reduce people sending autoinstall as cloud-config, so I think something like this would help reduce it. I'm not sure I want the "Remember to add" part all the time, but to just have 99% of the autoinstall snippets (pretty much all of them except the case showing the non-cloud-init path in this document) just always include

#cloud-config
autoinstall:

might well help reduce that confusion.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So yes, I like the suggestion very much, but think I want to skip the reminder part and just include the above 2 lines in yaml samples.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

I think having a warning at the top where you introduce the #cloud-config and autoinstall lines would achieve the same thing (see my comment around line 64) - any user who wants to use that method will have their attention drawn to the fact that these lines are necessary - but having the lines also included in the examples is a great idea in case users try to copy/paste directly. A tutorial should be foolproof, so if we give them examples to try they shouldn't be able to fail with them if they follow the instructions.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I'm erring on the side of foolproof. We have adequate user evidence that there is a lot of user confusion on this point. I'd normally prefer the shorter code sample.

Something I've debated doing is to allow direct specification of the autoinstall.yaml file to be in Cloud config data format - if autoinstall is the only top level directive, then this is simply handled subiquity side. But what if there are other cloud-config top level keys? I think Subiquity should warn or error in that case, as those aren't going to be processed.

If we did that, then 100% of the time it would be possible to just copy-paste the code sample in Cloud config data format and get a working result, regardless of if providing the data with the help of cloud-init or with modified install media.

Add 'autoinstall' to your kernel command line to avoid this


Continue with autoinstall? (yes|no)
Copy link
Member

Choose a reason for hiding this comment

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

Nothing to do here but I wish we'd stop the install if the user types "no". Right now, it keeps asking the same question again until you type "yes" (at least in dry-run)

Copy link
Contributor

@s-makin s-makin left a comment

Choose a reason for hiding this comment

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

Overall it's a really good basis. I would definitely recommend having a separate tutorial for each of the suggested methods; using this page as the introduction, you could then divert users early on towards the tutorial they need in order to avoid confusion that might arise from the two being presented together.

doc/conf.py Show resolved Hide resolved
doc/reference/autoinstall-reference.rst Outdated Show resolved Hide resolved
doc/reference/index.rst Outdated Show resolved Hide resolved
doc/tutorial/index.rst Outdated Show resolved Hide resolved
doc/tutorial/intro-to-autoinstall.rst Outdated Show resolved Hide resolved
doc/tutorial/intro-to-autoinstall.rst Outdated Show resolved Hide resolved
doc/tutorial/intro-to-autoinstall.rst Outdated Show resolved Hide resolved
doc/tutorial/intro-to-autoinstall.rst Show resolved Hide resolved
A minimal autoinstall configuration is:

.. code-block:: yaml

Copy link
Contributor

Choose a reason for hiding this comment

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

I think having a warning at the top where you introduce the #cloud-config and autoinstall lines would achieve the same thing (see my comment around line 64) - any user who wants to use that method will have their attention drawn to the fact that these lines are necessary - but having the lines also included in the examples is a great idea in case users try to copy/paste directly. A tutorial should be foolproof, so if we give them examples to try they shouldn't be able to fail with them if they follow the instructions.

doc/tutorial/intro-to-autoinstall.rst Outdated Show resolved Hide resolved
dbungert and others added 2 commits July 7, 2023 10:08
Co-authored-by: Sally <sally.makin@canonical.com>
Co-authored-by: Sally <sally.makin@canonical.com>
dbungert and others added 2 commits July 7, 2023 10:39
Co-authored-by: Sally <sally.makin@canonical.com>
Co-authored-by: Sally <sally.makin@canonical.com>
doc/conf.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

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

@dbungert this looks really good. I think the only thing I'd like to see is a bit more explicit content describing that cloud-init runs in both ephmeral and at first boot and a pointer to the honored cloud-init cloud-conifg module schema directives

Given that this is a tutorial, do you plan on having a section in a later pull request that actually walks someone through the cmdline to download live ISO, launch python3 -m http.server with nocloud user-data containing autoinstall: #cloud-config directives via kernel cmdline? Maybe that's the quickstart you referred to as a followup (out of scope for this PR).

doc/tutorial/intro-to-autoinstall.rst Outdated Show resolved Hide resolved
doc/tutorial/intro-to-autoinstall.rst Outdated Show resolved Hide resolved
doc/tutorial/intro-to-autoinstall.rst Outdated Show resolved Hide resolved
doc/tutorial/intro-to-autoinstall.rst Outdated Show resolved Hide resolved
@dbungert
Copy link
Collaborator Author

dbungert commented Jul 7, 2023

Given that this is a tutorial, do you plan on having a section in a later pull request that actually walks someone through the cmdline to download live ISO, launch python3 -m http.server with nocloud user-data containing autoinstall: #cloud-config directives via kernel cmdline? Maybe that's the quickstart you referred to as a followup (out of scope for this PR).

Yes, I see what you mention as a proper tutorial and what I'm referring to as a quickstart above.

When I sat down to bring https://ubuntu.com/server/docs/install/autoinstall into rtd/diataxis, I read the entire doc attempting to view it like a first time reader, and realized that much of it didn't really fit an introduction or tutorial in the diataxis sense. I was a bit paralyzed wondering what to do about it.

To split the problem a bit, I first wanted to just get the document kind-of as-is into rtd/diataxis, and sort out the tutorial versus other 3 categories problem later. Also, if we can cut over the existing docs to diataxis, it will be mentally easier to add new content.

So I really wanted to import the introduction, with most of the warts in place, rather than trying to build out a tutorial I liked better and deal with moving all the rest of the content to their proper locations.

I started the reference document largely as an exercise in learning how the ref links work.

Copy link
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

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

LGTM! thanks for the text and context around this iteration of the refactor. +1

Copy link
Contributor

@s-makin s-makin left a comment

Choose a reason for hiding this comment

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

Good changes! Found a few teeny nits, but otherwise LGTM :)

doc/tutorial/intro-to-autoinstall.rst Outdated Show resolved Hide resolved
doc/tutorial/intro-to-autoinstall.rst Outdated Show resolved Hide resolved
doc/tutorial/intro-to-autoinstall.rst Outdated Show resolved Hide resolved
doc/tutorial/intro-to-autoinstall.rst Outdated Show resolved Hide resolved
Co-authored-by: Sally <sally.makin@canonical.com>
@dbungert dbungert merged commit 7476600 into canonical:main Jul 13, 2023
10 checks passed
@dbungert dbungert deleted the docs-autoinstall-tutorial branch July 13, 2023 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants