Skip to content

Commit

Permalink
docs: remove not needed OS tabbing (#335)
Browse files Browse the repository at this point in the history
* docs: remove not needed OS tabbing

* docs: fix color and add admin warning

* docs(reference): add -config to table
  • Loading branch information
bwendlandt-intel authored Sep 25, 2023
1 parent 9acbab2 commit 66eba02
Show file tree
Hide file tree
Showing 9 changed files with 101 additions and 199 deletions.
4 changes: 3 additions & 1 deletion docs/GetStarted/buildRPC.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,14 @@ If you are building an executable on a development system, you will copy the exe

3. Confirm a successful build:

RPC must run with elevated privileges. Commands require `sudo` on Linux or an Administrator Command Prompt on Windows.

=== "Linux"
``` bash
sudo ./rpc version
```
=== "Windows"
``` bash
```
.\rpc version
```
=== "Docker (On Linux Host Only)"
Expand Down
11 changes: 3 additions & 8 deletions docs/Reference/Certificates/generateProvisioningCert.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,9 @@ First, we need to prepare two files:
The new hash should be listed.
=== "Linux"
``` bash
sudo ./rpc amtinfo -cert
```
=== "Windows"
```
.\rpc amtinfo -cert
```
```
rpc amtinfo -cert
```
!!! success "Success - Hash Inserted Correctly"
<figure class="figure-image">
Expand Down
2 changes: 2 additions & 0 deletions docs/Reference/RPC/buildRPC_Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ Developed in Go* programming language, the Remote Provisioning Client (RPC) appl

2. Confirm a successful build:

RPC must run with elevated privileges. Commands require `sudo` on Linux or an Administrator Command Prompt on Windows.

=== "Linux"
``` bash
sudo ./rpc version
Expand Down
120 changes: 46 additions & 74 deletions docs/Reference/RPC/commandsRPC.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,14 @@
On the managed device, a Remote Provisioning Client (RPC) communicates with the Remote Provision Server (RPS) in the process of activating or deactivating the device. In addition to activation and deactivation, the RPC provides informational and maintenance commands.

## List Commands
On the managed device, open a Terminal (Linux) or Powershell/Command Prompt **as Administrator** (Windows).

RPC must run with elevated privileges. Commands require `sudo` on Linux or an Administrator Command Prompt on Windows.

Run the RPC application on the command line with no arguments to see supported commands:

=== "Linux"
``` bash
sudo ./rpc
```
=== "Windows"
```
.\rpc.exe
```
```
rpc
```

| COMMAND | DESCRIPTION | EXAMPLE |
|-----------------------------|---------------------------------------------------------------------------------------------|--------------------------------------------------------------|
Expand All @@ -29,42 +25,47 @@ Run the RPC application on the command line with no arguments to see supported c

Run the application with a command to see available options for the command:

=== "Linux"
``` bash
sudo ./rpc [COMMAND]
```
=== "Windows"
```
.\rpc [COMMAND]
```
```
rpc [COMMAND]
```

### activate

#### Activate and Configure the device using RPS:

Activate the device with a specified profile:

=== "Linux"
``` bash
sudo ./rpc activate -u wss://server/activate -profile profilename
```
=== "Windows"
```
.\rpc activate -u wss://server/activate -profile profilename
```
```
rpc activate -u wss://server/activate -profile profilename
```

#### Activate the device locally:

This capability is only supported for activating unprovisioned (e.g. pre-provisioning state) devices. This command **only** activates AMT. It does not do profile-based configuration.

=== "CCM"
```
rpc activate -local -ccm -amtPassword NewAMTPassword
rpc activate -local -ccm -password NewAMTPassword
```
=== "ACM"
```
rpc activate -local -acm -amtPassword NewAMTPassword -provisioningCert "{BASE64_PROV_CERT}" -provivisioningCertPwd certPassword
```
=== "ACM w/ Config File"
Options can be passed via a config file. This can also be combined into a single config file with [addwifisettings](#addwifisettings) information.

=== "YAML"
```yaml title="config.yaml"
acmactivate:
amtPassword: 'P@ssw0rd'
provisioningCert: 'BASE64_PROV_CERT'
provivisioningCertPwd: 'CertP@ssw0rd'
```

Example Command
```
rpc activate -local -acm -config config.yaml
```

<br>

Expand Down Expand Up @@ -102,6 +103,7 @@ This capability is only supported for activating unprovisioned (e.g. pre-provisi
| -acm | Flag for ACM Local Activation. |
| -amtPassword string | New AMT Password to set on device. |
| -ccm | Flag for CCM Local Activation. |
| -config | File path of a `.yaml` file with desired ACM configuration. |
| -local | Execute command to AMT directly without cloud interaction. |
| -provisioningCert Base64 string | Base64 Encoded String of the `.pfx` provisioning certificate. |
| -provisioningCertPwd string | Password of provisioning certificate. |
Expand Down Expand Up @@ -194,14 +196,9 @@ Execute a maintenance command for the managed device:

Change the AMT password. A random password is generated by default if `static` option is not passed.

=== "Linux"
``` bash
sudo ./rpc maintenance changepassword -u wss://server/maintenance
```
=== "Windows"
```
.\rpc maintenance changepassword -u wss://server/maintenance
```
```
rpc maintenance changepassword -u wss://server/maintenance
```

| OPTION | DESCRIPTION |
|---------|-------------------------|
Expand All @@ -213,44 +210,29 @@ Change the AMT password. A random password is generated by default if `static` o

Syncs the host OS clock to AMT.

=== "Linux"
``` bash
sudo ./rpc maintenance syncclock -u wss://server/maintenance
```
=== "Windows"
```
.\rpc maintenance syncclock -u wss://server/maintenance
```
```
rpc maintenance syncclock -u wss://server/maintenance
```

<br>

#### synchostname

Sync the OS hostname to AMT Network Settings.

=== "Linux"
``` bash
sudo ./rpc maintenance synchostname -u wss://server/maintenance
```
=== "Windows"
```
.\rpc maintenance synchostname -u wss://server/maintenance
```
```
rpc maintenance synchostname -u wss://server/maintenance
```

<br>

#### syncip

Sync the static IP of host OS to AMT Network Settings.

=== "Linux"
```
sudo ./rpc maintenance syncip -staticip 192.168.1.7 -netmask 255.255.255.0 -gateway 192.168.1.1 -primarydns 8.8.8.8 -secondarydns 4.4.4.4 -u wss://server/maintenance
```
=== "Windows"
```
.\rpc maintenance syncip -staticip 192.168.1.7 -netmask 255.255.255.0 -gateway 192.168.1.1 -primarydns 8.8.8.8 -secondarydns 4.4.4.4 -u wss://server/maintenance
```
```
rpc maintenance syncip -staticip 192.168.1.7 -netmask 255.255.255.0 -gateway 192.168.1.1 -primarydns 8.8.8.8 -secondarydns 4.4.4.4 -u wss://server/maintenance
```

| OPTION | DESCRIPTION |
|---------------|---------------------------------------------------------------------------------------------------------------------|
Expand Down Expand Up @@ -543,14 +525,9 @@ On failure, the `addwifisettings` maintenance command will rollback any certific

Display AMT status and configuration:

=== "Linux"
``` bash
sudo ./rpc amtinfo [OPTIONS]
```
=== "Windows"
```
.\rpc amtinfo [OPTIONS]
```
```
rpc amtinfo [OPTIONS]
```

**Not passing `[OPTIONS]` will print all information.**

Expand Down Expand Up @@ -589,11 +566,6 @@ see [Wireless Activation](../../Tutorials/createWiFiConfig.md).

Display the current version of RPC and the RPC Protocol version:

=== "Linux"
``` bash
sudo ./rpc version
```
=== "Windows"
```
.\rpc version
```
```
rpc version
```
24 changes: 6 additions & 18 deletions docs/Reference/architectureOverview.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,27 +116,15 @@ Each microservice has an associated log file which can contain helpful debug inf

1. Open a Terminal or Powershell/Command Prompt and run the command to list the containers:

=== "Linux"
```
sudo docker ps
```

=== "Windows (Powershell)"
```
docker ps
```
```
docker ps
```

2. Copy the first three digits of the container ID of interest. Run the docker logs command followed by the container ID:

=== "Linux"
```
sudo docker logs <container ID>
```

=== "Windows (Powershell)"
```
docker logs <container ID>
```
```
docker logs <container ID>
```

See more help options for the `docker logs` command in [Docker Documentation](https://docs.docker.com/engine/reference/commandline/logs/).

Expand Down
11 changes: 3 additions & 8 deletions docs/Reference/middlewareExtensibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,8 @@ After implementing the multitenancy code changes and starting the services, prof

Then when activating and configuring the AMT device using RPC, provide the `-tenant` flag with the `tenantID` of the profile. [Find all RPC flags in the RPC CLI docs](./RPC/commandsRPC.md). See example command below.

=== "Linux"
``` bash
sudo ./rpc activate -u wss://server/activate -n -profile profilename -tenant profileTenantID
```
=== "Windows"
```
.\rpc activate -u wss://server/activate -n -profile profilename -tenant profileTenantID
```
```
rpc activate -u wss://server/activate -n -profile profilename -tenant profileTenantID
```

<br>
65 changes: 19 additions & 46 deletions docs/Tutorials/apiTutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,11 @@ See the [Authorize Method in the API Documentation](https://app.swaggerhub.com/a
2. Copy and paste the example code below into a text editor.
3. Update the values of the `[IP-Address or FQDN]`, `[MPS_WEB_ADMIN_USER]`, and `[MPS_WEB_ADMIN_PASSWORD]` fields.

=== "Linux"
```bash
curl --insecure -X POST https://[IP-Address or FQDN]/mps/login/api/v1/authorize \
-H "Content-Type:application/json" \
-d "{\"username\":\"[MPS_WEB_ADMIN_USER]\", \"password\":\" [MPS_WEB_ADMIN_PASSWORD]\"}"
```
=== "Windows"
```bash
curl --insecure -X POST https://[IP-Address or FQDN]/mps/login/api/v1/authorize ^
-H "Content-Type:application/json" ^
-d "{\"username\":\"[MPS_WEB_ADMIN_USER]\", \"password\":\" [MPS_WEB_ADMIN_PASSWORD]\"}"
```
```bash
curl --insecure -X POST https://[IP-Address or FQDN]/mps/login/api/v1/authorize \
-H "Content-Type:application/json" \
-d "{\"username\":\"[MPS_WEB_ADMIN_USER]\", \"password\":\" [MPS_WEB_ADMIN_PASSWORD]\"}"
```

!!!info "Info - Using the --insecure Flag"
Because we are using self-signed certificates for MPS for development and testing purposes, we must supply this flag to bypass SSL certificate verification.
Expand All @@ -81,16 +74,10 @@ See the [GetDevices Method in the API Documentation](https://app.swaggerhub.com/
2. Copy and paste the example code below into a text editor.
3. Update the values of the `[IP-Address or FQDN]` and `[JWT-Token]` fields.

=== "Linux"
```bash
curl --insecure https://[IP-Address or FQDN]/mps/api/v1/devices \
-H "Authorization: Bearer [JWT-Token]"
```
=== "Windows"
```bash
curl --insecure https://[IP-Address or FQDN]/mps/api/v1/devices ^
-H "Authorization: Bearer [JWT-Token]"
```
```bash
curl --insecure https://[IP-Address or FQDN]/mps/api/v1/devices \
-H "Authorization: Bearer [JWT-Token]"
```

4. Run the command.

Expand Down Expand Up @@ -125,32 +112,18 @@ See the [GetDevices Method in the API Documentation](https://app.swaggerhub.com/
The sample GET and POST curl commands below can be adapted for other MPS and RPS methods **by changing the URL path and modifying the request body data, if applicable**.
=== "Power Capabilities (GET Template)"
=== "Linux"
``` bash
curl --insecure https://[IP-Address or FQDN]/mps/api/v1/amt/powercapabilities/[AMT-Device-GUID] \
-H "Authorization: Bearer [JWT-Token]"
```
=== "Windows"
``` bash
curl --insecure https://[IP-Address or FQDN]/mps/api/v1/amt/powercapabilities/[AMT-Device-GUID] ^
-H "Authorization: Bearer [JWT-Token]"
```
``` bash
curl --insecure https://[IP-Address or FQDN]/mps/api/v1/amt/powercapabilities/[AMT-Device-GUID] \
-H "Authorization: Bearer [JWT-Token]"
```
See [Power Capabilities API Docs](https://app.swaggerhub.com/apis-docs/rbheopenamt/mps/{{ repoVersion.mpsAPI }}#/AMT/get_api_v1_amt_power_capabilities__guid_) for more information and expected responses.
=== "Power Action (POST Template)"
=== "Linux"
``` bash
curl --insecure -X POST https://[IP-Address or FQDN]/mps/api/v1/amt/power/action/[AMT-Device-GUID] \
-H "Content-Type: application/json" \
-H "Authorization: Bearer [JWT-Token]" \
-d "{\"action\": [Power-Action], \"useSOL\": false}"
```
=== "Windows"
``` bash
curl --insecure -X POST https://[IP-Address or FQDN]/mps/api/v1/amt/power/action/[AMT-Device-GUID] ^
-H "Content-Type: application/json" ^
-H "Authorization: Bearer [JWT-Token]" ^
-d "{\"action\": [Power-Action], \"useSOL\": false}"
```
``` bash
curl --insecure -X POST https://[IP-Address or FQDN]/mps/api/v1/amt/power/action/[AMT-Device-GUID] \
-H "Content-Type: application/json" \
-H "Authorization: Bearer [JWT-Token]" \
-d "{\"action\": [Power-Action], \"useSOL\": false}"
```
See [Power Action API Docs](https://app.swaggerhub.com/apis-docs/rbheopenamt/mps/{{ repoVersion.mpsAPI }}#/AMT/post_api_v1_amt_power_action__guid_) for more information and expected responses.
## Other Methods
Expand Down
Loading

0 comments on commit 66eba02

Please sign in to comment.