SEARCH DOCS
info central: your site for Collage technical info
  CASSATT.COM   INFO CENTRAL
ACTIVE RESPONSE 5.0 TOPICS BLUEPRINTS TROUBLESHOOTING DOC INDEX


 

TOC

Prerequisites
The blueprint steps
Step 1: Reserve a node from the free pool to use as an image host
Step 2: Install and configure the operating system

Step 3: Install and configure your software

Step 4: Capture the image
MySQL Management Tier
Step 5: Create the tier
Step 6: Personalize the image instances
Step 7: Allocate nodes and activate the tier
MySQL Storage Tier
Step 5: Create the tier
Step 6: Personalize the image instances
Step 7: Allocate nodes and activate the tier
MySQL Reference

MySQL Troubleshooting

   
 

Sidebars

Tier dependencies: what you should know
   
know-how:

MySQL: Capturing an Image and Creating Tiers

Intended for use with Cassatt Active Response V5.0.

This blueprint walks through preparing the MySQL software to run in the Cassatt Active Response environment. If you haven't read Understanding Blueprints for Deploying Applications, read that first for background and context.

The following illustration suggests how to organize hardware and software to run MySQL in a Cassatt Active Response environment.

Prerequisites

Hardware requirements:

  • Make sure enough nodes in your Cassatt Active Response environment have local disk to satisfy the max nodes for both tiers. Consider any other tiers in your domain that may also require local disk.
  • If you are installing a 64-bit version of the OS, and you have not already done so, follow these steps to set a custom attribute to identify x86_64 servers and ensure they are the only nodes allocated to run the image:
    1. Identify all of the x86_64 nodes.
    2. Add a custom attribute to each of those nodes that indicates the nodes can be allocated to run images that require a 64-bit-capable archictecture. Refer to the online help topic entitled "Using custom hardware attributes to specify hardware for your software" for information.
    3. When you capture the WebLogic image, assign the same custom attribute to the image as you assigned to the nodes.
    4. When you create the WebLogic tier, the custom attribute is assigned by default. Do not remove the custom attribute.

If you intend to run a 64-bit version of the OS in VMware ESX 3.0 VMs, you must have set up your VMware host tier with a custom attribute for supported x86_64 nodes. See also VMware KB 1901, Hardware and Firmware Requirements for 64-Bit Guest Operating Systems for supported 64-bit–capable processors. You must also have set a custom attribute on the VMs created by the host tier to indicate that the VMs are running on an x86_64 host.

Software requirements:

  • Red Hat ELAS 3 or 4
  • MySQL 4.1 Linux X86 RPM downloads (see "Download MySQL software")
  • NDB cluster RPM downloads
  • MySQL Connector/ODBC 3.51
  • Linux x86 RPM
  • MySQL Query Browser
  • MySQL Query Administrator
  • Your business applications

Tier Settings:

  • SLAs: Determine the capacity settings for the MySQL tier. To understand how to determine capacity levels, see Understanding Tier Configuration and Personalization.
  • If your MySQL tiers will run in VM guest tiers, determine which VMware host tier (or tiers) will provide the VMs for your MySQL tier.
    • Tier Dependencies: If this tier will run only in VMs, and not on physical hardware, select at least one of the VMware host tiers as a tier dependency to ensure that VMs are available for this tier. For more information, read about tier dependencies.
    • Custom Attributes: To ensure that VMware VMs are assigned to the tiers, use the vmware custom attribute, which Cassatt Active Response assigns to VMware VMs automatically.

      Also, use the custom attribute that designates storage for the VMs in the host tier (or tiers). Because the custom attribute represents the storage access, use only one storage custom attribute to ensure that all VMs allocated to the tier have the same storage access.
    • HBA key: FC SAN only—use the HBA key from the VMs in the host tier (or tiers).

Network Requirements: Determine the network to associate with the tier. Make sure it has adequate IP addresses free to accommodate maximum nodes for the tier.

The blueprint steps

This blueprint follows the standard high-level blueprint steps. In this blueprint, you will do steps 5–7 twice in succession for the two tiers the blueprint requires.

top

Step 1: Reserve a node from the free pool to use as an image host

  1. From the Controller, click the Free Pool.
  2. Select a physical node to reserve.
    You can differentiate between physical and virtual node by looking at the ID; virtual node IDs are appended with _vnodeN, for example, node003_vnode1.
    Be sure to select a node with the architecture required for your operating system; that is, Sparc for Solaris or IA32 for Linux or Windows.
  3. Select Node Actions > Reserve for Image Capture.
  4. Note the node's IP address, which you will use when you install the OS and capture the image.

Step 2: Install and configure the operating system

Follow instructions to install and configure ELAS 3 (32-bit only) or 4 (32-bit or 64-bit): Red Hat ELAS.

Red Hat Enterprise Linux 5 is not supported for this blueprint.

If this image will run in VMware VMs, make sure your Red Hat ELAS version and update level are supported by VMware. For more information, refer to your VMware documentation.

Step 3: Install and configure your software

Remove existing MySQL packages

  1. Use the following command to check for any MySQL packages installed with the operating system:

    rpm -qa |grep -i my
  2. If the previous command returns the names of any MySQL packages, use the following command to remove them:

    rpm -e RPM-1 RPM-2 RPM-3...

    In this command, RPM-n is the name of the package. For example, if the rpm -qa command returns the mysql-devel-3.23.58-1, perl-DBD-MySQL-2, and MyODBC- 2.50.39-12 package names, remove them with the following command:

    rpm -e mysql-3.23.58-1 perl-DBD-MySQL-2 MyODBC-2.50.39-12

The MyODBC package has dependencies on the MySQL packages. To remove the MySQL packages, you must also remove the MyODBC package.

Download MySQL software

Prerequisites

  • Identify a directory where you can download the MySQL and other related RPMs. This directory should not have any other RPMs in it, as the installation installs all RPMs.

Follow these steps to download MySQL and other required software:

  1. Download MySQL packages:
    1. Open a browser and navigate to http://dev.mysql.com/downloads/mysql/4.1.html.
    2. Navigate to Linux x86 RPM downloads.
    3. Download the following MySQL packages to the image host:
      Server
      Server Max
      Client Programs
      Dynamic client libraries
      Libraries and Header Files
    4. On the same page, navigate to NDB Cluster RPM downloads.
    5. Download the following NDB packages (required by the MySQL management tier) to the image host:
      MySQL NDB Cluster (x86) - Storage engine
      MySQL NDB Cluster (x86) - Storage engine management
      MySQL NDB Cluster (x86) - Storage engine basic tools
      MySQL NDB Cluster (x86) - Storage engine extra tools
  2. Download the MySQL ODBC package to the image host. (This package provides ODBC connectivity to the MySQL database.)
    1. Navigate to http://dev.mysql.com/downloads/connector/odbc/3.51.html.
    2. Navigate to Linux X86 RPM downloads.
    3. Download the following package:
      Linux (x86, libc6)
  3. Optional: Download the MySQL Query Browser to the image host. (This package provides a graphical user interface for running queries.)
    1. Navigate to http://dev.mysql.com/downloads/query-browser/1.1.html.
    2. Navigate to Linux x86 RPM downloads.
    3. Download the following package:
      Linux (x86, libc6)
  4. Optional: Download the MySQL Query Administrator to the image host. (This package provide a graphical user interface for managing MySQL.)
    1. Navigate to http://dev.mysql.com/downloads/administrator/index.html.
    2. Navigate to Linux x86 RPM downloads.
    3. Download the following package:
      Linux (x86, libc6)

Install MySQL software

Follow these steps to install MySQL on the image host:

  1. Log in as the root user on the image host.
  2. Change directory (cd) to the download directory on the image host.
  3. Use the following command to install MySQL and other support packages:

    rpm -iv *.rpm

    If you want to set MySQL passwords, do so when prompted.
  4. If for any reason you need to re-install MySQL during the initial setup on the image host, you first need to uninstall MySQL as described in "Remove existing MySQL packages ."

  5. Use the following command to ensure MySQL does not start up on a reboot of the image host:

    chkconfig mysql off

Download custom scripts

Follow these steps to download support scripts required in the MySQL image.

  1. Click the following link:
    mysql-scripts.zip
  2. Download the zip file to a local directory.
  3. Unzip the ndb and ndb_mgm files into the /etc/init.d directory on the image host.

top

Step 4: Capture the image

In this step, you will capture the base image from the image host using the cccapture command—an interactive script. Although you can change the values later, it is most efficient to supply valid values now.

Note that for this blueprint, the same MySQL image is used for both the management and the storage tiers.

Follow these steps:

  1. Log into the active control node as root.
  2. Enter the following command to start the capture of the base image from the image host:

    /opt/cassatt/bin/cccapture
  3. Answer each prompt.

    The next table lists the suggested values for the MySQL blueprint; unless you have site-specific reasons, accept the default values for other cccapture prompts.

    For names, descriptions, and other discretionary fields, use values that are meaningful to you. In the image name, do not use spaces or characters (for example, /) special to Unix-based file systems such as Linus and Solaris.

    For file system selection: selecting unneeded file systems wastes space but is otherwise harmless.

    At this prompt...

    Enter...

    Notes

    Enter the image type (linux,vmhost,windows,solaris): linux  

    If a tier using this image must always run on a specific set of nodes,
    custom attributes can be specified for the tier. These same attributes
    must then be specified on each node that will be reserved for the tier.
    The Cassatt system will then match on these attributes to ensure that
    those nodes are always allocated for a tier with this image.

    Do you want to specify any custom attributes for tiers using this image? [n]

    y or n

    If you installed a 64-bit version of the OS, use one of these custom attributes:

    • If the image will run on 64-bit capable hardware, specify the x86_64 server architecture custom attribute.
    • If this image will run in in VMware ESX 3.0 VMs, then specify the custom attribute you set on the VMs to indicate that the VMs are running on an x86_64 host.
    Enter an attribute value for nodes to use: x86_64attribute

    Enter the hardware architecture for this image

    (ia32): [ia32]

    ia32 Select "ia32" even when your image requires a 64-bit-capable server. A custom attribute is required to ensure allocation of 64-bit-capable servers.

    OS Monitoring Options

    Specify the operating system monitoring that will be used
    for this image (at least one monitoring option must be
    configured):
    Monitor via SNMP? [n]

    y

     

    Monitor via ping?

    y

     


  4. In the Controller, release the image host back to the free pool by selecting the node using the checkbox, then select Node Actions > Release from Image Capture.

top

The MySQL management tier

Step 5: Create the tier

Using the Controller, follow these steps to create and configure the MySQL management tier. Cassatt Active Response prepopulates tier values with the parameters you set during the image capture. If necessary, you can change them during tier creation.

  1. Open the Controller and on the left navigation pane, click Tiers.
  2. On the right side of the Tier page, click the New Tier button .
  3. Set properties for the MySQL management tier. The next table lists suggested values for the MySQL blueprint. Unless you have site-specific reasons, accept the defaults in other fields.

    Prompt or Parameter

    Example Value or Selection

    Notes

    Email Alerts

    On

     

    Email On:
    Tier Critical
    Tier Non-Critical


    Select all choices

    Reboot on failure

    On

     

    Automatic move to maintenance pool

    On

     

    Tier Priority

    Low

     

    Allow harvest

    Off

    Cassatt Active Response does not harvest nodes such that a tier has less than its minimum required number of nodes. Setting harvesting to Off, in this case, is good practice, indicating that you don't want nodes harvested from the management tier. The MySQL storage tier depends on the management tier, so you would never want the management node to be allocated to another tier and unavailable to the storage tier.

    Note that in the event the management node goes down, Cassatt Active Response allocates a new node from the free pool and reprovisions it for use in the MySQL management tier.

  4. On the Requirements page, set the hardware requirements for the MySQL management tier.

    Prompt or Parameter

    Value or Selection

    Notes

    Operational Target

    1

     

     

     

    Minimum Nodes

    1

     

    Maximum Nodes

    1

     

    HBA HBAKey If your MySQL tier will run in VMs—FC SAN only: select the checkbox and use the same HBA key that's assigned to the VMs that you want Cassatt Active Response to allocate to this tier.

    Custom Requirements

    CustomAttribute

    If your MySQL tier will run in VMs: Assign the vmware custom attribute and the same custom attribute you assigned to the VMs that you want Cassatt Active Response to allocate to this tier.

    Dependencies

    VMBaseTier

    If this tier will run only in VMs, and not on physical hardware, specify at least one VMware host tier. Note that:

    • If you select more than one, every tier you select must be activated for this tier to activate.
    • If you have multiple ESX host tiers that access different storage locations, you must select only ESX host tiers that access the same storage location.
    • If you installed a 64-bit operating system, be sure to select a VMware host tier that runs supported x86_64 nodes.
  5. On the networks page, select a primary network.
  6. On the IPs and Hostnames page, assign IP addresses or host names, or accept the default settings.
  7. You can close the Creating Tier Progress page and continue with the next section.

top

Step 6: Personalize the image instances

The blueprint does not require personalizing the MySQL management tier.

Step 7: Allocate nodes and activate the tier

Follow these steps to allocate nodes and activate the MySQL management tier.

  1. From the Tiers table on the Domain page, select the checkbox for the MySQL management tier.
  2. From the Tier Actions dropdown menu, select Allocate Nodes. Click Allocate Nodes on the confirmation page.

    Cassatt Active Response allocates nodes and displays the Tiers table.
  3. Again, select the checkbox for the MySQL management tier.
  4. From the Tier Actions dropdown menu, select Activate. Click Activate on the confirmation page.

    Cassatt Active Response starts the operating system and the applications on each node in the tier.

The MySQL storage tier

Step 5: Create the tier

Using the Controller, follow these steps to create and configure the MySQL storage tier. Cassatt Active Response prepopulates tier values with the parameters you set during the image capture. If necessary, you can change them during tier creation.

  1. On the left navigation pane, click Tiers to display the Tier list.
  2. On the Tier list page, click the New Tier button (on the right).
  3. Set properties for the MySQL storage tier. Refer to the next table, which lists suggested values for the MySQL blueprint. Unless you have site-specific reasons, accept the defaults in other fields.

    Prompt or Parameter

    Example Value or Selection

    Notes

    Email Alerts

    On

     

    Email On:
    Tier Critical
    Tier Non-Critical


    Select all choices

    Reboot on failure

    On

     

    Automatic move to maintenance pool

    On

     

    Tier priority

    Low

     

    Allow harvest

    Off

    Set to Off because MySQL keeps a separate database for each node and uses replication to keep the databases in sync. If a node is harvested, the database for that node cannot be updated during the time the node is unavailable.

  4. On the Requirements page, set the hardware requirements for the MySQL storage tier.

    Prompt or Parameter

    Value or Selection

    Notes

    Operational Target

    TargetNodes

     

    Minimum Nodes

    MinNodes

     

    Maximum Nodes

    MaxNodes

    MaximumNodes should not exceed 4 unless you desire multiple MySQL node groups (that is, a set of nodes that all store the same information). See the MySQL site for more information on node groups. Also, be aware that although using more nodes provides redundancy, it does not improve performance. MySQL replicates data across all nodes, so the more nodes used, the more cycles consumed replicating data.

    HBA HBAKey If your MySQL tier will run in VMs—FC SAN only: select the checkbox and use the same HBA key that's assigned to the VMs that you want Cassatt Active Response to allocate to this tier.

    Custom Requirements

    CustomAttribute

    If your MySQL tier will run in VMs: Assign the vmware custom attribute and the same custom attribute you assigned to the VMs that you want Cassatt Active Response to allocate to this tier.

    Dependencies

    VMBaseTier

    If this tier will run only in VMs, and not on physical hardware, specify at least one VMware host tier. Note that:

    • If you select more than one, every tier you select must be activated for this tier to activate.
    • If you have multiple ESX host tiers that access different storage locations, you must select only ESX host tiers that access the same storage location.
    • If you installed a 64-bit operating system, be sure to select a VMware host tier that runs supported x86_64 nodes.

    Dependencies

    MySQL Management Tier

    The storage tier depends on the management tier. This setting ensures that Cassatt Active Response brings up the management tier before the storage tier.

  5. On the networks page, select a primary network.
  6. On the IPs and Hostnames page, assign IP addresses or host names, or accept the default settings.
  7. You can close the Creating Tier Progress page and continue with the next section.

top

Step 6: Personalize the image instances

  1. On the tier page, select the MySQL storage tier using the checkbox, then select Personalize from the actions dropdown menu.

    Cassatt Active Response boots the maximum nodes for the tier.
  2. Use the following command to start and enable the MySQL node database management services on the MySQL management node.

    chkconfig ndb_mgm on
  3. For each node in the storage tier, open a shell, log in as the root user, and do the following to personalize the image instances:
    1. Use the following command to enable MySQL:

      chkconfig mysql on chkconfig ndb on
    2. Replace the contents of the /etc/config.ini file with the following:

      # Set n to the maximum number of nodes in storage tier.
      [NDBD DEFAULT]
      NoOfReplicas= n
      DataDir= /var/lib/mysql-cluster

      [NDB_MGMD DEFAULT]
      DataDir= /var/lib/mysql-cluster

      # Specify the hostname of the MySQL management node.
      [NDB_MGMD]
      Hostname= hostname
      DataDir= /var/lib/mysql-cluster

      # For each node in the storage tier, specify a
      # Hostname/DataDir block.
      # This example assumes 2 nodes in the storage tier.
      [NDBD]
      Hostname= storage-hostname1
      DataDir= /var/lib/mysql-cluster

      [NDBD]
      Hostname= storage-hostname2
      DataDir= /var/lib/mysql-cluster

      [MYSQLD]
      [MYSQLD]
    3. Replace the contents of the /etc/my.cnf file with the following:

      [mysqld]
      log-bin
      [mysqld]
      ndbcluster
      default-table-type=ndbcluster

      # For ndb-connectstring, specify the hostname of the MySQL
      # management node, followed by the a colon and the standard
      # MySQL port number, 1186.
      [mysql_cluster]
      ndb-connectstring = hostname:1186

      # Specify the hostname of the MySQL management server.
      [ndbd]
      connect-string=hostname

      # Specify the hostname of the MySQL management server.
      [ndb_mgm]
      connect-string=hostname

      [ndb_mgmd]
      config-file=/etc/config.ini

    You can use the same config.ini and my.cnf file on each application node in the storage tier.

  4. Copy the config.ini and my.cnf files to the /etc directory on the node in the MySQL management tier.
  5. When you are finished, return to the Controller, select the tier, and select "Personalization Complete" for the tier.

Step 7: Allocate nodes and activate the tier

Follow these steps to allocate nodes and activate the MySQL storage tier.

  1. From the Tiers table on the Domain page, select the checkbox for the MySQL storage tier.
  2. From the Tier Actions dropdown menu, select Allocate Nodes. Click Allocate Nodes on the confirmation page.

    Cassatt Active Response allocates nodes and displays the Tiers table.
  3. The MySQL storage tier depends on the management tier, so the management tier must be activated before Cassatt Active Response can allocate and activate the storage tier.

  4. Again, select the checkbox for the MySQL storage tier.
  5. From the Tier Actions dropdown menu, select Activate. Click Activate on the confirmation page.

    Cassatt Active Response starts the operating system and the applications on each node in the tier.

This completes the procedure to create and deploy a MySQL image onto a MySQL management tier and a MySQL storage tier.

MySQL Reference

  • To check MySQL logs, reference the following files:

    /var/lib/mysql/*.err
    /var/lib/mysql-cluster/*.log
  • From the MySQL management tier, you can use MySQL ndb_mgm to manage the storage nodes without conflicting with Cassatt Active Response monitoring and operations.

MySQL Troubleshooting

Problem

Resolution/Workaround

Node not connected

Using ndb_mgm, issue the show command to verify that each node is connected. Output similar to the following suggests that the node is not properly connected:

id=4 (not connected, accepting connect from any host)

To correct, check the connection string and port number. The port number changed in MySQL V4.1.8. Many web forums reference port 2200, but the correct port number to use is 1186.