I can hardly contain myself!

WARNING!!!!!! Straight from the Mad Scientist!!

Part 1

Curiosity and need often go hand in hand. When you know nothing about something, its best to start reading. Here is “The Docker Book” by James Turnbull. Perfect learners guide.

This blog is an effort to condense this information and help you get past a few wookie traps.

OK, first things first. What is Docker and why do you care? Well, I think of Docker as a multiplexer for the Operating System as opposed to VMware’s HyperVisor acting as a multiplexer for the hardware.

Here is a diagram of the basic differences between Virtualizaion and Containers. When you develop an application, it has dependencies on certain libraries and binaries (files we don’t often think about). If we are developing this on a VM in VMware, the app is dependent on certain files in that particular operation system. So if I ZIP up the APP files and send them to someone on another VM, the APP might not run. The only way to guarantee the APP to work correctly is to send the entire Virtual Machine. Docker builds and manages containers. Every dependent file needed for the APP to run properly are packaged in a very small file called a container. As long as you load the container on a similar docker host, the APP will run perfectly.

vmwarelab+logic

Let’s get started, we will need a workstation to turn into a Docker platform. I am a self confessed VirtualBox user. I could talk about why, but it would just be boring and not any fun. So fire up a new image of Ubuntu. Just found this and I have to admit….its pretty nice. Just take a look!

docker_server

Install Docker:

Installing Docker is straight forward.
Open a terminal window and at the command prompt enter:
sudo apt-get update
sudo apt-get install docker.io

Make sure it installed properly by launching a new container:
sudo docker run -i -t ubuntu /bin/bash

You should now see a new bash root@c0679a7f6d84:/#
If this is what you see then you are in a new container. Congratulations!

UP NEXT!!!! Working with containers. Do yourself a favor and signup for free accounts on Github and Dockerhub…you’re going to need them!

A box inside a box inside a box?

Starting out in a new job and I find myself needing to know way more about VMware than I do now. Luckily, I have not been living under a rock and I know what VMware is. In a very small nutshell, VMware is a virtualization technology that uses hypervisors that basically multiplex the underlying hardware to many virtual machines. Multiple hypervisors are managed by VMware vSphere (Individual hypervisors can be managed by vCenter Client, more on that later). I’m thinking more like a Pistachio nutshell.

I recently acquired a new laptop with 16 GB of RAM and I have gone a little crazy with building Virtual Machines in Oracle Virtual Box and not really having a need for VMware products. Life comes at you fast and you need to learn to adapt or you will no longer be relevant. With a little creative thinking I found a way to build a complete VMware environment with two hypervisors, a vShpere appliance and a couple of real VM’s to vMotion back and forth. Big thanks to sysAdmGirl….she rocks!

Here is a picture of the logical lab environment. Keep in mind there are only two physical devices. The laptop and the Synology data store.

vmwarelab+logic

First things first, you will need to get a copy of Oracle Virtual Box and shutdown anything that is taking up extra RAM on your system, yes Chris, that means you’ll have to shut down TweetDeck as well!

You will see from the diagram the three Oracle VB’s will have 4GB of RAM and a 10GB hard disk and 2 processors. Follow the links to the ESXi hypervisor  (an ISO file), download it and while you are on VMware’s website get the vSphere OVA appliance. Two of  the Oracle Virtual Boxes will be made by using the Oracle Virtual Box interface and create new VM’s make sure to set the network interface cars to “bridged” mode. The third (vSphere) you will just need to double-click the OVA file and it will import into Virtual Box.

When they are all installed and running it will look like this.
vmwarelab+phys

ALERT!!!!! Pay attention here!!!
When you look at the vShere appliance it will say to point your browser to https://some_IP_address:5480. When you do, you will see something that looks like this:

vmwarelab+logic

You are probably thinking, where do I import the ESXi servers?…That’s what I thought too. This screen is to configure the vShpere appliance with single sign on and database storage locations. These are not the droids you are looking for. Drop the port 5480 from your URL and you will be presented the vShpere web client interface.

The VMware vSphere Web Client is a newer interface compared to the VMware vSphere Client (the old school client). The VMware vSphere client is the same tool used to manage a single ESXi hypervisor as well as vSphere. you can find it on VMware site as well. Once it’s installed, just feed it the IP address of your vSphere appliance (minus the port 5480) and off you go!

Alright, now you should have the three VM’s up and running. You will need to create a common data store that is running NFS. I used my Synology Network attached storage device. Find something you can use and figure out how to make it appear as NAS on your lab network. Unfortunately, I don’t know what you will use, so you will have to put on your little grey hat and start looking around. Just Bing it on Google. If you need to know how the ESXi servers connect to the NAS storage you can find that information Here.

What about the VM’s?

OK, so you have this micro environment and we have to find a desktop image we can deploy on our ESXi servers to vMotion back and forth. I found Damn Small Linux (50MB) fits the bill. Get it and load it to the shared NFS storage and use vSphere to create new VM’s on each hypervisor.

You’ve been a good sport so far and I promise we are almost at the end of this exercise. I did this because I thought “I wonder what would happen if I installed VMware in Oracle Virtual Box?” Would it work?  Is it like mixing matter and anti-matter? You are about to find out.

We need to make some slight modification to the ESXi hypervisors network settings so follow along:
vsphere
In this diagram we launch the VMware vSphere Client and give the credentials for the vShpere appliance. Somehow mine is set to root/vmware. Then we click on each hypervisor and edit the networking settings.
vsphere
Drilling down a little deeper, look for the properties and select the Management network (remember, this is for a LAB, in real life you would most likely do something else). Once there, click on the vMotion option to allow vMotion across the Management network.

BOOM! Use the vSphere to “MIGRATE” the DSL VM’s back and forth. Can you say Winner!!!

This is a very brief post about the working of vmware. I found a ton of cool , free, online training  Here at VMware.com

Play Nice, you’re on your way to becoming a VCP!!

I feel a disturbance….but this time it’s a good thing

In case you have been hiding in a wiring closet admiring the weave of the Cat 5/6 cabling the last few months, let me bring you up to date on a big announcement from Hewlett-Packard. SDN.

Here is a link to the page
HP Go SDN!

In 3 days and about 4 hours, HP will officially lauch the HP SDN App Store! This is a place where HP and 3rd party applications will be made available for use with the HP VAN SDN Controller. SDN Applications can either run internally in the controller (Reactive) or externally (Proactive). These application can be easily be downloaded to your controller (Reactive) or run along side of the controller (Proactive).

This is great news because those of us who imagine we are monster DevOps mavens…I did say imagine…can create applications and once accepted, can be accessed through the App Store. These applications can generate revenue for you.

So if you’re a company in need of a SDN solution, you have a place to shop. If your capable of creating your own application, you have a marketplace to sell your wares.

After all, selling SDN applications on the HP SDN App store is my retirement plan…;-)

Also: Good information over at the SDN commiunity Discussion Boards Here

There is a new love in my life!

What can I say? I was with my long time favorite Linux Distro, Ubuntu, and we were having an argument. I wanted it to have the luscious Cinnamon interface, an it was telling me “I don’t have support for that anymore”. There was some initial shedding of tears and I steeled myself and said “It’s OK, at least I have MATE”. Well I looked up my old acquaintance, MATE and it didn’t take long until I remembered why I left in the first place.

I started staying up late at night, Hitting the Googler, hoping I would find some thing new and refreshing. Then it happened, not only did I find something refreshing, but it was also Minty! I had found something very exciting Linux Mint.

enable_server

I downloaded Linux Mint 17 and was instantly amazed by its good looks. We all know that looks can only go so far. So I took Mint out for a test drive and was completely blown away. The first thing I noticed was that the user interface was Cinnamon!!! WOOOT!

It’s the little things that make all the difference in the world. My scroll wheel on my mouse actually made the content on the screen scroll. What a concept! I was able to quickly search the network and mount my Synology NAS storage device. Lastly, I added my HP OfficeJet PRO8500A printer and it all worked flawlessly!

Just a couple quick commands on the commandline….whhhaaaa? The commandline windows are translucent? Out of the box? Just too cool……where was I…oh yes…command line…..I was able to get my L.A.M.P. server installed and with a quick “a2enmod cgi” I had the cgi script execution working as well.

So, do yourself a favor and dump that old distro for something sleek and beautiful and very, very (user) friendly with a minty fresh taste (I couldn’t resist)!

HIP TIP-O-THE DAY: Head over to Virtualboximages.com to find a boat load of “Free” virtual box VDI’s for your downloading pleasure.

Just don’t tell them I sent you!

Goodbye URLLIB2, I’m not going to miss you!

Hot on the trail of another monster chunk of code writing, I found I was stuck in a trap I made for myself. I was at the end of my understanding of Python, URLLIB2 and IMC eAPI’s. I was trying to HTTP POST a chunk of xml into IMC’s Configuration Template library. This was quite perplexing….I tried every thing I could and no matter how I changed the programming, I would still get the dreaded 500 Internal Server error….you know what I’m talking about. I feel you cringing right now!

So, after about a billion Google searches I started seeing the stuff called Requests. Developed by a guy named Kenneth Reitz, it is my new favorite plaything.

Take a look at this sample of URLLIB2 code to get the POST working.

cj = CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
resp = opener.open(c_url)
print c_url
print cj._cookies
# get to the cookie
foo = cj._cookies[‘10.132.0.100’][‘/imc/’][‘JSESSIONID’].value
foo1 = “JSESSIONID=%s” % (foo)
# Authenticate
authhandler = urllib2.HTTPDigestAuthHandler()
authhandler.add_password(“iMC RESTful Web Services”, server, user, passw)
opener = urllib2.build_opener(authhandler)
a2 = urllib2.install_opener(opener)

# Now build header to send HTTP POST for controller file
#agent = “Apache-Httpclient/4.1 (java 1.5)”
pagehandle=urllib2.Request(my_url,c_data) #Add values forces POST
pagehandle.add_header(‘Content-Type’,’application/xml; charset=utf-8′)
pagehandle.add_header(‘Accept’,’application/xml’)
pagehandle.add_header(‘USer-Agent’,’Apache-Httpclient/4.1 (java 1.5)’)
pagehandle.add_header(‘Accept-encoding’,’application/xml’)
pagehandle.add_header(‘Connection’,’Keep-Alive’)
pagehandle.add_header(‘Cookie’, foo1)
pagehandle.add_header(‘Cookie2′,’$Version=1’)
c_result = urllib2.urlopen(pagehandle)

If you ask me, it was good for its time but very confusing with the openers and handlers.

Now here is the same code using requests..

s = requests.session() # This keeps the session open

# Cookie Factory
r = s.get(my_url)
cook = r.headers[‘set-cookie’]
# Strip out the JSESSIONID
x1, x2, x3 = cook.split(‘;’)
# Set up Authentication header info
auth=HTTPDigestAuth(user,passw)

# POST with requests (Probably don’t need all these headers…but they don’t hurt)

headers = {‘Accept’: ‘application/xml’, ‘host’: ‘10.132.0.100:80’, ‘Content-Type’: ‘application/xml; charset=utf-8’, ‘Accept-encoding’: ‘application/xml’, ‘Connection’: ‘Keep-Alive’, ‘User-Agent’: ‘Apache-HttpClient/4.1 (java 1.5)’, ‘Cookie’: x1, ‘Cookie2’: ‘$Version=1’}

# This sends the controller xml data to the IMC server

r = s.post(my_url, data=c_data, auth=auth, headers=headers)

From here I can use: r.headers, r.return_code because everything the remote site sent back is in the variable “r”.

Thank you Mr. Reitz!!!

P.S. In the end it was a xml tag that I had given a wrong name. Correct name wasand I had…..so humbling!

Just take a wiff of that air!

OK, Seems I’m on a roll here with the HP 830 Wired-WLAN controller. Just looking things over and I see I can turn one of the radios on the MSM Access Point into a sniffer.

If you’re fighting wireless connectivity issues this could be a life saver.

In full disclosure: I will tell you that the HP 830 has a web interface but I’m from a planet far, far away and a long time ago. I’m old school so I opt for the command line. after all….question mark is my friend and yours too.

To use one of the radios as a sniffer, you will need to take it out of service. Let’s break it down:

1. If you have “Auto Ap” enabled, it will need to be temporarily disabled, use the undo wlan auto-ap enable command.

2. Change the view to the AP you want to use:
wlan ap ap01_0002 model 425-AM id 5 in this example ap01_0002 is the name of my access point.

3. Enter the radio view: radio 2

4. Disable the radio to change its settings: raido disable

5. Set the channel statically: channel 11 in this example 11 is the channel I statically assigned the radio.

6. Enable the radio: radio enable

7. Use the wlan capture start ap ap01_0002 radio 2 to get the sniffer started.

 

To verify the operation use the display wlan capture to see if it is running
WLAN Capture
——————————————————————————–
AP Name        : ap01_0002
Radio          : 2
Radio Mode     : 802.11n(2.4GHz)
Channel        : 11
Capture Limit  : 10000
File Name      : CaptureRecord.dmp
Status         : Capturing
——————————————————————————–.

8. To stop the capture: wlan capture stop

From the pointed prompt enter the dir command. Talk about a throwback command…you should see a list of filenames. Look for the “.dmp” file.

<AC>dir
Directory of cfa0:/

0     -rw-       298  Dec 06 2013 20:25:38   system.xml
1     -rw-       624  Apr 26 2013 19:23:42   wlan_ca_certificate.cer
2     -rw-      1800  Apr 26 2013 19:23:42   wlan_local_certificate.pfx
3     -rw-      3855  Dec 05 2013 20:49:08   startup.cfg
4     -rw-      2493  Sep 09 2013 22:24:30   basewc.cfg
5     -rw-      5449  Jul 09 2013 18:12:18   830-1-cfg.cfg
6     -rw-      1437  Jul 09 2013 18:15:58   default.cfg
7     -rw-      4610  Dec 06 2013 20:25:40   startup.cfg.old
8     -rw-       149  Jul 09 2013 20:23:12   apcfg.txt
9     -rw-      3075  Dec 05 2013 20:49:06   _startup_bak.cfg
10    -rw-   1199826  Dec 17 2013 20:49:36   capturerecord.dmp
11    -rw-  89019392  Sep 18 2013 08:36:46   hp830-cmw520-r3308p29.bin

1020068 KB total (865328 KB free)

File system type of cfa0: FAT32

Hook up a quick tftp server…something like 3cdaemon…and get it ready to receive a file.

9. Enter the tftp 10.132.0.10 put capturedrecord.dmp command.This will copy the file to your PC.

Rename the filetype to “.cap” and open it with Wireshark.

enable_server

DHCP server in times of need?

OK, say your working on getting the new HP 830 Unified Wired-WLAN controller up and running in a test lab. I know, you’re just like me and like to geek out in the lab…..wear it like a badge of honor. You happen to have the New HP 830 Unified Wired-WALN controller and some access points (MSM-430, MSM-460). The one thing you don’t have is a DHCP server handy in your lab. Fear not! One is closer than you think.

You see, the HP 830 controller actually has an embedded 8 or 24 port gigabit switch. IF you look at the command line for the switch you will see it has all kinds of features and functionality and one of them is a DHCP server.

When you establish a console connection to the controller you will be at the WLAN controller prompt…..<HP>…from this prompt you need to navigate to the prompt for the internal switch. How do you do this? I’m glad you asked. Use the very intuitive command…..oap connect slot 0.

You should now see an identical prompt to the one you were just at <HP>…..from here you can issue the system-view command to get to the [HP] (enabled mode) or CTRL+K to move back to the controller. Let’s stay on the switch prompt and use the system-view to get enabled.

Let’s take a quick peak at what it will take to get it running.

A quick look at the commands.
enable_server

We start off with enabling the DHCP server. Next we specify the name of the server, I used swim2 with the EXTENDED option.
Specify the IP range and mask along with the gateway information. The forbidden IP addresses are optional.

Finally apply the ip-pool to the VLAN interface. In this example it is VLAN 100.

That’s it. You now have a quick and easy DHCP server to use for your LAB environment.

HP’s iMC 7.0 Login Page Customization

I know what you’re thinking. I just upgraded my iMC server to the 7.0 release and now my old login customization no longer works. Well, maybe that wasn’t what you were thinking but at some point you will. So I have been busy here in the “Wookie Lab” and tracked down where the graphic locations are.

If you haven’t tried the new themes in iMC, there are four to choose from.

Classic, Midnight, Gun Metal and Ocean.
enable_server

The corresponding folder locations:
c:\Program Files\iMC\client\web\apps\imc\resources\primefaces-imc-deep-blue\images.

There is also a primefaces-imc-classic-blue, primefaces-imc-cool-black and
 primefaces-imc-elegant-gray directory. You may want to add the custom graphics to those as well.

There are two files that you will need to create. The first is “box_bg.png” This has to be a png file. The graphic dimensions are 508X248.

The second image is “login_bg.jpg” This file will be 1908X1080.

Be creative!

Here I made the box_bg.png file:
enable_server

This will be where  the Username and password fields will be displayed. Don’t worry, just experiment and see what you come up with.

The next graphic is the overall background image login_bg.jpg. This is what mine looks like:
enable_server

Place a copy of both files in the primefaces directories listed above. Make sure you make of backup of the original files….never know if you’ll need them later.

Point you browser over at your iMC server and behold!…..do people even say that anymore?

enable_server

 

Hit me up if you have any questions!!