Configuration Management Archive

http://www.cyberciti.biz/cloud-computing/use-vagrant-to-create-small-virtual-lab-on-linux-osx/

Good step through on a Vagrant setup.

Be the first to comment

Using git (and Puppet) to manage configurations

Posted January 5, 2015 By Landis V

http://sickbits.net/nagios-deployment-automation-tips-and-tricks/
Specifically with Nagios in the case above.

http://www.linux.com/learn/tutorials/431119:weekend-project-using-git-to-manage-config-files

http://www.networkassassin.com/foss-solution-for-network-configuration-backups/
Great use of EEM to backup config.  It would be interesting to integrate Puppet into this setup and have the system receiving the configs first diff to see if there were any changes, then check with the puppetmaster to make sure everything was kosher.

Be the first to comment

dl-config-compare – Information

Posted March 4, 2014 By Landis V

http://www.timedicer.co.uk/programs/help/dl-config-compare.sh.php

Configuration file update checker for use when changing versions of Devil Linux.

Be the first to comment

Creating a new VirtualBox VM on the command line

Posted March 1, 2014 By Landis V

I finally removed a computer that I’ve had running for quite a while, configuring another “intermittently operational” system to run all the time.  I’d like to have the old system run as a VirtualBox VM on the new system.  My VirtualBox VMs are running headless as services using VboxVMService.  Further, one of my VirtualBox VMs runs an Ubuntu guest which itself runs Linux Containers guests for some small, lightweight hosts on my network.

I’ve got a couple of existing LXC guests that do some monitoring for me using Nagios, run a Gitlab instance, and a couple of others that I no longer need and will probably remove.  I’d also like to set up a couple of new hosts to run a small, simple webserver for my home network “homepage” with links to things I commonly use and a Puppet system to manage my configurations a little bit more efficiently (especially credentials if I look to expand the number of Linux hosts on my network; I’d like the logins to be maintained automatically, and very preferably to be key based).

My straight Nagios monitoring takes a bit more thought to maintain than I’d like, given the number of things on my mind at any given time, so that’s one of the first things I’d like to simplify.  However, from the point of view of simplicity, creating a dead simple web host (though I’d like to eventually integrate some DNS service discovery…) is the simplest.

I spun up a new, basic LXC with Apache, RCS, and a few Perl modules to load Foswiki onto for a basic intranet home page.

Finally attempting to spin a new VM from the command line… fails

VBoxVMService does not allow you to run the VirtualBox GUI at the same time, as I understand it.  As such, I assume that I will need to create any new native (non-LXC) guests I require from the command line.  This Oracle reference describes how to configure the VM instances from the CLI using the ‘vboxmanage’ command.  However, upon issuing a ‘vboxmanage list ostypes’ command, I discovered that even the CLI version appears to be dependent upon the same COM configuration that prevents the GUI from running.  So, I configured as stated at http://sourceforge.net/p/vboxvmservice/wiki/Runing%20VirtualBox%20GUI%20together%20with%20VBoxVmService/.  This didn’t take immediately, so I restarted.

Numerous hassles

I had a lot of problems being able to get back into VirtualBox to work on setting up a VM to replace the machine I took down, generally appearing to be related to permissions.  I’d run across a batch file that someone had written that supposedly sets the permissions appropriately to allow you to switch back and forth between the VirtualBox GUI and VBoxVMService, but it didn’t seem to be very effective.  I was finally successful after uninstalling VirtualBox, deleting the VirtualBox directory, reinstalling, then going into DCOMConfig and setting permissions back to defaults (everything on Security tab as “Use Defaults” and the Identity tab as “Launching User”).  That let me get back in and do some things.

Using a physical/raw disk in a VM

I referenced these instructions to configure the disk I had pulled from my old system as a raw disk for the VM.  A couple of notes on items that proved handy:

  • The command wmic diskdrive list brief under Windows 7 helps to identify the correct PhysicalDrive setting to use in creating the VMDK.
  • User Account Control under Windows 7 is a turd for configuring the physical disk as a VMDK.  I was able to get around this by going into User Accounts -> Change User Account Control Settings and slid the bar all the way to the bottom – i.e., don’t prompt me for anything (I didn’t reboot as the system told me I had to).  I was then able to create the VMDK under my local account, which has administrative privileges (previously I had received the error “VBoxManage.exe: error: Cannot open the raw disk ‘\\.\PhysicalDrive1’: VERR_ACCESS_DENIED
    VBoxManage.exe: error: The raw disk vmdk file was not created” under my own account and “VBoxManage.exe: error: Failed to create the VirtualBox object!
    VBoxManage.exe: error: Code CO_E_SERVER_EXEC_FAILURE (0x80080005) – Server execution failed (extended info not available)
    VBoxManage.exe: error: Most likely, the VirtualBox COM server is not running orfailed to start” under a “runas administrator” command window.

This was a great idea until I determined that I couldn’t (or at least there wasn’t a method I could find) grant my user account raw/physical disk access under Windows 7 Home.  I can run VirtualBox as an administrator and launch the machine, booting from the physical drive, and everything works.  Unfortunately I’d prefer not to run as an administrator, so I will probably need to work on converting the physical disk to an image.  My goal is ultimately to get everything copied off of that drive anyway and eliminate the machine; I had just thought this might be a shortcut to save a step or two.

Be the first to comment

LXC provider for Vagrant – Fábio Rehm

Posted March 1, 2014 By Landis V

http://fabiorehm.com/blog/2013/04/28/lxc-provider-for-vagrant/

I’m going to need to spend some more time with LXC and vagrant.  Had a former coworker who did quite a bit in vagrant and it sounded interesting, but seeing the tie between Vagrant and LXC… I’ve just got to “get it” better.

Be the first to comment

Shrubbery Networks, Inc. – RANCID

Posted December 11, 2012 By Landis V

RANCID is one of those tools that will bubble up in my mind every now and then for some purpose.  I’ve tinkered with it a time or two but it never quite seems to “just work” in the situations I’ve put it in.  Probably because most of them are nonstandard.

Once again I’ve been trying to get it working in a less than typical scenario (under Cygwin, and with HP switches rather than Cisco gear).  Encountered some problems with it not properly retrieving configuration from the HP’s, and just kinda hanging the process.  I didn’t really do a whole lot of investigation on it.  I’ve written some Expect before, but I don’t have the time to dig into it right now just for some statistical information.  So, instead I’ll just make some notes on what I did find in case I ever get a chance to get back to it.

Several people mentioned having problems with terminal length, but that didn’t appear to be the source of my problems.  Tested with rancid-run, clogin, and hlogin all to no avail.  I was able to log in interactively with hlogin, but on logout it left the hpuifilter process running in the background looking like it couldn’t find its parent process to talk to.  Below are a few of the articles I ran across while troubleshooting and still have open in tabs  (tabs I would like to close out, which is my primary reason for making these notes).

 

Be the first to comment