AppLogic 2.1/2.2 Documentation The latest production release is AppLogic 2.9.9
Lamp - Lamp and LampX4 Applications
Lamp - 2-tier Non-scalable Web Application
LampX4 - Scalable Lamp Web Application
The Lamp and LampX4 reference applications are simple 2-tier Web applications that make it easy for a user to port their applications onto AppLogic. These reference applications drastically reduce the entry barrior for using AppLogic grids.
The Lamp application consists of a single web server, a database server, a file server, a gateway for external network access and an input gateway for user access. In addition, the application contains a monitor which allows the maintainer to montior various aspects of the application (e.g., CPU/memory usage, hit rate on a web site, etc).
LampX4 is the same as Lamp except it provides a load-balanced web tier; a load balancer plus 4 web servers. LampX4 is designed for applications that incure heavy traffic load (i.e., may be accessed by hundreds of users).
With these Lamp applications, in just a few simple steps, the user can port their application onto AppLogic with ease. Simply provision one of the Lamp applications, SSH into the web server (via the AppLogic
web shell), install the neccessary software and the application is ready for production.
Note that Lamp and LampX4 are made for simple applications that do not require:
- any build tools such as GCC
- write access to the
usr directory in the web servers
For applications that do not fit within these requirements, the LampCluster
reference application should be used instead.
| Property Name || Type || Description |
| String || Host name under which the Lamp application is accessible. This is the name that users point their browsers at: http://hostname/. This name should resolve to the IP address specified in |
in_ip. Default: (empty; no hostname is used).
| IP || This is the IP address at which the Lamp application provides services to users. If the |
hostname property is not empty, it should resolve to
in_ip. This property is mandatory.
| IP || This is the IP address that is used by the Lamp application to access an external network that resides outside of the application (i.e., the internet). This property is mandatory. |
| IP || Network mask for the network on which |
out_ip reside. This property is mandatory.
| IP || Defines the IP network gateway (router) that is used for all outgoing traffic to the external network via |
out_ip. This property is mandatory.
| IP || IP address of the primary DNS server used for host name resolutions. This property is mandatory. |
| IP || IP address of the backup DNS server used for host name resolutions. Default: (empty; not used). |
| Int || Determines whether application monitoring is disabled upon application start for the Lamp application. If non-zero, monitoring is disabled, otherwise monitornig is enabled. The monitoring can be enabled at runtime by manually starting the |
mon appliance. Default:
1 (monitoring is disabled).
| Int || Specifies whether the second WEB server is in standby mode. If non-zero, the second WEB server is in standby mode, otherwise it is not in standby mode. This property is valid only for the LampX4 application. Default: |
1 (standby mode).
| Int || Specifies whether the third WEB server is in standby mode. If non-zero, the third WEB server is in standby mode, otherwise it is not in standby mode. This property is valid only for the LampX4 application. Default: |
1 (standby mode).
| Int || Specifies whether the fourth WEB server is in standby mode. If non-zero, the fourth WEB server is in standby mode, otherwise it is not in standby mode. This property is valid only for the LampX4 application. Default: |
1 (standby mode).
The IP addresses configured in the
properties must be IP addresses available on your AppLogic grid. You can find them, together with the netmask, gateway and dns servers on the dashboard of your grid. We are working to make it possible for AppLogic to provide these addresses automatically
The application itself uses several volumes. They are part of the application and are already configured into the appliance instances. There are no volumes that need to be configured on the application boundary.
| Volume || Description |
| A read-only volume containing, at a minimum, the SSL server signing key. The SSL file should be in PEM format located in the root directory, named |
server.pem. This volume is assigned to the
INSSL appliance. By default, this volume is not used (SSL is disabled by default). Please see the INSSL data sheet for how to enable SSL for your Lamp application.
| Volume for the database data storage. This volume is assigned to the |
MYSQL appliance. By default, an empty volume called
mysql is supplied for the application to use.
| This volume is used to store the Lamp application's web pages, code and scripts (plus anything else that is needed by the application). It is also used to store the web server and database logs. This volume is assigned to the |
NAS appliance. By default, an empty volume called
fs is supplied for the application to use.
| This volume is used to store monitoring data for the application. There is no reason for the user to access/modify this volume; this volume is used internally by the |
MON appliance. By default, a volume called
mon is supplied to store the application monitoring data.
This section describes how to use and operate the Lamp applications. It is geared towards both maintainers and regular AppLogic users. The initial setup and maintenance of the Lamp applications requires access to an AppLogic grid.
Lamp and LampX4 are designed to allow the user to quickly port their application over to AppLogic. Lamp and LampX4 are both used in the same way. All instructions in this section apply to both Lamp applications.
Initial application setup
Use the following steps to get your own Lamp application up and running on an AppLogic grid. This example creates a scalable Lamp application based on LampX4 called
- Provision the Lamp application using the command below. This command provisions a new Lamp application named
mylampapp based on the LampX4 reference application. All properties are set to their appropriate values (IPs, DNS servers, etc). All 4 web servers are enabled in order to accomidate for possible heavy traffic loads. Also, the sizes of the
mysql volumes are increased to 250MB.
app provision LampX4 mylampapp hostname=www.myapp.com in_ip=184.108.40.206 out_ip=220.127.116.11 netmask=255.255.255.0 gateway=18.104.22.168 dns1=22.214.171.124 dns2=126.96.36.199 mon_standby=0 srv2_standby=0 srv3_standby=0 srv4_standby=0 fs.size=250MB mysql.size=250MB
- AppLogic will provision the
mylampapp application and start it on the grid. Wait for the application to start; this may take serveral minutes.
- Now you can access your application using a browser. Open up a browser and point it to the configured hostname and you will see a test web page from the Apache web server. If you do not see a test page, make sure your IP addresses are configured correctly and restart the application if needed.
- You now have a running Lamp application on your grid. All that is left to do is to install your specific application onto the application volumes and your application will be ready to go.
Installing your application
This steps below describe how to install your own software on your Lamp application:
- SSH into the web appliance from within the Applogic shell:
- From within the web server, you can now download and install software directly from the internet (as you would normally do if working on your own private server).
- If needed, you can also access the MySQL database using the
db hostname (e.g.,
mysql -h db). The default database that is set up automatically when the application is first created has sufficient permissions for the
root user of any of the web server appliances.
- You can use
/mnt/fs to store any files/folders you need for your application (this is the path to your
fs application volume). This volume is also used to store all of the apache files (
/var/www/html is linked to
/mnt/fs for example).
- After all of your software is installed and configured, there is no need to restart the application (unless the software you installed requires a reboot).
- Users should now be able to access your application by using the configured hostname or IP address (
Monitoring your application
After your application has started, you can monitor the application by using the monitor GUI accessible through the AppLogic GUI in one of two ways:
- In the applications list GUI page, select your application and click on the "Monitor" button.
- Edit your application using the AppLogic application editor and choose the "Monitor" button at the top of the window.
If you started your application with the monitor in standby state, you can manually start it at runtime:
comp start mylampapp:main.mon
. The monitor must be started before you can access it through the AppLogic GUI.
After the monitor has started, you may now access the monitoring GUI to monitor your application. This is used to monitor CPU/memory usage, number of hits your website is getting, traffic load, etc. The
appliance properties are not configured by default; please see the MON
datasheet on how to configure
for things like setting the monitor title, enabling background alarms, etc. Please also see the Monitor Reference
for additonal details on how to monitor your application and use the visual interface.
Lamp and LampX4 are reference designs for basic 2-tier Lamp web applications. They are designed for rapid deployment and easy management.
Lamp contains the following components:
- firewalled input SSL gateway (
INSSL) -- provides user access to the Lamp application
- a web server (
WEB) -- an Apache web server which provides the application services to the user
- a database (
MYSQL) -- a MySQL database server used by the application for database access and storage (if needed)
- a centralized content file storage (
NAS) -- stores the application specific web pages/scripts/etc, also used for storing the logs of the web server and database
- a firewalled output network gateway (
NET) -- used to access the external network (i.e., the internet) from within the web server
- an application monitor (
MON) -- used to monitor the Lamp application through the AppLogic GUI
LampX4 is the same as Lamp except instead of using
, LampX4 uses
to provide a load-balanced web tier (a load balancer plus 4
servers). This adds scalability to the Lamp application. If desired,
can be replaced with
to provide greater scalability for the application. After provisioning the LampX4 application, replace WEBx4 with WEBx8 by:
- hold down the SHIFT key
- click on WEBx8 and drag it over WEBx4 (while holding down the SHIFT key)
- release the left mouse button and then let go of the SHIFT key
- choose OK to confirm the replacement
All appliances used in Lamp and LampX4 are from the standard AppLogic
catalog (no branched appliances are used in these applications).
The application infrastructure is here
(at the beginning of this data sheet).
- The web servers used in the Lamp applications do not have a GCC build environment or a writable
usr directory tree. If either of these are needed, it is recommended to use the LampCluster reference application instead of the Lamp/LampX4 applications.
- There is a known incompatibility between the web and mysql servers related to user authentication (SCR 1564). If a mysql user other than root is used in your lamp application, the user must not have an associated password (password authentication does not work due to a mysql client/server version mismatch between the web and mysql server). For more details, please see SCR 1564.
Questions and Comments
To post questions and/or comments for the Lamp application, visit our forum
To post questions and/or comments for the Lampx4 application, visit our forum
- 07 May 2007