Skip to main content

Packer Tips and Lessons Learned

· 4 min read

Packer is a cross-platform tool for scripting out virtual machine images. Put another way: use it to create new virtual machines with fully automated and repeatable installations. No clicking around. Some of the benefits:

  1. Startup fresh virtual machines from a pre-created, Packer-based image in seconds instead of hours.
  2. Use the same scripts to create a local VM, a VWMARE instance, or a cloud-based virtual machine.
    • in other words, you can test your virtual machine creation process locally
  3. Helps you maintain a strategy of infrastructure-as-code, which can be version-conrolled.

Manually Shimming An Application Into the Chocolatey Path

· One min read

Recently I installed MongoDb using Chocolatey, and was surprised to notice that the executables weren't placed into the Chocolately path. Chocolatey uses a shimming process to automatically add executes to PATH. This is really quite nice.

I can imagine scenarios where I have command line executables that weren't installed by Chocotely that I would like to add to my path easily. Or a scenario like this where I want to address something that someone forgot to build into the choco package. Thankfully manually calling the shimgen executable to create a new shim is quite trivial:

c:\ProgramData\chocolatey\tools\shimgen.exe `
--output=c:\ProgramData\Chocolatey\bin\mongodump.exe `
--path="..\..\..\Program Files\MongoDb\Server\3.6\bin\mongodump.exe"

The only key thing to notice is the relative path constraint.

Installing OpenSSH in Windows

· 2 min read

One of my very first technical blog posts was about running OpenSSH on Windows - written over 14 years ago. Recently I was playing around with Microsoft's port of OpenSSH, which has officially achieved version v1.0.0.0 beta status. Installation was pretty easy, but I ran into a little problem: needing to set "user" group permissions. This little gist has my final script. For reasons of my own I didn't feel like running the chocolatey install, so I don't know if it has this permission problem.

Gulf fritillary caterpillars

· One min read

Another backyard success: breeding habitat for the Gulf fritillary butterfly. This medium-sized orange butterfly, while less famous than the Monarch for which it is sometimes mistaken, is a beautiful part of our landscape. Like the Monarch, its caterpillars can only eat from one type of plant ("passionflower") and they have a long-distance migration: across the Gulf of Mexico to southern Florida.

This purple passionflower in these photos only bloomed once or twice this summer, but one or more adult females clearly knew what was what and laid some eggs. I have counted as many as 8 visible caterpillars/pupae of multiple sizes at once (including the one trapped by a spider), and there were probably more that were hiding under leaves and around stems.

photo collage

Support for the Clean Power Plan

· 3 min read

The serious nature of air pollution did not truly hit me until a family wedding in Austin, Texas in the late 90's. That year the pollution was so severe that older family members were warned by their doctors not to attend. As a kid from the suburbs, I didn't have to deal with the reality of "bad air" that millions of people in the urban cores breath day in, day out. As a person of faith, I began to awaken to the manifest injustice of suburban commuters contributing more than their fair share to pollution, from the tailpipe and the power plant. What had been a mere academic awareness suddenly turned visceral.

API Calls from Postman Work, But Not From the Browsers

· 2 min read

Problem

I had just upgraded NuGet packages - a seemingly innocent thing to do. Everything compiles fine and I tried to run my ASP.NET WebAPI service. Testing in Postman works fine, but when I try to let the browser call an endpoint (any endpoint), I get a mysterious 500 server error with a rather unhelpful payload message of {"message":"An error has occurred."}. However, even with Chrome accessing the service, a breakpoint in the endpoint showed me that the code was executing fine. The problem is clearly occurring inside the ASP.NET engine when trying to send the response back to the browser.

Autumn Birds in the Backyard Habitat

· 2 min read

The Yellow-rumped Warblers and Dark-eyed Juncos have been back and enjoying our back yard for several weeks now. This year, the warblers have decided to trust our bird bath - we've frequently seen them drinking and bathing over the past several weeks. While the Blue Jays have still been coming round, and we've had several sightings of Orange-crowned Warbler and Ruby-Crowned Kinglet this fall, I hadn't seen a Bewick's Wren in quite some time. Thus I was delighted to see this guy a few days ago. The light isn't very good, and the window is a bit dirty, but the ID is clear.

Bewick's Wren in crapemyrtle

Bewick's Wren foraging in a crapemyrtle

Mid-June, Mid-Afternoon Birding at Sam Houston Trail Park

· 3 min read

On Friday, the flood waters were fully receded on the Elm Fork of the Trinity River. With only a trace of rain on Saturday, I noticed on Sunday afternoon that the Elm Fork had returned to a flood warning. The Army Corps must have released water from one of the upstream lakes again. Quickly airing-up my tires, I raced down to Sam Houston Park in the hope of crossing the recently revealed causeway and seeing whom I could find on the levee-side of the lake. Alas, I was already too late. But the hour spent at the tantalizingly-small open (to bikers & peds) part of Sam Houston was well worth it the ride.

The Power to Move

· 2 min read

Great stories moves us. They do not only move us: indded, they instill the desire to move. But it is we, the reader or audience, who choose where to go, and what to do.

Moving stories comes in so many packages, though one man's great may be another woman's banal. Tonight I watched an episode of Star Trek: Deep Space Nine that fulfilled all of the promise of social commentary through science fiction. This was in your face; the banal was banished; my comfort and ease were disturbed; and yet I was left with hope by the end.

safnet logo