-
Notifications
You must be signed in to change notification settings - Fork 27
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
ug: Add documentation for aktualizr-lite command line interface #734
Conversation
Docs for 5c71a19 are browsable at: https://ci.foundries.io/projects/fio-docs/builds/2715/docs/artifacts/html/index.html |
.. highlight:: bash | ||
:linenothreshold: 1 | ||
|
||
Sample bash script illustrating usage of CLI operations and return codes handling:: |
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.
I would move this script to the sotactl
repo and reference it from this doc.
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.
I was thinking about having it on a repo an also keep it in the docs, I believe it is simple enough to contribute to the docs context.
- Unable to fetch TUF metadata | ||
- *14*: Failure | ||
- TUF metadata not found in the provided path (offline mode only) | ||
- *15*: Failure |
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.
I think we need to ask someone from CS team to check if the CLI commands and return codes as explained here works for them.
I'm missing a note about stopping aklite daemon before running CLI.
|
I haven't reviewed return codes and sample script yet. |
5c71a19
to
4564d81
Compare
Docs for 4564d81 are browsable at: https://ci.foundries.io/projects/fio-docs/builds/2717/docs/artifacts/html/index.html |
4564d81
to
5e568db
Compare
Docs for 5e568db are browsable at: https://ci.foundries.io/projects/fio-docs/builds/2742/docs/artifacts/html/index.html |
5e568db
to
1548918
Compare
Docs for 1548918 are browsable at: https://ci.foundries.io/projects/fio-docs/builds/2743/docs/artifacts/html/index.html |
Fetch TUF Metadata and List Updates | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
The ``check`` command will refresh the Targets metadata from the OTA server, and present you with a list of available Targets:: |
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.
@kprosise Do you think this "refresh the Targets metadata from the OTA server" means what the command actually does?
1548918
to
9eebdc6
Compare
Docs for 9eebdc6 are browsable at: https://ci.foundries.io/projects/fio-docs/builds/2751/docs/artifacts/html/index.html |
Added note.
Added note.
We do need the daemon binary, so the build itself is not changed someone is going to use CLI. Perhaps adding something about not enabling the aklite service by default in the build? Not sure hot that can be done, will have to check it. |
9eebdc6
to
968cbee
Compare
Docs for 968cbee are browsable at: https://ci.foundries.io/projects/fio-docs/builds/2752/docs/artifacts/html/index.html |
.. note:: | ||
An update can only be performed when the original and update Targets are under the same tag. | ||
In case the Target is tagged differently, | ||
it is required to switch tags before running this command. |
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.
I would rather recommend to add the device's tag to the Target, switching tags on a device is rather the last resort.
Maybe we should remove this note at all since this is a general rule, not specific to the CLI, is applicable to any types of update.
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.
I agree. Having it here only adds uneccessary complexity to the documentation. The target would not be listed in the list
and check
commands anyway. Removing the note.
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, just minor comments.
968cbee
to
f227e91
Compare
Docs for f227e91 are browsable at: https://ci.foundries.io/projects/fio-docs/builds/2753/docs/artifacts/html/index.html |
0a1f96f
to
c9b6130
Compare
Docs for c9b6130 are browsable at: https://ci.foundries.io/projects/fio-docs/builds/2758/docs/artifacts/html/index.html |
@kprosise can you take a look? Feel free to do text adjustments and merge if no changes are required from our side. Thanks! |
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.
Made some minor suggestions, but otherwise it LGTM
|
||
sudo aktualizr-lite status | ||
|
||
Fetch TUF Metadata and List Updates |
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.
Fetch TUF Metadata and List Updates | |
Fetch :term:`TUF` Metadata and List Updates |
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.
Applied.
The ``install`` command installs the Target, which should have been previously pulled. | ||
It yields an error if the specified Target has not been pulled before, and also supports the ``--update-name`` option. | ||
|
||
It is necessary to verify the return codes for each command in order to guarantee the correct update process flow, |
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 is necessary to verify the return codes for each command in order to guarantee the correct update process flow, | |
It is necessary to verify the return codes for each command to guarantee the correct update process flow, |
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.
Applied.
^^^^^^^^^^ | ||
The commands set exit codes (``echo $?``) that can be used by the caller to act accordingly. |
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 commands set exit codes (``echo $?``) that can be used by the caller to act accordingly. | |
^^^^^^^^^^ | |
The commands set exit codes (``echo $?``) that can be used by the caller to act accordingly. |
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.
Applied.
- *130*: Failure | ||
- Installation failed and rollback operation was not successful | ||
|
||
Automating the use of CLI operations |
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.
Automating the use of CLI operations | |
Automating the use of CLI Operations |
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.
Applied.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
The individual command line interface operations, | ||
specially ``check``, ``pull``, ``install`` and ``run``, |
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.
specially ``check``, ``pull``, ``install`` and ``run``, | |
especially ``check``, ``pull``, ``install`` and ``run``, |
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.
Applied.
Command Line Interface - CLI (Aktualizr-lite Manual Mode) | ||
--------------------------------------------------------- | ||
|
||
The `aktualizr-lite` executable can be invoked to perform individual operations allowing more control over the update flow. |
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 `aktualizr-lite` executable can be invoked to perform individual operations allowing more control over the update flow. | |
The ``aktualizr-lite`` executable can be invoked to perform individual operations allowing more control over the update flow. |
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.
Applied.
and/or disabled with ``sudo systemctl disable aktualizr-lite``. | ||
|
||
.. note:: If lmp-device-register is used, | ||
the `--start-daemon 0` is recommended |
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 `--start-daemon 0` is recommended | |
Using ``--start-daemon 0`` is recommended |
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.
Applied.
|
||
.. note:: If lmp-device-register is used, | ||
the `--start-daemon 0` is recommended | ||
in order to avoid starting aktualizr-lite daemon automatically. |
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.
in order to avoid starting aktualizr-lite daemon automatically. | |
in order to avoid starting the aktualizr-lite daemon automatically. |
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.
Applied.
|
||
sudo aktualizr-lite update | ||
|
||
To update to a specific build number or target name, |
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.
To update to a specific build number or target name, | |
To update to a specific build number or Target name, |
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.
Applied.
Only choose to do so mindfully. | ||
For any update, always test before rolling out to production devices. | ||
|
||
Aktualizr-lite command line interface also allows the update steps to be performed individually, |
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.
Aktualizr-lite command line interface also allows the update steps to be performed individually, | |
The command line interface also allows the update steps to be performed individually, |
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.
Applied.
@detsch, if you could add the suggestions, if they seem appropriate, then squash the commits, I will then go ahead and merge. Thank you! |
c9b6130
to
9d9037d
Compare
Signed-off-by: Andre Detsch <[email protected]>
9d9037d
to
4502850
Compare
Thanks @kprosise! Applied all your suggestions, and rebased to the latest |
Docs for 9d9037d are browsable at: https://ci.foundries.io/projects/fio-docs/builds/2764/docs/artifacts/html/index.html |
Docs for 4502850 are browsable at: https://ci.foundries.io/projects/fio-docs/builds/2765/docs/artifacts/html/index.html |
CLI documentation update for v95.
PR Template and Checklist
Please complete as much as possible to speed up the reviewing process.
Readiness and adding reviewers as appropriate is required.
All PRs should be reviewed by a technical writer/documentation team and a peer.
If effecting customers—which is a majority of content changes—a member of Customer Success must also review.
Readiness
Overview
Why merge this PR? What does it solve?
Checklist
make linkcheck
.-s, --signoff
).-S, --gpg-sign
).Comments
Any thing else that a maintainer/reviewer should know.
This could include potential issues, rational for approach, etc.