Sun Update Connection - Enterprise 1.0 User's Guide

Creating Floating Server Environment

In this procedure, you will use Sun Update Connection – Enterprise to install the needed server profile on the floating server when the load threshold has reached overload, and to uninstall the profile when the load threshold has reached idle.

ProcedureTo Create a Floating Server

  1. Using Sun Update Connection – Enterprise, create the profiles of your servers.

    Define what is required and what is not allowed to be on each type of server. For this scenario, define a WebServerProfile profile and a TelnetServerProfile profile.

    See To Create a Profile.

  2. Create a profile that uninstalls the software of the other two profiles.

    No damage is caused by setting Uninstall to components that are not there. So, make an uninstall profile called IdleServerProfile.

  3. If there are various distributions used in the server pools and in the floating servers, align the profiles for all relevant distributions.

    See To Align Component Settings for Multiple Distributions.

  4. Create a policy that automates all actions (Yes to all actions on all Software) and call it YesToAll.

    See To Create a Policy.

  5. Create groups for each pool of servers, and a group called Idle.

    For this scenario, call the server groups WebServers and TelnetServers.

    See To Create a Group.

  6. In the Idle group, assign a spare server that is your floating server and name it floating.

    See To Assign a Host to Groups and To Edit a Managed Host.

  7. Write a script that takes the output of your local resource monitoring tool when the load threshold has been passed (either on overload or on idle) and runs a script similar to floatingServers.sh.

floatingServers.sh Script

This script is called by a local script that finds the group with an overload or an idle threshold pass. Its arguments are the group with the needed resources (source) and the group that needs the resource (target).


#! /bin/bash 

host=floating 
policy=YesToAll 

function login {
 echo -n “Type your user name:”
 read user
 echo -n “Type your password:”
 read password
 } 

function deployServer {
 uce_cli -sj -P “$profile” -C “$policy” -h “$host” -dp -u “$user” -p
 “$password”
 } 

function findProfile {
 sourceG=$1
 targetG=$2
 if [ $sourceG = “Idle” -a $targetG = “WebServers” ]; then 
               profile=”WebServerProfile”
 elif [ $sourceG = “Idle” -a $targetG = “TelnetServers” ]; then
               profile=”TelnetServerProfile” 
 elif [ $sourceG = “WebServers” -o $sourceG = “TelnetServers” ]; then 
               profile=”IdleServerProfile”
 else 
   echo “Source is not in automated script.”
   echo “From the following list of known profiles, select one to deploy on floating server”
      uce_cli -lp -u “$user” -p “$password”
      echo -n “Profile to deploy:”
      read profile
 fi 
} 
login 
findProfile $1 $2
 echo “Deploying $profile on $host to make it part of $2”
 deployServer

Note –

If the servers in a pool are of one distribution, and the floating server is of another, you can use the BMI Server to recycle the floating server with a new Linux distribution while provisioning it with a profile. Consult with your Sun distributor for details.