Python AMT Tools Documentation

Similar documents
Roman Numeral Converter Documentation

Python wrapper for Viscosity.app Documentation

Python simple arp table reader Documentation

TPS Documentation. Release Thomas Roten

Python Project Example Documentation

PyCRC Documentation. Release 1.0

chatterbot-weather Documentation

Simple libtorrent streaming module Documentation

Aircrack-ng python bindings Documentation

I2C LCD Documentation

sainsmart Documentation

django-idioticon Documentation

Poulpe Documentation. Release Edouard Klein

Release Nicholas A. Del Grosso

Simple Binary Search Tree Documentation

google-search Documentation

Pykemon Documentation

DNS Zone Test Documentation

Release Fulfil.IO Inc.

django-reinhardt Documentation

Django Wordpress API Documentation

OpenUpgrade Library Documentation

smartfilesorter Documentation

gunny Documentation Release David Blewett

Google Domain Shared Contacts Client Documentation

Python Schema Generator Documentation

Redis Timeseries Documentation

dj-libcloud Documentation

django-cas Documentation

django-users2 Documentation

Game Server Manager Documentation

doconv Documentation Release Jacob Mourelos

Frontier Documentation

withenv Documentation

django CMS Export Objects Documentation

pydrill Documentation

open-helpdesk Documentation

Python State Machine Documentation

AnyDo API Python Documentation

pyldavis Documentation

Release Ralph Offinger

Python AutoTask Web Services Documentation

e24paymentpipe Documentation

Mantis STIX Importer Documentation

Aldryn Installer Documentation

eventbrite-sdk-python Documentation

Poetaster. Release 0.1.1

django-telegram-bot Documentation

yardstick Documentation

Python State Machine Documentation

API Wrapper Documentation

smsghussd Documentation

PyZillow Documentation

django-responsive2 Documentation

Python data pipelines similar to R Documentation

Job Submitter Documentation

ejpiaj Documentation Release Marek Wywiał

nacelle Documentation

gpib-ctypes Documentation

django-private-chat Documentation

PyCon APAC 2014 Documentation

syslog-ng Apache Kafka destination

Airoscript-ng Documentation

dublincore Documentation

xmljson Documentation

xmodels Documentation

dicompyler-core Documentation

pvl Documentation Release William Trevor Olson

Infoblox Client Documentation

django-composite-foreignkey Documentation

django-stored-messages Documentation

Gearthonic Documentation

Python Finite State Machine. Release 0.1.5

Microlab Instruments Documentation

lazy-object-proxy Release 1.3.1

django-composite-foreignkey Documentation

ProxySQL Tools Documentation

django-bootstrap3 Documentation

invenio-groups Documentation

Dragon Mapper Documentation

CID Documentation. Release Francis Reyes

cwmon-mysql Release 0.5.0

OTX to MISP. Release 1.4.2

Connexion Sqlalchemy Utils Documentation

invenio-formatter Documentation

Durga Documentation. Release dev2. transcode

pytest-benchmark Release 2.5.0

Release Manu Phatak

Archan. Release 2.0.1

MT940 Documentation. Release Rick van Hattem (wolph)

otree Virtual Machine Manager Documentation

Regressors Documentation

timegate Documentation

Face Recognition Documentation

redis-lock Release 3.2.0

ouimeaux Documentation

mlpy Documentation Release Astrid Jackson

Lazarus Documentation

MyAnimeList Scraper. Release 0.3.0

ironic-staging-drivers Documentation

Transcription:

Python AMT Tools Documentation Release 0.8.0 Sean Dague Jan 14, 2018

Contents 1 Python AMT Tools 3 1.1 Background................................................ 3 1.2 Hardware that includes AMT...................................... 3 1.3 Configuring AMT............................................ 4 1.4 amtctrl.................................................. 4 1.5 Futures.................................................. 4 2 Installation 5 3 Usage 7 4 Contributing 9 4.1 Types of Contributions.......................................... 9 4.2 Get Started!................................................ 10 4.3 Pull Request Guidelines......................................... 11 4.4 Tips.................................................... 11 5 Credits 13 5.1 Development Lead............................................ 13 5.2 Contributors............................................... 13 6 History 15 6.1 0.8.0 (2017-06-27)............................................ 15 6.2 0.7.0 (2017-03-24)............................................ 15 6.3 0.6.0 (2016-10-27)............................................ 15 6.4 0.5.0 (2016-10-20)............................................ 15 6.5 0.4.0 (2016-10-10)............................................ 15 6.6 0.3.0 (2015-10-08)............................................ 16 6.7 0.1.0 (2015-08-09)............................................ 16 7 Indices and tables 17 i

ii

Python AMT Tools Documentation, Release 0.8.0 Contents: Contents 1

Python AMT Tools Documentation, Release 0.8.0 2 Contents

CHAPTER 1 Python AMT Tools Tools for interacting with Intel s Active Management Technology 1.1 Background AMT is a light weight hardware control interface put into some Intel based laptops and desktops as a tool for corporate fleets to manage hardware. It provides the basics of power control, as well as remote console via VNC. It functions by having a dedicated service processor sniff traffic off the network card on specific ports before it gets to the operating system. Some versions of Intel NUC boxes have AMT, which make them ideal candidates for building a reasonable cluster in your basement. There was once a tool called amttool which let you interact with these systems from Linux. This used the SOAP interface to AMT. That was removed in v9 of the firmware, which means it no longer works with modern AMT in the field. The interface that remains is CIM, a standard from the DMTF that builds XML models for all the things. There exist very few examples for how to make this work on the internet, with one exception: the OpenStack Baremetal (Ironic) service. It has native support for AMT hardware control. This project is derivative work from Ironic. The heavy lifting of understanding all the CIM magic incantations, and oh the magic they are, comes from that code. Refactored for a more minimal usage. 1.2 Hardware that includes AMT AMT is branded as vpro in products by Intel. It is found in many Intel based laptops. There are also specific models of Intel NUC that include vpro. Intel NUC KIT Core Processor BLKNUC5I5MYHE This code gets tested with 5i5MYHE NUCs as well as an older NUC that I have laying around. 3

Python AMT Tools Documentation, Release 0.8.0 1.3 Configuring AMT AMT must be enabled in the BIOS before it can be used externally. This is done by pressing Ctrl-P during initial boot. Initial user / pass is admin / admin. You will be required to create a new admin password that has at least 1: number, capital letter, and non alphanumeric symbol. One you do that, reboot and you are on your way. 1.4 amtctrl The amt library installs a binary amtctrl for working with AMT enabled machines. 1.4.1 machine enrollment To simplify the control commands amtcrtl has a machine registry. New machines are added via: amtctrl add <name> <address> <amtpassword> You can see a list of all machines with: amtctrl list And remove an existing machine with: amtctrl rm <name> 1.4.2 controlling machines Once machines are controlled you have a number of options exposed: amtctrl <name> <command> Command is one of: on - power on the machine off - power off the machine reboot - power cycle the machine pxeboot - set the machine to pxeboot the next time it reboots, and reboot the machine. This is extremely useful if you have install automation on pxeboot. status - return power status as an ugly CIM blob (TODO: make this better) 1.5 Futures More extensive in tree testing (there currently is very little of this) Retry http requests when they fail. AMT processors randomly drop some connections, built in limited retry should be done. Fault handling. The current code is very optimistic. Hence, the 0.x nature. Remove console control. There are AMT commands to expose a VNC remote console on the box. Want to support those. 4 Chapter 1. Python AMT Tools

CHAPTER 2 Installation At the command line: $ easy_install amt Or, if you have virtualenvwrapper installed: $ mkvirtualenv amt $ pip install amt 5

Python AMT Tools Documentation, Release 0.8.0 6 Chapter 2. Installation

CHAPTER 3 Usage To use Python AMT Tools in a project: import amt 7

Python AMT Tools Documentation, Release 0.8.0 8 Chapter 3. Usage

CHAPTER 4 Contributing Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given. You can contribute in many ways: 4.1 Types of Contributions 4.1.1 Report Bugs Report bugs at https://github.com/sdague/amt/issues. If you are reporting a bug, please include: Your operating system name and version. Any details about your local setup that might be helpful in troubleshooting. Detailed steps to reproduce the bug. 4.1.2 Fix Bugs Look through the GitHub issues for bugs. Anything tagged with bug is open to whoever wants to implement it. 4.1.3 Implement Features Look through the GitHub issues for features. Anything tagged with feature is open to whoever wants to implement it. 9

Python AMT Tools Documentation, Release 0.8.0 4.1.4 Write Documentation Python AMT Tools could always use more documentation, whether as part of the official Python AMT Tools docs, in docstrings, or even on the web in blog posts, articles, and such. 4.1.5 Submit Feedback The best way to send feedback is to file an issue at https://github.com/sdague/amt/issues. If you are proposing a feature: Explain in detail how it would work. Keep the scope as narrow as possible, to make it easier to implement. Remember that this is a volunteer-driven project, and that contributions are welcome :) 4.2 Get Started! Ready to contribute? Here s how to set up amt for local development. 1. Fork the amt repo on GitHub. 2. Clone your fork locally: $ git clone git@github.com:your_name_here/amt.git 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development: $ mkvirtualenv amt $ cd amt/ $ python setup.py develop 4. Create a branch for local development: $ git checkout -b name-of-your-bugfix-or-feature Now you can make your changes locally. 5. When you re done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox: $ flake8 amt tests $ python setup.py test $ tox To get flake8 and tox, just pip install them into your virtualenv. 6. Commit your changes and push your branch to GitHub: $ git add. $ git commit -m "Your detailed description of your changes." $ git push origin name-of-your-bugfix-or-feature 7. Submit a pull request through the GitHub website. 10 Chapter 4. Contributing

Python AMT Tools Documentation, Release 0.8.0 4.3 Pull Request Guidelines Before you submit a pull request, check that it meets these guidelines: 1. The pull request should include tests. 2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst. 3. The pull request should work for Python 2.6, 2.7, 3.3, and 3.4, and for PyPy. Check https://travis-ci.org/sdague/ amt/pull_requests and make sure that the tests pass for all supported Python versions. 4.4 Tips To run a subset of tests: $ python -m unittest tests.test_amt 4.3. Pull Request Guidelines 11

Python AMT Tools Documentation, Release 0.8.0 12 Chapter 4. Contributing

CHAPTER 5 Credits 5.1 Development Lead Sean Dague <sean@dague.net> 5.2 Contributors None yet. Why not be the first? 13

Python AMT Tools Documentation, Release 0.8.0 14 Chapter 5. Credits

CHAPTER 6 History 6.1 0.8.0 (2017-06-27) add support for hybernate power state (thanks Chen Rotem Levy) ensure hostdb is not world readable when created (thanks bodo-riediger) 6.2 0.7.0 (2017-03-24) add support for -p flag to prompt for password and bypass hostdb nice errors to the user when auth fails 6.3 0.6.0 (2016-10-27) add support for stand-by power state (thanks Chen Rotem Levy) 6.4 0.5.0 (2016-10-20) python 2 fixes for python 3 issues (thanks Chen Rotem Levy) 6.5 0.4.0 (2016-10-10) python 3 fixes and testing (thanks Rixillo) 15

Python AMT Tools Documentation, Release 0.8.0 6.6 0.3.0 (2015-10-08) python 3 print fix (thanks Mike Nawrocki) add set_next_boot and change_boot_order_request (thanks John L. Villalovos) 6.7 0.1.0 (2015-08-09) First release on PyPI. 16 Chapter 6. History

CHAPTER 7 Indices and tables genindex modindex search 17