Reference9:Concept Linux Application: Difference between revisions

From innovaphone wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 57: Line 57:
</application>
</application>
</pre>
</pre>
name: application name displayed at the linux application platform.<br>
desc: very short description of the application (also displayed).<br>
version: application version.<br>
href: main site of your application. When click on '''name''', your site will be opened in a new tab or page.
directory: any application should create a directory and place its file inside it.
    <linux-username>hello-world</linux-username>
    <packages>
        <package></package>
    </packages>
    <database name="hello-world" username="hello-world"/>
    <cronjob username="www-data" script="hello_world.sh"/>
    <log-files>
        <log title="Hello World">/var/www/innovaphone/apps/hello-world/logs/helloWorld.log</log>
        <log title="Application log">/var/log/my_application.log</log>
    </log-files>
    <config-files>
        <conf>/var/www/innovaphone/apps/hello-world/conf/helloWorld.conf</conf>
    </config-files>
    <backup>
        <command title="Save hello World configuration files" cmd="savehello-worldcfgs" script=""/>
        <command title="Save hello World database" cmd="savehello-worlddb" script=""/>
        <command title="Save hello World log files" cmd="savehello-worldlogs" script=""/>
        <command title="Application dependant command" cmd="my_backup" script="my_backup.sh"/>
    </backup>
    <restore>
        <command title="Restore hello World configuration files" cmd="restorehello-worldcfgs" script=""/>
        <command title="Restore hello World database" cmd="restorehello-worlddb" script="">
            <action>/etc/init.d/postgresql restart</action>
        </command>
    </restore>
    <uninstall/>
</application>

Revision as of 14:06, 6 April 2011

Introduction

Applications like innovaphone reporting can be developed for the linux application platform.

Requirements

It is needed to have the linux application platform installed and running.

Installation

You can install new applications or just update them here.

Requirements

The installation/update file must be a .tar.gz file with a name beginning with install like install_helloWorld.tar.gz. Inside this compressed file must exist at top-level only one script with a name beginning with install and with any executable extension (sh, pl, py, out), like install_helloWorld.sh. It is of course allowed to have other install scripts inside folders or another script at top-level but beginning with another name.

Application XML

If you want to manage your application through the linux application platform you need to provide an XML file with the name helloWorld.xml and copy it to the following location: /var/www/innovaphone/apps/ (more information about the web server here).

This would be an example of a possible helloWorld.xml file:

<?xml version="1.0" encoding="utf-8"?>
<application>
    <name>hello World!</name>
    <desc>Test application</desc>
    <version>1.0</version>
    <directory>hello_world</directory>
    <href>helloWorld.php</href>
    <linux-username>hello-world</linux-username>
    <packages>
        <package></package>
    </packages>
    <database name="hello-world" username="hello-world"/>
    <cronjob username="www-data" script="hello_world.sh"/>
    <log-files>
        <log title="Hello World">/var/www/innovaphone/apps/hello-world/logs/helloWorld.log</log>
        <log title="Application log">/var/log/my_application.log</log>
    </log-files>
    <config-files>
        <conf>/var/www/innovaphone/apps/hello-world/conf/helloWorld.conf</conf>
    </config-files>
    <backup>
        <command title="Save hello World configuration files" cmd="savehello-worldcfgs" script=""/>
        <command title="Save hello World database" cmd="savehello-worlddb" script=""/>
        <command title="Save hello World log files" cmd="savehello-worldlogs" script=""/>
        <command title="Application dependant command" cmd="my_backup" script="my_backup.sh"/>
    </backup>
    <restore>
        <command title="Restore hello World configuration files" cmd="restorehello-worldcfgs" script=""/>
        <command title="Restore hello World database" cmd="restorehello-worlddb" script="">
            <action>/etc/init.d/postgresql restart</action>
        </command> 
    </restore>
    <uninstall/>
</application>

name: application name displayed at the linux application platform.
desc: very short description of the application (also displayed).
version: application version.
href: main site of your application. When click on name, your site will be opened in a new tab or page. directory: any application should create a directory and place its file inside it.

   <linux-username>hello-world</linux-username>
   <packages>
       <package></package>
   </packages>
   <database name="hello-world" username="hello-world"/>
   <cronjob username="www-data" script="hello_world.sh"/>
   <log-files>
       <log title="Hello World">/var/www/innovaphone/apps/hello-world/logs/helloWorld.log</log>
       <log title="Application log">/var/log/my_application.log</log>
   </log-files>
   <config-files>
       <conf>/var/www/innovaphone/apps/hello-world/conf/helloWorld.conf</conf>
   </config-files>
   <backup>
       <command title="Save hello World configuration files" cmd="savehello-worldcfgs" script=""/>
       <command title="Save hello World database" cmd="savehello-worlddb" script=""/>
       <command title="Save hello World log files" cmd="savehello-worldlogs" script=""/>
       <command title="Application dependant command" cmd="my_backup" script="my_backup.sh"/>
   </backup>
   <restore>
       <command title="Restore hello World configuration files" cmd="restorehello-worldcfgs" script=""/>
       <command title="Restore hello World database" cmd="restorehello-worlddb" script="">
           <action>/etc/init.d/postgresql restart</action>
       </command> 
   </restore>
   <uninstall/>

</application>