File: autofirmware.rst

package info (click to toggle)
python-hpilo 4.4.3-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,784 kB
  • sloc: python: 3,418; ruby: 467; makefile: 122; sh: 31
file content (51 lines) | stat: -rw-r--r-- 1,708 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Automated firmware updates
==========================
Building on the :doc:`Elasticsearch </elasticsearch>` example, we can now build
automated updates for iLO firmware. 

The example application uses `beanstalk`_ and `azuki`_ to queue firmware
updates and process them with as much parallelism as you want.

Scheduling updates
------------------
If you run :command:`hpilo_firmware_update`, it will query elasticsearch to
find iLOs with obsolete firmware and schedule updates. It's probably most
useful to run this command in the same cronjob as the elasticsearch importer to
schedule firmware updates as they come in.

Checking the queue
------------------
Using the :command:`azuki` tool, you can check how many iLOs need to be upgraded::

  $ azuki stats hpilo-upgrades
  hpilo-upgrades
  Connections:
      Producers:   0
      Consumers:   1
      Waiting:     0
  Jobs:
      Delayed:     0
      Ready:       1
      Urgent:      0
      Reserved:    1
      Buried:      0
      Deleted:     11
      Total:       13

Doing the upgrades
------------------
To process the queue, you again use azuki::

   $ azuki daemon hpilo-upgrades
   INFO:azuki:Waiting for job
   Upgrading example-server-1.int.kaarsemaker.net (10.10.10.42) from ilo3 1.70 to ilo3 1.85
   ...

This will keep running and process new items as they come in. You'll probably
want to run it in screen or tmux so it stays on in the background. If you have
lots of iLOs to upgrade, you can start as many instances of this as you want,
they will not step on each others toes. I regularly run up to 30 instances in
parallel in a tmux session.

.. _`beanstalk`: http://kr.github.io/beanstalkd/
.. _`azuki`: http://github.com/seveas/azuki