{"id":25649799,"url":"https://github.com/openchami/smd","last_synced_at":"2026-03-07T02:08:32.776Z","repository":{"id":204926822,"uuid":"712455865","full_name":"OpenCHAMI/smd","owner":"OpenCHAMI","description":null,"archived":false,"fork":false,"pushed_at":"2025-11-20T02:05:38.000Z","size":87021,"stargazers_count":3,"open_issues_count":5,"forks_count":6,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-12-23T08:22:24.779Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenCHAMI.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-10-31T14:02:57.000Z","updated_at":"2025-11-07T18:26:55.000Z","dependencies_parsed_at":"2024-02-05T13:30:27.082Z","dependency_job_id":"5176cc25-a38d-4fc3-9bc5-8e7f415a0495","html_url":"https://github.com/OpenCHAMI/smd","commit_stats":null,"previous_names":["openchami/smd"],"tags_count":99,"template":false,"template_full_name":null,"purl":"pkg:github/OpenCHAMI/smd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenCHAMI%2Fsmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenCHAMI%2Fsmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenCHAMI%2Fsmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenCHAMI%2Fsmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenCHAMI","download_url":"https://codeload.github.com/OpenCHAMI/smd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenCHAMI%2Fsmd/sbom","scorecard":{"id":1237876,"data":{"date":"2025-09-16T11:38:44Z","repo":{"name":"github.com/OpenCHAMI/smd","commit":"b1262a193742fdf685d26e5db4328f92f71aa71c"},"scorecard":{"version":"v4.13.1","commit":"49c0eed3a423f00c872b5c3c9f1bbca9e8aae799"},"score":6.6,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/49c0eed3a423f00c872b5c3c9f1bbca9e8aae799/docs/checks.md#binary-artifacts"}},{"name":"Branch-Protection","score":6,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'force pushes' disabled on branch 'main'","Info: 'allow deletion' disabled on branch 'main'","Warn: no status checks found to merge onto branch 'main'","Warn: number of required reviewers is only 1 on branch 'main'","Info: settings apply to administrators on branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/49c0eed3a423f00c872b5c3c9f1bbca9e8aae799/docs/checks.md#branch-protection"}},{"name":"CI-Tests","score":8,"reason":"8 out of 9 merged PRs checked by a CI test -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/49c0eed3a423f00c872b5c3c9f1bbca9e8aae799/docs/checks.md#ci-tests"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/49c0eed3a423f00c872b5c3c9f1bbca9e8aae799/docs/checks.md#cii-best-practices"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/49c0eed3a423f00c872b5c3c9f1bbca9e8aae799/docs/checks.md#code-review"}},{"name":"Contributors","score":10,"reason":"8 different organizations found -- score normalized to 10","details":["Info: contributors work for OpenCHAMI,chapel-lang,hewlett packard enterprise,hpe,intros,lanl,los alamos national laboratory,openchami for lanl"],"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/49c0eed3a423f00c872b5c3c9f1bbca9e8aae799/docs/checks.md#contributors"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/49c0eed3a423f00c872b5c3c9f1bbca9e8aae799/docs/checks.md#dangerous-workflow"}},{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: tool 'Dependabot' is used: :0"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/49c0eed3a423f00c872b5c3c9f1bbca9e8aae799/docs/checks.md#dependency-update-tool"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no OSSFuzz integration found: Follow the steps in https://github.com/google/oss-fuzz to integrate fuzzing for your project.\nOver time, try to add fuzzing for more functionalities of your project. (High effort)","Warn: no OneFuzz integration found: Follow the steps in https://github.com/microsoft/onefuzz to start fuzzing for your project.\nOver time, try to add fuzzing for more functionalities of your project. (High effort)","Warn: no GoBuiltInFuzzer integration found: Follow the steps in https://go.dev/doc/fuzz/ to enable fuzzing on your project.\nOver time, try to add fuzzing for more functionalities of your project. (Medium effort)","Warn: no PythonAtherisFuzzer integration found: Follow the steps in https://github.com/google/atheris to enable fuzzing on your project.\nOver time, try to add fuzzing for more functionalities of your project. (Medium effort)","Warn: no CLibFuzzer integration found: Follow the steps in https://llvm.org/docs/LibFuzzer.html to enable fuzzing on your project.\nOver time, try to add fuzzing for more functionalities of your project. (Medium effort)","Warn: no CppLibFuzzer integration found: Follow the steps in https://llvm.org/docs/LibFuzzer.html to enable fuzzing on your project.\nOver time, try to add fuzzing for more functionalities of your project. (Medium effort)","Warn: no SwiftLibFuzzer integration found: Follow the steps in https://google.github.io/oss-fuzz/getting-started/new-project-guide/swift-lang/ to enable fuzzing on your project.\nOver time, try to add fuzzing for more functionalities of your project. (Medium effort)","Warn: no RustCargoFuzzer integration found: Follow the steps in https://rust-fuzz.github.io/book/cargo-fuzz.html to enable fuzzing on your project.\nOver time, try to add fuzzing for more functionalities of your project. (Medium effort)","Warn: no JavaJazzerFuzzer integration found: Follow the steps in https://github.com/CodeIntelligenceTesting/jazzer to enable fuzzing on your project.\nOver time, try to add fuzzing for more functionalities of your project. (Medium effort)","Warn: no ClusterFuzzLite integration found: Follow the steps in https://github.com/google/clusterfuzzlite to integrate fuzzing as part of CI.\nOver time, try to add fuzzing for more functionalities of your project. (High effort)","Warn: no HaskellPropertyBasedTesting integration found: Use one of the following frameworks to fuzz your project:\nQuickCheck: https://hackage.haskell.org/package/QuickCheck\nhedgehog: https://hedgehog.qa/\nvalidity: https://github.com/NorfairKing/validity\nsmallcheck: https://hackage.haskell.org/package/smallcheck\nhspec: https://hspec.github.io/\ntasty: https://hackage.haskell.org/package/tasty (High effort)","Warn: no TypeScriptPropertyBasedTesting integration found: Use fast-check: https://github.com/dubzzz/fast-check (High effort)","Warn: no JavaScriptPropertyBasedTesting integration found: Use fast-check: https://github.com/dubzzz/fast-check (High effort)"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/49c0eed3a423f00c872b5c3c9f1bbca9e8aae799/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: License file found in expected location: LICENSE:1","Info: FSF or OSI recognized license: LICENSE:1"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/49c0eed3a423f00c872b5c3c9f1bbca9e8aae799/docs/checks.md#license"}},{"name":"Maintained","score":10,"reason":"30 commit(s) out of 30 and 2 issue activity out of 22 found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/49c0eed3a423f00c872b5c3c9f1bbca9e8aae799/docs/checks.md#maintained"}},{"name":"Packaging","score":10,"reason":"publishing workflow detected","details":["Info: GitHub/GitLab publishing workflow used in run https://api.github.com/repos/OpenCHAMI/smd/actions/runs/17314806752: .github/workflows/PRBuild.yml:12"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/49c0eed3a423f00c872b5c3c9f1bbca9e8aae799/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/PRBuild.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/OpenCHAMI/smd/PRBuild.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/PRBuild.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/OpenCHAMI/smd/PRBuild.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/PRBuild.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/OpenCHAMI/smd/PRBuild.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/PRBuild.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/OpenCHAMI/smd/PRBuild.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/Release.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/OpenCHAMI/smd/Release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/Release.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/OpenCHAMI/smd/Release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/Release.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/OpenCHAMI/smd/Release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/Release.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/OpenCHAMI/smd/Release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/Release.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/OpenCHAMI/smd/Release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/Release.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/OpenCHAMI/smd/Release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/Release.yml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/OpenCHAMI/smd/Release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/Release.yml:77: update your workflow using https://app.stepsecurity.io/secureworkflow/OpenCHAMI/smd/Release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/Release.yml:82: update your workflow using https://app.stepsecurity.io/secureworkflow/OpenCHAMI/smd/Release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/Release.yml:87: update your workflow using https://app.stepsecurity.io/secureworkflow/OpenCHAMI/smd/Release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/Release.yml:92: update your workflow using https://app.stepsecurity.io/secureworkflow/OpenCHAMI/smd/Release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/Release.yml:97: update your workflow using https://app.stepsecurity.io/secureworkflow/OpenCHAMI/smd/Release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/scorecard.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/OpenCHAMI/smd/scorecard.yml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating chainguard/wolfi-base:latest to chainguard/wolfi-base:latest@sha256:0e09bcd548cf2dfb9a3fd40af1a7389aa8c16b428de4e8f72b085f015694ce3d","Warn: containerImage not pinned by hash: Dockerfile.CSM:28","Warn: containerImage not pinned by hash: Dockerfile.CSM:37","Warn: containerImage not pinned by hash: Dockerfile.CSM:49","Warn: containerImage not pinned by hash: Dockerfile.CSM:59","Warn: containerImage not pinned by hash: Dockerfile.pprof:1: pin your Docker image by updating chainguard/wolfi-base:latest to chainguard/wolfi-base:latest@sha256:0e09bcd548cf2dfb9a3fd40af1a7389aa8c16b428de4e8f72b085f015694ce3d","Warn: containerImage not pinned by hash: test/ct/Dockerfile:23","Warn: containerImage not pinned by hash: test/ct/Dockerfile.wait-for-smd.Dockerfile:23","Info:   2 out of  14 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   6 third-party GitHubAction dependencies pinned","Info:   0 out of   8 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/49c0eed3a423f00c872b5c3c9f1bbca9e8aae799/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":3,"reason":"SAST tool is not run on all commits -- score normalized to 3","details":["Warn: 11 commits out of 30 are checked with a SAST tool","Warn: CodeQL tool not detected"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/49c0eed3a423f00c872b5c3c9f1bbca9e8aae799/docs/checks.md#sast"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/OpenCHAMI/.github/SECURITY.md:1","Info: Found linked content: github.com/OpenCHAMI/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/OpenCHAMI/.github/SECURITY.md:1","Info: Found text in security policy: github.com/OpenCHAMI/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/49c0eed3a423f00c872b5c3c9f1bbca9e8aae799/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":0,"reason":"0 out of 5 artifacts are signed or have provenance","details":["Warn: release artifact v2.19.0 does not have provenance: https://api.github.com/repos/OpenCHAMI/smd/releases/243580891","Warn: release artifact v2.19.0 not signed: https://api.github.com/repos/OpenCHAMI/smd/releases/243580891","Warn: release artifact v2.18.0 does not have provenance: https://api.github.com/repos/OpenCHAMI/smd/releases/197238537","Warn: release artifact v2.18.0 not signed: https://api.github.com/repos/OpenCHAMI/smd/releases/197238537","Warn: release artifact v2.17.7 does not have provenance: https://api.github.com/repos/OpenCHAMI/smd/releases/182293012","Warn: release artifact v2.17.7 not signed: https://api.github.com/repos/OpenCHAMI/smd/releases/182293012","Warn: release artifact v2.17.6 does not have provenance: https://api.github.com/repos/OpenCHAMI/smd/releases/182056888","Warn: release artifact v2.17.6 not signed: https://api.github.com/repos/OpenCHAMI/smd/releases/182056888","Warn: release artifact v2.17.3 does not have provenance: https://api.github.com/repos/OpenCHAMI/smd/releases/182055614","Warn: release artifact v2.17.3 not signed: https://api.github.com/repos/OpenCHAMI/smd/releases/182055614"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/49c0eed3a423f00c872b5c3c9f1bbca9e8aae799/docs/checks.md#signed-releases"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/PRBuild.yml:1: Visit https://app.stepsecurity.io/secureworkflow/OpenCHAMI/smd/PRBuild.yml/main?enable=permissions\nTick the 'Restrict permissions for GITHUB_TOKEN'\nUntick other options\nNOTE: If you want to resolve multiple issues at once, you can visit https://app.stepsecurity.io/securerepo instead. (Low effort)","Warn: topLevel permissions set to 'write-all': .github/workflows/Release.yml:8: Visit https://app.stepsecurity.io/secureworkflow/OpenCHAMI/smd/Release.yml/main?enable=permissions\nTick the 'Restrict permissions for GITHUB_TOKEN'\nUntick other options\nNOTE: If you want to resolve multiple issues at once, you can visit https://app.stepsecurity.io/securerepo instead. (Low effort)","Info: topLevel permissions set to 'read-all': .github/workflows/scorecard.yml:18","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/49c0eed3a423f00c872b5c3c9f1bbca9e8aae799/docs/checks.md#token-permissions"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-vrw8-fxc6-2r93 / GO-2025-3770"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/49c0eed3a423f00c872b5c3c9f1bbca9e8aae799/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-09-19T00:39:39.063Z","repository_id":204926822,"created_at":"2025-09-19T00:39:39.064Z","updated_at":"2025-09-19T00:39:39.064Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30205896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"online","status_checked_at":"2026-03-07T02:00:06.765Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-23T14:33:55.607Z","updated_at":"2026-03-07T02:08:32.734Z","avatar_url":"https://github.com/OpenCHAMI.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# State Management Database (SMD)\n\n## Table of Contents\n1. [About](#about)\n2. [Overview](#overview)\n3. [Build \u0026 Install](#build--install)\n4. [Testing](#testing)\n5. [Running](#running)\n6. [More Reading](#more-reading)\n\n## About\n\nThe State Management Database (SMD) is a robust service designed for monitoring, tracking, and managing hardware components in high-performance computing (HPC) environments. It performs dynamic inventory discovery, interrogates hardware controllers, and maintains real-time state and lifecycle data. SMD captures essential component details such as hardware status, logical roles, architecture, and resource capabilities, making this information accessible via REST queries and event-driven notifications. Additionally, it facilitates component grouping, partitioning, power operations, firmware management, and boot-time configuration. By maintaining a comprehensive hardware inventory and tracking system changes, SMD ensures efficient resource management, operational continuity, and streamlined troubleshooting across diverse HPC infrastructures.\n\n- SMD provides inventory management services for HPC systems based on BMC discovery and enumeration.\n\n## Overview\nSMD is responsible for:\n- Discovering hardware inventory.\n- Tracking hardware state, logical roles, and enabled/disabled status.\n- Creating and managing component groups and partitions.\n- Storing and retrieving Redfish endpoint and component data.\n- Monitoring hardware state transitions via Redfish events.\n\n\n## Build \u0026 Install\n\n### Using GoReleaser\nSMD employs [GoReleaser](https://goreleaser.com/) for automated releases and build metadata tracking. \n\nTo build locally:\n#### Set Environment Variables\n```bash\nexport GIT_STATE=$(if git diff-index --quiet HEAD --; then echo 'clean'; else echo 'dirty'; fi)\nexport BUILD_HOST=$(hostname)\nexport GO_VERSION=$(go version | awk '{print $3}')\nexport BUILD_USER=$(whoami)\n```\n\n#### Install GoReleaser\nFollow [GoReleaser’s installation guide](https://goreleaser.com/install/).\n\n#### Build Locally\n```bash\ngoreleaser release --snapshot --clean\n```\nBuilt binaries will be located in the `dist/` directory.\n\n## Testing\nSMD includes continuous test (CT) verification for live HPC systems. The test image is invoked via `helm test`.\nIn addition to the service itself, this repository builds and publishes cray-smd-test images containing tests that verify HSM on live Shasta systems. The tests are invoked via helm test as part of the Continuous Test (CT) framework during CSM installs and upgrades. The version of the cray-smd-test image (vX.Y.Z) should match the version of the cray-smd image being tested, both of which are specified in the helm chart for the service.\n\n\n## Running\n\n### Runtime Options\nEnvironment variables can be set for runtime configurations:\n```bash\nRF_MSG_HOST   # Kafka host:port:topic\nSMD_PROXY     # socks5 proxy for Redfish endpoint interrogation\nSMD_DBTYPE    # Database type (default: postgres)\nSMD_DBNAME    # Database name (default: hmsds)\nSMD_DBUSER    # Database user (default: hmsdsuser)\nSMD_DBHOST    # Database hostname (e.g., cray-smd-postgres in Kubernetes)\nSMD_DBPORT    # Database port (default: 5432)\nSMD_DBPASS    # Database password\nSMD_DBOPTS    # Additional DB parameters\nLOGLEVEL      # Logging level (0-4)\n```\n\n### Running Outside Kubernetes\nTo run SMD locally with a PostgreSQL database:\n\n1. Start a local PostgreSQL container:\n   ```bash\n   sudo docker run --rm --name cray-smd-postgres -e POSTGRES_PASSWORD=hmsdsuser \\\n   -e POSTGRES_USER=hmsdsuser -e POSTGRES_DB=hmsds -d -p 5432:5432 postgres:10.8\n   ```\n2. Initialize the database schema:\n   ```bash\n   sudo docker run --name smd-init --link cray-smd-postgres:cray-smd-postgres \\\n   -e SMD_DBHOST=cray-smd-postgres -e SMD_DBOPTS=\"sslmode=disable\" -e SMD_DBPASS=hmsdsuser \\\n   -d dtr.dev.cray.com:443/cray/cray-smd-init:latest\n   ```\n3. Start the SMD service:\n   ```bash\n   sudo docker run --name smd --net host -p 27779:27779 -e SMD_DBHOST=127.0.0.1 \\\n   -e SMD_DBPASS=hmsdsuser -e SMD_DBOPTS=\"sslmode=disable\" \\\n   -e SMD_PROXY=\"socks5://127.0.0.1:9999\" -d dtr.dev.cray.com:443/cray/cray-smd:latest\n   ```\n4. Verify the service is running:\n   ```bash\n   curl -k https://localhost:27779/smd/hsm/v2/groups\n   ```\n---\n#### Using Proxy Mode to Get Access to Non-Local BMCs\n\nFind the machine you wish to discover and ssh to it with dynamic port\nforwarding enabled on the local port you gave for SMD_PROXY:\n\n```bash\nssh -D 9999 root@example-sms.us.cray.com\n```\n\nLeave this window open until you are finished with the discovery.\n\nDouble check /etc/hosts for the BMC IP addresses that are assigned to the nodes\nyou wish to discover, in case they are non-standard ones\n\n#### Discovering Nodes Once HSM is Properly Running\n\nIf the proxy has been set up (or you are running locally on an SMS), then\nyou can then create endpoints for every BMC you wish to discover using their\nnative BMC IP addresses.\n\n_NOTE: If you need particular NIDs and Roles, you will need to set up xname_\n_entries in /hsm/v2/Defaults/NodeMaps BEFORE discovery OR patch the NID and/or_\n_Role fields after discovery:_\n\nSee: https://connect.us.cray.com/confluence/display/HSOS/HSM+Documentation+for+SPS2+-+Setting+Default+NIDs\n\n***Example creation and discovery of preview system computes***\n\nThese are the usual computes found on a standard preview system, but you can easily adapt this example for whatever is in /etc/hosts.  Just make sure you use the BMC xname and a raw IP (if using a socks5 proxy):\n\n```text\ncurl -k -d '{\"ID\": \"x0c0s28b0\", \"RediscoverOnUpdate\":true, \"Hostname\":\"10.4.0.5\", \"User\": \"root\",\"Password\": \"somePassword\"}' -H \"Content-Type: application/json\" -X POST https://localhost:27779/hsm/v2/Inventory/RedfishEndpoints\ncurl -k -d '{\"ID\": \"x0c0s26b0\", \"RediscoverOnUpdate\":true, \"Hostname\":\"10.4.0.6\", \"User\": \"root\",\"Password\": \"somePassword\"}' -H \"Content-Type: application/json\" -X POST https://localhost:27779/hsm/v2/Inventory/RedfishEndpoints\ncurl -k -d '{\"ID\": \"x0c0s24b0\", \"RediscoverOnUpdate\":true, \"Hostname\":\"10.4.0.7\", \"User\": \"root\",\"Password\": \"somePassword\"}' -H \"Content-Type: application/json\" -X POST https://localhost:27779/hsm/v2/Inventory/RedfishEndpoints\ncurl -k -d '{\"ID\": \"x0c0s21b0\", \"RediscoverOnUpdate\":true, \"Hostname\":\"10.4.0.8\", \"User\": \"root\",\"Password\": \"somePassword\"}' -H \"Content-Type: application/json\" -X POST https://localhost:27779/hsm/v2/Inventory/RedfishEndpoints\n```\n\u003e [!NOTE]\n\u003e the above path is assuming you are running docker in a bare container (see above).  Otherwise use 'https://\u003cstandard-api-gateway-host\u003e/apis/smd/hsm/v2/... instead of 'https://localhost:27779/hsm/...'\n\n\u003e [!NOTE]\n\u003e Also note that inventory discovery is a read-only operation and should not do anything to the endpoints besides walk them via GETs.   The \"RediscoverOnUpdate\":true field is important because it will automatically kick off inventory discovery.\n\n\n### API Overview\nPlease refer to [Architecture and Design Details](SMD-DESIGN.md) for API overview \n\n### Additional API Documentation\n\nThe complete HSM (smd) API documentation is included in the Cray API docs.\nThis is the nightly-generated version.  Content is generated in an automated\nfashion from the current swagger.yaml file.\n\nhttp://web.us.cray.com/~ekoen/cray-portal/public\n\nLatest detailed API usage examples:\n\nhttps://github.com/OpenCHAMI/smd/blob/master/docs/examples.adoc  (current)\n\nLatest swagger.yaml (if you would prefer to use the OpenAPI viewer of your choice):\n\nhttps://github.com/OpenCHAMI/smd/blob/master/api/swagger_v2.yaml (current)\n\n## More Reading\n- [Architecture and Design Details](SMD-DESIGN.md)\n- [API Definitions](api/swagger_v2.yaml)\n- [Full API Documentation](https://github.com/OpenCHAMI/smd/blob/master/api/swagger_v2.yaml)\n- [HPE’s Original SMD Documentation](https://github.com/Cray-HPE/hms-smd)\n\nFor advanced configuration, troubleshooting, and database management, refer to additional documentation in the `docs/` directory.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenchami%2Fsmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenchami%2Fsmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenchami%2Fsmd/lists"}