canonical / open-documentation-academy

Learn open-source software documentation skills with Canonical
https://canonical.com/documentation
Apache License 2.0
48 stars 30 forks source link

LXD: Add `lxc config device override` to the docs #16

Closed ru-fu closed 2 months ago

ru-fu commented 4 months ago

Documentation: https://documentation.ubuntu.com/lxd/en/latest/ GitHub repo: https://github.com/canonical/lxd Contribution guide: https://documentation.ubuntu.com/lxd/en/latest/contributing/


The LXD documentation has a section about configuring devices that explains how you can add a device and configure it. However, there is a special command to modify devices that are inherited from a profile, namely lxc config device override.

We should add this command and some explanation on when it should be used to the "Configure devices" section (for CLI, API, and UI).

MCoooo commented 4 months ago

Hi @ru-fu , I'm interested taking the plunge with this one. However I would need novice guidance :).

ru-fu commented 4 months ago

Hi @MCoooo - great, thanks for your interest!

And sure, please ask about anything that's unclear.

The first step for this task would be to read up a bit on LXD, mainly about devices and profiles, and try to determine where you think this new information should go. And then the next step would be to jump right in and do the required changes! If you're familiar with Git, you can do them directly on the LXD repo, otherwise we can find an easier way to get them in. :)

MCoooo commented 2 months ago

Hi @ru-fu - apologies for the lack of activity.

I've finally done some reading and playing with LXD and the doc system.

I could not find any associated behaviour in API or UI so my initial proposed changes are a little under whelming. I've attempted to go the Git route. Would you like to review my fork before I try a PR or should I just send.

Fork is here: https://github.com/MCoooo/lxd/tree/oda-issue16-dev-override

As much feedback as you wish is welcome :)

ru-fu commented 2 months ago

Thanks @MCoooo ! That looks really good already! :slightly_smiling_face: And don't worry about the changes seeming underwhelming - it's very usual in documentation that you spend a lot of time reading up and researching, maybe even writing a lot of content, figuring out the right place for the update, and in the end you realise you only need to add a sentence or two. It might look like a small change, but that doesn't mean it's quick and easy!

I think you picked the right spot for your addition, and it looks good as it is! Two small suggestions you could consider:

And yes, I think you're ready to open a PR then! :rocket: One thing that will be required to get it in is that you sign off your commit - see https://documentation.ubuntu.com/lxd/en/latest/contributing/#developer-certificate-of-origin You can do that by using git commit -s (instead of just git commit), or by just manually adding the line to your commit message.

ru-fu commented 2 months ago

Oh, and you're totally correct about the API and UI - in the API, you use the same command for overriding the options as for setting them, so there is no update needed. And the UI guides you through what you need to do, so no need to document this.

MCoooo commented 2 months ago

Thank you for the feedback, much appreciated.

I have made another attempt via https://github.com/canonical/lxd/pull/13418

Let me know if further polishing needed :)

ru-fu commented 2 months ago

Thanks a lot, @MCoooo ! This has now been merged. :)

https://documentation.ubuntu.com/lxd/en/latest/howto/instances_configure/#configure-devices