4 Replies Latest reply on Aug 22, 2011 3:46 AM by morphy

    AS7 admin CLI non interactive way

    morphy

      Hi

       

      i would like to prepare an installation script to add resources, prepare server groups, deploy artifacts... and so on...

       

      first step is deploy artifacts in an already configured AS7

       

      the tool is the admin CLI (jboss-admin.sh)

       

      but the olny way to perform non-interactive operations is redirecting the stdin from a file...

       

      any opinions?

       

      bye

        • 1. Re: AS7 admin CLI non interactive way
          jaikiran

          The CLI is non-interactive. i.e. you can just issue commands/operations via your scripts and it does "ask" for input when you run those commands. The input itself will be part of the command/operation that you run.

           

          Is there some specific operation that you are looking at from the CLI?

          • 2. Re: AS7 admin CLI non interactive way
            morphy

            the (first) need is the following:

             

            1. remove from server group
            2. undeploy
            3. redeploy (i know... deploy -f should avoid the remove/undeploy phase)

             

            so i've prepared a conf file with:

             

            1. /server-group=xxx/deployments=yyy:remove
            2. undeploy yyy
            3. deploy -f yyy etcetcetc

             

            next in a sh script

             

            • $JBADMIN < myconf_file

             

            it works properly even if i have to fix some hardcodings

             

            i was just wondering how to simplify the process removing in toto the conf file

             

            thank you

            • 3. Re: AS7 admin CLI non interactive way
              nickarls

              are you looking for the -c --file parameters?

              1 of 1 people found this helpful
              • 4. Re: AS7 admin CLI non interactive way
                morphy

                it should be better than redirecting the stdin... meybe what's going around in my brain is something like sqlplus.... sqlplus <opt> @<file> but the --file should be fine