Size: 1125
Comment:
|
Size: 2263
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 8: | Line 8: |
This example presumes that you have already installed SAFplus, built it from source. First, Download and detar the example, or cd to <safplus>/examples/eval/basic if you are using SAFplus source from Github. Next build: {{{ make V=1 }}} The program "basicApp" will be created. If you installed SAFplus it will be created in this directory, but if you are using SAFplus from source, it will be located in the SAFplus target directory (<safplus>/target/<architecture>/bin). This will be called the "bin" directory. Next, we need to load a cluster model. Two example models are provided in this sample: * SAFplusAmf1Node1SG1Comp.xml: Run redundant copies of the app on a single node * SAFplusAmf2Node1SG1Comp.xml: Run on two nodes Please choose which option you want, cd to the bin directory, and install the model: {{{ cd SAFplus/target/i686-linux-gnu/bin ./safplus_db -x <example_source_dir>/SAFplusAmf1Node1SG1Comp.xml safplusAmf }}} This command reads the model XML in and writes it to a file called safplusAmf.db in the current directory. The AMF will read this file to access the cluster model. |
Running the Availability Management Framework (AMF) Example
The AMF provides redundancy, failure monitoring and restart for applications. To implement this, the AMF requires a description of the cluster, which is essentially a description of all the programs that should be run, whether they "understand" SAF communications, and their redundancy relationships. This is called the "cluster model" or just "model".
An example model and simple redundant "Hello World" application is included with SAFplus and is located in the source code under "examples/eval/basic" (and on download.openclovis.com). This model specifies applications that are "SAF-aware" -- that is, the applications can communicate with the AMF to receive work assignments. Another example model is also provided at "examples/eval/exampleNonSafApp" that handles "non-SAF-aware" applications. Non-SAF-aware applications do not communicate with the AMF -- they may be legacy apps, standard Linux services (e.g Apache), or applications that you do not have access to the source code.
The "Basic" Example: Compiling and Running
This example presumes that you have already installed SAFplus, built it from source.
First, Download and detar the example, or cd to <safplus>/examples/eval/basic if you are using SAFplus source from Github. Next build:
make V=1
The program "basicApp" will be created. If you installed SAFplus it will be created in this directory, but if you are using SAFplus from source, it will be located in the SAFplus target directory (<safplus>/target/<architecture>/bin). This will be called the "bin" directory.
Next, we need to load a cluster model. Two example models are provided in this sample:
- SAFplusAmf1Node1SG1Comp.xml: Run redundant copies of the app on a single node
- SAFplusAmf2Node1SG1Comp.xml: Run on two nodes
Please choose which option you want, cd to the bin directory, and install the model:
cd SAFplus/target/i686-linux-gnu/bin ./safplus_db -x <example_source_dir>/SAFplusAmf1Node1SG1Comp.xml safplusAmf
This command reads the model XML in and writes it to a file called safplusAmf.db in the current directory. The AMF will read this file to access the cluster model.