Tag: ubuntu

  • Jan ’24 Homelab Status

    Jan ’24 Homelab Status

    Whatsit run?

    • ArgoCD as a Git-Ops mechanism
    • Databases (Postgres, Maria DB, Redis, Elasticsearch)
    • This WordPress
    • Mastodon
    • Synapse
    • The Lounge IRC client
    • FreshRSS feed aggregator
    • Audio Bookshelf audiobook and podcast manager
    • kube-prometheus-stack to monitor performance
    (more…)
  • ERROR Guest name ‘img-build-centos7-amd64’ is already in use.

    For whatever reason, the maas-image-builder script for CentOS 7 does not like our local mirror.  We’ll investigate further.  But the problem is that it leaves the qemu vm in a bit of a half baked state.  The process fails, but it doesn’t clean up after itself.  No matter, as we can just as easily do that ourselves.

    root@tnewman3:~/maas-image-builder# ./bin/build centos amd64 –centos-edition 7
    Formatting ‘/tmp/img-builder-3Eef5T/disk.img’, fmt=raw size=5368709120
    WARNING  KVM acceleration not available, using ‘qemu’
    ERROR    Guest name ‘img-build-centos7-amd64’ is already in use.
    Traceback (most recent call last):
      File “./bin/build”, line 45, in
        sys.exit(main(args))
      File “/root/maas-image-builder/builder/main.py”, line 108, in main
        osystem.build_image(args)
      File “/root/maas-image-builder/builder/osystems/centos.py”, line 101, in build_image
        super(CentOS, self).build_image(params)
      File “/root/maas-image-builder/builder/osystems/__init__.py”, line 158, in build_image
        extra_args=extra_arguments)
      File “/root/maas-image-builder/builder/virt.py”, line 76, in install_location
        subprocess.check_call(args)
      File “/usr/lib/python2.7/subprocess.py”, line 540, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command ‘[u’virt-install’, u’–name’, u’img-build-centos7-amd64′, u’–ram’, u’2048′, u’–arch’, u’x86_64′, u’–vcpus’, u’1′, u’–os-type’, u’linux’, u’–os-variant’, u’rhel5′, u’–disk’, u’path=/tmp/img-builder-3Eef5T/disk.img,format=raw’, u’–network’, u’bridge=virbr0,model=virtio’, u’–location’, u’http://yum.tamu.edu/centos/7/os/x86_64′, u’–initrd-inject=/root/maas-image-builder/contrib/centos/centos7/centos7-amd64.ks’, u’–extra-args=console=ttyS0 inst.ks=file:/centos7-amd64.ks text inst.cmdline inst.headless’, u’–noreboot’, u’–nographics’, u’–force’]’ returned non-zero exit status 1
    root@tnewman3:~/maas-image-builder# virsh list –all
     Id    Name                           State
    —————————————————-
     4     img-build-centos7-amd64        running

    root@tnewman3:~/maas-image-builder# virsh undefine  img-build-centos7-amd64
    Domain img-build-centos7-amd64 has been undefined

    root@tnewman3:~/maas-image-builder# virsh list –all
     Id    Name                           State
    —————————————————-
     4     img-build-centos7-amd64        running

    root@tnewman3:~/maas-image-builder# virsh destroy  img-build-centos7-amd64
    Domain img-build-centos7-amd64 destroyed

    root@tnewman3:~/maas-image-builder# virsh list –all
     Id    Name                           State
    —————————————————-

    root@tnewman3:~/maas-image-builder#
    Now we can set about the task of building the image once more.

  • 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.

  • Ubuntu Browser Performance

    Firefox > Chrome

    I’ll come up with some numbers to support whether or not that’s the case, but subjectively, Firefox doesn’t seem to get bogged down as quickly.  I rather enjoy the sync-iness of Chrome, but those little app icons for Facebook and Gmail are pretty slick..

  • Ubuntu on touch friendliness

    UI & Handling

    Can we change the UI to make it more touch friendly?

    The main purpose of this project is to get the core of Ubuntu ready for mobile devices. This means using RAM and power more efficiently, etc. As of now, we can not change the UI to make it more touch friendly. We will however, happily accept patches.

     https://wiki.ubuntu.com/Nexus7/FAQ

  • But the fonts aren’t bad all the time

    Screen cap was taken just after boot.

  • Ubuntu 13.04 on my Nexus 7 (2012), CM 10.2 on Note 2, et. al.

    Last night I installed Ubuntu 3.0 on my Nexus 7 using this guide.

    Order the Thai Breaker, its really good.

    The Ubuntu Desktop Installer did not work for me so had to do it manually from the command line.  I can confirm those commands do work.  If you’ve ever re-installed Android onto your Nexus 7, its a virtually identical process.  Once all of the files were pushed to the device, it rebooted, and presented me with the usual Ubuntu setup wizard, and an on-screen keyboard!  After completing the wizard, it rebooted again, and I was at the usual Ubuntu desktop that we all know and love.

    The experience of interacting with a real Ubuntu desktop on my Nexus 7 blew my mind.

    In the flesh

    Even right now its still awesome.  Touch interaction still has a ways to go before I’d recommend this for prime time (I’ll probably be switching back to Android when I get home from typing this).  If you planned on only using this with a keyboard and mouse, I’d say no problem, but chances are, you’ll want to pick it up and poke at it to get it to do things.  If you are planning on using this at all as a “tablet” don’t do it just yet, Android is still a better option for that.  Once the interface becomes more touch friendly (and I don’t think they have too far to go), they’ll be golden.

    Fit and finish is a little lacking, as you can see in the picture below:
    Glitchy text
    Text in window chrome is glitchy.  This is a super new use of Ubuntu, and its not really meant to be used by the masses yet, so I’m willing to forgive things like that.
    I’m just amazed that it works at all!  Sound works.  WiFi works.  No flash, but I had the brilliant idea of getting a user agent switcher for Chrome that tells websites that I’m on a mobile browser instead of a desktop browser, so that helps a bit.  Bluetooth almost works.  It says that it doesn’t work in the “Known Issues” but I was able to see (but not successfully pair with) my Motorola Xoom Bluetooth keyboard.  Just confirmed that GPS works!  Navigated to Google Maps, Chrome asked me if I would allow the website to access my current location, said ‘yes’, and it went right to where I am!

    Have you ever had a netbook?  Its little better than that.

    Interesting that the text glitches showed up in the screen capture
    Its not as fluid as Android on the same device, but that’s to be expected.  It’s also not as fast as Ubuntu on a real desktop.  It strains easily..  Good at unitasking, not so great at multitasking.. quick.  If I just needed to do one thing at a time, this wouldn’t be a bad option.  Although it does make me curious how well Ubuntu would run on more potent hardware, like the new Nexus 7 that just came out.  Tried some video playback.. Still better off in Android.
    You’re also going to encounter issues with architecture.  This isn’t the same Ubuntu that you run on your desktop (assuming you’re running an i386- or AMD64-based desktop).  This is Ubuntu for the ARM architecture.  So even though there is Flash, Dropbox, and Skype for Ubuntu, there’s not Flash, Dropbox, and Skype for Ubuntu on ARM.  However, you DO have all of those for Android.. except maybe Flash.  I think adobe axed that, which is fine with me (C’mon HTML5!).  Ubuntu on my Nexus 7 does a LOT of what I want my tablet to do, but not everything.  Touch interaction has some work to do.. animation and interface bugs need to be ironed out..  The whole thing needs to be optimized so that its lean and fast.  It would be nice if it could approach the responsiveness of Android, but I’m not holding my breath.

    Overall, I love it, in spite of the fact that I’ll be reinstalling Android very shortly.

    If Ubuntu for ARM contained both interfaces that would be ideal.  If the OS had the ability to switch between the conventional desktop interface and the touch interface they’re developing for mobile, that would be perfect.  Although, I think they should also make the desktop interface more finger-friendly.

    The flipside of that would be to make a desktop for Android.  I feel like it would be easier for Android to make a desktop, than what Ubuntu is having to go through to make a touch interface.  You can already use a keyboard and mouse with Android, but applications take up the whole screen, and I’m still waiting on a LibreOffice APK.  Android already has a massive library of applications, it’s already optimized for ARM..

    As I’ve mentioned before, the PC revolution as we know it is over.  We’re in uncharted territory now.  Microsoft seems to be the biggest player that’s actually pumping out products that are trying to address this.  Ubuntu is hard at work too..  Apple, ironically enough, seems content having a desktop OS and a mobile OS that, while sometimes sharing similar UI elements, are entirely different operating systems.

    Also I installed CM 10.2 on Yong’s Samsung Galaxy Note 2 (i317) this morning.  Everything works!  Even GPS..  a feature that still eludes me on my Galaxy S2 (i777) running CM 10.2 as well..  If my GPS worked..  I would have zero desire to replace my handset…

    Recent price cut on Nexus 4 = sold out 4GB mdoels.

    Next Android OS (4.4) to be called Kit-Kat.  New (?) Nexus accidentally leaked in video from Google advertising new operating system code name, so that’s kinda exciting.  Might actually get this one if it’s priced right.

    Time to go home and swim.  I typed this entire post on my Nexus 7 running Ubuntu 13.04.  Exciting times ahead!

  • Mobile/Desktop Experience

    This is something that Ubuntu is already working on, and something you can partially get away with in Android.

    Right now, Ubuntu is working on a mobile version of their operating system, Ubuntu Touch.  While it can be installed on a variety of devices right now, much of the functionality is missing.  Lots of dummy content.  Think of a phone that’s on display in a retail outlet.  You can get Ubuntu Touch today, but its not ready to be your daily mobile OS…  yet.

    Ubuntu isn’t just making an OS for mobile, they’re doing something more.

    Ubuntu Touch (from my understanding) IS the full version of Ubuntu, just with a more touch-friendly interface.  Applications that you run on your phone are the same versions that you would run on the desktop, again, with a more touch friendly interface.

    The reason for this is because Ubuntu Touch wants to be your desktop.  When you plug a display into your Ubuntu Touch-running phone, you’re at the Ubuntu Desktop.  Attach a keyboard and mouse (or pair wirelessly via Bluetooth) and you have a full desktop experience served up by your phone.

    To my knowledge, Ubuntu is the only project out there like this.  The key to this whole setup is video out.  And currently, many handsets do have video out (MHL).

    So video out is an output but your would-be desktop needs inputs:  Keyboard and mouse.

    Recently, I got a Motorola Xoom Bluetooth keyboard.  It’s compact, made for Android, and fairly cheap ($30 w/ shipping on eBay).  I especially like it because the Android-specific shortcut keys work.  I can press home and it takes me back to the home screen, the gmail button opens gmail, etc.  Its pretty neat.

    What i’m discovering though, is that it is very possible to navigate around the UI with just a keyboard.  Additionally, some apps are nicer about this than others.  Of course, a Bluetooth mouse would make this issue disappear.  But as it stand’s right now, I don’t, and for my purposes I’m not sure I need it.  Using a mouse requires extra desktop real estate, plus I’m an HID snob and don’t like how Bluetooth mice are weighted (wired mice are lighter).  Also, it’s one more thing to carry.

    Right now, I’m typing this on my Nexus 7 (currently offline because this room is walled with lead…  or it might as well be) with my Bluetooth keyboard in the Blogger app.  I’m sitting comfortably away from the screen and the text is readable to me, although it may be harder to read for someone with less than perfect vision.  I don’t think its significantly smaller than text on a laptop or a desktop screen.

    How is this different than a laptop?

    It is more limited, for sure, because I can’t go and get any program or application off the internet and install it, it needs to be made for Android.  But, so long as it provides the same needed functionality, then what difference does it make?  I can write papers, listen to music, write emails, surf the web, chat, get on Facebook, and watch movies.  I’m still feeling it out, but so far, this is a pretty neat solution.

    To-Do:

    Figure out how to open, edit, save files on the phone.  And not just “files” that reside inside of apps (documents in Google Drive, posts in Blogger), files that I can see when I plug my phone into my computer, files that I can send as attachments.  You know, file files.  Living in the cloud is fine, but I would like have the ability to be really capable.

    Printing is another thing.  I know that it’s possible.  Waaaaay back when, when my good buddy Patrick had his G1, he was able to print to an HP LaserJet that was connected to the network.  Printing could be an interesting problem because of drivers.  However, if the printer is shared over the network, depending on how its advertised, it might be driver agnostic.  I’ll need to look into the printing problem further, because that is a very fundamental function of a desktop computer.