Archive for the ‘Software’ Category

Script Day: Cloud-init for MS-Windows, The Poor Man’s Version

Cloud-init is a Linux technology that allows easy setup and automation of virtual machines. The concept is very simple – the VM infrastructure provides some way of setting some custom data for each virtual machine (many providers call this “user data”), and when the operating system starts the cloud-init service reads that configuration, loads a bunch of modules to handle various parts and let them configure the system. As a user it is very convenient – you write a setup scenario using the variety of tools offered by cloud-init, you can store the scenario in a source control to allow to develop the scenario further, then just launch a bunch of machines with the specified scenario and watch them configure themselves.

The situation is much worse on the MS-Windows side of the fence: want to have an MS-Windows server configured and ready to go? Start a virtual machine, connect to is using RDP and Next, Next, Finish until your fingers are sore. Need to deploy a new version? either retrofit an existing image (again, manually) and risk deployment side effects, or do the whole process again from scratch.

Here’s a script to try to help a bit with the problem – at least on Amazon Web Services: a poor man’s cloud-init-like for MS-Windows server automation.

(more…)

Software recommendation: MongoDB UI – Robomongo

I’ve been looking a while now for a good way to manage data in MongoDB database servers. The command line tool is OK, but its not really easy to work with, even doing simple stuff like listing the content of a collection.

For a while I’ve been using Genghis, which has an interesting approach to a local graphical interface: it starts a local web server and invokes a web browser to access that server. The UI is pretty nice and very responsive, but it is kind of flaky and lately has stopped working for me entirely. Also the data density you can get from a nice looking web UI is still much lower then you can get in a well designed desktop UI – and when looking at a lot of data records in a database, data density is very important.

Enter Robomongo:

(more…)

Fix another ‘curl|sh’ bogus installation – Heroku

The Heroku toolbelt (which I don’t remember if its mentioned in the “curlpipesh” tumbler mentioned by Amir in his response to my “Fix RVM” post), is a CLI to manage applications on the Heroku PaaS platform. As is common (and horrible) in this day and age they also offer a ‘curl|sh’ type install on their home page.

While the Debian/Ubuntu specific installer is not entirely horrible – it basically adds the Heroku Toolbelt debian repository to the APT source list, updates the package list and installs it, the “standalone” version is as horrible as it can get: download an unsigned binary from the internet, get root permissions and then do something.

For users of Fedora and other distributions, or just Ubuntu users who don’t like installing external repositories on their system, here is a simpler method to get the Heroku Toolbelt running on your system without root permissions and downloading scripts off the internet:

(more…)

The sorry state of the autonomous car discussion

English: Google driverless car operating on a ...As can be evident across the web (for example in this article), the current discussion fueled by Google’s self driving car news and a the possible development plans of other small and large companies is often concerning itself with the morals of a software driven car1. Which is, frankly, unfortunate.

I think that the only people that should be really bothered by all this talk of “who should the autonomous car kill (in case of an accident)” discussion are the programmers hard at Google and other companies, who are suddenly held to a much higher moral standard than expected of programmers who are responsible, today, to hundreds of lives in each instances – such as programmers for railway systems and passenger jets flight control software.

When you look at the problem from the perspective of autonomous transport control software, that is right now being used to safely transport millions of humans daily, its obvious that the main concern of the designers is to have quantitatively better response (more consistent and faster, in that order) than a human, for adverse situations, but qualitatively better – that is, the systems will not pretend to make decisions morally better than a human would do at any given situation, just perform better on the exact same actions that the human it replaces will have taken anyway.

So when a Google self-driving car programmer comes answer to the “trolley problem” or the “fat man problem” discussed in the linked article, they should not be held to a higher moral standard than the average driver, because that is who they are replacing.

 

  1. that is, immediately after the “ooh, technology is so awesome” debate []

Fix RVM “run script from the internet to install”

On Wednesday I complained about the latest UN*X fad of installing software by running scripts from the internet, without any regard to how your operating system handles software installation.

Docker, that I complained about last time, at least has a script that takes into account the local software management solution (uses apt for Ubuntu, yum for Fedora, etc), but RVM – the Ruby Version Manager which is a popular tool among rubyists everywhere, just downloads a bunch of executable stuff (granted, most of it are scripts, but the difference is lost on most people) into arbitrary location on your file system. At least it doesn’t install system software, oh wait – it does.

While I can’t help with RVM’s desire to install system level software (that it actually needs because one of the things you want RVM to do for you is to compile ruby versions from source), I can try to help you figure out how to install RVM where you want it and use it how you want it.

(more…)

Docker and the horrible “one line installation” fad

One of the weird things that sane (or some would say “old skool”) system administrators complain about lately is that with the rising popularity of UN*X systems (mostly Mac OS X and Linux) in the world, and in particular in the software development world, people using UN*X system want less and less to understand how to manage their systems and the culmination is the

to install this complicated system level software, just copy and paste simple wget command to your terminal

with Docker being the most horrible example of that behavior. No sane person (who understand UN*X) will ever think that installing Docker by feeding the content of a URL to bash is a good idea, but for some reason this is the documented and recommended way by the Docker people. Other examples are abound, but lets concentrate on fixing the Docker scenario.

(more…)

Best Terminal Emulator Application

Edge-gnome-terminal

Frankly, I don’t think that there is any point of discussion, it is hands down KDE’s Konsole, but as recently I’ve been using GNOME 3.16 as my main desktop environment, I thought it will be useful to have a list of features missing from GNOME Terminal to be a contender:

(more…)

Microsoft open-sourced MSBuild

The Microsoft initiative to open source the .Net platform (which the MSBuild tool is a part of) has been talked about a lot in the past (though I have something to say about this as well, probably later in this post), but the fanfare has died down quite a bit since the last announcement. One might say that the reason they didn’t open source the entire thing at once was so Microsoft can space out the announcement and synthetically generate continued buzz about their platform, but knowing how these things usually work, its much more likely that because preparing a project for open-source is difficult and time consuming and a project as large as .Net doubly so (or a thousand times so), so it makes sense to do so in parts.

But to the question at hand – what does an open source MSBuild means to you? (more…)

Never let a Mac user design your website, here’s why:

Well, at least until the entire world uses high DPI screens. Lets see an example:

Pulsing button (video)

This is a “call to action” effect on a button – it pulses slightly to get attention. This has proven to be really effective at improving “conversion” (web term to “getting you to do that thing I want you to do”). But even if you are not a designer at heart its easy to see that the text in the button is pulsing at different speeds and this creates a really jarring effect.

(more…)

Script day – Amazon AWS Signature Version 4 With Bash

As anyone who works with the Amazon Web Services API knows, when you submit requests to an AWS service you need to sign the request with your secret key – in order to authenticate your account. The AWS signing process has changed through the years – an earlier version (I think version 1) I implemented in a previous blog post: upload files to Amazon S3 using Bash, with new APIs and newer versions of existing APIs opt in to use the newer signing process.

The current most up to date version of the signing process is known as Signature Version 4 Signing Process and is quite complex, but recently I had the need to use an AWS API that requires requests to be signed using the version 4 process in a bash script1, so it was time to dust off the old scripting skills and see if I can get this much much much more elaborate signing process to work in bash – and (maybe) surprisingly it is quite doable.

With no further ado, here is the code:

(more…)

  1. I’m trying to use SQS to send change notifications from a FreeBSD jail running on a FreeNAS server – a place were I’m uncomfortable installing the AWS CLI tool or the SDK. This also help explains all the FreeBSD compatibility written into the code []