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