Skip to content

Commit

Permalink
Update guide docs
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Vrachev <[email protected]>
  • Loading branch information
MVrachev committed Jun 7, 2024
1 parent c7591dc commit 288561c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 30 deletions.
55 changes: 27 additions & 28 deletions docs/source/guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,15 @@ It executes administrative commands to the Repository Service for TUF.
Administrative Commands
╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --help -h Show this message and exit. │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ceremony Bootstrap Ceremony to create initial root metadata and RSTUF config. │
│ import-artifacts Import artifacts to RSTUF from exported CSV file. │
│ metadata Metadata management. │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --api-server TEXT URL to an RSTUF API. │
│ --help -h Show this message and exit. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ceremony Bootstrap Ceremony to create initial root metadata and RSTUF config. │
│ import-artifacts Import artifacts information from exported CSV file and send it to RSTUF API deployment. │
│ metadata Metadata management. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
.. rstuf-cli-admin-ceremony
Expand All @@ -129,10 +130,10 @@ You can do the Ceremony offline. This means on a disconnected computer
Bootstrap Ceremony to create initial root metadata and RSTUF config.
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ --save -s FILENAME Write json result to FILENAME (default: 'ceremony-payload.json')
│ --help -h Show this message and exit.
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────╮
│ --out FILENAME Write output json result to FILENAME (default: 'ceremony-payload.json') │
│ --help -h Show this message and exit. │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯
There are four steps in the ceremony.

Expand Down Expand Up @@ -176,22 +177,15 @@ sign (``sign``)
❯ rstuf admin metadata sign -h
Usage: rstuf admin metadata sign [OPTIONS] [SIGNING_JSON_INPUT_FILE]
Usage: rstuf admin metadata sign [OPTIONS]
Add one signature to root metadata.
There are two ways to use this command:
1) utilizing access to the RSTUF API and signing pending metadata roles
2) provide a local file using the SIGNING_JSON_INPUT_FILE argument
When using method 2:
- 'SIGNING_JSON_INPUT_FILE' must be a file containing the JSON response from the 'GET /api/v1/metadata/sign' API endpoint.
- '--api-server' will be ignored.
- the result of the command will be saved into the 'sign-payload.json' file unless a different name is provided with '--save'.
╭─ Options ────────────────────────────────────────────────────────────────────────────────╮
│ --api-server TEXT URL to an RSTUF API.
│ --save -s FILENAME Write json result to FILENAME (default: 'sign-payload.json') │
│ --help -h Show this message and exit. │
──────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --in FILENAME Input file containing the JSON response from the 'GET /api/v1/metadata/sign' RSTUF API endpoint.
│ --out FILENAME Write output JSON result to FILENAME (default: 'sign-payload.json')
│ --help -h Show this message and exit.
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Expand Down Expand Up @@ -243,12 +237,17 @@ See the below CSV file example:
❯ rstuf admin import-artifacts -h
Usage: rstuf admin import-artifacts [OPTIONS]
Usage: rstuf admin import-artifacts [OPTIONS]
Import artifacts information from exported CSV file and send it to RSTUF API deployment.
Note: there are two additional requirements for this command:
1) sqlalchemy needs to be installed in order to use this command:
pip install repository-service-tuf[sqlalchemy,psycopg2]
Import artifacts to RSTUF from exported CSV file.
2) '--api-server' admin option or 'SERVER' in RSTUF config set
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --api-server TEXT RSTUF API URL i.e.: http://127.0.0.1 . │
│ * --db-uri TEXT RSTUF DB URI. i.e.: postgresql://postgres:[email protected]:5433 [required] │
│ * --csv TEXT CSV file to import. Multiple --csv parameters are allowed. See rstuf CLI guide for more details. [required] │
│ --skip-publish-artifacts Skip publishing artifacts in TUF Metadata. │
Expand Down
4 changes: 2 additions & 2 deletions repository_service_tuf/cli/admin/sign.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _get_pending_roles(settings: Any) -> Dict[str, Dict[str, Any]]:
"--in",
"input",
help=(
"Input ile containing the JSON response from the "
"Input file containing the JSON response from the "
"'GET /api/v1/metadata/sign' RSTUF API endpoint."
),
type=click.File("r"),
Expand All @@ -80,7 +80,7 @@ def _get_pending_roles(settings: Any) -> Dict[str, Dict[str, Any]]:
"--out",
is_flag=False,
flag_value=DEFAULT_PATH,
help=f"Write output json result to FILENAME (default: '{DEFAULT_PATH}')",
help=f"Write output JSON result to FILENAME (default: '{DEFAULT_PATH}')",
type=click.File("w"),
required=False,
)
Expand Down

0 comments on commit 288561c

Please sign in to comment.