This is 1st part of series of blog posts related to my recent work with Linux and Open Management Infrastructure (OMI). I will have pretty long talk on DAL concept next week and while preparing for it I decided that I need something to demo OMI on. In the perfect world I would take shining new Cisco Nexus (one of models that have OMI as an option) or one of Arista gears (with same prerequisite) and demo it there. There were two pain points in this approach: I have no modern switches lying around at my home/ work was major one. Minor one? It would be pretty hard to take it with me to the presentation. If you compare physical device and virtual machine running on a laptop it’s kind of no-brainer witch one you should pick, right?
So there it is: motivation. I knew what I wanted to do:
Installation:
- Install Linux (that is supported on Hyper-V) as VM on my laptop
- Make sure all OMI prerequisites are met on it (with some GUI, knowing how rusty my Linux skills can be after 10+ years without using it)
- Install OMI and make sure it works locally
Configuration/ testing:
- Try to enable remote access to it (configure firewall)
- Create simple provider to familiarize myself with concepts and procedure
Implementation:
- Implement something useful – I decided to use processes assuming it’s something obvious and easy to demo
- Write CDXML that would pack my CIM calls in something that looks like cmdlet (cmdletization).
I will try to guide you step-by-step (and update this post with link to relevant posts) but before I start, you should be aware that most of it is better explained (for one: in “real” English) in document available on OMI web page. Where we want to get to? Here:
Why I wrote whole series of posts? Because I know that people very often don’t want to read “readme.txt”, “readme”, “release notes”. And it’s harder to google them usually. Also: seeing that someone with so rusty knowledge about Linux and so bad C++ programmer (yeah, right… more like “programmer”…
) could do it may be encouraging for others to write something better and share, so that next time I will want to demo it, I will have something good, not something that kind-of-sort-of-works.
Edit: Even though I think my implementation of Lin_Process provider is terrible (at best) I shared it on GitHub. So if you want to follow my footsteps, or just want to fix it, you can find repository here.
Pingback: Managing Linux via OMI: Installation | IT Pro PowerShell experience
Pingback: Managing Linux via OMI: Configuration | IT Pro PowerShell experience
Pingback: Managing Linux via OMI: Implementation (1) | IT Pro PowerShell experience
Pingback: Managing Linux via OMI: Implementation (2) | IT Pro PowerShell experience
Pingback: Managing Linux via OMI: Packaging | IT Pro PowerShell experience
Hi,
Can you please post your Lin_Process class sample files.
Best
Sorry that it took so long… At first I wanted to re-write it before making it public, but today I decided I probably won’t have time to do that, so for good laugh… you can find it on github: https://github.com/bielawb/LinProcess (if make fails it’s probably because path in makefile is wrong).
Pingback: PowerShell Magazine » OMI and NetworkSwitch module
Pingback: I can run, but I can’t hide… | IT Pro PowerShell experience