|
Sun Grid Engine Information Center Automating the Installation ProcessThis section describes how you can automate the software installation process for the following reasons:
This section consists of the following topics:
About Automatic InstallationYou can use the $SGE_ROOT/inst_sge utility to install and uninstall Sun Grid Engine master hosts, execution hosts, shadow host and Berkeley DB spooling server hosts. You can also use this utility to backup automatically the Sun Grid Engine configuration and accounting data.
You can use the inst_sge utility in interactive mode to supplant any of the commands that were described in Installing the Grid Engine Software Interactively. To simplify automatic installation and backup processes, use the configuration templates that are located in the $SGE_ROOT/util/install_modules directory. The automatic installation requires no user interaction. No messages are displayed on the terminal during the installation. When the installation finishes, a message indicates where the installation log file resides. The name of the installation log file format is install_hostname_timestamp.log. Normally, you can find information about errors during installation in this file. In case of serious errors though, the installation script might not be able to move the log file into the spool directory. In this situation, the log file is placed in the /tmp directory. Special ConsiderationsThe first step in performing an automatic installation is to set up a configuration file. You can find configuration file templates in the $SGE_ROOT/util/install_modules directory. Consider the following as you plan your automatic installation:
To perform this step manually before you start the automatic installation, use the following command: ./inst_sge -db You can also use the following command to install automatically the Berkeley DB Spooling Server: % ./inst_sge -db -m -x -auto <full-path-to-configuration-file> This command checks the SPOOLING_SERVER entry within the configuration file and starts the Berkeley DB installation on the server host.
Using the inst_sge Utility and a Configuration TemplateTo automate system installation, use the inst_sge utility in combination with a configuration file. See Configuration File Templates.
How to Automate the Master Host InstallationBefore You BeginYou need to complete the planning process as outlined in Planning the Installation. In addition, you need to be able to connect to each of the remote hosts using the rsh or ssh commands, without supplying a password. If this type of access is not allowed on your network, you cannot use this method of installation. Steps
The -m option starts the master host installation and installs the master daemon on the local machine. In addition, the -auto option sets up any remote hosts, as specified in the configuration file.
To prevent data loss or destroying an already installed cluster, the automatic installation terminates if the configured $SGE_CELL directory or the configured Berkeley DB spooling directory already exists. If the installation terminates, the script displays the reason for the termination on the screen. A log file of the master installation is created in the $SGE_ROOT/default/spool/qmaster directory. The file name is created using the format install_hostname_date_time.log.
./inst_sge -m -x -auto <full-path-to-configuration-file> a. Wait for notification that the installation has completed. b. When the automatic installation exits successfully, it displays a message similar to the following:
The Install log can be found in the
{{/opt/sge62/spool/install_myhost_30mar2007_090152.log}} file.
The installation log file includes any script or error messages that were generated during installation. If the qmaster_spooling_dir directory exists, the log files will be in that directory. If the directory does not exist, the log files will be in the /tmp directory.
Automating Other Installations Through a Configuration FileIn addition to installing the master host, you can perform a variety of other automatic installations using a similar process. The actual form of the inst_sge command differs slightly, and different sections of the configuration file apply. This section provides some examples.
See Configuration File Templates. Automatic Installation With Increased Security (CSP)The automatic installation also supports the Certificate Security Protocol (CSP) mode described in Installing the Increased Security Features. To use the CSP security mode, you must fill out the CSP parameters of the template files. The parameters are as follows: # This section is used for csp installation mode. # CSP_RECREATE recreates the certs on each installation, if true. # In case of false, the certs will be created, if not existing. # Existing certs won't be overwritten. (mandatory for csp install) CSP_RECREATE="true" # The created certs won't be copied, if this option is set to false # If true, the script tries to copy the generated certs. This # requires passwordless ssh/rsh access for user root to the # execution hosts CSP_COPY_CERTS="false" # csp information, your country code (only 2 characters) # (mandatory for csp install) CSP_COUNTRY_CODE="DE" # your state (mandatory for csp install) CSP_STATE="Germany" # your location, eg. the building (mandatory for csp install) CSP_LOCATION="Building" # your organisation (mandatory for csp install) CSP_ORGA="Organisation" # your organisation unit (mandatory for csp install) CSP_ORGA_UNIT="Organisation_unit" # your email (mandatory for csp install) CSP_MAIL_ADDRESS="name@yourdomain.com" To start the installation, type the following command: inst_sge -m -csp -auto template-file-name
Automatic UninstallationYou can also uninstall hosts automatically.
To ensure that you have a clean environment, always source the $SGE_ROOT/$SGE_CELL/common/settings.csh file before proceeding. Uninstalling Execution HostsDuring the execution host uninstallation, all configuration information for the targeted hosts is deleted. The uninstallation attempts to stop the exec hosts in a graceful manner. First, the queue instances associated with the target host of the uninstallation will be disabled, so that new jobs will not be started. Then, in sequence, the following actions are done on each of the running jobs: checkpoint the job; reschedule the job; do forced rescheduling of the job. At this point, the queue instance will be empty, and the execution daemon will be shut down, then the configuration, global spool directory or local spool directory will be removed. The configuration file template has a section for identifying hosts that can be uninstalled automatically. Look for this section: # Remove this execution hosts in automatic mode EXEC_HOST_LIST_RM="host1 host2 host3 host4" Every host in the EXEC_HOST_LIST_RM list will be automatically removed from the cluster. To start the automatic uninstallation of execution hosts, type the following command: % ./inst_sge -ux -auto <full-path-to-configuration-file> Uninstalling the Master HostThe master host uninstallation removes all of the Sun Grid Engine configuration files. After the uninstallation procedure completes, only the binary files remain. If you think that you will need the configuration information after the uninstallation, perform a backup of the master host. The master host uninstallation supports both interactive and automatic mode. To start the automatic uninstallation of the master host, type the following command: % ./inst_sge -um -auto <full-path-to-configuration-file> This command performs the same procedure as in interactive mode, except the user is not prompted for confirmation of any steps and all terminal output is suppressed. Once the uninstall process is started, it cannot be stopped. Uninstalling the Shadow HostTo start the automatic uninstallation of the shadow host, type the following command: % ./inst_sge -usm -auto <full-path-to-configuration-file> Automatic BackupThe automatic backup procedure backs up configuration and accounting data in much the same way as the interactive backup procedure. You can run the automatic backup procedure as a cron job if you want to schedule unattended or periodic backups. The automatic backup requires a configuration file, for which a template is located in the $SGE_ROOT/util/install_modules/backup_template.conf file. Comments within the configuration file template indicate what values to use for your environment. Starting an Automatic BackupAfter you set up the configuration file, type the following command to start the automatic backup: % ./inst_sge -bup -auto <full-path-to-configuration-file> To prevent overwriting existing backup files, a date/time combination is added to the end of the backup directory name that is specified in the configuration file. Example - Backup Configuration File#--------------------------------------------------- # Autobackup Configuration File Template #--------------------------------------------------- # Please, enter your SGE_ROOT here (mandatory) SGE_ROOT="/opt/gridengine" # Please, enter your SGE_CELL here (mandatory) SGE_CELL="default" # Please, enter your Backup Directory here # After backup you will find your backup files here (mandatory) # The autobackup will add a time /date combination to this dirname # to prevent an overwriting! BACKUP_DIR="/opt/backups/ge_backup" # Please, enter true to get a tar/gz package # and false to copy the files only (mandatory) TAR="true" # Please, enter the backup file name here. (mandatory) BACKUP_FILE="backup.tar" Troubleshooting Automatic Installation and UninstallationThe following errors might be encountered during auto-installation:
If your network does not allow user root to have permissions to connect to other hosts through rsh or ssh without asking for a password, the automatic installation will not work remotely. In this case, log in to the host and use the following command to start the automatic installation locally on each host: % ./inst_sge -x -noremote -auto /tmp/install_config_file.conf Supplemental Information |