You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- [Getting an Access Token (WIP)](#getting-an-access-token-wip)
27
+
- [Running with Docker](#running-with-docker)
28
+
- [How It Works](#how-it-works)
29
+
- [TODO](#todo)
30
+
- [Copyright](#copyright)
30
31
31
32
<!-- TOC end -->
32
33
@@ -50,6 +51,20 @@ See the [TODO](#todo) section for a list of soon-ish goals planned.
50
51
51
52
[Build](#building) and [run on bare metal](#running-the-tool) or run and test with Docker using the [latest prebuilt image](#running-with-docker). For quick testing, the repository integrates a Redfish emulator that can be run by executing the `emulator/setup.sh` script or running `make emulator`.
52
53
54
+
## Documentation
55
+
56
+
There is detailed documentation included with the project's repository that can be built using `scdoc` and `go doc`.
57
+
58
+
To build the documentation, invoke the following commands.
59
+
60
+
```bash
61
+
# man page documentation
62
+
make man
63
+
64
+
# API reference documentation
65
+
make docs
66
+
```
67
+
53
68
## Building the Executable
54
69
55
70
The `magellan` tool can be built to run on bare metal. Install the required Go tools, clone the repo, and then build the binary in the root directory with the following:
@@ -158,7 +173,6 @@ Where the `map_key` is the name of the attribute known to `magellan` that identi
158
173
x<cabinet>c<chassis>s<shelf>b<blade>
159
174
```
160
175
161
-
162
176
where `<cabinet>` is a cabinet number in the cluster, `<chassis>` is a chassis within the cabinet, `<shelf>` is the shelf within the chassis and `<blade>` is the blade within a shelf where the BMC is located. The above mapping file (minus the elipsis) will work with the example described in the [Starting the Emulator](#starting-the-emulator) section.
163
177
164
178
If you are using `magellan` within a system deployed using RIE in the [Quickstart Deployment Recipe](https://github.com/OpenCHAMI/deployment-recipes/blob/main/quickstart/README.md) you can generate a BMC ID Map with XNAMEs that match the RIE configured XNAMEs from the RIE instances running under `docker-compose`. You can do this outside of the docker containers by running this script:
@@ -240,6 +254,9 @@ To start a network scan for BMC nodes, use the `scan` command. If the port is no
240
254
--cache data/assets.db
241
255
```
242
256
257
+
> [!NOTE]
258
+
> Make sure to include the `--insecure` flag if the BMC does not require TLS verification when using HTTPS.
259
+
243
260
This will scan the `172.16.0.0` subnet returning the host and port that return a response and store the results in a local cache with at the `data/assets.db` path. Additional flags can be set such as `--host` to add more hosts to scan that are not included on the subnet, `--timeout` to set how long to wait for a response from the BMC node, or `--concurrency` to set the number of requests to make concurrently with goroutines. Try using `./magellan help scan` for a complete set of options this subcommand. Alternatively, the same scan can be started using CIDR notation and with additional hosts:
Copy file name to clipboardExpand all lines: cmd/collect.go
+4-7Lines changed: 4 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -117,12 +117,10 @@ var CollectCmd = &cobra.Command{
117
117
params:=&magellan.CollectParams{
118
118
Timeout: timeout,
119
119
Concurrency: concurrency,
120
-
CaCertPath: cacertPath,
121
120
OutputPath: outputPath,
122
121
OutputDir: outputDir,
122
+
Insecure: insecure,
123
123
Format: collectOutputFormat,
124
-
ForceUpdate: forceUpdate,
125
-
AccessToken: accessToken,
126
124
SecretStore: store,
127
125
BMCIDMap: idMap,
128
126
}
@@ -153,9 +151,8 @@ func init() {
153
151
CollectCmd.Flags().StringVar(&protocol, "protocol", "tcp", "Set the protocol used to query")
154
152
CollectCmd.Flags().StringVarP(&outputPath, "output-file", "o", "", "Set the path to store collection data in a single file")
155
153
CollectCmd.Flags().StringVarP(&outputDir, "output-dir", "O", "", "Set the path to store collection data using HIVE partitioning")
154
+
CollectCmd.Flags().BoolVarP(&insecure, "insecure", "i", false, "Skip TLS certificate verification during probe")
156
155
CollectCmd.Flags().BoolVar(&showOutput, "show", false, "Show the output of a collect run")
157
-
CollectCmd.Flags().BoolVar(&forceUpdate, "force-update", false, "Set flag to force update data sent to SMD")
158
-
CollectCmd.Flags().StringVar(&cacertPath, "cacert", "", "Set the path to CA cert file (defaults to system CAs when blank)")
159
156
CollectCmd.Flags().VarP(&collectOutputFormat, "format", "F", "Set the default output data format (json|yaml; can be overridden by file extensions)")
160
157
CollectCmd.Flags().StringVarP(&idMap, "bmc-id-map", "m", "", "Set the BMC ID mapping from raw json data or use @<path> to specify a file path (json or yaml input)")
Copy file name to clipboardExpand all lines: cmd/crawl.go
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,6 @@ package cmd
3
3
import (
4
4
"encoding/json"
5
5
"fmt"
6
-
"os"
7
6
8
7
"github.com/rs/zerolog/log"
9
8
@@ -57,7 +56,7 @@ var CrawlCmd = &cobra.Command{
57
56
log.Debug().Str("uri", uri).Msgf("one or both of --username and --password NOT passed, attempting to obtain missing credentials from secret store at %s", secretsFile)
0 commit comments