r3 - 23 Oct 2007 - 12:17:26 - LubaFutekovaYou are here: Wiki >  AppLogic2 Web > CatMiscMYSQLBp
ALERT! AppLogic 2.1/2.2 Documentation The latest production release is AppLogic 2.9.9

MYSQL: MySQL Database Appliance - Build Procedure

Here are the steps needed to create a MYSQL class from LUX

  1. Create an application with only LUX and NET in it; configure the NET appliance
  2. Branch LUX
  3. Resize volumes
    1. vol resize LUX.boot size=150M
    2. vol resize LUX.usr size=250M
  4. Edit the class (in EDT)
    1. add a placeholder volume (name: data; mount on /dev/hda3; mandatory)
    2. make the usr volume rw
    3. set the in terminal to use proto mysql
    4. rename the out terminal to log and change the proto to cifs
    5. add a net terminal and make it gateway
    6. change the class icon color to red
    7. change the class name to MYSQL
    8. change the class description
    9. change class category to 'Database Appliances'
    10. Add the following properties:
      • auto_create|int|default 1| allowed values 1,0
      • error_log_filename|String
      • error_log_level|String| Default error| allowed values - error, warn
    11. Set resources
      • CPU: 0.10 | 4 | 0.40
      • MEM: 128M | 8G | 512M
      • BW: 1M |500M | 1M
  5. Connect the net terminal of MYSQL to the net appliance
  6. Create a volume and use it the MYSQL placeholder
  7. Save the application
  8. Start the application in debug mode
  9. Login the MYSQL and do
    1. mkdir -p /mnt/log /mnt/data
    2. yum -y upgrade
    3. yum -y install mysql-server samba-client sudo
    4. yum clean all
    5. rpm --rebuilddb
  10. Copy the following files in MYSQL
    1. /etc/my.cnf
    2. /etc/ccad.conf
    3. /etc/fstab
    4. /appliance/create_db.sh
    5. /appliance/db_permck.sh
    6. /appliance/feed_mysql_counters.sh
    7. /appliance/start_mysqld.pl
    8. /appliance/appliance.sh
  11. Setup permissions of scripts
    1. cd /appliance ; chmod +x appliance.sh create_db.sh db_permck.sh feed_mysql_counters.sh start_mysqld.pl
  12. Stop the application
  13. Mount the boot volume of MYSQL (vol mount MYSQL.boot) and cleanup.
    1. rm -f root/.bash_history root/.lesshst root/.mysql_history appliance/log appliance/vmalog appliance/passwd.stamp etc/resolv.conf
    2. find var/log -type f -exec rm {} \;
    3. touch var/log/lastlog
    4. rm -f tmp/*
  14. Umount the boot volume (vol umount MYSQL.boot)
  15. Edit class
    1. remove the net terminal
    2. make the usr volume ro
  16. Save the application
  17. Vol resize
    1. vol resize MYSQL.boot size=80M
    2. vol resize MYSQL.usr size=200M
  18. Move the class to the /proto catalog

-- NetClime - 02 Oct 2007

 
Copyright © CA 2005-2010. All Rights Reserved.
%