Doc:Sdk 4.1/awdguide/deppkg

Contents

Deployment and Packaging

The SAFplus Platform Web Director GUI is provided in the form of a gzipped tar file (.tgz). You should open this file (tar xvfz {filename}) in the SAFplus Platform user's (generally "root") home directory or the SAFplus Platform base directory. It will create a directory called aspwebdirector-{version}-{OS}-{arch}. The rest of this document will refer to this directory using the symbol {AWDBASE}.

Integration within your IDE model

The SAFplus Platform Web Director GUI can be integrated within your IDE-based model by creating a 1+1 Service group with 1 component on 1 or 2 SAFplus Platform nodes. The component executable should reference a script that simply executes the AWD binary ({AWDBASE}/bin/aspwebdirector). Before running your model, you must run the {AWDBASE}/install script to ensure that all of the AWD requirements are installed.

Dynamic Installation

Additionally, the SAFplus Platform Web Director GUI can be dynamically installed into a running SAFplus Platform chassis. To do so, detar the package and run the ./install and then the ./start scripts. These scripts do not need to be run again (even after an cluster reboot) unless you remove the SAFplus Platform configuration (located in the "var" directory of your SAFplus Platform installation). If the SAFplus Platform configuration is deleted, you will need to run the "./start" script again to insert the AWD service group into the SAFplus Platform Application Management Framework (AMF).

Library Integration

The SAFplus Platform Web Director Libraries can be deployed within your management application by running your management application (or agent) on an SAFplus Platform node and running a Python interpreter within it. Embedding a Python interpreter in this manner is very simple. You may use the AWD GUI as an example of how to do so, or you may read the "Extending and Embedding Python" chapter of the python documentation located at http://www.python.org.

Standalone Python

Additionally, you may run the SAFplus Platform Web Director Libraries stand-alone in its own Python shell. To do so, first start SAFplus Platform and then add the AWD "bin" directory to your "PYTHONPATH" environment variable (see Python documentation for more details) so you can "import" the AWD libraries. Next, from the SAFplus Platform base directory run "bin/asp_run python". You should see the python prompt. Next run:

>>> import asppy
>>> asppy.initializeAmf()

At this point, you should be able to access the API. For example:

>>> import clusterinfo
>>> print [x.name for x in clusterinfo.ci.nodes]

Additionally, if you choose to not run the GUI, you do not need most of the applications that are installed as part of the {AWDBASE}/install script (although it does not hurt to install them). All that is needed is "pexpect" which is used for deployment (to automate the "scp" command). You may see how to install this by hand by looking at the {AWDBASE}/3rdparty/Makefile file. If you are not using the GUI or the deployment features, you do not need to install any prerequisites.