Difference between revisions of "Doc:latest/evalguide/app ide"

 
(Generating Configuration and Source Code)
 
(21 intermediate revisions by 4 users not shown)
Line 1: Line 1:
==Appendix A: OpenClovis IDE==
+
==Examining The Evaluation Model==
  
OpenClovis IDE is an Integrated Development Environment designed to simplify and accelerate the development of software with the OpenClovis SDK. It provides a simple and powerful mechanism with easy drag-and-drop features, to create Resources and Components, define attributes and relationships between them. The OpenClovis IDE graphical interface enables you to capture the Information Models through UML notifications and save them as XML files.
+
During your journey through the evaluation guide, it may be instructive to refer back to the "cluster model" to discover how the various applications in the different modules are configuredThe "cluster model" consists of the definition of the nodes in the cluster, the processes each node runs, the grouping of these processes into redundancy (or "protection") groups, and the objects the cluster "presents" to the management station (the management model).
  
This Appendix is only a brief introduction to the IDE and only provides basic information on how to
+
The cluster model is defined by XML files.  Understanding and editing this XML by hand is very difficult and is much better accomplished through the OpenClovis SAFplus IDE.
*start the OpenClovis IDE
+
*view the model which was used to build the the skeleton code for csa101 to csa113
+
*generate code based upon the model.
+
  
Further information concerning the IDE and creating a model can be found within the ''OpenClovis IDE User Guide'' and ''OpenClovis Sample Application Tutorial''.
+
The OpenClovis SAFplus IDE is an Eclipse-based Integrated Development Environment designed to simplify and accelerate the development of the cluster model.  It  provides a simple and powerful mechanism with easy drag-and-drop features, to create resources and components, define attributes and relationships between them. The OpenClovis IDE graphical interface enables you to capture the Information Models through UML notifications and save them as XML files.
  
As previously mentioned, this appendix assumes you have followed the instructions found in the document ''OpenClovis Installation Guide,'' and installed the SDK. After installing the SDK, we need to create a project area. You may have already created a project area  either by the command <code>cl-create-project-area</code> or <code>cl-eval-wizard</code>. Again to prevent the repetition of data we suggest looking at section [[Doc:Evalguide/build#Evaluation Wizard - Single Node Setup|Evaluation Wizard - Single Node Setup]] and [[Doc:Evalguide/build#Manually Building the Target Images|Manually Building the Target Images]].
 
  
===Scope===
+
Before proceeding, it is recommended that the reader work through the [[Doc:latest/tutorial | ''OpenClovis Sample Application Tutorial'']], which will introduce you to cluster modelling using the IDE.  Further information about the IDE is available in the ''OpenClovis IDE User's Guide''.
  
This appendix covers instructions to start the OpenClovis IDE and introduce you to the evaluation model that forms the foundation of the Evaluation System. You will be able to see how the values set for Clovis Sample Applications, affect the source code generated and behavior.
+
And to prevent the repetition of data we expect that you have installed SAFplus and we suggest looking at section [[Doc:latest/evalguide/build#Evaluation Wizard - Single Node Setup|Evaluation Wizard - Single Node Setup]] and [[Doc:latest/evalguide/build#Manually Building the Target Images|Manually Building the Target Images]].
  
Instructions are provided to generate source code. Once the code is generated you have the opportunity to see how we enhanced the generated source code to create the Clovis Sample Applications which were run in Chapter [[Doc:Evalguide/csa#Sample Applications|Sample Applications]].
+
This chapter describes how to import and examine the cluster model used within this evaluation guide, and then how to regenerate the XML configuration and source code in case you would like to experiment with modifying the evaluation guide cluster model.
 
+
Although the generated code provides a framework for the Sample Applications without any functionality, instructions are provided on how to configure, build and start SAFplus Platform.
+
  
 
===Starting the IDE===
 
===Starting the IDE===
  
If you chose to create symbolic links during installation, from the command line enter <code>cl-ide</code> to launch OpenClovis IDE. Otherwise, from the command line you can either:
+
If you chose to create symbolic links during installation, from the command line enter <code>cl-ide</code> to launch OpenClovis IDE. Otherwise, please enter <the complete path to your chosen installation location>/6.1/sdk/bin/cl-ide
<ul>
+
<li>Add the installation directory to the shell's search path. For example with a bash shell,
+
<code><pre>export PATH=$PATH:$install_dir/sdk-3.0/bin</pre></code>
+
or
+
<li>Execute the command
+
<code><pre><install_dir>/sdk-3.0/bin/cl-ide</pre></code>
+
</ul>
+
  
 
The splash screen for OpenClovis IDE is displayed followed by the Workspace Launcher, as presented in Figure [[#eval_IDEWorkspaceLauncher|OpenClovis IDE Workspace Launcher]].
 
The splash screen for OpenClovis IDE is displayed followed by the Workspace Launcher, as presented in Figure [[#eval_IDEWorkspaceLauncher|OpenClovis IDE Workspace Launcher]].
Line 59: Line 46:
 
This is the Evaluation Model used as the foundation of our Evaluation System. From here you have the opportunity to explore the model in its entirety. To understand how to navigate the IDE please refer to the OpenClovis IDE User Guide.
 
This is the Evaluation Model used as the foundation of our Evaluation System. From here you have the opportunity to explore the model in its entirety. To understand how to navigate the IDE please refer to the OpenClovis IDE User Guide.
  
===Generating Source Code===
+
===Generating Configuration and Source Code===
 +
 
 +
If changes are made to the model configuration, it is necessary to regenerate the configuration XML and source code.  During this regeneration, the system will attempt to merge changes made to the files with the newly generated source.  Similar to the issues encountered in multi-branch development using revision control systems, it is difficult to automatically merge changes.  Therefore, if code is regenerated it may be necessary handle merge issues by hand.  One rule-of-thumb is that once the basic code is generated it is rarely necessary to overwrite it (the exception is if the cluster management object model -- i.e SNMP access is extended).  Therefore, a common strategy is to regenerate but then revert all source code (including Makefiles), only keeping changes to the XML files.
  
To generate source code a number of steps are required. Firstly the location of SAFplus Platform and Python needs to be correct.  
+
 +
To generate source code a number of steps are required. First the location of SAFplus Platform and Python needs to be correct.  
  
 
<span id="eval_IDEASPPython"></span>
 
<span id="eval_IDEASPPython"></span>
Line 69: Line 59:
 
<li>'''SAFplus Platform Location''':  
 
<li>'''SAFplus Platform Location''':  
 
<br>This usually appears by default. This is the location where the SAFplus Platform source code is installed. The default location is usually  
 
<br>This usually appears by default. This is the location where the SAFplus Platform source code is installed. The default location is usually  
<br><code><install_dir>/sdk-3.0/src/SAFplus Platform</code>.  
+
<br><code><install_dir>/6.1/sdk/src/SAFplus Platform</code>.  
  
 
<li>'''Python Location''':  
 
<li>'''Python Location''':  
<br>Again the location of Python 2.4.2 should appear by default. If this is not the case python can be located within  
+
<br>Again the location of Python 2.4.2 or above should appear by default. If this is not the case python can be located within  
<br><code><installation-directory>buildtools/local/bin</code>
+
<br><code><installation-directory>/6.1/buildtools/local/bin</code>
 
<br>The default <code><installation-directory></code> is <code>/opt/clovis</code> for root installation and <code>$HOME/clovis</code> for non root users. This is determined during the installation of the SDK.
 
<br>The default <code><installation-directory></code> is <code>/opt/clovis</code> for root installation and <code>$HOME/clovis</code> for non root users. This is determined during the installation of the SDK.
 
</ul>
 
</ul>
Line 88: Line 78:
 
  <project-area_dir>/eval/src
 
  <project-area_dir>/eval/src
  
You have the opportunity to compare how we built upon the generated code to further develop the Clovis Sample Application found within Chapter [[Doc:Evalguide#Sample Applications|Sample Applications]].
+
You have the opportunity to compare how we built upon the generated code to further develop the Clovis Sample Application found within Chapter [[Doc:latest/evalguide/csa#Sample Applications|Sample Applications]].
  
 
===Configuring & Building Generated Code, and Starting SAFplus Platform===
 
===Configuring & Building Generated Code, and Starting SAFplus Platform===
  
Once the code for the eval model is generated, the first choice you will have to make is decide which hardware setup to run the generated code. This information can be found within is discussed in full within Chapter [[Doc:Evalguide/setup#Runtime Hardware Setup|Runtime Hardware Setup]].  
+
Once the code for the eval model is generated, the first choice you will have to make is decide which hardware setup to run the generated code. This information can be found within is discussed in full within Chapter [[Doc:latest/evalguide/setup#Runtime Hardware Setup|Runtime Hardware Setup]].  
  
 
The next logical step is to configure and build this code. There are two methods of doing this, the first via the OpenClovis IDE, as covered within the ''OpenClovis Sample Application Tutorial''.  
 
The next logical step is to configure and build this code. There are two methods of doing this, the first via the OpenClovis IDE, as covered within the ''OpenClovis Sample Application Tutorial''.  
  
The second method, as discussed earlier, is via the command line. As you already have this document open we suggest looking again at Chapter [[Doc:Evalguide/build#Building the Evaluation System and Deploying Runtime Images|Building the Evaluation System and Deploying Runtime Images]]:  
+
The second method, as discussed earlier, is via the command line. As you already have this document open we suggest looking again at Chapter [[Doc:latest/evalguide/build#Building the Evaluation System and Deploying Runtime Images|Building the Evaluation System and Deploying Runtime Images]]:  
  
 
<ul>
 
<ul>
<li>[[Doc:Evalguide/build#Modifying the Clovis Sample Applications|Modifying the Clovis Sample Applications]]
+
<li>[[Doc:latest/evalguide/build#Modifying the Clovis Sample Applications|Modifying the Clovis Sample Applications]]
 
<br>Provides instructions on modifying the generated code.
 
<br>Provides instructions on modifying the generated code.
  
<li>[[Doc:Evalguide/build#Building SAFplus Platform and the Evaluation System|Building SAFplus Platform and the Evaluation System]]
+
<li>[[Doc:latest/evalguide/build#Building SAFplus Platform and the Evaluation System|Building SAFplus Platform and the Evaluation System]]
<br>Provides details on how to configure and build SAFplus Platform and the generated model. One small difference here is that when we run <code><install_dir>/sdk-3.0/src/SAFplus/configure -with-model-name</code> it should be run with the generated eval model. E.g.:
+
<br>Provides details on how to configure and build SAFplus Platform and the generated model. One small difference here is that when we run <code><install_dir>/6.1/sdk/src/SAFplus/configure -with-model-name</code> it should be run with the generated eval model. E.g.:
 
<code><pre>
 
<code><pre>
$ <install_dir>/sdk-3.0/src/SAFplus/configure \
+
$ <install_dir>/6.1/sdk/src/SAFplus/configure \
 
   --with-asp-build --with-model-name=eval
 
   --with-asp-build --with-model-name=eval
 
</pre></code>
 
</pre></code>
  
<li>[[Doc:Evalguide/build#Configuration file - target.conf|Configuration file - target.conf]]
+
<li>[[Doc:latest/evalguide/build#Configuration File - target.conf|Configuration file - target.conf]]
 
<br>The Hardware Setup choice you made will be required here in setting up the target.conf file
 
<br>The Hardware Setup choice you made will be required here in setting up the target.conf file
  
<li>[[Doc:Evalguide/build#Building Single/Distributed Target Image(s)|Building Single/Distributed Target Image(s)]]
+
<li>[[Doc:latest/evalguide/build#Building Single/Distributed Target Image(s)|Building Single/Distributed Target Image(s)]]
 
<br>Lists commands required to build the target images.
 
<br>Lists commands required to build the target images.
  
<li>[[Doc:Evalguide/build#Content of Target Images|Content of Target Images]]
+
<li>[[Doc:latest/evalguide/build#Content of Target Images|Content of Target Images]]
 
<br>Provides details of the content of the target images for both the singe and distributed setups.
 
<br>Provides details of the content of the target images for both the singe and distributed setups.
 
 
<li>[[Doc:Evalguide/build#Runtime Software Installation|Runtime Software Installation]]
+
<li>[[Doc:latest/evalguide/build#Runtime Software Installation|Runtime Software Installation]]
 
<br>Once the  images have been created this section provides information on how these can be copied to the target.
 
<br>Once the  images have been created this section provides information on how these can be copied to the target.
  
Once the images are copied to their targets we now have to start/stop SAFplus Platform. This is discussed within Section [[Doc:Evalguide/csa#Starting and Stopping SAFplus|Starting and Stopping SAFplus]].
+
Once the images are copied to their targets we now have to start/stop SAFplus Platform. This is discussed within Section [[Doc:latest/evalguide/csa#Starting and Stopping SAFplus Platform|Starting and Stopping SAFplus Platform]].
 
</ul>
 
</ul>
  
 
===Running the Sample Applications===
 
===Running the Sample Applications===
  
The sample applications can be run via the SAFplus Platform Console, however, as the code is simply generated from the IDE nothing will happen.
+
The sample applications can be run via the SAFplus Platform Console, as described in each chapter.
  
 
===Summary and Next Steps===
 
===Summary and Next Steps===
  
 
This appendix provided you with specific steps to open the OpenClovis IDE, import and open the Evaluation Model and generate the source code.
 
This appendix provided you with specific steps to open the OpenClovis IDE, import and open the Evaluation Model and generate the source code.

Latest revision as of 02:53, 11 November 2014

Contents

[edit] Examining The Evaluation Model

During your journey through the evaluation guide, it may be instructive to refer back to the "cluster model" to discover how the various applications in the different modules are configured. The "cluster model" consists of the definition of the nodes in the cluster, the processes each node runs, the grouping of these processes into redundancy (or "protection") groups, and the objects the cluster "presents" to the management station (the management model).

The cluster model is defined by XML files. Understanding and editing this XML by hand is very difficult and is much better accomplished through the OpenClovis SAFplus IDE.

The OpenClovis SAFplus IDE is an Eclipse-based Integrated Development Environment designed to simplify and accelerate the development of the cluster model. It provides a simple and powerful mechanism with easy drag-and-drop features, to create resources and components, define attributes and relationships between them. The OpenClovis IDE graphical interface enables you to capture the Information Models through UML notifications and save them as XML files.


Before proceeding, it is recommended that the reader work through the OpenClovis Sample Application Tutorial, which will introduce you to cluster modelling using the IDE. Further information about the IDE is available in the OpenClovis IDE User's Guide.

And to prevent the repetition of data we expect that you have installed SAFplus and we suggest looking at section Evaluation Wizard - Single Node Setup and Manually Building the Target Images.

This chapter describes how to import and examine the cluster model used within this evaluation guide, and then how to regenerate the XML configuration and source code in case you would like to experiment with modifying the evaluation guide cluster model.

[edit] Starting the IDE

If you chose to create symbolic links during installation, from the command line enter cl-ide to launch OpenClovis IDE. Otherwise, please enter <the complete path to your chosen installation location>/6.1/sdk/bin/cl-ide

The splash screen for OpenClovis IDE is displayed followed by the Workspace Launcher, as presented in Figure OpenClovis IDE Workspace Launcher.

OpenClovis IDE Workspace Launcher

Within the Workspace field the default location of the workspace of IDE is placed. This is the location where information concerning the IDE and models created is saved. This can be altered by pressing the Browse button. Select the workspace directory and click OK to launch OpenClovis IDE as illustrated in the Figure OpenClovis IDE Welcome Screen.

OpenClovis IDE Welcome Screen

[edit] Importing the Evaluation Model

First, we need to import the model.

Importing Evaluation Model into Eclipse Workspace

The Clovis Works model is now presented within the Clovis Workspace View. To, view the Resource Editor, right click on eval -> select Clovis -> select Resource Editor. For the Component Editor right click on eval-> select Clovis -> select Component Editor. The Resource and Component Editor views will now be presented. See Figures below.

Component View

Resource View

This is the Evaluation Model used as the foundation of our Evaluation System. From here you have the opportunity to explore the model in its entirety. To understand how to navigate the IDE please refer to the OpenClovis IDE User Guide.

[edit] Generating Configuration and Source Code

If changes are made to the model configuration, it is necessary to regenerate the configuration XML and source code. During this regeneration, the system will attempt to merge changes made to the files with the newly generated source. Similar to the issues encountered in multi-branch development using revision control systems, it is difficult to automatically merge changes. Therefore, if code is regenerated it may be necessary handle merge issues by hand. One rule-of-thumb is that once the basic code is generated it is rarely necessary to overwrite it (the exception is if the cluster management object model -- i.e SNMP access is extended). Therefore, a common strategy is to regenerate but then revert all source code (including Makefiles), only keeping changes to the XML files.


To generate source code a number of steps are required. First the location of SAFplus Platform and Python needs to be correct.

Set SAFplus Platform and Python Location
  • SAFplus Platform Location:
    This usually appears by default. This is the location where the SAFplus Platform source code is installed. The default location is usually
    <install_dir>/6.1/sdk/src/SAFplus Platform.
  • Python Location:
    Again the location of Python 2.4.2 or above should appear by default. If this is not the case python can be located within
    <installation-directory>/6.1/buildtools/local/bin
    The default <installation-directory> is /opt/clovis for root installation and $HOME/clovis for non root users. This is determined during the installation of the SDK.

Once we are certain the locations of SAFplus Platform and Python 2.4.1 are correct we can now generate the code.

  1. Within the Clovis Workspace View highlight eval; and right click to present a menu.
  2. Within the menu select Generate Source.
  3. A Project Validation pop up window is displayed with the message:
    eval model has errors/warnings. Do you want to continue?
    Press OK

Once OK is pressed the XML and source code is generated and placed within

<project-area_dir>/eval

You will now be able to view this generated source code within

<project-area_dir>/eval/src

You have the opportunity to compare how we built upon the generated code to further develop the Clovis Sample Application found within Chapter Sample Applications.

[edit] Configuring & Building Generated Code, and Starting SAFplus Platform

Once the code for the eval model is generated, the first choice you will have to make is decide which hardware setup to run the generated code. This information can be found within is discussed in full within Chapter Runtime Hardware Setup.

The next logical step is to configure and build this code. There are two methods of doing this, the first via the OpenClovis IDE, as covered within the OpenClovis Sample Application Tutorial.

The second method, as discussed earlier, is via the command line. As you already have this document open we suggest looking again at Chapter Building the Evaluation System and Deploying Runtime Images:

[edit] Running the Sample Applications

The sample applications can be run via the SAFplus Platform Console, as described in each chapter.

[edit] Summary and Next Steps

This appendix provided you with specific steps to open the OpenClovis IDE, import and open the Evaluation Model and generate the source code.