Skip to content

Commit

Permalink
STP-3533: Change command prompts to match docs-csm
Browse files Browse the repository at this point in the history
Signed-off-by: Jessica Dehn <jessica.dehn@hpe.com>
  • Loading branch information
jld-dehn-hpe committed Sep 1, 2023
1 parent 2fcdcf0 commit 8763435
Show file tree
Hide file tree
Showing 19 changed files with 489 additions and 321 deletions.
4 changes: 2 additions & 2 deletions docs/about_sat/command_authentication.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# SAT Command Authentication

Some SAT subcommands make requests to the Shasta services through the API
Some SAT subcommands make requests to the HPE Cray EX services through the API
gateway and thus require authentication to the API gateway in order to function.
Other SAT subcommands use the Kubernetes API. Some `sat` commands require S3 to
be configured. In order to use the SAT S3 bucket, the System Administrator must
generate the S3 access key and secret keys and write them to a local file. This
must be done on every Kubernetes manager node where SAT commands are run.
must be done on every Kubernetes control plane node where SAT commands are run.

For more information on authentication requests, see *System Security and
Authentication* in the [*Cray System Management
Expand Down
4 changes: 2 additions & 2 deletions docs/about_sat/dependencies.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# SAT Dependencies

Most `sat` subcommands depend on services or components from other products in the
HPE Cray EX (Shasta) software stack. The following list shows these dependencies
for each subcommand. Each service or component is listed under the product it belongs to.
HPE Cray EX software stack. The following list shows these dependencies for each
subcommand. Each service or component is listed under the product it belongs to.

## `sat auth`

Expand Down
87 changes: 48 additions & 39 deletions docs/about_sat/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ are reported through Redfish.
- [Grafana Fabric RFC3635 Dashboard](../dashboards/SAT_Grafana_Dashboards.md#grafana-fabric-rfc3635-dashboard)

In CSM 1.3 and newer, the `sat` command is automatically available on all the
Kubernetes NCNs. For more information, see [SAT in CSM](sat_in_csm.md). Older
Kubernetes worker nodes. For more information, see [SAT in CSM](sat_in_csm.md). Older
versions of CSM do not have the `sat` command automatically available, and SAT
must be installed as a separate product.

Expand All @@ -38,7 +38,7 @@ instruction on the SAT Container Environment.

### SAT Command Line Utility

The primary component of the System Admin Toolkit (SAT) is a command-line utility run from Kubernetes manager nodes
The primary component of the System Admin Toolkit (SAT) is a command-line utility run from Kubernetes control plane nodes
(`ncn-m` nodes).

It is designed to assist administrators with common tasks, such as troubleshooting and querying information about the
Expand All @@ -54,32 +54,37 @@ have their own set of options.
### SAT Container Environment

The `sat` command-line utility runs in a container using Podman, a daemonless container runtime. SAT runs on
Kubernetes manager nodes. A few important points about the SAT container environment include the following:
Kubernetes control plane nodes. A few important points about the SAT container environment include the following:

- Using either `sat` or `sat bash` always launches a container.
- The SAT container does not have access to the NCN file system.

There are two ways to run sat.
There are two ways to run `sat`.

- **Interactive**: Launching a container using `sat bash`, followed by a `sat` command.
- **Non-interactive**: Running a `sat` command directly on a Kubernetes manager node.
- **Non-interactive**: Running a `sat` command directly on a Kubernetes control plane node.

In both of these cases, a container is launched in the background to execute the command. The first option, running
`sat bash` first, gives an interactive shell, at which point `sat` commands can be run. In the second option, the
container is launched, executes the command, and upon the command's completion the container exits. The following two
examples show the same action, checking the system status, using interactive and non-interactive modes.
examples show the same action, checking the system status, using both modes.

#### Interactive
(`ncn-m001#`) Here is an example using interactive mode:

```screen
ncn-m001# sat bash
(CONTAINER-ID)sat-container# sat status
```bash
sat bash
```

#### Non-interactive
(`(CONTAINER-ID)sat-container#`) Example `sat` command after a container is launched:

```screen
ncn-m001# sat status
```bash
sat status
```

(`ncn-m001#`) Here is an example using non-interactive mode:

```bash
sat status
```

#### Interactive Advantages
Expand All @@ -95,48 +100,52 @@ several steps that need to be executed from a management NCN.

#### Man Pages - Interactive and Non-interactive Modes

To view a `sat` man page from a Kubernetes manager node, use `sat-man` on the manager node as shown in the following
example.
To view a `sat` man page from a Kubernetes control plane node, use `sat-man` on the manager node.

(`ncn-m001#`) Here is an example:

```screen
ncn-m001# sat-man status
```bash
sat-man status
```

A man page describing the SAT container environment is available on the Kubernetes manager nodes, which can be viewed
A man page describing the SAT container environment is available on the Kubernetes control plane nodes, which can be viewed
either with `man sat` or man `sat-podman` from the manager node.

```screen
ncn-m001# man sat
(`ncn-m001#`) Here are examples:

```bash
man sat
```

```screen
ncn-m001# man sat-podman
```bash
man sat-podman
```

## Command Prompt Conventions in SAT

The host name in a command prompt indicates where the command must be run. The account that must run the command is
also indicated in the prompt.
The host name in a command prompt indicates where the command must be run. The
user account that must run the command is also indicated in the prompt.

- The `root` or super-user account always has the `#` character at the end of the prompt and has the host name of the
host in the prompt.
- Any non-`root` account is indicated with account@hostname>. A user account that is neither `root` nor `crayadm` is
referred to as `user`.
- The command prompt inside the SAT container environment is indicated with the string as follows. It also has the "#"
character at the end of the prompt.
- The `root` or super-user account always has host name in the prompt and the
`#` character at the end of the prompt.
- Any non-root account is indicated with `account@hostname>`. A non-privileged
account is referred to as user.
- The command prompt inside the SAT container environment is indicated with the
string as follows. It also has the `#` character at the end of the prompt.

| Command Prompt | Meaning |
|----------------|---------|
| `ncn-m001#` | Run on one of the Kubernetes Manager servers. (**Non-interactive**) |
| `ncn-m001#` | Run the command as `root` on the specific Kubernetes control plane server which has this hostname (`ncn-m001` in this example). (**Non-interactive**) |
| `user@hostname>` | Run the command as any non-`root` user on the specified hostname. (**Non-interactive**) |
| `(venv) user@hostname>` | Run the command as any non-`root` user within a Python virtual environment on the specified hostname. (**Non-interactive**) |
| `(CONTAINER_ID) sat-container#` | Run the command inside the SAT container environment by first running `sat bash`. (**Interactive**) |

Here are examples of the `sat status` command used by an administrator.
These command prompts should be inserted into text before the fenced code block
instead of inside of it. This is a change from the documentation of SAT 2.5 and
earlier. Here is an example of the new use of the command prompt:

```screen
ncn-m001# sat status
```
1. (`ncn-m001#`) Example first step.

```screen
ncn-m001# sat bash
(CONTAINER_ID) sat-container# sat status
```
```bash
yes >/dev/null
```
2 changes: 1 addition & 1 deletion docs/about_sat/sat_in_csm.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SAT in CSM

In CSM 1.3 and newer, the `sat` command is automatically available on all the Kubernetes NCNs, but it is still possible
In CSM 1.3 and newer, the `sat` command is automatically available on all the Kubernetes worker nodes, but it is still possible
to install SAT as a separate product stream. Any version of SAT installed as a separate product stream overrides the
`sat` command available in CSM. Installing the SAT product stream allows additional supporting components to be added:

Expand Down
13 changes: 6 additions & 7 deletions docs/dashboards/SAT_Grafana_Dashboards.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,22 @@ The SAT Grafana Dashboards display messages that are generated by the HSN (High
Redfish. The messages are displayed based on severity.

Grafana can be accessed via web browser at the following URL:
`https://sma-grafana.cmn.<site-domain>`.

- `https://sma-grafana.cmn.<site-domain>`
(`ncn-m001:~ #`) The value of `site-domain` can be obtained as follows:

The value of `site-domain` can be obtained as follows:

```screen
ncn-m001:~ # kubectl get secret site-init -n loftsman -o jsonpath='{.data.customizations\.yaml}' | \
```bash
kubectl get secret site-init -n loftsman -o jsonpath='{.data.customizations\.yaml}' | \
base64 -d | grep "external:"
```

That command will produce the following output, for example:

```screen
```bash
external: EXAMPLE_DOMAIN.com
```

This would result in the address for Grafana being `https://sma-grafana.cmn.EXAMPLE_DOMAIN.com`
This would result in the address for Grafana being `https://sma-grafana.cmn.EXAMPLE_DOMAIN.com`.

For more information on accessing the Grafana Dashboards, refer to **Access the Grafana Monitoring UI** in the
SMA product documentation.
Expand Down
13 changes: 6 additions & 7 deletions docs/dashboards/SAT_Kibana_Dashboards.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,22 @@ node data in the forms of charts, tables and maps that display real-time Elastic
this way breaks down the complexity of large data volumes into easily understood information.

Kibana can be accessed via web browser at the following URL:
`https://sma-kibana.cmn.<site-domain>`.

- `https://sma-kibana.cmn.<site-domain>`
(`ncn-m001:~ #`) The value of `site-domain` can be obtained as follows:

The value of `site-domain` can be obtained as follows:

```screen
ncn-m001:~ # kubectl get secret site-init -n loftsman -o jsonpath='{.data.customizations\.yaml}' | \
```bash
kubectl get secret site-init -n loftsman -o jsonpath='{.data.customizations\.yaml}' | \
base64 -d | grep "external:"
```

That command will produce the following output, for example:

```screen
```bash
external: EXAMPLE_DOMAIN.com
```

This would result in the address for Kibana being `https://sma-kibana.cmn.EXAMPLE_DOMAIN.com`
This would result in the address for Kibana being `https://sma-kibana.cmn.EXAMPLE_DOMAIN.com`.

For more information on accessing the Kibana Dashboards, refer to **View Logs Via Kibana** in the SMA product
documentation.
Expand Down
Loading

0 comments on commit 8763435

Please sign in to comment.