Aliases in CloudForms and ManageIQ

introduction

It's always nice to save some keystrokes, and CloudForms and ManageIQ have some useful, although not so well known, aliases to help us achieve that.

what we're after

If you're not familiar with the "alias" command in Linux, it's worth looking into. Here's a nice overview. This post will take a look at some of the new aliases that are showing up in the new ManageIQ appliances and the CloudForms 4.2 Beta.

the code

We've talked about the "vmdb" alias before, both here and here. That one is still here and just as useful. The command:

#vmdb

is an alias for:

#cd /var/www/miq/vmdb

If you've typed that often you'll understand the value.

In recent builds of the 4.1 Appliance, we started seeing a new alias, "ap". You're probably quite familiar with this:

Because there are so many other commands that start with "app", tab completion has never been much of a help with this. Now we have a new alias. The command:

#ap

is an alias for:

#/usr/bin/appliance_console

Another new alias is "apstatus". There are a few ways to check what's going on in an appliance from the command line. There's:

#systemctl status evmserverd

as well as (from the /var/www/miq/vmdb directory):

#rake evm:status

or another version of this as suggested by the venerable Peter McGowan:

#watch -n 10 rake evm:status

which will update the worker information every 10 seconds, a great help if you're monitoring worker activity.

On appliances with the UI role enabled, you can check the status of apache

#systemctl status httpd

While the rake commands are still useful and give more information than the status of the service itself, as of the 4.2 Beta, the command:

#apstatus

resolves to:

#echo "EVM Status:";service evmserverd status;echo " ";echo "HTTP Status:";service httpd status

which gives us something like this:

So hopefully this makes your command line experience a little more pleasant, and remember that just running the command "alias" with no arguments or with the -p option prints the list of aliases in the form: alias name=value on standard output:

So you can always check yourself to see if any new and exciting aliases have been added.