Category: Technology

  • Ubuntu MaaS + maas-image-builder + CentOS 6

    Ubuntu recently announced support for other operating systems to be deployed with their Metal as a Service provisioning utility.  The hosting company that I work for is primarily a CentOS and Windows shop, so I was curious to experiment with this utility.  While it is still in a testing phase for us, this shows great promise as a replacement for our existing PXE server.

    I just used MaaS to successfully install CentOS on one of the nodes in my test network about 30 minutes ago, so bear with me.  This will likely be a working document.

    My test setup consists of:

    • A Dell 1950 server performing NAT duties connected to one of our access switches.
    • The other port on the NAT box is connected to my test Cisco switch (not the access switch).  NOTE:  Something that gave me a bit of headache in the beginning was link negotiation between the switch and the interfaces on my servers.  Spanning-tree portfast is your friend.  Initially, I suspected that it was a firmware issue (BMC firmware), but really it was the interfaces not coming up in a timely manner.  I was able to successfully install Ubuntu on other servers that did not have up-to-date BMC firmware.
    • Connected to to the test switch is an Ubuntu server with MaaS installed.
    • Multiple “node” servers (Dell 1950’s of varying specs) are also connected to the test switch.

    Installing and getting MaaS up and running is straightforward enough, and Ubuntu’s documentation is sufficient.  Initially, I tried to model my setup after their topology diagram on their site, with a ‘Region Controller’ manipulating satellite ‘Cluster Controllers’.  I may come to back to that (my setup was torn down and rebuilt a few times during this whole process), but for our testing purposes, one MaaS server to start.

    I did a couple of Ubuntu installs just to make sure all the vanilla MaaS functionality was working as it should.  Again, for our purposes, an Ubuntu-only provisioning system would not be practical.  The focus then shifted to how to use MaaS to provision CentOS.

    I suspect that because this feature is relatively new, there is not a lot of documentation on this subject.

    The kind folks over at #maas on freenode directed me to a script on Github.  I was unable to use the script directly, but after close examination discovered something interesting.

    command sudo ./bin/build centos amd64 –centos-edition 7

    HMMMM.  So I got to googling..  and found this:  maas-image-builder  So, I downloaded it, and poked around a bit.  From the readme:

    root@tnewman3:~/maas-image-builder# cat README

    Automated building system for tarball images used by the curtin installer.

    Supported Operating Systems:
     – CentOS 6 (i386, amd64)
     – CentOS 7 (amd64)
     – RHEL 7 (amd64)

    Well that seems really flipping promising.  So, using that previously mentioned script as a template, I issued the following command to install the necessary dependencies:

    ./bin/build –install-deps

    I let that complete, then for the magical part:

    ./bin/build centos amd64 –centos-edition 6

    I should note that we doctored /maas-image-builder/builder/osystems/centos.py to use our own mirrors at  http://dist1.800hosting.com/centos/  This sped up the process considerably.

    Basically, an image gets installed into a QEMU VM, a snapshot is taken, and that is the image that MaaS pushes to provision servers.

    In the script the author jjasghar suggests grabbing a coffee.  On the hardware that I was using, it took a VERY VERY long time.  Though I can’t say exactly how long it took, because I left the image to bake over night.  It was on 2 hours when I left for the day.

    When I came back in the morning, I checked to see if the process had completed, and sure enough:

    root@tnewman3:~/maas-image-builder# ls -al build-output/
    total 540132
    drwxr-xr-x 2 root root      4096 Feb 20 10:17 .
    drwxr-xr-x 7 root root      4096 Feb 19 22:02 ..
    -rw-r–r– 1 root root 276538776 Feb 19 22:02 centos6-amd64-root-tgz
    -rw-r–r– 1 root root 276538776 Feb 20 10:17 centos6-amd64-root-tgz.bak

     (I immediately made a backup of the image just to be safe)

    Wonder of wonders, the process completed!

    Referring back to centos.rb, the next step is to add the newly created image to the MaaS service itself.  This was achieved by:

    root@tnewman3:~# maas root boot-resources create name=centos/centos6 architecture=amd64/generic content@=/root/maas-image-builder/build-output/centos6-amd64-root-tgz

    Again, slightly modified from the version in the centos.rb script to use the MaaS user (‘root’) that I had created and to reflect our choice of CentOS 6 and not CentOS 7.

    From there, I went into the MaaS options in the web interface, specified ‘CentOS’ as the ‘Default operating system used for deployment’ and CentOS 6.0 the Default OS release used for deployment and went about commissioning and provisioning a server as usual!

    I logged in with

    root@tnewman3:~# ssh [email protected]

    No password is required, as it uses the SSH key that it would normally use for any other provision.

    I hope that this write-up of my MaaS CentOS experience is helpful to others and I welcome feedback!  I will update this post with tweaks and modifications as we tailor MaaS to fit into our existing workflow.

    TL;DR – It is quite possible to provision CentOS with Ubuntu’s MaaS service.

    Non-update Update 4-2-15:
    When I was working on this I got kind of consumed by it.  Very intense work on it..  and then..  nuthin.  I am sure we will come back to this at some point.  Thank you very much for all the interest in my post, but at least as of today, this post is not being maintained.  I do hope that Ubuntu/Canonical adds some serious documentation as the MaaS feature matures.

  • per-program memory usage analyzer

    ps_mem!

    “A utility to accurately report the core memory usage for a program
    Yes the name is a bit weird. coremem would be more appropriate, but for backwards compatible reasons the ps_mem name remains.”

    https://github.com/pixelb/ps_mem

  • Dell D620 Flair

    Ordered some Rinse.FM, Ubuntu, and Kubuntu stickers today too, and good buddy Robbie says that he’s going to bring me more tomorrow 😉

  • K Desktop Love

    Yup, I think I might have a soft spot for KDE..

  • DHA Meetup! Lubuntu! Aced the LFS101x Final! Bigger HDD for the D620!

    Went to my first MeetUp last night

    Monthly meeting of the Dallas Hackers Association!  Lots of fun!  Discussed the recent developments in the Linux world and other experiences in IT/infosec.  I’ve made it a recurring event on my calendar.  There are more events that I’m considering going to, but I’d need to do some rearranging of my work schedule to give me more time to do stuff on the weekends, and that might be a tall order (pun intended ZING).

     

    Lubuntu on the D620

    Very responsive.  Current (at least until Lubuntu 14.10 is released).  Doesn’t have dependency issues.  Wi-Fi works.  I’ve been very pleased with it!  No random freezes like I had for some reason on my desktop.  I suppose the only other thing that I could do is get more RAM for it.  LXDE is snappy enough, and DDR2 is stupid expensive..  I’ve spent about $50 on parts that are unique to this computer (batteries).  The hard drive that’s supposed to get in today is transferable so I see that as more of an investment than a purchase since I can use that going forward.  Hell, I could even make it into an external.

     

    Kubuntu on the Desktop

    Contemplating what might be a better utilization of that computer.  Has Kubuntu, CentOS 7, and Win7 Pro.  Most of the desktoppy data is in Windows.  Thinking about using that computer as a landfill for my data.  Also an excuse to play with RockStor?  Love the concept of a roll-your-own Drobo.  I do REALLY like KDE.  I do really get the sense that its very mature, albeit a bit big..  Ars has a great article about the next iteration of KDE, Plasma 5.  Can’t wait for the wrinkles to get ironed out of that.

     

    Successfully completed LinuxFoundationX: LFS101x Introduction to Linux

    Got every question correct on the first attempt! Not exactly sure what I want to do next.  I do still need to finish Hitchhicker’s Guide to the Galaxy…  Perhaps something a little more..  I was going to say ‘useful’.  I should look for more things like it.  More activities to work through.  As I may have mentioned before, I knew a fair amount of it going into it, but there was certainly a ton of stuff that I didn’t know, and I appreciated the distinctly *nix flavor of it.  I hope that The Linux Foundation comes out with more offerings on edX.

     

    Hard Drive set to arrive today!

    Going from 80gb to 1tb 😉  Watched a video of the install and looks super easy, just undo a couple of screws, slide it out, replace the hard drive in the carrier, pop it back in, tighten everything up, and you’re good to go!  Of course I’ll have to install everything again, but hey, that’s half the fun right?  I think Unix Stickers might help me totally complete the package 😉

  • Rockstor web-ui demo video


    Idea for the hard-drive filled desktop?

  • Firefox ESR 31.1.0

    Mmm..  Firefox ESR 31.1.0..  I feel so current!

    Even better, it doesn’t feel any less responsive, I’ll take it!

  • Batteries Ordered!

      
    Very excite!  $45.88 for a replacement stock battery, and a “modular bay battery” to go in the place of the seldom used DVD drive.  Hard drive might be next..