r16 - 12 Mar 2008 - 06:12:24 - NetClimeYou are here: Wiki >  AppLogic23 Web > CatDatabaseAppliancesMYSQLRBp
ALERT! AppLogic 2.3 Beta Documentation The latest production release is AppLogic 2.4.7

MYSQLR: MySQL Database Appliance - Build Procedure

Here are the steps needed to create a MYSQLR class from LUX5

  1. Create an application with only LUX5 and NET in it; configure the NET appliance
  2. Branch LUX5
  3. Resize volumes
    1. vol resize LUX5.boot size=300M
    2. vol resize LUX5.usr size=500M
  4. Edit the class (in EDT)
    1. add a data placeholder volume (name: data; mount on /dev/hda3; mandatory)
    2. add a binlogs placeholder volume (name: binlogs; mount on /dev/hda4; )
    3. add a old_data placeholder volume (name: old_data; mount on /dev/hda5; )
    4. make the usr volume rw
    5. rename the out terminal to log and change the proto to cifs
    6. change in terminal proto to mysql
    7. add a rin input terminal, proto any
    8. add a ui input treminal, proto http
    9. add a rout output terminal, proto any
    10. add a net terminal and make it gateway
    11. change the class icon color to red
    12. change the class name to MYSQLR
    13. change the class description
    14. change class category to 'Database Appliances'
    15. Add the following properties:
      • auto_create|int|default 1| allowed values 1|0
      • error_log_filename|String
      • error_log_level|String| Default warn| allowed values - error|warn
      • use_old_passwords| Int| Default 1| allowed values 1|0
      • server_id| Int | Default 1| allowed values 1|2|3|4|5|6|7|8|9|10
      • rpl_mode| String | Default none| allowed values none|master|slave|master_and_slave
      • web_pwd | String
    16. Set resources
      • CPU: 0.10 | 16 | 0.40
      • MEM: 128M | 64G | 512M
      • BW: 1M |500M | 1M
  5. Connect the net terminal of MYSQLR to the net appliance
  6. Create a volume and use it the MYSQLR 'data' placeholder
  7. Save the application
  8. Start the application in debug mode
  9. Login the MYSQLR and do
    1. mkdir -p /mnt/binlogs /mnt/old_data /mnt/snapshot /srv/www/ /mnt/data /mnt/log /var/lib/php/session
    2. yum -y upgrade
    3. yum -y install mysql-server aspell aspell-en curl freetype gmp libidn libjpeg libpng libxml2 lvm2 php-cli php-common php-gd php-mbstring php-mysql php-pdo rsync sudo samba-client samba-common
    4. rpm -Uv lighttpd-1.4.18-1.el5.rf.i386.rpm (Current link)
    5. rpm -Uv perl-IPC-Run-0.80-1.el5.rf.noarch.rpm (Current link)
    6. rpm -Uv perl-Time-Duration-1.06-1.el5.rf.noarch.rpm (Current link)
    7. yum clean all
    8. rpm --rebuilddb
    9. chown lighttpd /var/lib/php/session/
    10. rm -rf /usr/share/man/*
    11. rm -rf /usr/share/doc/*
    12. find / -type f -iname "*rpmnew" -exec rm -vf {} \;
    13. tar -xzf MYSQLR.tar.gz -C /
  10. Stop the application
  11. Mount the boot volume of MYSQLR (vol mount MYSQLR.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/*
  12. Umount the boot volume (vol umount MYSQLR.boot)
  13. Edit class
    1. remove the net terminal
    2. set '/etc/my.cnf' file as config file (volume: boot, quoting method: none)
    3. make the usr volume ro
  14. Save the application
  15. Vol resize
    1. vol resize MYSQLR.boot size=130M
    2. vol resize MYSQLR.usr size=340M
  16. Move the class to the /proto catalog

-- NetClime - 07 Nov 2007

 
Copyright © 2005-2008 3tera, Inc. All Rights Reserved.
%