r20 - 23 May 2008 - 17:39:30 - BeckyHYou are here: Wiki >  AppLogic23 Web > CatMiscNas
ALERT! AppLogic 2.3 Beta Documentation The latest production release is AppLogic 2.4.7

NAS Appliance

Latest version: 2.3.2

nas.PNG At a Glance
Catalog System
Category Misc. Appliances
User volumes yes
Min. memory 64 MB
OS Linux
Constraints no
Questions/Comments Ask Forum

Functional Overview

The NAS appliance is a shared file storage appliance. It provides file storage accessible over HTTP, NFS, and CIFS file protocols.

The NAS appliance serves files contained within a configured (pluggable) data volume thus providing the ability for the content served by the appliance to be changed easily as well as the ability for the volume to have varied sizes. For example, if NAS is being used to store log files, the data volume does not need to be as large as what may be needed to store content for an apache server.

The root directory of the volume is shared and the HTTP, NFS, and CIFS (samba) servers see the same volume, at the same root. The NFS server exposes the volume as a shared named /mnt/data. The CIFS server exposes the volume as a share named share. The root directory of the volume is accessible for read-only access by the HTTP server and for read-write access by the NFS and CIFS (samba) server.

The security for http access may be open (no user/pwd), fixed single user/pwd (from property) or from .htpasswd file stored within the root directory of the data volume.

The CIFS access is anonymous. It is assumed that only appliances that are allowed to access the volume are connected to the cifs terminal. This eliminates the need to configure complex security settings on the client and server and makes it possible to simply connect appliances that need file access to the cifs input.

There are three key use cases for the NAS appliance:

  1. Serving large files over HTTP. The cifs interface is used to add/remove files (usually exported over a separate gateway)
  2. As a shared file server through which other appliances/servers exchange files (fully internal to the application)
  3. As a log server through which other appliances/servers store their log files so that those logs may be easily accessed/viewed by an administrator rather than having to log into each individual appliance.

Boundary

Resources

Resource Minimum Maximum Default
CPU 0.1 16 .2
Memory 64 MB 32 GB 256 MB
Bandwidth 1 Mbps 400 Mbps 1 Mbps

Terminals

Name Dir Protocol Description
http in http Terminal on which HTTP requests are received. This terminal is used to access NAS's data volume using the HTTP/1.1 protocol. HTTP requests are served by HTTP server version 2.0.53-3.3.
nfs in nfs Terminal on which NFS requests are received. This terminal is used to access NAS's data volume using the NFS/3.0 protocol.
cifs in cifs Terminal on which CIFS requests are received. This terminal is used to access NAS's data volume using the CIFS/1.0 protocol. CIFS requests are served by Samba server version 3.0.10-1.
mon out cce Sends performance and resource usage statistics.
This terminal may be left unconnected if it is not used.

The default interface is enabled. This provides the ability for administrators to log into the appliance using the '3t ssh comp' command in order to perform maintenance or to troubleshoot problems. One possible maintenance activity might be to add/remove users from the .htpasswd file stored on the data volume.

User Volumes

Volume Description
data Read/write volume providing storage for the files to be served by the appliance

The following file may reside within the root directory on the volume:

File Description
.htpasswd HTTP Password File. If present, this file is inaccessible from the http interface but will be accessible through the cifs interface (so that new users can be added/passwords changed)

Properties:

Property name Type Description
http_url_prefix String Root path (URL) at which the web server should expose the file system. Default: /
http_dir_enabled String Enable/disable displaing of directory listing hwne a directory does not contain an index.html file (yes or no). Default: no
http_sec_mode String HTTP security mode (none, single, or htpasswd). Default: none
http_sec_realm String HTTP security realm in case http_sec_mode is single or htpasswd. Default: Restricted Area
http_user String User name for http access in case http_sec_mode is single. Default: (empty)
http_pwd String Password for http access in case http_sec_mode is single. This property may be left empty (no password) in the case when http_user is set to a valid user. Default: (empty)
cifs_read_only String Restrict CIFS access to read only (yes or no). Default: no
cifs_case_sensitive String Enable/disable case sensitive file paths (yes or no). Default: no
nfs_read_only String Restrict NFS access to read only (yes or no). Default: no
log_dir String Directory beginning from the root directory of the data volume where the http and samba server log files are to be stored. For example, if this property is set to /, the log files will be stored within the root directory of the data volume. If this property is empty then no logs are written to. Default: /

Error Messages

The following messages may appear in either the appliance log file or the system log of the grid controller when the appliance fails to start:

  • failed to mount data volume
  • failed to set permissions on the data share
  • Samba failed to start
  • NFS failed to start
  • Apache failed to start

Typical Usage

Static content server

The following diagram shows a typical usage of NAS for a simple web server application:

nas-web-usage.PNG

Appliances in use:

  • web - input gateway, class IN
  • maint - input gateway, class IN
  • urlsw - URL switch, class urlsw
  • admin - Linux Server, class LINUX
  • nas - NAS appliance, class NAS
  • apache - Apache server, class APACHE

The nas appliance in this example is used to serve the static content of the web site (e.g., images) as it is simple to configure and less resource-demanding, while a separate apache server is set up to serve the dynamic content (e.g., forms interface, etc.)

The admin appliance in this example is used to authenticate users and provide access to the cifs terminal of the nas appliance so that an administrator may update the set of files exposed by nas through its http terminal.

IDEA! The urlsw appliance in this example is not shipped with AppLogic, but can be built using apache and pound. IDEA! The apache appliance in this example is not shipped with AppLogic. However, AppLogic does provide a similar appliance named WEB.

HTTP Access:

web accepts HTTP requests coming to the application and passes them to urlsw through its out terminal. urlsw sends HTTP file requests for dynamic content through its out1 terminal to be served by nas1 on its http terminal. urlsw forwards all other HTTP requests through its aux terminal to be served by apache.

CIFS Access:

When an administrator needs to modify the set of files made available for HTTP access by nas, the administrator connects and logs into the admin appliance through the maint appliance. The user then mounts the CIFS share exposed by nas (if it is not already mounted) and modifies the files as needed.

Example:

Property name Value Notes
data mydata Data volume holding the files to be served by the web server
http_url_prefix /images Root path at which the web server should expose the file system.
http_dir_enabled no Directory listing is disabled.
http_sec_mode none No security is enabled for HTTP access.
cifs_read_only no The CIFS share is exposed for read-write access.
cifs_case_sensitive yes Enable case sensitive file paths.

Shared Storage

The following diagram shows a typical usage of NAS as shared storage for multiple application servers.

nas-shared-usage.PNG

Appliances in use:

  • app1 - Application server, class APP
  • app2 - Application server, class APP
  • nas1 - NAS appliance, class NAS

The nas1 appliance in this example is used as shared storage for app1 and app2. Both application servers have read-write access to the directories and files served by nas1.

app1 and app2 issue CIFS requests through their out terminals to the cifs terminal of nas1 in order to access files stored on the volume shared by nas1. Any changes made by one application server are seen by the other application server.

Example:

Property name Value Notes
data mydata Data volume holding the files to be shared between the applications
cifs_read_only no The CIFS share is exposed for read-write access.
cifs_case_sensitive yes Enable case sensitive file paths.

Log Server

The following diagram shows a typical usage of NAS as a log server.

nas-log-srv-usage.PNG

Appliances in use:

  • user - Input gateway, class IN
  • admin - Input gateway, class IN
  • webs - Load Balancer, class HLB
  • srv1 - Web server, class WEB
  • srv2 - Web server, class WEB
  • dbase - Database server, class MYSQL
  • logs - NAS appliance, class NAS
  • mail - Output gateway, class OUT

The logs appliance in this example is used to store the log files for the two web servers as well as the database server and makes those files available through its http terminal.

The log terminals for the web servers (web1 and web2) and the database server (dbase) are all connected to the cifs terminal of logs so that when they write to their log files, the files are stored on the logdata volume that is configured on logs.

When an administrator needs to inspect the log files, he connects via the admin gateway to the http terminal of the logs appliance. He logs in with the configured administrator user name and password and is shown a listing of the root directory of the logdata volume from which the administrator is free to view the log file(s) he is interested in.

Example:

Property name Value Notes
data logdata Data volume holding the log files
http_url_prefix /logs URL root path where log files can be accessed.
http_dir_enabled yes Directory listing is enabled.
http_sec_mode single HTTP security mode is single user.
http_user admin User name for HTTP access.
http_pwd admin123 User password for HTTP access.
cifs_read_only yes The CIFS share is exposed for read-only access.
cifs_case_sensitive yes Enable case sensitive file paths.

Notes

  • The features of the http and samba servers are limited and only those features that are exposed by properties are supported. All other features of the http server that are controlled by special files stored in the document tree are disabled.
  • To change the size of the data volume used by NAS, perform the following steps:
    1. Stop the application if it is running.
    2. Using the editor or 3tvol utility, create a new volume within the application with the desired size.
    3. If you want to keep the files that are on the existing volume, mount both volumes, copy the files from the old volume to the new volume and unmount both volumes.
    4. Using the editor, update the data volume for the NAS appliance to be the newly created volume.
    5. Using the editor, destroy the old volume and save the application.
    6. Start the application.

Future directions:

  • add webdav and/or read-write interface through http
  • add ldap authentication modes to both cifs and http


Related Documents


Questions and Comments

IDEA! To post a question or comment on this appliance, visit our forum.


-- PeterNic - 30 Dec 2005

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