3 Replies Latest reply on Jul 17, 2006 12:02 PM by slaboure

    VDF deployer update

    starksm64

      I have gone through the system2 (can be checked out as part of the jbossmc cvs alias or this eclipse project set: http://fisheye.jboss.com/viewrep/JBoss/build/mc/eclipse.psf) and updated the vdf prototype to align with the two phase deployment model we talked about in JBW that is needed for use with the profile service.

      As part of this I went over the existing vdf discussion and jira items (see http://www.jboss.com/index.html?module=bb&op=viewtopic&t=58404) and I have the following changes to discuss:

      1. I don't see a need to separate structural deployers from runtime deployers. In the previous discussion there was a notion that the structural phase would run a separate deployer stack and that the first deployer that recognized the deployment would win. With the extension of the structural phase to one that essentially parses a physical deployment info metadata that supports the profile service configuration and management view behaviors, essentially every deployer can contribute both forms of metadata to a deployment.

      2. Related to this, a DeploymentContext (the object representation of a subdeployment) does not have an associated AspectDeployer. Instead there is a set of deployment types that identify the AspectDeployer that contributed to the metadata and will want to process this context at runtime.

      3. The org.jboss.deployers.vdf package which essentially was the virtual file system concept has been replaced with the existing container org.jboss.vfs.* classes. A DeploymentContext has a VirtualFile rather than a VDFComponent.

      4. The notion of deployer suffixes in this vdf deployer scheme seems a legacy bootstrap notion at best. The org.jboss.deployers.plugins.MainDeployerImpl externalizes the notion of how a deployment is started to a org.jboss.deployers.spi.DeploymentGraphBuilder which returns a Graph that is a directed graph of the deployment contexts. A depth first traversal of this graph with execution of each deployer that matches the DeploymentContext registered deployment types defines the deployment processing.

      The deployment order can therefore be based on the legacy structure/suffix notion, explicit deployment unit/context ordering, ...

      5. The JARDeployer notion seems obsolete. The deployment structure is handled by vfs, ClassloaderDeployer, and the deployers themselves.

      6. In addition to breaking the AspectDeployer into two distinct phases, there is a notion of a manged object that represents the view a management client would use to update a deployment. This ties into the profile service support for being able to update a deployment in a profile without having a running jboss instance. This is the biggest implementation change to deployers as currently the management interface is an implicit detail based on the jmx beans that happen to show up.

      I'm still working on getting this update to the state of actually deploying mc beans and integrating with the profile service. After that getting the other deployers ported over to the vdf needs to be done to fully flesh this out.

        • 1. Re: VDF deployer update
          starksm64

          The server core is booting the mc, loadig the ProfileService and bootstrap deployers, and loading an equivalent of the current hot deployment service. In the MainWithSimpleHotDeployTestCase, this is deploying a couple of beans deployments:

          2006-07-16 19:43:01,031 DEBUG [org.jboss.test.server.profileservice.MainWithSimpleHotDeployTestCase] ==== Starting testDefaultStartup ====
          2006-07-16 19:43:01,109 INFO [org.jboss.system.server.Server] Starting JBoss (MicroContainer)...
          2006-07-16 19:43:01,109 INFO [org.jboss.system.server.Server] Release ID: null null
          2006-07-16 19:43:01,109 DEBUG [org.jboss.system.server.Server] Using config: org.jboss.system.server.ServerConfigImpl@10ef90c
          2006-07-16 19:43:01,109 DEBUG [org.jboss.system.server.Server] Server type: class org.jboss.system.server.profileservice.ServerImpl
          2006-07-16 19:43:01,109 INFO [org.jboss.system.server.Server] Home Dir: C:\cvs\JBossMC\workspace\system
          2006-07-16 19:43:01,109 INFO [org.jboss.system.server.Server] Home URL: file:/C:/cvs/JBossMC/workspace/system/
          2006-07-16 19:43:01,109 INFO [org.jboss.system.server.Server] Library URL: file:/C:/cvs/JBossMC/workspace/system/lib/
          2006-07-16 19:43:01,125 INFO [org.jboss.system.server.Server] Patch URL: null
          2006-07-16 19:43:01,140 INFO [org.jboss.system.server.Server] Server Name: defaulthotdeploy
          2006-07-16 19:43:01,140 INFO [org.jboss.system.server.Server] Server Home Dir: C:\cvs\JBossMC\workspace\system\server\defaulthotdeploy
          2006-07-16 19:43:01,140 INFO [org.jboss.system.server.Server] Server Home URL: file:/C:/cvs/JBossMC/workspace/system/server/defaulthotdeploy/
          2006-07-16 19:43:01,140 INFO [org.jboss.system.server.Server] Server Data Dir: C:\cvs\JBossMC\workspace\system\server\defaulthotdeploy\data
          2006-07-16 19:43:01,140 INFO [org.jboss.system.server.Server] Server Temp Dir: C:\cvs\JBossMC\workspace\system\server\defaulthotdeploy\tmp
          2006-07-16 19:43:01,140 INFO [org.jboss.system.server.Server] Server Config URL: file:/C:/cvs/JBossMC/workspace/system/server/defaulthotdeploy/conf/
          2006-07-16 19:43:01,140 INFO [org.jboss.system.server.Server] Server Library URL: file:/C:/cvs/JBossMC/workspace/system/server/defaulthotdeploy/lib/
          2006-07-16 19:43:01,140 INFO [org.jboss.system.server.Server] Root Deployment Filename: jboss-service.xml
          2006-07-16 19:43:01,140 INFO [org.jboss.system.server.Server] Starting MicroContainer
          2006-07-16 19:43:01,171 DEBUG [org.jboss.kernel.KernelFactory] Starting JBoss Kernel construction...
          2006-07-16 19:43:01,312 DEBUG [org.jboss.kernel.KernelFactory] Completed JBoss Kernel construction. Duration: 141 milliseconds
          2006-07-16 19:43:01,375 DEBUG [org.jboss.system.server.profileservice.ProfileServiceBootstrap] Scanning for bootstrap resources: defaulthotdeploy/deployer-beans.xml
          2006-07-16 19:43:01,375 DEBUG [org.jboss.system.server.profileservice.ProfileServiceBootstrap] Deploying bootstrap config: file:/C:/cvs/JBossMC/workspace/system/src/resources/tests/bootstrap/defaulthotdeploy/deployer-beans.xml
          2006-07-16 19:43:02,218 INFO [org.jboss.system.server.profile.basic.ProfileImpl] Using profile root:C:\cvs\JBossMC\workspace\system\output\file:C:\cvs\JBossMC\workspace\system\output\lib
          2006-07-16 19:43:02,265 DEBUG [org.jboss.deployers.plugins.classloading.ClassLoadingDeployer] Setting kernel context AbstractKernelControllerContext@1fe1feb{ metadata=AbstractBeanMetaData@f8f7db{name=ClassLoadingDeployer bean=org.jboss.deployers.plugins.classloading.ClassLoadingDeployer properties=[mainDeployer] constructor=null}name=ClassLoadingDeployer target=ClassLoadingDeployer@15856a5{} state=Described depends=AbstractDependencyInfo@a084f8{idependOn=[AbstractDependencyItem@79ed7f{name=ClassLoadingDeployer dependsOn=MainDeployer whenRequired=Configured dependentState=Installed resolved=false}] unresolved=[AbstractDependencyItem@79ed7f{name=ClassLoadingDeployer dependsOn=MainDeployer whenRequired=Configured dependentState=Installed resolved=false}]}}
          2006-07-16 19:43:02,265 DEBUG [org.jboss.deployers.plugins.MainDeployerImpl] Registering aspect deployer: ClassLoadingDeployer@15856a5{}
          2006-07-16 19:43:02,265 DEBUG [org.jboss.deployers.plugins.bean.BeanDeployer] Setting kernel context AbstractKernelControllerContext@1e845c2{ metadata=AbstractBeanMetaData@125fefa{name=BeanDeployer bean=org.jboss.deployers.plugins.bean.BeanDeployer properties=[mainDeployer] constructor=null}name=BeanDeployer target=BeanDeployer@186df0f{} state=Described depends=AbstractDependencyInfo@19e8f17{idependOn=[AbstractDependencyItem@c44b88{name=BeanDeployer dependsOn=MainDeployer whenRequired=Configured dependentState=Installed resolved=false}] unresolved=[AbstractDependencyItem@c44b88{name=BeanDeployer dependsOn=MainDeployer whenRequired=Configured dependentState=Installed resolved=false}]}}
          2006-07-16 19:43:02,265 DEBUG [org.jboss.deployers.plugins.MainDeployerImpl] Registering aspect deployer: BeanDeployer@186df0f{}
          2006-07-16 19:43:02,296 DEBUG [org.jboss.deployers.plugins.scanner.VFSDeploymentScannerImpl] Added URI: file:C:/cvs/JBossMC/workspace/system/output/lib/../resources/deploy/
          2006-07-16 19:43:02,296 DEBUG [org.jboss.deployers.plugins.scanner.VFSDeploymentScannerImpl] URI list: [file:C:/cvs/JBossMC/workspace/system/output/lib/../resources/deploy/]
          2006-07-16 19:43:02,312 DEBUG [org.jboss.system.server.profileservice.ProfileServiceBootstrap] Scanning for bootstrap resources: META-INF/defaulthotdeploy/deployer-beans.xml
          2006-07-16 19:43:02,312 DEBUG [org.jboss.deployers.plugins.scanner.VFSDeploymentScannerImpl] Checking file: org.jboss.vfs.file.FileImpl@1d95492[path=file:C:/cvs/JBossMC/workspace/system/output/lib/../resources/deploy/,vfsPath=,isFile=false,isDirectory=true,isArchive=false]
          2006-07-16 19:43:02,312 DEBUG [org.jboss.system.server.profileservice.ProfileServiceBootstrap] Using MainDeployer: MainDeployerImpl@76ab2f{}
          2006-07-16 19:43:02,312 DEBUG [org.jboss.system.server.profileservice.ProfileServiceBootstrap] Using ProfileService: org.jboss.system.server.profileservice.ProfileServiceImpl@e0cc23
          2006-07-16 19:43:02,312 DEBUG [org.jboss.deployers.plugins.scanner.VFSDeploymentScannerImpl] Deploying: org.jboss.vfs.file.FileImpl@7a1576[path=file:C:/cvs/JBossMC/workspace/system/output/resources/deploy/beans/test-beans.xml,vfsPath=test-beans.xml,isFile=true,isDirectory=false,isArchive=false]
          2006-07-16 19:43:02,406 DEBUG [org.jboss.system.server.Server] Shutdown hook added
          2006-07-16 19:43:02,406 DEBUG [org.jboss.deployers.plugins.bean.BeanDeployer] No META-INF/jboss-beans.xml, assuming *-beans.xml
          2006-07-16 19:43:02,406 INFO [org.jboss.system.server.Server] JBoss (MicroContainer) [null] Started in 1s:266ms
          2006-07-16 19:43:02,500 DEBUG [org.jboss.deployers.plugins.scanner.VFSDeploymentScannerImpl] Deploying: org.jboss.vfs.file.FileImpl@acb158[path=file:C:/cvs/JBossMC/workspace/system/output/resources/deploy/beans/unpacked.beans,vfsPath=unpacked.beans,isFile=false,isDirectory=true,isArchive=false]
          2006-07-16 19:43:02,500 DEBUG [org.jboss.deployers.plugins.bean.BeanDeployer] Found META-INF/jboss-beans.xml: org.jboss.vfs.file.FileImpl@1af33d6[path=file:C:/cvs/JBossMC/workspace/system/output/resources/deploy/beans/unpacked.beans/META-INF/jboss-beans.xml,vfsPath=META-INF/jboss-beans.xml,isFile=true,isDirectory=false,isArchive=false]
          2006-07-16 19:43:02,546 INFO [org.jboss.test.server.profileservice.MainWithSimpleHotDeployTestCase] Notified of scan: 1
          2006-07-16 19:43:02,546 DEBUG [org.jboss.system.server.Server] Shutting down
          2006-07-16 19:43:02,546 DEBUG [org.jboss.system.server.Server] exitOnShutdown: true
          2006-07-16 19:43:02,546 DEBUG [org.jboss.system.server.Server] blockingShutdown: false
          2006-07-16 19:43:02,546 INFO [org.jboss.system.server.Server] LifeThread.run exits!
          2006-07-16 19:43:02,546 DEBUG [org.jboss.test.server.profileservice.MainWithSimpleHotDeployTestCase] testDefaultStartup took 1515ms
          2006-07-16 19:43:02,546 DEBUG [org.jboss.test.server.profileservice.MainWithSimpleHotDeployTestCase] ==== Stopping testDefaultStartup ====
          2006-07-16 19:43:02,546 INFO [org.jboss.system.server.Server] Shutting down the JVM now!
          2006-07-16 19:43:02,546 INFO [org.jboss.system.server.Server] JBoss SHUTDOWN: Undeploying all packages
          2006-07-16 19:43:02,546 DEBUG [org.jboss.system.server.Server] Shutting down MicroContainer
          2006-07-16 19:43:02,546 DEBUG [org.jboss.deployers.plugins.MainDeployerImpl] Unregistering aspect deployer: BeanDeployer@186df0f{}
          2006-07-16 19:43:02,562 DEBUG [org.jboss.deployers.plugins.bean.BeanDeployer] Unsetting kernel context AbstractKernelControllerContext@1e845c2{ metadata=AbstractBeanMetaData@125fefa{name=BeanDeployer bean=org.jboss.deployers.plugins.bean.BeanDeployer properties=[mainDeployer] constructor=null}name=BeanDeployer target=BeanDeployer@186df0f{} state=Described depends=AbstractDependencyInfo@19e8f17{idependOn=[AbstractDependencyItem@c44b88{name=BeanDeployer dependsOn=MainDeployer whenRequired=Configured dependentState=Installed resolved=false}] unresolved=[AbstractDependencyItem@c44b88{name=BeanDeployer dependsOn=MainDeployer whenRequired=Configured dependentState=Installed resolved=false}]}}
          2006-07-16 19:43:02,562 DEBUG [org.jboss.deployers.plugins.MainDeployerImpl] Unregistering aspect deployer: ClassLoadingDeployer@15856a5{}
          2006-07-16 19:43:02,562 DEBUG [org.jboss.deployers.plugins.classloading.ClassLoadingDeployer] Unsetting kernel context AbstractKernelControllerContext@1fe1feb{ metadata=AbstractBeanMetaData@f8f7db{name=ClassLoadingDeployer bean=org.jboss.deployers.plugins.classloading.ClassLoadingDeployer properties=[mainDeployer] constructor=null}name=ClassLoadingDeployer target=ClassLoadingDeployer@15856a5{} state=Described depends=AbstractDependencyInfo@a084f8{idependOn=[AbstractDependencyItem@79ed7f{name=ClassLoadingDeployer dependsOn=MainDeployer whenRequired=Configured dependentState=Installed resolved=false}] unresolved=[AbstractDependencyItem@79ed7f{name=ClassLoadingDeployer dependsOn=MainDeployer whenRequired=Configured dependentState=Installed resolved=false}]}}
          2006-07-16 19:43:02,562 INFO [org.jboss.system.server.Server] Shutdown complete
          


          At this point we need a plan to move head over to this. The major sticking points are porting the deployers, and jmx integration.

          What are the thoughts for migration of existing sar deployments? A new jbossxb binding model for the jboss-service.xml schema for the BeanXMLDeployer would be the most natural approach.


          • 2. Re: VDF deployer update

            I'm currently working on rewriting the ServiceController to "wrap"
            the kernel controller and provide the backward compatible JMX behaviour.

            The version I have at the moment (incomplete) is not using JBossXB
            but it does have a ServiceMetaData (like the BeanMetaData)
            with some external xml parsing ripped from the ServiceCreator/Configurator
            that populates the model.

            I expect the xml parsing to be replaced with JBossXB once we have
            a well defined schema than can cope with some of the "strangeness"
            like injecting DOM elements, and the custom POJO parsing,
            and the "depends optional-attribute".

            • 3. Re: VDF deployer update
              slaboure

              Do we have a new ETA for JMX support, etc.?

              Congrats on making this start BTW Scott!

              Cheers,


              sacha