Andrew Latham

Playing with some libvirt stuffs and setup a quick task to get my HVM nodes working the way I want. Will update with some fine tuning over time.

---

- name: HVM Packages to install 
  apt: 
    name: "{{ item }}"
    state: latest
  with_items:
    - qemu-kvm
    - libvirt-clients 
    - libvirt-daemon-system

- name: Add user to group
  user:
    name: hvm
    groups: libvirt-qemu,libvirt
    append: yes
Andrew Latham

On systems like Debian Stretch with systemd the time sync is baked in but will not run if the legacy NTP package is installed at all so here is a howto/demo of what to do.

# apt-get purge ntp
# systemctl restart systemd-timesyncd.service
# systemctl status systemd-timesyncd.service 
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
           └─disable-with-time-daemon.conf
   Active: active (running) since Fri 2017-08-11 10:09:11 CDT; 3s ago
     Docs: man:systemd-timesyncd.service(8)
 Main PID: 31413 (systemd-timesyn)
   Status: "Synchronized to time server 92.243.6.5:123 (0.debian.pool.ntp.org)."
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/systemd-timesyncd.service
           └─31413 /lib/systemd/systemd-timesyncd

Aug 11 10:09:11 nodeone systemd[1]: Starting Network Time Synchronization...
Aug 11 10:09:11 nodeone systemd[1]: Started Network Time Synchronization.
Aug 11 10:09:11 nodeone systemd-timesyncd[31413]: Synchronized to time server 92.243.6.5:123 (0.debian.pool.ntp.org).
#
Andrew Latham

Clean installs directly from the repos...

Using libvirt (virsh/virt-install/virt-manager) you can install from the HTTP repo of a Linux distribution to be super lazy. During installation you simply provide the URI in the location field or tools like virt-manager will have an option in the wizard.

For Debian you would use:

http://deb.debian.org/debian/dists/stable/main/installer-amd64/

For CentOS which lacks a CDN mirror or I could not find it quickly, you can try:

http://mirrors.kernel.org/centos/7/os/x86_64/
Andrew Latham

My evil list of how to win!

  • No authentication required internally to read-only see the status and flow of a product - linkable steps any boss, support or manager can follow
  • Defined roles for gating products. Not named persons for gating.
  • Full or part time documentation curator. Great entry level position for person separate from the development or operations process.
  • Style Guides, Unit Testing, and Coverage reporting. Don't test everything, just most things!
  • Topic centric meetings with recorder (maybe the documentation curator)
  • Encourage failure disclosure, discourage boasting.
  • In project/agile user stories/etc use standard verb namespacing. Overly vague incomplete example:
    • Design widget requirements
    • Review widget requirements
    • Design widget solutions
    • Select widget solution
    • Define widget interfaces
    • Develop widget component A-Z
    • Validate widget meeting requirements
    • Define QA process
    • Define Release process
    • Release to QA
    • etc...
  • Document the product. Linking to the product source code is not a horrible idea to start documentation.
  • Iterate - work on bite sized items and keep moving forward while validating against the requirements at every step.
    • Validation is a process to mitigate project drift and accidentally report success. Do not reverse this idea.
  • Make it known that the functional deliverable is the product, reports that everything is awesome are not the product.
    • Management and or micromanagement is a distraction. Create clear communication that asymmetrical information is not useful for success.
  • Do not allow tools to decide workflow.
    • Tools can be replaces but workflow is hard to develop. Value the agreed workflow more than a tool
  • Morning pleasantries - Discuss life, food, sports, whatever prior to any issue, get a feeling for the day.
    • Call it morning pleasantries, really do...
    • A person's relative could have passed away over the night, never assume, be human
  • Standups have little value when roles are clear. Dispersed teams are impacted by standups
    • Decide if the roles are accurate and projects/jobs are defined.

TL;DR; Enable https://en.wikipedia.org/wiki/Systems_development_life_cycle for humans.

Andrew Latham

Introduction

Analyzing code to look for irregularities most commonly done with language specific Style Checks is a method of discovering things about the code and possibly some pointers to resolving issues.

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.

Andrew Latham

Devops without the extra parts

You want to deploy code onto a server into a certain directory. You have SSH to the server and it has Git installed. Your desired destination is /home/user/public_html/production/