Category: 3d

  • Signed NVIDIA drivers on Google Cloud Dataproc 2.2

    Hello folks,

    I’ve been working this year on better integrating NVIDIA hardware with the Google Cloud Dataproc product (Hadoop on Google Cloud) running the default cluster node image. We have an open bug[1] in the initialization-actions repo regarding creation failures upon enabling secure boot. This is because with secure boot, kernel driver code has its signature verified before insmod places the symbols into kernel memory. The verification process involves reading trust root certificates from EFI variables, and validating that the signatures on the kernel driver either a) were made directly by one of the certificates in the boot sector or b) were made by certificates which chain up to one of them.

    This means that Dataproc disk images must have a certificate installed into them. My work on the internals will likely start producing images which have certificates from Google in them. In the meantime, however, our users are left without a mechanism to have both secure boot enabled and install out-of-tree kernel modules such as the NVIDIA GPU drivers. To that end, I’ve got PR #83[2] open with the GoogleCloudDataproc/custom-images github repository. This PR introduces a new argument to the custom image creation script, `–trusted-cert`, the argument of which is the path to a DER-encoded certificate to be included in the certificate database in the EFI variables of the disk’s boot sector.

    I’ve written up the instructions on creating a custom image with a trusted certificate here:

    https://github.com/cjac/custom-images/blob/secure-boot-custom-image/examples/secure-boot/README.md

    Here is a set of commands that can be used to create a Dataproc custom image with certificate installed to the EFI’s db variable. You can run these commands from the root directory of a checkout such as this:

    
    
    git clone https://github.com/cjac/custom-images.git --branch secure-boot-custom-image --single-branch
    pushd custom-images
    PROJECT_ID=your-project-here
    PROJECT_NUMBER=your-project-nnnn-here
    my_bucket=your-bucket-here
    custom_image_zone=your-zone-here
    
    gcloud projects add-iam-policy-binding ${PROJECT_ID} \
            --member=serviceAccount:${PROJECT_NUMBER}-compute@developer.gserviceaccount.com \
            --role=roles/secretmanager.secretAccessor
    gcloud config set project ${PROJECT_ID}
    
    gcloud auth login
    
    eval $(bash examples/secure-boot/create-key-pair.sh)
    metadata="public_secret_name=${public_secret_name}"
    metadata="${metadata},private_secret_name=${private_secret_name}"
    metadata="${metadata},secret_project=${secret_project}"
    metadata="${metadata},secret_version=${secret_version}"
    
    #dataproc_version=2.1-debian11
    dataproc_version=2.2-debian12
    #customization_script=examples/secure-boot/install-nvidia-driver-debian11.sh
    customization_script=examples/secure-boot/install-nvidia-driver-debian12.sh
    #image_name="nvidia-open-kernel-bullseye-$(date +%F)"
    image_name="nvidia-open-kernel-bookworm-$(date +%F)"
    disk_size_gb="50"
    
    python generate_custom_image.py \
        --image-name ${image_name} \
        --dataproc-version ${dataproc_version} \
        --trusted-cert "tls/db.der" \
        --customization-script ${customization_script} \
        --metadata "${metadata}" \
        --zone "${custom_image_zone}" \
        --disk-size "${disk_size_gb}" \
        --no-smoke-test \
        --gcs-bucket "${my_bucket}"
    popd
    

    I’d love to hear your feedback!

    [1] https://github.com/GoogleCloudDataproc/initialization-actions/issues/1058
    [2] https://github.com/GoogleCloudDataproc/custom-images/pull/83

  • Gotta’ get ’em all.

    And now I have them all. Maybe I can reduce the load on my wan pipe by setting up a mirror for the island.

    Gotta' get 'em all

  • Jenkara is building

    Okay… after this morning’s post, I decided to make Jenkara build. It is now. You can get it thus:

    $ svn co http://svn.colliertech.org/svn/trunk/jenkara

    or

    $ wget http://www.colliertech.org/downloads/jenkara-0.0.1.tar.gz

    You can build it with ye olde

    $ ./configure && make

    there’s no install target, so run it with

    $ cd src && ./jenkara

    but it doesn’t work for ‘cuz the glade file it reads doesn’t work with the new libglade. I did write this stuff in 2001, after all…

    So if any of you know how to make the following glade file work with the new and shiny, it would be great to get some of that info!

    http://svn.colliertech.org/svn/trunk/jenkara/ui/jenkara.glade2

    One day I will re-write this in C# and run it on mono. Promise!

  • GTK+ OpenGL work

    There’s an opening at Canonical that I’d like to take after the current contract is up. It’s an opening for a OpenGL dev on the Ubuntu desktop team.

    Don’t get me wrong; I enjoy working with my current group quite a bit. We’re building a pretty neat tool. However, building OpenGL into the GNOME desktop has been a personal goal of mine for quite a while now.

    I bought a Voodoo II in 1999, just after I graduated from high school with the hopes of building a video game. The tools for Linux were sparse. There was Blender, but the learning curve is very high, the source was not then open, and I knew I wouldn’t be able to build the whole game by myself. So I started building a 3d modeler myself.

    I got as far as building a quake .mdl loader with rotation, scaling and primitive animation. I was pretty proud of myself.

    I haven’t gotten too far along the path since then, however. Time required by work has increased, and I haven’t been able to find a way to make the two projects (food on the table, continuing work on the modeler) mesh.

    In 2006, I was able to take over maintaining gtkglarea and fix a couple of minor problems. I wrote a c# wrapper around the widget library using Mike‘s excellent gapi tool. I was able to help Rob, Dave and Dylan with Tao.OpenGL (which led to a bit of work on Prebuild). I helped Sam a bit to make gtkglarea-sharp production-ready. But I haven’t had a chance to get that modeler finished…

    I’m nothing if not persistent, though :)

  • An update

    I don’t really have anything really exciting to report, so y’all get to listen to me blather. And after all, that’s what blogs are for anyway, right?

    Zelda is turning 11 months old this month. This is still my favorite picture:
    PA111421.JPG

    I have been dishonorably discharged from Amazon. It seems that I am incompetent. It might have had something to do with slipping a note under the CEO’s door, though. But I have no proof of that, so let’s assume it was an un-related event. Being a nutjob doesn’t necessarily get one booted from employment. I think I can prove that.

    My friends were very supportive during my short stint of unemployment:

    
    18:32 <@drgone> how's being fired?
    18:32 < cj_> drgone: I made money by being fired.  isn't that great?
    18:32 <@drgone> rock on
    18:32 <@drgone> gotta love hush money
    20:13 <@btm> cj: where you working now?
    20:56 < cj_> btm: cardomain.com
    

    I went to lunch with a couple of friends from #mono today. That references earns me the right to spam the monologue folks (hi everyone!). benjoldersma, his friend [Ian] and I went to an Indian place in Fremont. I was hoping that RevFry would come, too, but he is lame.

    We talked about the Seattle Mono Users’ Group (all four of us), Prebuild, the DLR, my hopes of getting a gig at Microsoft to implement Perl6 on the DLR, IKVM, GTK#, gtk+, XAML, WPF, Moonlight, Ubuntu, and other stuff, I’m sure.

    I’m working at cardomain.com on contract. It’s fun. The people there seem smart and interested in what they’re doing. Their development infrastructure makes me happy. The fact that their devs do automated testing also makes me happy. The fact that I have LoS to the Westin makes me happy. The parking situation rains on my parade.

    Speaking of the Westin, I let down my friends with whom I co-locate. I was unable to run to the rack when one of the servers needed love and attention. It cost the other folks quite a bit of revenue. Allow me to apologize publicly. I’m sorry folks. I’m doing what I can to reduce the risk of this happening again. I hope I can make it up to you.

    Hannah got a job at Microsoft working on the Surface team.

    And with that, I will select some categories… thanks for tuning in :)

  • I had to fill out a Bio today… here’s what I wrote.

    My background includes experience in system administration, network operation, technical support, and development of applications on server and client side.

    My primary operating system is Debian GNU/Linux.
    My primary programming languages are C# and Perl.
    I run a small family ISP on a not-for-profit basis: http://colliertech.org/
    I am a “charter” member of a group originally know as “The Linux Internet Support Co-Operative” (LISC). The group is now known as the Open Projects Network (OPN) and is best known for its involvement with the freenode.net IRC servers.
    I hold r/w access to the source code repositories of many “open source” projects including Mono, GNOME, and many projects hosted by sourceforge.
    I self-identify as a Free Software developer, non-pauline christian, democratic socialist and egalitarian.
    I find the work done by the free software / open source community fascinating and attempt to contribute to the project with time available to me.

  • Producing relocatable packages with the GNU build system

    I’ve recently found a need to create relocatable versions of some of my favorite libraries (produced, not-so-coincidentally by the GNU build system). You might find yourself asking “What is relocatable software, and why should I care?” Maybe I can help.

    A piece of software is said to be “relocatable” when it does not rely on an absolute path in a filesystem in order to operate correctly. An example of this type of system is OS X’s .app directory/package framework.

    As it currently stands, if I were to install iceweasel (or Firefox™) in /usr/local/mozilla/, but later realize there is more disk space available in /opt, I would be SOL. If mozilla were built as a relocatable package, however, moving /usr/local/mozilla/ to /opt/mozilla/ would not be a problem.

    There are a couple of things standing in the way of this shiny new future.

    1) In its current state, GNU autoconf accepts multiple absolute paths as argument values. In a relocatable package, all related software must be installed relative to a single point, referred to in autoconf nomenclature as the “prefix”. In a perfect world, all directories relative to the prefix would be further constrained as not to be beneath the prefix root. For example, defining the “bindir” as ${prefix}/../bin/ would be a no-no.

    I have proposed a solution to this problem on the bug-autoconf list.

    2) After a package is created in a relocatable way, how does one find said package once it has been moved?

    The solution to this problem lies in the standardization of the use of pkg-config and subsequent modifications to the $PKG_CONFIG_PATH environment variable.

    The first step is to ensure that your GNU build system includes a rule to generate a .pc file. The standard way to do this is to include a .pc.in autoconf template in the distribution as well as an entry in the AC_OUTPUT( … ) macro of the configure.am file (configure.in in legacy codebases).

    Here are some examples from the Mono codebase. Note that configure.am is named configure.in in the mono codebase. Note further that I am scowling.

    AC_OUTPUT([
    Makefile
    mint.pc
    mono.pc
    mono-cairo.pc
    dotnet.pc
    mono-uninstalled.pc
    scripts/mono-nunit.pc
    ...
    ])
    

    Here are a couple of examples of the contents of .pc.in files:

    cjac@dom0:/usr/src/svn/mono/mono-1.2.5$ cat mint.pc.in 
    prefix=${pcfiledir}/../..
    exec_prefix=${pcfiledir}/../..
    libdir=${prefix}/lib
    includedir=${prefix}/include/mono-@API_VER@
    
    
    Name: Mono Interpreter
    Description: Mono Interpreter Runtime
    Version: @VERSION@
    Requires: glib-2.0 gthread-2.0
    Libs: -L${libdir} @export_ldflags@ -lmint @libmono_ldflags@
    Cflags: -I${includedir} @libmono_cflags@
    
    cjac@dom0:/usr/src/svn/mono/mono-1.2.5$ cat mono.pc.in 
    prefix=${pcfiledir}/../..
    exec_prefix=${pcfiledir}/../..
    libdir=${prefix}/@reloc_libdir@
    includedir=${prefix}/include/mono-@API_VER@
    
    Name: Mono
    Description: Mono Runtime
    Version: @VERSION@
    Requires: glib-2.0 gthread-2.0
    Libs: -L${libdir} @export_ldflags@ -lmono @libmono_ldflags@
    Cflags: -I${includedir} @libmono_cflags@
    

    Of particular importance in these files is the definition of ${prefix}, ${exec_prefix}, ${libdir} and ${includedir} relative to ${pcfiledir}. ${pcfiledir} is set at pkg-config run time as it iterates over the contents of the $PKG_CONFIG_PATH environment variable.

    For example, if $PKG_CONFIG_PATH evaluates as “/home/cjac/opt/mono/lib/pkgconfig:/usr/lib/pkgconfig”, on the first iteration, ${pcfiledir} will store /home/cjac/opt/mono/lib/pkgconfig, and on the second iteration, ${pcfiledir} will store /usr/lib/pkgconfig.

    So! Assuming I installed mono to ~/opt/mono, and I wanted to instead move it to /opt/mono, all I would need to do is the following:

    $ sudo mv ~/opt/mono /opt
    $ export PKG_CONFIG_PATH="/opt/mono/lib/pkgconfig:$PKG_CONFIG_PATH"
    

    And voila. All of my mono-related bits and all references to them have been moved. Independent of the absolute path to the mono package, the prefix can be determined in a consistent way:

    $ pkg-config mono --variable=prefix
    

    Comment away… I’ll try to get rid of some of the spam crowding my comment backlog…

  • Prebuild Autotools target

    Hello public,

    I’m putting some effort into GtkGlAreaSharp again. The supporting bits aren’t really production-ready, though, so rather than hacking on the widget itself and its associated examples, I’m beefing up the underlying platform.

    The first step in the process is making Prebuild a viable meta-build system. Right now it works pretty well for generating NAnt, Visual Studio 2003, Visual Studio 2005 and MonoDevelop build systems. The Autotools target is a bit lacking, however. There is not currently support for recursive projects, ie, solutions with multiple projects. There is also no support for versioned solutions or projects. This makes it difficult to strong-named assemblies, without which, libraries can’t be added to the GAC. Production-quality code is usually added to the GAC, so getting the feature addressed is pretty high priority.

    The reason I’m focusing on Prebuild is that the Tao framework, a cross-platform C# binding to the OpenGL API, uses Prebuild to generate its build systems. I use Tao in the examples distributed with GtkGLAreaSharp in order to demonstrate the widget’s usage, how one might allow one’s users to interact with objects rendered in the OpenGL widget, etc.

    My work so far on the Prebuild Autotools templates is living in my own subversion repository until I get it to a better state than the stuff at sourceforge. If you’re interested in taking a peek, browse on over to https://svn.colliertech.org/mono/dnpbAutotools/

    After we convince Prebuild to generate robust Autotool build systems, I’m going to see how much effort it takes to push Prebuild into the Ubuntu core. After there is an Ubuntu package, it will probably take much less effort to get it packaged up for Debian. One day I will become a DD, but that takes a lot of time, and I hear a rumor that someone has to kick the bucket before they start accepting more :)

    There are also a couple of nearly-complete bugs blocking gtkglarea from working smoothly on win32. This seems like a good place to focus effort after Prebuild does what I want. Plus, then, I will move the gigantic project of adding OpenGL support to GTK+ core forward a few steps.

  • A (round-about) story about Jeffry P. Bezos

    The following is what i wrote on “43people.com” about the boss. I thought it was worth keeping in my own archives, since it’s actually a story about my life as it pertains to Mr. Bezos.



    Back a few years ago, I was taking some classes down in Edmonds. The one I’m thinking of in particular was on the care and feeding of unix. We were using red hat linux 6.0 or some crufty version that wasn’t so crufty at the time.

    Anyway, the prof didn’t require that we buy any books, but he made some suggestions. And he also suggested that we buy them on this new fangled “Internet” thing through a few of his friends down south in Seattle at this place called Amazon.com.

    And thus was my introduction to O’Reilly and Associates. I soon thereafter bought a book called “Open Sources.” It quickly shaped my outlook on life and the way I viewed software, information and communication. The professor of the class told me that O’Reilly and Amazon got along quite well and that Amazon sold mostly technical books. I thought to myself “self, it might be fun to meet some of the folks at Amazon and maybe even take a job there.”

    And that was about as far as I got on that train of thought before I hopped off and got distracted by the shiny bling of 3dfx and internet service providing. During this distracted period of my life (as opposed to the many and varied distracted periods that followed), I spent many an hour curled up in a comfy chair reading books published by Tim and friends that I bought from Amazon.

    Then there was a period of weeping and gnashing of teeth when everyone got disillusioned by the whole humanity taking advantage of the VCs that funded development of the intarwebs thing.

    I was happy to note that neither O’Reilly nor Amazon tanked during this period. This seemed like a well planned and well executed failure to fail.

    After the fall of civilization, I found myself living in a social nexus called “Fey Abbey.” My fellow residents and the visitors were very supportive; I learned quite a bit about building intentional community, social networking, and the connectness of all things living.

    I came up with some ideas about integrating these social networks with computational networks. I never implemented any of them to much extent, but shortly after I shared the ideas with the hive mind, sites like “friendster.com,” “tribe.net,” and “orkut.com” started showing up. Coincidence? Perhaps. Perhaps I had merely “tapped the zeitgeist” as Jeff is wont to say.

    Either way, it taught me something about one’s involvement in community and the impact that such involvement triggers, in whatever direction the impact happens to travel.

    But back to the story. I kept O’Reilly’s and Amazon.com’s success in mind as I delivered pizzas, sewed my wild oats, and dreamed of returning to the life of high technology.

    I mentioned it to one of my confidantes and she said to me “get thee to a computery!” or something not unlike this, so, with her help and the help of my network of friends, I did. And shortly thereafter, but after more time than I would have liked at the time, I had an offer to take a contract working for Mr. Bezos and his company.

    The contract went well; I learned a lot, and I like to think I imparted much wisdom, but rather than riding it out until the bitter end, I took some time to train with some Europeans on how to make software that lasts much longer than anyone would have expected (and maybe hoped).

    I returned to the doors of Amazon.com barely a year later with resume in hand, some ideas that I wanted to implement, and a great deal more experience. The folks with whom I interviewed fought hard to get me on their team, hinting that the group would be getting close attention from senior members of staff.

    So here I am, working with a crack team to build the pet projects of “senior members of amazon staff.” It’s challenging work, but it’s work that I’ve been intending to get done for a few years now. If I read him right, I think Jeff has many of the same ideas about software and perhaps the world as do I. Perhaps I’ll talk to him about it tomorrow night…