Andrew Latham

A recurring issue in most computer system infrastructure is the System of Record (SOR)[1] which is a source of truth about the desired state or the current state of systems and networks. Many outsiders or senior management are left to believe that the planned state and the current state are the same but that rarely happens. I have written a few SORs and enabled others to be more accurate. Much of the work on modern container image manifests [2] has made great advancements to a more complete language to communicate the details of an endpoint. An issue I would love to resolve is the assumption that a single application is the SOR. The reality is that a data service is the ultimately the SOR and many things might read from or write to it. Today if I was asked to write another SOR I would setup RethinkDB [3] and establish a table named 'help' that pointed to a table named 'standards' and thus became self documenting system.

SORs should also be free to access offline in emergencies and distributed systems like RethinkDB and even Git are perfect for this type of setup. A support person or team can maintain a local copy of the SOR with little to no overhead. Even tools like MediaWiki[4] are great as they can be duplicated or distributed as a side effect of their design. For discovery there are established tools like DNS SRV [5] that are often overlooked. A popular solution for datacentres is NetBox [6] which is a fine step forward from RackTables [7] which served many for years and is still not a horrible solution. In my spare time I hope to integrate a DCIM [8] solution into Odoo [9] to connect the various organizational groups together.

  1. https://en.wikipedia.org/wiki/System_of_record
  2. https://github.com/opencontainers/image-spec/blob/master/manifest.md
  3. https://www.rethinkdb.com/
  4. https://www.mediawiki.org/wiki/MediaWiki
  5. https://en.wikipedia.org/wiki/SRV_record
  6. https://netbox.readthedocs.io/en/latest/
  7. https://www.racktables.org/
  8. https://en.wikipedia.org/wiki/Data_center_infrastructure_management
  9. https://www.odoo.com/
Andrew Latham

Python the programming language and versions

Over the many decades Python has become a very stable language. From version to version more things are alike than different. In the last fire or more years people new to the industry have shown their cards by claiming it can't be done.

Not that hard

As I continue to hear sob stories about how hard everything is I keep reaching back to https://www.tomaz.me/2011/12/03/lessons-learned-while-porting-libcloud-to-python-3.html as you can see from the page the date and content show that it is not hard to support various versions if that is a goal.

Personal exp...

Almost exactly three years ago in 2014 I did a fast conversion of Ansible to work with Python 3 in PR 8322 which ended up in a land of personal preferences and overly complex solutions to simple problems. I have worked on converting other projects like PyPXE and Saltstack. In each case I hit walls where confusion is apparent and in every case I am supplying working tested code to prove it works.

Take away

Write better software, think about the future and the past. Work on problems like anything is possible because it is. Develop good clean interfaces and standard APIs in such a way that the software could be written in any version of any language and operate the same. Think before you code.

This rant was brought to you by Andrew Latham in a frustrated situation attempting to understand the lack of effort.

Python Testing

Testing is not hard, don't make it hard.

Andrew Latham

Working on https://github.com/lathama/Adynaton I have setup some testing that runs every time and I want to talk about it. I have worked on software in industries that could benefit from testing, coverage and style checks but the organizational impact causes testing to be a pretty harsh hurdle. Some amazing work has gone into bypassing testing in many industries. Here in this post I am discussing some testing, coverage and style checks that lower the bar and make it easy to use. The testing does not stop the operation or development. The code coverage report is useful. The style check is more of an indicator than anything else. This is a discussion and a process. Enable everyone from support to operations with that warm fuzzy feeling that testing is the new norm. Show the developers that testing is not a blocker.

Andrew Latham

Python CLI Webserver

If you ever need or want to create a webserver with the files in the current directory listed then just use this little snippet.

python -m SimpleHTTPServer

It will inform you of the address it is listening at or you can set the port via

python -m SimpleHTTPServer 8080

With Python 3 you might want to use:

python3 -m http.server

The same method of setting the port with Python 3 too

python3 -m http.server 8080