Skip to content

Musings of an Anonymous Geek

Made with only the finest 1's and 0's

Menu
  • About
  • Search Results
Menu

How to Build Your Own MySQL 5 Server in AppLogic

Posted on December 19, 2007May 14, 2008 by bkjones

I’m building an infrastructure on a grid using AppLogic, which is a grid OS that provides both GUI and command line interfaces to build your infrastructure. I use both interfaces, depending on the task I’m trying to perform at the time.

One thing I have discovered is that there are a lot of somewhat nebulous concepts, abstractions, lingo, etc., and a number of default configuration settings that make doing really really simple things extremely unintuitive if you’re coming from a (more or less) physical server environment.

Another thing I discovered is that, while AppLogic provides a pretty nice collection of template ‘appliances’ that you can drag around the GUI and connect to each other in various ways, the MySQL appliance in particular is somewhat lacking. Specifically, it’s a MySQL 4.0 server. Lame.

There might be better ways to do all of this, and if you know of any, I welcome the input!! For now, here’s what *I* did to build my own MySQL 5 server:

  1. In the GUI, at the top of the left pane, choose ‘proto’ from the drop down menu to show the appliances in the ‘proto’ catalog.
  2. Drag the “LUX5” appliance to the work area in the right pane. This is a very bare-bones appliance. There’s almost nothing installed on it. However, it *is* a CentOS *5* install, and the version of MySQL distributed for this version of CentOS is 5.0.x. Unfortunately, you still don’t have network access, or read-write access to /usr, or enough disk space. The /usr volume is mounted read-only, and is something like 120MB in size.
  3. Right-click the appliance and choose “Branch Class”. This is super important. If you don’t do this, you can lose any changes you make to the appliance later. Don’t proceed until you do this. Seriously.
  4. Once done, the first thing to do is right click the appliance, choose ‘Edit Class’, and click the ‘Interfaces’ tab. Create an interface called ‘net’, choose ‘Out’ for the Direction, ‘any’ for the Protocol, and click the ‘Gateway’ button in the Options column. In order to enable this appliance to reach the internet so it can do things like ‘yum install’, you need to connect that ‘net’ interface to a ‘NET’ appliance, which is another AppLogic-supplied appliance whose sole purpose is to be a gateway to the internet for your appliances. If you don’t have one of those yet, you’ll need to add one. See this doc on how to use NET: http://doc.3tera.net/AppLogic2/CatGatewayNet.html – creating this gateway interface will cause a new line to appear in the output of the ‘route’ command when you log in on the device showing your new gateway.
  5. While you’re in this tab, you can also change the protocol for the ‘in’ interface to ‘mysql’.
  6. Next, you’ll need to resize “/” and “/usr” on the system. The only way I know how to resize a volume on a specific appliance is using the AppLogic controller’s command line interface. Assuming you didn’t change the class name of your appliance from ‘LUX5’, here are the commands to use:
    # ca myapp
    # vol resize LUX5.boot size=1G
    # vol resize LUX5.usr size=1G

    Replace ‘myapp’ with the name of your application. Also note, the app will need to *not* be running when you do this (yes, this means volume resizes require an app restart. Yes this kinda degrades the benefits of virtualization. No, I’m not a fan of how this is implemented)
  7. [UPDATE] forgot to mention: by default, LUX5 has like 40MB of RAM, so when you run ‘yum install whatever’, it’ll be killed at different stages in its work by the Out of Memory (OOM) killer in Linux. Right click the appliance, go to ‘Resources’, and up the minimum and default to at least 256MB. I used 512MB.
  8. Finally, right click your appliance, go to ‘Edit Class’ again, and then go to ‘Volumes’ and unclick the ‘read only’ button in the Options column for the ‘/usr’ volume.

Once you’ve done all of that, you can finally get some real work done. Run ‘yum install mysql-server’ to get the server installed, and you’re on your way. There are still problems to solve with this setup, such as how to manage the volumes for your data directory, how to set up, for example, phpMyAdmin if you want to use that to manage your MySQL database, and how to use things like memcached in this environment. I guess I’ll blog those as I get to them. Wish me luck!

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Facebook (Opens in new window) Facebook

Recent Posts

  • Auditing Your Data Migration To ClickHouse Using ClickHouse Local
  • ClickHouse Cheat Sheet 2024
  • User Activation With Django and Djoser
  • Python Selenium Webdriver Notes
  • On Keeping A Journal and Journaling
  • What Geeks Could Learn From Working In Restaurants
  • What I’ve Been Up To
  • PyCon Talk Proposals: All You Need to Know And More
  • Sending Alerts With Graphite Graphs From Nagios
  • The Python User Group in Princeton (PUG-IP): 6 months in

Categories

  • Apple
  • Big Ideas
  • Books
  • CodeKata
  • Database
  • Django
  • Freelancing
  • Hacks
  • journaling
  • Leadership
  • Linux
  • LinuxLaboratory
  • Loghetti
  • Me stuff
  • Other Cool Blogs
  • PHP
  • Productivity
  • Python
  • PyTPMOTW
  • Ruby
  • Scripting
  • Sysadmin
  • Technology
  • Testing
  • Uncategorized
  • Web Services
  • Woodworking

Archives

  • January 2024
  • May 2021
  • December 2020
  • January 2014
  • September 2012
  • August 2012
  • February 2012
  • November 2011
  • October 2011
  • June 2011
  • April 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • September 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007
  • February 2007
  • January 2007
  • December 2006
  • November 2006
  • September 2006
  • August 2006
  • July 2006
  • June 2006
  • April 2006
  • March 2006
  • February 2006
  • January 2006
  • December 2005
  • November 2005
  • October 2005
  • September 2005
  • August 2005
  • July 2005
  • June 2005
  • May 2005
  • April 2005
  • March 2005
  • February 2005
  • January 2005
  • December 2004
  • November 2004
  • October 2004
  • September 2004
  • August 2004
© 2025 Musings of an Anonymous Geek | Powered by Minimalist Blog WordPress Theme