4 Replies Latest reply on Sep 30, 2008 5:52 AM by stefanocke

    JSR88 updated with a StreamingTarget implementation

    starksm64

      As part of the profile service crud support for deployments, I added a new StreamingTarget implementation that uses the remoting streaming capability to allow uploads via any protocol remoting supports.

      The default target implemention is still the JMXTarget. To select the StreamingTarget, a targetType=remote query param would be added to the

       /**
       * Obtain a DeploymentManager using a deployURI of the form
       * http://org.jboss.deployment/jsr88?targetType=targetType
       * Valid targetType values are:
       * jmx - Use the JMXTarget RMIAdaptor based deployment target
       * remote - Use the StreamingTarget remoting based deployment target
       * @return JSR88 DeploymentManager
       * @throws Exception
       */
       protected DeploymentManager getDeploymentManager(String targetType)
       throws Exception
       {
       // Get the deployment manager and the distribution targets
       String mgrURI = DeploymentManagerImpl.DEPLOYER_URI+"?targetType="+targetType;
       DeploymentManager manager = factory.getDeploymentManager(mgrURI, null, null);
       return manager;
       }
      


      See the org.jboss.test.deployment.{JMXDeploymentTestCase,StreamingDeploymentTestCase}s in the jbossas/testsuite module for examples.

      Right now this is just uploading content to the DeploymentManagerService uploadDir (tmp/jsr88) and is not really integrated with the ProfileService. Adding a proper deployment repository notion to the ProfileService is next.


        • 1. Re: JSR88 updated with a StreamingTarget implementation
          starksm64

          The streaming upload handler is a new subsystem added to the unified invoker Connector configuration:

           <mbean code="org.jboss.remoting.transport.Connector"
           name="jboss.remoting:service=Connector,transport=socket"
           display-name="Socket transport Connector">
          ...
           <handlers>
           <!-- can also specify handler by fully qualified classname -->
           <handler subsystem="invoker">jboss:service=invoker,type=unified</handler>
           <!-- The JSR88 deployment service StreamingTarget handler -->
           <handler subsystem="JSR88">org.jboss.deployment.remoting.DeployHandler</handler>
           </handlers>
           </config>
          



          • 2. Re: JSR88 updated with a StreamingTarget implementation
            ccrouch

            With respect to fleshing out the Profile Service I'm thinking about what would need to happen to deploy a DataSource into the MC using the Profile Service, e.g.
            0) Start the Server
            1) Use JSR88+StreamingDeployment to upload a DataSource deployment (*)
            2) Have the ProfileService pass the new deployment off to the MainDeployer.

            Did I miss anything? Is this about the most basic use case we can start with?

            (*)Do we care about whether the DataSource gets deployed the old mbean way i.e. -ds.xml, rather than the new raw MC way, i.e. -beans.xml? I'm guessing this would be related to
            http://jira.jboss.com/jira/browse/JBAS-3415 (Port RARDeployer).

            These steps would seem to require the Profile Service to have the "proper deployment repository notion " Scott mentions above.

            • 3. Re: JSR88 updated with a StreamingTarget implementation
              starksm64

              Yes, that is the simple add a deployment sequence.

              We don't care about how the service is packaged for this scenario. Something has to care about the packaging in terms of how admin changes are applied to the deployment repository, but there are a lot of details to flesh out. The issue is that, for a given deployment:

              - there has to be a management interface representation that allows a tool to perform changes without the jboss server running
              - there has to be a mapping from the management interface properties to the deployment metadata the admin changes apply to, and/or a mapping to the runtime component properties the changes apply to. There can be a management property that only applies to the deployment metadata and requires a restart, applies to only a runtime mc component property, or applies to both. The change has to be a delta of some form in the deployment repository. How this is stored and the override applied depends on the management interface to deployment metadata/component property mapping. The RARDeployer port certainly affects the mapping, but should not affect the managment interface.

              I'm working on a profile service overview/state of being description to put out tonight as background for the parties to use as a basis for what we want to do with a managment aspect.

              • 4. Re: JSR88 updated with a StreamingTarget implementation
                stefanocke

                Hi,

                Is it possible to use StreamingTarget to deploy on a remote server? Where and how would one have to configure the host then?

                It seems, that DeploymentManagerImpl.DEPLOYER_URI is always mapped to localhost by StreamingTarget...

                Best Regards,
                Stefan.