/dev/zero - page 4
The infinite stream
-
Importing Key Pairs in Eucalyptus
One of Eucalyptus’s oldest feature requests that people constantly ask about is the ability to import a pre-existing SSH key for use with instances. It even predates EC2’s support for doing that. I am happy to report that Eucalyptus 3.2 will at long last support it as well! (See the change on GitHub.) If you’re following Eucalyptus development, you can try this out right away with
euca-import-keypair
. Chances are, your version of euca2ools already contains it.The thing that makes this feature really nice, however, looks like this:
Just a few hours ago, the new web console that is slated to land alongside Eucalyptus 3.2 later this year gained support for importing key pairs as well. (See the change on GitHub.) I’m sure I am not alone in wanting to thank the contributors who added this.
-
Readable Monospace Fonts
The default monospace fonts on the operating systems I use range from “fairly good” on Mac OS X to “awful” on Windows. This led me to search for alternatives in the hopes that I would find something that is less of a strain on my eyes while I write code. I found a surprising number of good typefaces out there, many of which are even free. I eventually settled on two, depending on what platform I am using.
Inconsolata
Inconsolata is my favorite monospaced font. On top of that, it’s free. It has its own unique sort of style that is easy on the eyes and yet instantly recognizable. It also scales beautifully to sizes both large and small. I use it on everything from terminal windows to code editors to the huge LCD on the wall at work.
Its main downside is that it doesn’t seem to look particularly great on Windows. It looks amazing everywhere else as long as you remember to turn anti-aliasing on. But even at sizes that are too tiny to use anti-aliasing, it still manages to remain legible.
If you use Fedora you can even install Inconsolata using yum.
$ yum install levien-inconsolata-fonts
Consolas
On Windows I use Consolas, a commercial typeface that Microsoft bundles with Windows and Office. It has a sort of roundish appeal to it but still manages to keep just enough of the boxy look that works well for code. It looks cleaner than the Courier New typeface that Windows programs tend to use by default because it drops a lot of serifs that just take up space. Unsurprisingly, it also blows the ancient, raster-based one that the command prompt uses out of the water. Just don’t forget to leave anti-aliasing on.
-
Better Visual Searching in Vim
If you press
*
in the Vim editor it will search for the next place where the word the cursor is over appears. The#
key does the same thing, but searches backwards instead. Unfortunately, this only works for one word at a time. But if you add some code to~/.vimrc
then you can extend those functions to work with whatever you have selected when you are in visual mode." Search for selected text, forwards or backwards vnoremap <silent> * :<C-U> \let old_reg=getreg('"')<Bar>let old_regtype=getregtype('"')<CR> \gvy/<C-R><C-R>=substitute( \escape(@", '/\.*$^~['), '\_s\+', '\\_s\\+', 'g')<CR><CR> \gV:call setreg('"', old_reg, old_regtype)<CR> vnoremap <silent> # :<C-U> \let old_reg=getreg('"')<Bar>let old_regtype=getregtype('"')<CR> \gvy?<C-R><C-R>=substitute( \escape(@", '?\.*$^~['), '\_s\+', '\\_s\\+', 'g')<CR><CR> \gV:call setreg('"', old_reg, old_regtype)<CR>
After adding this, select some text in visual mode (press
v
and move the cursor around) and search for what you have selected with*
or#
.
-
Reverting a Range of Git Commits Separately
All kinds of articles on the Internet tell you how to revert a range of git commits in one massive, squashed-together revert commit. But to split them up into separate revert commits you have to pass a list of commits to
git revert
, and that list has to go in reverse order to avoid conflicts.$ git rev-list --reverse ${last_good_commit}.. | xargs git revert
-
Less Obvious Changes in Eucalyptus 3.1
Now that Eucalyptus 3.1 is out at last and we all get to wade through tons of announcements and blog posts, I thought I would mention a few of the changes that have happened since Eucalyptus 2 that you aren’t likely to see in marketing materials.
Why Eucalyptus 2? Most of us don’t get to use Eucalyptus 3.0, so comparing against that wouldn’t exactly be fair, would it? ;-)
Centralized documentation
The documentation for Eucalyptus 2 was strewn about the Eucalyptus website on a number of wiki pages. You had to read all of them to have any hope of ending up with a working cloud.
Eucalyptus 3’s documentation comes in the form of front-to-back PDFs. HTML documentation is forthcoming. You still need to read it all, but it is now in one place so you don’t have to go digging to find it.
The documentation’s source (in DITA format, if you find that sort of thing interesting) is also up on github, so there is now a way to fix errors: just send a pull request.
A new database
Eucalyptus 3.1 switches from HSQLDB to PostgreSQL. Given the number of Eucalyptus users I have seen over time who have experienced problems with HSQLDB’s behavior in the face of faults, I suspect this will make a lot of people happy.
Correct packaging
The RPM and DEB packages for Eucalyptus 2 fail to list a number of important things they depend upon, making the software needlessly complicated to install. In fact, this was so complicated that the popular FastStart distribution became the method of choice for getting started with a new Eucalyptus cloud.
This is no longer the case. Installation now consists of adding package repositories and telling one’s package manager to install a component. No more “install these dependencies first.” No more “download these packages separately and install them.” In fact, short of a script that writes Eucalyptus’s configuration for you, this completely obviates the need for FastStart.
RHEL 6 support
Eucalyptus 2 is supported only on CentOS 5. It also works on RHEL 5, but users of RHEL 6 and friends couldn’t even compile the stuff. That is now fixed; those operating systems now have full support.
A more usable configuration file
Eucalyptus 2’s configuration file jams everything into one huge list. Nothing gives any indication what Eucalyptus components actually care about each option. There is also no indication how options were affected by one’s choice of networking mode.
Eucalyptus 3’s configuration file and documentation break options down by component. For networking-related options, they also list the networking modes in which they apply.
Bugfixes
Eucalyptus 3 fixes bugs. Lots and lots of bugs. So many bugs that release notes cannot possibly list them all. In the future this will be easier, as every future bug report will now go through a new JIRA tracker.
What else?
Those are some of my favorites, but there are lots of other little improvements all over the place. Try Eucalyptus 3 out and see what you think. You may be pleasantly surprised.