{"id":19900076,"url":"https://github.com/m-lab/bmctool","last_synced_at":"2026-01-17T03:47:21.600Z","repository":{"id":55953267,"uuid":"185421291","full_name":"m-lab/bmctool","owner":"m-lab","description":"BMCTool is a command line tool to manage BMC credentials on the M-Lab infrastructure.","archived":false,"fork":false,"pushed_at":"2024-06-09T13:49:22.000Z","size":7084,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-10-29T16:02:05.895Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m-lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2019-05-07T14:42:39.000Z","updated_at":"2023-08-24T13:36:35.000Z","dependencies_parsed_at":"2024-04-15T07:00:35.421Z","dependency_job_id":"623e88dc-7fdb-48fc-913a-e957db513ab7","html_url":"https://github.com/m-lab/bmctool","commit_stats":{"total_commits":47,"total_committers":3,"mean_commits":"15.666666666666666","dds":0.06382978723404253,"last_synced_commit":"adc301be99f10eb84e0ee780e91c3644dc5da3ea"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Fbmctool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Fbmctool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Fbmctool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Fbmctool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-lab","download_url":"https://codeload.github.com/m-lab/bmctool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411238,"owners_count":20934654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-11-12T20:11:05.007Z","updated_at":"2026-01-17T03:47:21.590Z","avatar_url":"https://github.com/m-lab.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GoDoc](https://godoc.org/github.com/m-lab/bmctool?status.svg)](https://godoc.org/github.com/m-lab/bmctool) [![Build Status](https://travis-ci.org/m-lab/bmctool.svg?branch=master)](https://travis-ci.org/m-lab/bmctool) [![Coverage Status](https://coveralls.io/repos/github/m-lab/bmctool/badge.svg?branch=master)](https://coveralls.io/github/m-lab/bmctool?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/m-lab/bmctool)](https://goreportcard.com/report/github.com/m-lab/bmctool)\n\n# BMCTool\nBMCTool is a command line tool to manage Baseband Management Controller credentials on the M-Lab infrastructure.\n\nIn particular, it allows to:\n\n* Fetch credentials for the BMC module on a given node from Google Cloud Datastore\n* Add a new node\n* Update the credentials for an existing node\n* Delete credentials for an existing node\n* Reboot a node via its BMC, using the credentials in GCD to log in\n* Automatically set up SSH forwarding to access the BMC's web interface and virtual console\n\nIf an entity is created or updated, output is provided in JSON format.\n\n## Usage\n\n### Common flags\n\n```--project \u003cproject_id\u003e```\n\nOverrides the auto-detected project ID (based on the hostname format) with the specified `\u003cproject_id\u003e`.\n\nIf the project is not specified, it is inferred based on the hostname format. The regular expressions used to determine the project are the following, in decreasing priority order:\n\n1. Sandbox: `[a-zA-Z]{3}[0-9]t` (e.g. `mlab1.lga0t`)\n2. Staging: `^mlab4` (e.g. `mlab4.lga05`)\n3. Production: anything that does not match the previous ones\n\n\n### Fetch credentials\n\n```bmctool get \u003chost\u003e```\n\nRetrieves the credentials for `\u003chost\u003e`.\n\n### Add a new node\n\n```bmctool add \u003chost\u003e \u003caddress\u003e```\n\nSet the shell variables `BMCUSER` and `BMCPASS` to the appropriate values before running this command.\n\nCreates the node `\u003chost\u003e` with the provided `BMCUSER`, `BMCPASS` and `\u003caddress\u003e`. If the specified node already exists or the required env variables are not set, the command will fail.\n\n### Update an existing node\n\n```bmctool set \u003chost\u003e```\n\nUpdates details for node `\u003chost\u003e`. If `\u003chost\u003e` does not exist, the command will fail.\n\nA list of fields that can be updated can be retrieved with `bmctool set --help`.\n\nFor example, to set the address to 127.0.0.1\n\n```bmctool set mlab1.lga0t --addr 127.0.0.1```\n\n\n### Delete an existing node\n\n```bmctool delete \u003chost\u003e```\n\nDeletes the Credentials entity for `\u003chost\u003e`. This works in the same way as Datastore's `Delete` operation, thus if `\u003chost\u003e` does not exist, this command will not fail.\n\n### Reboot a node\n\n```bmctool reboot \u003chost\u003e```\n\nLogs into the BMC for `\u003chost\u003e` and reboots the node. Credentials are fetched from GCD.\n\n### Forward ports via SSH\n\n```bmctool forward \u003chost\u003e```\n\nRuns the system-wide SSH command to connect to an authorized host and forward ports to the BMC.\n\nAccess to M-Lab's BMCs is restricted to a set of IP addresses, thus the only way to log into them is to connect from those.\n\nThis is normally used to access the BMC's web interface and its Virtual Console, thus the default behavior is to map ports 4443 -\u003e 443 (to not require root privileges) and 5900 -\u003e 5900. For a list of the available options:  `bmctool forward --help`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-lab%2Fbmctool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-lab%2Fbmctool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-lab%2Fbmctool/lists"}