Giter Site home page Giter Site logo

amtgo's Introduction

amtgo Build Status codecov GoDoc

A golang implementation of amtc and its amtc-web GUI. Like amtc -- for mass remote power management and monitoring Intel AMT hosts.

Features over amtc / amtc-web:

  • includes amtc-web application webserver in a single binary
  • instant, parallel execution of GUI-submitted tasks
  • includes cron functionality for monitoring and scheduled tasks
  • it finally has a command/context-sensitive -h(elp) command line switch
  • windows binaries are available on releases page, too

amtgo still supports SQLite and MySQL as database back-ends. amtc-web GUI is included 1:1 from amtc repository.

binary installation

Download the latest release for your OS. Unzip the download -- the zip file contains the amtgo binary. Move the binary to a location of your choice, e.g. /usr/local/bin. That's all needed to run amtgo from CLI like amtc. You should be able to run amtgo -h for help.

amtgo server should be started up via systemd or the like. Find first run instructions below.

... when using SQLite

  • In a terminal / CMD session, cd to the directory where amtgo is supposed to store its SQLite database and AMT password files.
  • Put your AMT password into a file, e.g. echo 'mY$ecurePassw0rd' > amtpassword.txt
  • Type/Run amtgo server. Visit http://localhost:8080 to create initial web site user account and log in

... when using MySQL

  • Install MySQL, start it and create a database and a user for amtgo purposes.
  • Proceed like with SQLite above
  • Starting amtgo server using MySQL requires MySQL connection details. They should be passed as environment variables, but can also be passed as command line arguments for testing. Output excerpt from amtgo server -h:
OPTIONS:
   --dbdriver value, -d value    Database driver: sqlite3 or mysql (default: "sqlite3") [$DB_DRIVER]
   --dbfile value, -F value      SQLite database file (default: "amtgo.db") [$DB_FILE]
   --dbName value, -D value      MySQL database name (default: "amtgo") [$DB_NAME]
   --dbHost value, -H value      MySQL database host (default: "localhost") [$DB_HOST]
   --dbUser value, -U value      MySQL database user name (default: "amtgo") [$DB_USER]
   --dbPassword value, -P value  MySQL database password [$DB_PASSWORD]
   --dbPort value, -p value      MySQL database port (default: "3306") [$DB_PORT]

For example, to run amtgo server using mysql database foo on localhost as user joe using password 1234, run: amtgo server -d mysql -D foo -U joe -P 1234.

For testing purposes, you may want to run a ephemeral MySQL instance using Docker:

docker run --rm --name amtgo-mysql \
  -e MYSQL_RANDOM_ROOT_PASSWORD=yes \
  -e MYSQL_DATABASE=amtgo \
  -e MYSQL_USER=amtgo \
  -e MYSQL_PASSWORD=1234 \
  -p 3306:3306 \
  -d mysql/mysql-server

building amtgo from source

# if using Go < 1.8
export GOPATH=/home/you/go

# fetch and build amtgo
go get -v github.com/schnoddelbotz/amtgo

To run tests, git clone the repository and run make test or make coverage. Note that the repository contains a pre-built amtc-web; to rebuild amtc-web from source, run make assets, then make to build amtgo itself.

status & open issues

amtgo is a fun project for me to get into golang -- I never was too happy with amtc-web's requirement for Apache, PHP and cron... Like amtc, amtgo works for me (tm), but I lack long-term usage experience. Note that amtgo, in contrast to amtc, does not support EOI protocol but only WS-MAN. For AMT versions <6, you might want to stay with amtc.

Please report any issues you encounter. I'm also thankful for any hints for improvement.

license

amtgo is published under MIT license.

Besides golang's standard library, amtgo relies on:

Assets (i.e. amtc-web static content and AMT commands) are included using go-bindata. Releases for all platforms are built using xgo.

Please check amtc-web 3rd party components, too.

amtgo's People

Contributors

schnoddelbotz avatar

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.