ec2gaming icon indicating copy to clipboard operation
ec2gaming copied to clipboard

[WIP] Write a golang cli

Open BenjaminMalley opened this issue 9 years ago • 2 comments

This is just a note that I've started work on a golang cli. I haven't done much, just install some dependencies and grabbed the spot price history. I'm going to tinker with it over the next week or so.

BenjaminMalley avatar Nov 01 '16 17:11 BenjaminMalley

Siiiick. You've picked up exactly the dependencies I'd earmarked, you'll want this guy for the WinRM stuff:

https://github.com/masterzen/winrm

Example usage in this project:

https://github.com/masterzen/winrm-cli

DanielThomas avatar Nov 01 '16 17:11 DanielThomas

WinRM example of using psexec to start a process that interacts with the console session:

bin/winrm -hostname 10.8.0.1 -username administrator -password <password> 'psexec -accepteula -i 1 -u administrator -p <password> cmd.exe /c start steam://'

We'll also be able to use it to do general bootstrap/housekeeping tasks:

bin/winrm -hostname 10.8.0.1 -username administrator -password <password> 'aws s3 sync Z:\Documents s3://etc...'

The prerequisite steps on the image being:

https://github.com/masterzen/winrm-cli#preparing-the-remote-windows-machine-for-basic-authentication

Idea is to move the stuff I was doing in a batch file locally into local commands, and add a steam command that can invoke any of the steam protocol commands:

https://developer.valvesoftware.com/wiki/Steam_browser_protocol

DanielThomas avatar Nov 01 '16 17:11 DanielThomas