Page Tools

    Redeployment, or dynamic deployment

    In a normal world, deployed applications are often dynamic.. you may want to extend them, add roles and processes, and replace crashed ones. ADAGE has a special feature for this, called 'redeployment'.

    The basic idea is :

    • you deploy your application using '' as usual. -a tests/test/a.test -r tests/nodes.res -c tests/ctrl.xml -x
    • you decide to extend it by adding a new process group and increasing the cardinality of an existing one (example shows a diff -u-like between previous and new specific application description)
    -<host id='h2' cardinality='1'>
    +<host id='h2' cardinality='2'>
            <process id='p2' command='/usr/bin/uptime' cardinality='3'/>
    +<host id='h3' cardinality='3'>
    +        <process id='p3' command='/usr/bin/uptime' cardinality='1'/>
    • you give the new description to ADAGE, telling it to replace the previous one (warning, filename HAS to be the same) -replaceappl tests/test/a.test -x
    • finally, you noticed that an entire process group has crashed, and that one instance of one crashed too (this has to be done in the plugin code ATM, sorry) .. btw you want to replace this instance, so you don't modify the cardinality. ADAGE will detect that you want to create a new instance.
    // remove the crashed process group
    -<host id='h2' cardinality='2'>
    -    <process id='p2' command='/usr/bin/uptime' cardinality='3'/>
    // in plugin code
    // OR in ctrl.xml
    +    <instance id="TEST_0_a.test_h3" num="1"/>
    • you re-give the new description to ADAGE, it will discard the instances which crashed, and create a new one. -replaceappl tests/test/a.test -x
    • if you dump status document, you'll see that whole process group TEST_0_a.test_h2 and instance #1 of process group TEST_0_a.test_h3 have been marked in state discarded, and that a fourth instance of the latter has been created.

    Powered by Heliovista - Création site internet