This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This library handles rather specific remote power management scenario.

  • Server can be woken up with wake-on-lan (WOL)
  • SSH access with public key authentication to the server (for shutting it down)
  • Server responds to ping (checking whether the server is running)

Installation:

pip install manage_server_power

or clone the repository and use

python setup.py install

Configuration and notes

On the server side:

  • Enable WOL (from BIOS/… settings).
  • Take note of relevant MAC address.
  • Add new user to server (say, powermanagement).
  • Edit sudoers (visudo) and add powermanagement ALL=NOPASSWD: /sbin/poweroff

On the management computer:

  • Generate ssh public key pair (ssh-keygen)
  • Copy public key to powermanagement user on server (add it to .ssh/authorized_keys)
  • Connect to server to check that public key works properly and to add server host key to known_hosts.

Notes:

  • At least with some devices/networks, WOL won’t work if broadcast_ip is not set to local network’s broadcast, instead of 255.255.255.255.

Usage

import manage_server_power
sp = manage_server_power.ServerPower(server_hostname="example.com",
                                     server_mac="61:a3:18:1c:84:4b",
                                     server_port=22,  # optional, default is 22
                                     ssh_username="powermanagement",
                                     broadcast_ip="192.168.1.255",  # optional, default is 255.255.255.255
                                     socket_timeout=0.5,  # optional
                                     wol_port=9,  # optional, default is 9
                                     )
print sp.is_alive()
# SERVER_DOWN, SERVER_UP or SERVER_UP_NOT_RESPONDING
print sp.wake_up()  # send WOL packet
print sp.shutdown()  # ssh in and run "sudo poweroff"
Release History

Release History

0.0.6

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
manage_server_power-0.0.6-py2.py3-none-any.whl (5.2 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Apr 25, 2016
manage_server_power-0.0.6.tar.gz (3.1 kB) Copy SHA256 Checksum SHA256 Source Apr 25, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting