Fabian

Git: Contributing to a git project using a pull request

With so many critical projects available in public git repositories like github, it is important to be able to contribute back additional functionality, tests, and documentation to the original project.  While most projects do not allow a direct commit, contributions can be made by submitting a pull request to original repository. Often times, repositories are Git: Contributing to a git project using a pull request

Ubuntu: Auditing sudo commands and forwarding audit logs using syslog

sudo provides users with temporary elevated privileges to perform operations.  No matter what your security philosophy, sudo is more than likely enabled on your system if even for a limited number of users. And if it is enabled, creating an audit log of exactly what was run (and who ran it) is essential to reporting.  Ubuntu: Auditing sudo commands and forwarding audit logs using syslog

Git: Sharing a single git controlled folder among a group under Linux

With the modern mantra of “everything is code”, operations and network teams must come to terms with how they want to work with source control in a team environment. Imagine a repository that contains configuration templates and scripts for maintaining an application or appliance.  For a multi-member operations team who shares the responsibility for this Git: Sharing a single git controlled folder among a group under Linux

Python: Using pip with a squid proxy

In a production datacenter it would not be uncommon for internet access to be limited to domains whitelisted on a web proxy such as Squid.  If this is the case, and you are using pip to install packages, then you will need to: Have your Squid administrators whitelist pypi.python.org Add the “–proxy” switch when invoking Python: Using pip with a squid proxy

KVM: Deploy the VMware vCenter 6.7 appliance using the CLI installer

Update Nov 2021: I have written a newer article that deploys vCenter 7.0. If you have just virtualized the VMware ESXi 6.7 server on top of KVM, the next step will be to install vCenter 6.7 for its centralized control and additional feature set and management capabilities. In my last article we took KVM running KVM: Deploy the VMware vCenter 6.7 appliance using the CLI installer

Linux: Using GPG encrypted credentials for enhanced security

If you currently store sensitive credentials in plaintext to automate scripting or integration to other systems, you should consider an extra layer of security by storing them encrypted using GPG. There is no fullproof way to hide sensitive information for a service that also needs to decrypt them as part of normal operations (think DVD Linux: Using GPG encrypted credentials for enhanced security

PowerShell: Create Windows Scheduled Task to run Powershell script every hour

If you are using a newer version of PowerShell, then by all means use the New-ScheduledTaskAction, New-ScheduledTaskTrigger, and Register-ScheduledTask and  to create a Windows schedule task using PS scripting. But if you still need to be compatible back to PowerShell 2.0, and want to keep it simple, you can avoid using the Schedule.Service COM interface, PowerShell: Create Windows Scheduled Task to run Powershell script every hour

Ubuntu: X11 forwarding to view GUI applications running on server hosts

Although server hosts typically have no graphical desktop and only serve console-based clients, these machines still have the ability to serve a GUI display screen to a remote desktop if necessary. The X11 protocol makes it possible to send the graphical display to a remote graphical desktop. Beyond the ability to run GUI utilities on Ubuntu: X11 forwarding to view GUI applications running on server hosts

PuTTy: Bulk import PuTTy session definitions into the registry using Powershell

Putty is one of the first tools I install on any host or jumpbox.  And creating a saved session definition is extremely helpful so I can get the right window size, scrollback, keep alives, color scheme, etc. but creating each session definition by hand is time consuming. In this article, I will show you how PuTTy: Bulk import PuTTy session definitions into the registry using Powershell

ELK: Deleting unassigned shards to restore cluster health

If your ElasticSearch cluster is not healthy because of unassigned shards, there are multiple resolution paths. This datadoghq article provides an excellent walk-through of how you can analyze and resolve the situation.  The simplest case is when those unassigned shards are not required anymore, and deleting them restores cluster health. In this article, I will ELK: Deleting unassigned shards to restore cluster health

Ubuntu: Customizing and repacking a deb file

Although there are utilities such as dpkg-deb for managing .deb packages, they can also be manipulated by the standard set of archival utilities: tar, ar, and gzip. This article will lead you through extracting the contents of a .deb file, making modifications to the installation scripts and default configuration files, then repackaging.

Linux: Excluding directories when using zip

If you are using zip and find yourself needing to exclude a directory (.git, build, etc), the “-x” exclude switch can provide that functionality.  Take the following directory structure: $ find . . ./two.txt ./skipme ./skipme/three.txt ./one.txt You can exclude the entire ‘skipme’ folder and everything in it with: zip -r myzip.zip * -x skipme/*

Ubuntu: Gathering hardware and BIOS details

Whether you need to flash the BIOS or check hardware compatibility for a virtualization engine, it is often necessary to gather details on your current hardware, BIOS, and CPU/DRAM feature set. In this article I’ll provide a starting list of commands you can use to gather this information.

iptables: Running service as non-root, iptables to forward from privileged port

There are multiple approaches to allowing a process to run as a non-root user but still provide access to privileged ports (<1024). There are applications like Apache that handle this by starting the master process as root, and then worker processes as a less privileged user.  Another way is setting the privilege on a binary iptables: Running service as non-root, iptables to forward from privileged port

Vagrant: Fixing “error while downloading the metadata for this box”

If you see the message, “There was an error while downloading the metadata for this box”, with a 404 not found return message when doing a box update – make sure to check the URL listed in the Vagrant “metadata_url” files. For example, the “atlas.hashicorp.com” host has been deprecated in favor of “vagrantcloud.com” for some Vagrant: Fixing “error while downloading the metadata for this box”

KVM: Alternate firmware BIOS for KVM

By default, KVM will use an older SeaBIOS x86 firmware for your virtual machines.  If you want to use a more recent version of seaBIOS or want to drop the older BIOS standard and instead use the newer UUEFI specification (Unified Extensible Firmware Interface), KVM can support that with configuration changes. In this article, I KVM: Alternate firmware BIOS for KVM

SaltStack: salt-ssh for agentless automation on Ubuntu

Configuration Management tools like SaltStack are invaluable for managing infrastructure at scale.  Even in the growing world of containerization, there is the need for bulk automation. This article will detail installation of  Salt SSH which leverages the power of SaltStack without the requirements for an agent install.

SaltStack: Installing a Salt Master on Ubuntu Xenial

Configuration Management tools like SaltStack are invaluable for managing infrastructure at scale.  Even in the growing world of containerization where immutable image deployment is the norm, those images need to be built in a repeatable and auditable fashion. This article will detail installation of the SaltStack master on Ubuntu Xenial 16.04, with validation using a single Minion. Note that SaltStack: Installing a Salt Master on Ubuntu Xenial