Code Monkey home page Code Monkey logo

bmctool's People

Contributors

cristinaleonr avatar nkinkade avatar robertodauria avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bmctool's Issues

Use the right project based on the node name

@nkinkade and I were discussing using the mlab-oti Datastore only for production BMCs / mlab-staging only for staging BMCs. To avoid the need to specify which project to use when creating mlab4d entities, bmctool should be able to automatically detect the correct GCP project to use, keeping the --project flag as a way to override it.

Update README

The README is very outdated and should be updated to reflect the current features of bmctool.

Add subcommand to call the Reboot API

bmctool should have a subcommand like bmctool reboot <host> that makes an HTTP call to the Reboot API to reboot that host via its BMC.

The URL for the Reboot API should be configurable but provide a sensible default based on the project.

"bmctool reboot" should just work for M-Lab staff

Today, it's necessary to set REBOOTAPIURL= in the environment. Additionally, it's necessary to discover the API user and password to construct a URL with the user/password embedded. e.g.

REBOOTAPIURL=https://user:[email protected]

If the project were different, presumably the URL would need to be updated, possibly with alternate passwords. Ideally, for any M-Lab staff with access to GCP, these values can be discovered at runtime.

Ideally, a user who is already authenticated with GCP could successfully run:

go get github.com/m-lab/bmctool
bmctool reboot <host>

This behavior would make the command more accessible to all engineers on the team, and encouraging consistent actions during oncall or other activity.

Add subcommand to tunnel to the BMC via another host

bmctool should have a subcommand like bmctool forward <host> <bmc> --ports 443,5900 to create an SSH tunnel via <host> to the specified <bmc>.

bmctool should then keep running on the foreground.

Also, there could be an alias like bmctool web <host> <bmc> to forward ports that are useful to access the BMC web interface, or we could just make 443,5900 the default value for the --ports flag. @stephen-soltesz @nkinkade any thoughts on this?

Allow specifying short node names

Currently, to get DRAC credentials you have to specify the FQDN of the DRAC, which is a lot to type. It would be nice if the -node option allowed one to specify something like:

$ bmctool -node mlab1.den01

... a short name, and optionally not including the d. It should probably accept any of the following and still do the right thing:

  • mlab1d.den01.measurement-lab.org
  • mlab1.den01.measurement-lab.org
  • mlab1d.den01
  • mlab1.den01

Add an update facility for datastore credentials in bmctool

Currently, if a datastore credential for a DRAC exists, but has wrong information, then only way to fix the record is to either manually delete it and then use bmctool to recreate it, or to manually update it in the GCP console. I would be nice if bmctool could allow for updating an existing record. Perhaps the add facility could be leveraged to create a record if it doesn't exist, or to update an already existing record?

Add subcommand to manage SSH keys on BMCs

A subcommand to set up the M-Lab Ops team's SSH keys would be useful. It was previously considered adding this feature to the Reboot API, but this feels like a much better place for it.

I would put this under a "manage" subcommand, e.g.
bmctool manage ssh <bmc host> <key slot> key.pub

This command would actually do something only if on the Credentials entity for this has Model: DRAC.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.