3 Replies Latest reply on Jun 10, 2011 11:03 PM by ssilvert

    undeploy workaround in AS7 domain

    mtb2ride

      Using the Deploy and undeploy with the CLI I can successfully deploy war archives to my server groups.  I'm using JBoss AS 7.0.0.Beta3.  When I un-deploy using --all-relevant-server-groups flag, the deployment is removed from the server groups but still stays in the domain deployment repository.  Then when I do a simple undeploy with no args I get this.

       

       

          <deployments>
              <deployment name="e32web.war" runtime-name="e32web.war" sha1="be6c6e6e619d0504cb32252c598cbf21800b2041"/>
          </deployments>
          <server-groups>
              <server-group name="main-server-group" profile="default">
                  <jvm name="default">
                      <heap size="64m" max-size="512m"/>
                  </jvm>
                  <socket-binding-group ref="standard-sockets"/>
              </server-group>
              <server-group name="other-server-group" profile="default">
                  <jvm name="default">
                      <heap size="64m" max-size="512m"/>
                  </jvm>
                  <socket-binding-group ref="standard-sockets"/>
              </server-group>
          </server-groups>
      
      

       

       

      [localhost:9999 /] undeploy e32web.war
      Undeploy failed: {"domain-failure-description" => "No handler for undeploy at address [(\"deployment\" => \"e32web.war\")]"}
      

       

      Instead I have to do this with "remove":

       

      [localhost:9999 /] cd deployment=e32web.war
      [localhost:9999 e32web.war] :remove
      

       

      I even took advantage of using tab completion for e32web.war

      Now my domain.xml has no <deployments> element

        • 1. Re: undeploy workaround in AS7 domain
          ssilvert

          I think maybe the problem is with the terminology.  When you start talking about domain deployments, things get more complicated.

           

          See this document.

           

          Undeploy doesn't mean the same as "remove from domain".   The problem is that "undeploy" in the CLI is a command that means slightly different things on Standalone vs. Domain.  I'd like to see something more consistent.

           

          Stan

          • 2. Re: undeploy workaround in AS7 domain
            mtb2ride

            So the commands in the CLI commands don't necessarily match up with the terminology, that's fine.  I'm looking for a way to carry out the terminology from the AS7 Deployment Terms using the CLI. In the case of a domain deployment for example, could you give me a quick overview of how to use the CLI to "assign" a deployment to a server group?

            • 3. Re: undeploy workaround in AS7 domain
              ssilvert

              Hopefully, we can figure something out so that the CLI, the web console, and the underlying API all match up a little better.  But it's complicated, especially because of the traditional meanings of terms like deploy and undeploy.

               

              Anyway, this functionality now exists in the latest web console.  So if you grab a nightly build of AS7 or wait a few days for the CR release then you will have an easy way to do it with a nice web UI.

               

              So back to your question about using the CLI.  Once you have your deployment uploaded to the content store, the command to assign to a server group looks something like this:

              /server-group=mygroup/deployment=foo.war/:add
              

               

              Then, to enable the deployment so it will actually deploy, do this:

              /server-group=mygroup/deployment=foo.war/:deploy
              

               

              Stan