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 'adage-client.pl' as usual.
    adage-client.pl -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>
    +<host id='h3' cardinality='3'>
    +        <process id='p3' command='/usr/bin/uptime' cardinality='1'/>
    +</host>
    • you give the new description to ADAGE, telling it to replace the previous one (warning, filename HAS to be the same)
    adage-client.pl -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'/>
    -</host>
    // in plugin code
    docs->discard_proc_group_instance("TEST_0_a.test_h3",1);
    // OR in ctrl.xml
    +<discarded_pgs>
    +    <instance id="TEST_0_a.test_h3" num="1"/>
    +<discarded_pgs>
    • you re-give the new description to ADAGE, it will discard the instances which crashed, and create a new one.
    adage-client.pl -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