setupplatform and other new XSCF features
By Bob Hueston on Nov 01, 2007
Some of the key new features in XCP1050 and XCP1060 are:
- Signed XCP releases
- Web UI (aka Browser UI, or BUI)
- Fault LEDs and clearing faults
setupplatformMy personal favorite new feature is the setupplatform command. As a development engineer, I've set up literally dozens if not hundreds of SPARC Enterprise M-class servers, and it's not easy -- you have to create users, set up the network, the hostname, enable optional services, and so forth. The XSCF User Guide has an entire chapter on it. And every time I had to set up a platform, I had to refer back to the user guide.
So a couple of us decided to "wizard-ize" the setup process. Other Sun service processors had a command called 'setupplatform', so we started there. We figured the first thing someone does when they turn on a new machine is log into the service processor and create a user account with useradm (the ability to create more user accounts) and platadmn (i.e., platform administrator, to set-up the rest of the platform) privileges. So the first thing setupplatform does is prompt for a user name and password for a new account with platadm and useradm privileges.
The next thing you normally do is set up the network -- service processor host name, IP address, netmask, default gateway, domain name server, and so forth. On service processors with multiple network interfaces, you need to set up each interface. The setupplatform command leads you through the process. Finally, you need to enable optional services, like the Web UI (aka, Browser UI or BUI), ssh, ntp, and whether you want email notification of important events. That was provided in XCP1050, and in XCP1060 we added support for setting the datacenter altitude, and selecting the local timezone. When the setupplatform command is done and you've answered all the prompts, you're pretty much ready to configure your domain and boot Solaris.
If you find you've made a mistake, you don't have to re-do everything. For example, if you forgot to set up ssh, you could do 'setupplatform -p network' and answer "no" to everything until it prints "Do you want to set up ssh?" Answer "yes" and you're prompted with "Enable ssh service? [y|n]:", and a simple "yes" or "no" will enable or disable ssh. I know from memory that 'setssh -c enable' will enable ssh, but other tasks require more than a simple enable/disable argument (and I'm way too lazy to go read the man page).
Here's a quick sample, creating a new platform administrator user account:
Note that the last few lines of output, while they start with the "XSCF>" prompt, are actually generated by the setupplatform command itself; these are the actual commands that setupplatform executed on your behalf. As a result, you always know exactly what setupplatform did to the system. And in the process, you might learn the syntax of the commands yourself so you can skip setupplatform for simple changes. I think it was a great idea, and I hope others appreciate that as well.
XSCF> setupplatform -p user
Do you want to set up an account? [y|n]: y
User id in range 100 to 65533 or leave blank to let the system
Are these settings correct? [y|n]: y
XSCF> adduser johndoe
XSCF> setprivileges johndoe useradm platadm platop
XSCF> password johndoe
New XSCF password:
Retype new XSCF password:
I have to admit, the prompts are pretty pedantic. For example, setupplatform always asks if you want to set up something, asks you how you want it set up, then summarizes your answers and asks you again if they're correct. But we wanted to make sure people wouldn't hit the wrong key and really screw up their system. Since this is all text-based, it's not like you can hit the "back" button.
I'll write about some of the other new features in coming posts...