Installing Juniper’s Python module py-junos-eznc on Mac OSX Mavericks

python-logo-master-v3-TMIf you are a networking type who works with Juniper gear, you’ve no doubt heard a lot about automation over the past couple of years. Maybe you’ve heard about Puppet and Chef integration, and maybe Ansible integration, and if you ever ran into Jeremy Schulman, you heard about Py-EZ. Maybe you’re interested in checking this out. Maybe you’re a Mac User and you don’t really want to spin up a VM of linux to check it out. If so, read on.

OSX Mavericks ships with python 2.7 but does not include several tools required for installation of the junos-eznc python modules. Mavericks is specifically missing the xmlsoft tools libxml2 and libxslt. Additionally Mavericks does not include pip.

You can easily install pip by following the instructions at https://pip.pypa.io/en/latest/installing.html

There are pre-compiled binaries of libxml2 and libxslt, but it’s probably safer to build these tools from their source. To do this, you need a few other tools from the public domain: GNU autoconf (because libxml2 doesn’t include a configure file, only a configure.ac file), GNU automake, GNU help2man (because the full text of the man pages is delivered in textinfo rather than man pages format).

This guide assumes that you’ve installed Xcode and Xcode Command Line tools.

Install autoconf
  1. Download the latest gzip tar file from http://ftp.gnu.org/gnu/autoconf/ (as of 20150626 this is autoconf–2.69.tar.gz)
  2. Run the command “tar xzvf autoconf–2.69.tar.gz”
  3. Change diredctories into the resulting autoconf source directory.
  4. Run the command “autoconf” to generate a configure file.
  5. Run the command “./configure” to generate a Makefile.
  6. Run the commands to build source and install the resulting binary.
    make
    sudo make install
Install automake
  1. Download the latest gzip tar file from http://ftp.gnu.org/gnu/automake/ (as of 20150626 this is automake–1.15.tar.gz)
  2. Run the command “tar xzvf automake–1.15.tar.gz”
  3. Change diredctories into the resulting autoconf source directory.
  4. Run the command “autoconf” to generate a configure file.
  5. Run the command “./configure” to generate a Makefile.
  6. Run the commands to build source and install the resulting binary.
    make
    sudo make install
Install xz (required by libxml2)
  1. Download the latest zx source from http://tukaani.org/xz/ (as of 20150626 this is xz–5.2.1.tar.gz)
  2. Run the command “tar xzvf xz–5.2.1.tar.gz”
  3. Change diredctories into the resulting autoconf source directory.
  4. Run the command “autoconf” to generate a configure file.
  5. Run the command “./configure” to generate a Makefile.
  6. Run the commands to build source and install the resulting binary.
    make
    sudo make install
Install help2man (required by libxml2 and libxslt builds)
  1. Download help2man http://www.gnu.org/software/help2man/ (as of 20150626 this is help2man–1.47.1.tar.xz)
  2. Run the command “tar xzvf help2man–1.47.1.tar.xz”
  3. Change diredctories into the resulting autoconf source directory.
  4. Run the command “autoconf” to generate a configure file.
  5. Run the command “./configure” to generate a Makefile.
  6. Run the commands to build source and install the resulting binary.
    make
    sudo make install
Install libxml2
  1. Download libxml2 from ftp://xmlsoft.org/libxml2/ (as of 20150626 this is libxml2-sources–2.9.2.tar.gz)
  2. Run the command “tar zxvf libxml2-sources–2.9.2.tar.gz”
  3. Change diredctories into the resulting autoconf source directory.
  4. Run the command “autoconf” to generate a configure file.
  5. Run the command “./configure” to generate a Makefile.
  6. Run the commands to build source and install the resulting binary.
    make
    sudo make install
Install libxslt
  1. Download libxslt from ftp://xmlsoft.org/libxslt/ (as of 20150626 this is libxslt–1.1.28.tar.gz)
  2. Run the command “tar zxvf libxslt–1.1.28.tar.gz”
  3. Change diredctories into the resulting autoconf source directory.
  4. Run the command “autoconf” to generate a configure file.
  5. Run the command “./configure” to generate a Makefile.
  6. Run the commands to build source and install the resulting binary.
    make
    sudo make install
Install pip
  1. Follow the guide at https://pip.pypa.io/en/latest/installing.html or run the command “easy_install pip”
Install junos-eznc with pip
  1. sudo pip install junos-eznc or pip install git+https://github.com/Juniper/py-junos-eznc.git

That Horse Looks Kinda, Really Fucking Big

A few weeks ago, a good friend posted something to the effect of “Why does the horse always look so much bigger when you’re trying to get back on it?” on his Facebook page. I “Liked” it as did so many other folks, because, well it’s funny and it’s true.

Somewhere over the past, oh I don’t know, six to seven months, I really fell off the horse.  Perhaps this is evidenced by the fact that I’ve not posted anything on this site since March.  Or perhaps it’s better evidenced by the fact that I didn’t ride my bike for 2 months straight after my MS ride in July.  Or perhaps by the fact that I stopped paying attention to my weight, and ballooned to an all time high of nearly an eighth of a Ton.  (That’s 250 pounds folks).

Or perhaps…

The list of things that I should be doing but haven’t been is as long as the list of things that I should not be doing but have been is short.

Rather than bare my soul with a gut wrenching list of my failures, I’ll just list out some things that I am now working on.

  1. Eating a whole foods diet.  My doctor recommended that I look into the “Paleo Diet” and while I was pretty skeptical of it, after reading the book it seems to make a lot of sense.  I’m trying it out.  Basically, what it has come down to for me is no wheat and no dairy.  It’s a lot of lean animal protein, veggies and fruits.  As Michael Pollan says, “Eat Food, Not too much, Mostly Plants.”
  2. Getting some exercise again.  Last spring I ended up at the doctor’s office and ultimately in 3 months of physical therapy because of lower back pain.  PT did wonders, but I foolishly stopped doing the exercises after PT officially ended.  And so, back pain came back into my life.  Walking, and cycling need to be on the list of things to do.
  3. Acupuncture.  I regularly went to get acupuncture for about 3 years to treat migraine headaches.  Thankfully, I haven’t had many migraines, but I haven’t been going to get acupuncture and I miss it.  Even if I’m not having headaches, 45 minutes of relaxation a week is probably a good thing to add to my routine.
  4. Cutting down on the booze.  This pretty much goes hand in hand with getting a good diet going.  There are so many reasons to cut down.  Lots of unnecessary calories.  Lack of presence.
  5. Reading and writing.  It’s time to start reading again and to start writing again.  Most likely that means putting some stuff on this site.

Yeah, that’s a big horse.  I’m gonna get back on it and if I fall off, well, I’ll get back on it again.

Things I wish I’d known at 13

Recently a friend of mine asked me to contribute to a list of things we wished we’d known at 13 for a boy who is about to turn 13.

Here’s what I came up with:

Things I wish I’d known at 13

  • For every person who breaks your heart, there is likely someone who you’ve heart-broken.
  • Shined shoes are one way potential employers judge whether you’d be the right person for the job.
  • Everyone is delicate on the inside. Treat everyone you meet with the respect you’d expect them to show you.
  • Life is not fair, don’t expect it to be.
  • Don’t expect that people will do what you expect of them. Very often they won’t meet your expectations. Accept that they are doing as best they can, and you don’t know what’s going on in their lives that may be impacting them.
  • You won’t meet others expectations all the time either.
  • Some days you won’t have it in you to do your best, that’s okay too. Pick up where you left off and give it your best the next day.
  • Nothing fixes a bad day like laughing. Surround yourself with people who make you laugh.
  • Eat breakfast every day.
  • Don’t smoke. Anything. Ever. It will kill you.
  • Some things you won’t understand until you are much older. Some things you may never understand. That’s okay, too.
  • That girl (or boy) you want to kiss but are afraid to…Just give them a kiss. You might be surprised. (Or embarrassed, but embarrassment fades quickly and you’ll never know until you try.)
  • When you find the person who is the love of your life, you will know it. There may be people you think are “The One”. There may be people you convince yourself are “The One.” These people may not be “The One.” But when you meet the person who you love and can live with forever, you will know it. It may take years to find that person.
  • There are many paths to “success,” your job is to find the one that suits you the best.
  • “Success” does not = $
  • “Stay Hungry. Stay Foolish”

Is this the New Normal?

cropped-IMG_0421.jpg

I’m struggling to understand what’s happened to our collective conscious. Last Friday, arguably the a most severe typhoon in recorded history hit the Philippines and caused massive destruction with wind-speeds of 200 mph upon landfall. On Monday there were reports of as many as 10,000 dead in a single city. Images of dead floating in the streets were widespread on-line. It was clear that the typhoon had devastated the area and that people needed help.

And it’s as if the world stood still.

I saw virtually nothing in my social media streams. With the exceptions of some NGOs like the Red Cross and Environmental organizations, it was as if nothing happened. In the past, social media has exploded with appeals for ways to help. I think back over the last two years about some of the major disasters including Fukashima, Hurricane Sandy, the Boston Marathon attacks. All of them seemed to stir my social media streams with concern. But not this time.

Is it because we are too busy? I don’t think so. We’re no more busy than we were a last year when Sandy hit the East Coast.

Is it because this happened in a far off land? Again, I don’t think so, we responded to the disasters in Fukashima and to the Tsunami in 2004.

Is it because we have grown callous as a society? I certainly doubt it.

Is it because we’ve come to accept these things as the new normal? I hope that I get proven wrong, but I have a growing sense that it is exactly that we are starting to accept huge storms and their inevitable consequences as purely a fact of life.

Please, Donate to the Red Cross or to another charity that supports international relief efforts. And while you’re at it, lobby your congressman to address climate change in a meaningful way. Nothing will change unless we make it change.

Tomorrow is Day 30

Twenty Nine Days
Twenty Nine Days

I thought that my buddy’s 40th would be the hardest day of the 30 day alcohol fast. I was wrong.

Today is day 29 and has proved to be pretty difficult. I had a few meetings scheduled in Hampton and Norfolk, VA. The first meeting was relatively easy, but the second meeting was with a customer who quite frankly is challenging. I’ll leave the details out, but after two hours of circular discussion, we left having accomplished nothing more than showing our faces. I was pretty frustrated and knew that I’d be going out to dinner with my account manager. He was ready for a drink, and so was I.

Before heading out, we checked into the hotel. I told him I’d meet him in an hour. I had a few things to do and needed some time to decompress. I spoke with my wife and told her that I was really thinking that I’d gone far enough with this 30 day thing. Technically speaking, the last drink I’d had was the evening of the 24th of June. I could rationalize that I’d made it to my goal if I wanted to. Then I got a text from my buddy, Matt.

A Timely Text
A Timely Text

The text turned into a phone call and I told him that I was feeling a lot like I wanted to just go out and have a drink with dinner. Matt said to me, “I’m going to give you unsolicited advice. I don’t think that’s a good idea.” He reminded me that I’d made a commitment to myself to go 30 days. I realized that even if I could rationalize it, I wasn’t being true to myself and that I could really find another way to let the stress out.

When the waiter asked if I wanted anything from the bar, I asked for ginger ale with some bitters. ( Yes, technically bitters contains alcohol, but technically non-alcoholic beer also contains alcohol. The amount of alcohol in a few drops of bitters diluted with 10 oz of ginger ale is negligible so I’m not counting it just as I didn’t count the .05% ABV of the NA beer’s I had last weekend.) I enjoyed my dinner – She Crab Soup, Steak, Fries, & Spinach with the pecan pie at the end, and had a good conversation with Bob. I didn’t need the drink. While I might have liked to have one, I really didn’t miss it.

Some might call it providence. Some might call it chance. Some might call it bad timing. But Matt’s check-in came at exactly the right time for me.

Tomorrow will officially be 30 days without drinking. I don’t know if I’ll have a drink tomorrow, the day after, this weekend, next week or in a year a this point. I do know that I’ve made some very positive changes in the past 30 29 days and I’m happy that I made the decision to cut out booze for a while.

I’m also grateful to have good friends who have supported me on this journey. You all know who you are and you’re the best.