Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
644 lines (456 sloc) 24.9 KB
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<!-- ===================================================================
rm.Manager implementation
=================================================================== -->
<bean id="nimbus-rm.manager"
class="org.globus.workspace.manager.DelegatingManager">
<constructor-arg ref="nimbus-rm.creation"/>
<constructor-arg ref="nimbus-rm.PathConfigs"/>
<constructor-arg ref="nimbus-rm.home.instance"/>
<constructor-arg ref="nimbus-rm.home.group"/>
<constructor-arg ref="nimbus-rm.home.cosched"/>
<constructor-arg ref="nimbus-repr.ReprFactory"/>
<constructor-arg ref="nimbus-rm.persistence.DataConvert"/>
<constructor-arg ref="nimbus-rm.loglevels" />
<property name="accounting"
ref="nimbus-rm.accounting" />
</bean>
<!-- ===================================================================
rm.BasicLegality implementation (using nimbustools default)
=================================================================== -->
<bean id="nimbus-rm.BasicLegality"
class="org.nimbustools.api.defaults.services.rm.DefaultBasicLegality" />
<!-- ===================================================================
brain.ModuleLocator implementation
For use from above to find key modules, where "above" in almost all
cases means a container (the remote messaging layer). Those cannot be
served by dependency injection (or if they happened to be, would be a
different application context unless you took time to integrate
directly).
=================================================================== -->
<bean id="nimbus-brain.ModuleLocator"
class="org.nimbustools.api.defaults.brain.DefaultModuleLocator">
<lookup-method name="getManager" bean="nimbus-rm.manager"/>
<lookup-method name="getReprFactory" bean="nimbus-repr.ReprFactory"/>
<lookup-method name="getMetadataServer" bean="nimbus-metadata-server"/>
</bean>
<!-- ===================================================================
representation classes are broken out
=================================================================== -->
<import resource="main.repr.xml"/>
<!-- ===================================================================
property sources are concentrated in this file
=================================================================== -->
<import resource="main.conflocator.xml"/>
<!-- ===================================================================
Creation interfaces
=================================================================== -->
<bean id="nimbus-rm.creation"
class="org.globus.workspace.creation.defaults.DefaultCreation">
<constructor-arg ref="nimbus-rm.LockManager" />
<constructor-arg ref="nimbus-rm.BasicLegality" />
<constructor-arg ref="nimbus-rm.service.binding.BindingAdapter" />
<constructor-arg ref="nimbus-rm.networks" />
<constructor-arg ref="nimbus-rm.service.binding.Authorize" />
<constructor-arg ref="nimbus-rm.scheduler.Scheduler" />
<constructor-arg ref="nimbus-repr.ReprFactory" />
<constructor-arg ref="nimbus-rm.service.binding.GlobalPolicies" />
<constructor-arg ref="nimbus-rm.persistence.PersistenceAdapter" />
<constructor-arg ref="nimbus-rm.persistence.DataConvert" />
<constructor-arg ref="nimbus-rm.home.instance" />
<constructor-arg ref="nimbus-rm.home.group" />
<constructor-arg ref="nimbus-rm.home.cosched" />
<constructor-arg ref="other.timerManager" />
<constructor-arg ref="nimbus-rm.loglevels" />
<property name="accountingEventAdapter"
ref="nimbus-rm.accounting" />
</bean>
<!-- Retrieve the active authorization callout definition, it could be
the "disabled" one which causes no callout to happen -->
<import resource="authz-callout-ACTIVE.xml" />
<bean id="nimbus-rm.service.binding.Authorize"
class="org.globus.workspace.service.binding.authorization.DefaultAuthorize">
<constructor-arg ref="nimbus-rm.service.binding.GlobalPolicies" />
<constructor-arg ref="nimbus-rm.service.binding.AuthorizationCallout" />
<constructor-arg ref="nimbus-rm.home.instance" />
<property name="accountingReaderAdapter"
ref="nimbus-rm.accounting" />
</bean>
<!-- BindingAdapter is autowired, it gets automatically fed any needed
beans into its constructor args -->
<bean id="nimbus-rm.service.binding.BindingAdapter"
class="org.globus.workspace.service.binding.defaults.DefaultBindingAdapter"
autowire="constructor" />
<bean id="nimbus-rm.service.binding.GlobalPolicies"
class="org.globus.workspace.service.binding.defaults.DefaultGlobalPolicies"
init-method="validate">
<!-- Property values coming via vmm.conf -->
<property name="cpuArchitectureName"
value="$VMM{cpu.arch}" />
<property name="vmm"
value="$VMM{vmm.type}" />
<property name="vmmVersions"
value="$VMM{vmm.versions}" />
<!-- Property values coming via global-policies.conf -->
<property name="allowStaticIPs"
value="$GLOBAL{allow.static.addresses}" />
<property name="maximumRunningTimeSeconds"
value="$GLOBAL{maximum.runtime.seconds}" />
<property name="maximumGroupSize"
value="$GLOBAL{maximum.group.size}" />
<property name="terminationOffsetSeconds"
value="$GLOBAL{termination.offset.seconds}" />
<property name="defaultRunningTimeSeconds"
value="$GLOBAL{default.runtime.seconds}" />
<!-- Property values coming via common.conf -->
<property name="fake" value="$COMMON{fake.mode}" />
<property name="fakelag" value="$COMMON{fake.lag.ms}" />
</bean>
<bean id="nimbus-rm.service.binding.BindSchedule"
class="org.globus.workspace.service.binding.defaults.DefaultBindSchedule">
<constructor-arg ref="nimbus-rm.service.binding.GlobalPolicies" />
</bean>
<bean id="nimbus-rm.service.binding.BindInitialState"
class="org.globus.workspace.service.binding.defaults.DefaultBindInitialState" />
<bean id="nimbus-rm.service.binding.BindShutdownMechanism"
class="org.globus.workspace.service.binding.defaults.DefaultBindShutdownMechanism">
<constructor-arg ref="nimbus-rm.service.binding.GlobalPolicies" />
</bean>
<bean id="nimbus-rm.service.binding.BindCustomizations"
class="org.globus.workspace.service.binding.defaults.DefaultBindCustomizations"
init-method="validate">
<constructor-arg ref="nimbus-rm.PathConfigs" />
</bean>
<bean id="nimbus-rm.service.binding.BindKernel"
class="org.globus.workspace.service.binding.defaults.DefaultBindKernel" />
<bean id="nimbus-rm.service.binding.BindResourceRequest"
class="org.globus.workspace.service.binding.defaults.DefaultBindResourceRequest" />
<bean id="nimbus-rm.service.binding.BindDisks"
class="org.globus.workspace.service.binding.defaults.DefaultBindDisks">
<constructor-arg ref="nimbus-rm.service.binding.GlobalPolicies" />
<!-- <property name="sda1Replacement" value="xvda1" /> -->
</bean>
<bean id="nimbus-rm.service.binding.BindVMM"
class="org.globus.workspace.service.binding.defaults.DefaultBindVMM" />
<bean id="nimbus-rm.service.binding.BindNetwork"
class="org.globus.workspace.service.binding.defaults.DefaultBindNetwork">
<constructor-arg ref="nimbus-rm.service.binding.GlobalPolicies" />
<constructor-arg ref="nimbus-rm.networks" />
<constructor-arg ref="nimbus-rm.persistence.DataConvert" />
</bean>
<!-- ===================================================================
org.globus.workspace.* interfaces
=================================================================== -->
<bean id="nimbus-rm.PathConfigs"
class="org.globus.workspace.DefaultPathConfigs"
init-method="validate">
<property name="backendTempDirPath"
value="$VMM{control.tmp.dir}" />
<property name="localTempDirPath"
value="$COMMON{persistence.dir}/tmpfiles" />
</bean>
<bean id="nimbus-rm.LockManager"
class="org.globus.workspace.DefaultLockManager" />
<bean id="nimbus-rm.loglevels"
class="org.globus.workspace.Lager">
<property name="events" value="$LOGGING{log.events}" />
<property name="accounting" value="$LOGGING{log.accounting}" />
<property name="DB" value="$LOGGING{log.db}" />
<property name="state" value="$LOGGING{log.state}" />
<property name="trace" value="$LOGGING{log.trace}" />
<!-- very high signal/noise -->
<property name="scheduler" value="off" />
<property name="poll" value="off" />
<property name="perf" value="off" />
</bean>
<bean id="nimbus-rm.locator"
class="org.globus.workspace.TempLocatorImpl">
<!-- locator to help some things that would be too time consuming to
get into IoC right now, holding off for future organization -->
<constructor-arg ref="nimbus-rm.persistence.PersistenceAdapter" />
<constructor-arg ref="nimbus-rm.PathConfigs" />
<constructor-arg ref="nimbus-rm.service.async.ResourceMessage" />
<constructor-arg ref="nimbus-rm.service.binding.GlobalPolicies" />
<constructor-arg ref="nimbus-rm.service.propagation" />
</bean>
<!-- ===================================================================
org.globus.workspace.network.* interfaces
=================================================================== -->
<bean id="nimbus-rm.networks"
class="org.globus.workspace.network.defaults.DefaultAssociationAdapter"
init-method="validate">
<constructor-arg ref="nimbus-rm.persistence.PersistenceAdapter" />
<constructor-arg ref="nimbus-rm.loglevels" />
<property name="networksDir" value="$COMMON{conf.dir}/network-pools" />
<property name="macPrefix" value="$NETWORK{mac.prefix}" />
</bean>
<!-- ===================================================================
org.globus.workspace.service.* interfaces
=================================================================== -->
<bean id="nimbus-rm.resource.instance"
scope="prototype"
class="org.globus.workspace.service.impls.OneXenVM">
<!-- for InstanceResourceImpl: -->
<constructor-arg ref="nimbus-rm.persistence.PersistenceAdapter" />
<constructor-arg ref="nimbus-rm.service.binding.BindingAdapter" />
<constructor-arg ref="nimbus-rm.service.binding.GlobalPolicies" />
<constructor-arg ref="nimbus-rm.persistence.DataConvert" />
<constructor-arg ref="nimbus-rm.loglevels" />
<!-- for StatefulResourceImpl: -->
<constructor-arg ref="nimbus-rm.scheduler.Scheduler" />
<constructor-arg ref="nimbus-rm.LockManager" />
<constructor-arg ref="nimbus-rm.service.StateTransition" />
<constructor-arg ref="other.timerManager" />
<!-- these modules can be null (InstanceResourceImpl) -->
<property name="accountingEventAdapter"
ref="nimbus-rm.accounting" />
<property name="authzCallout"><null/></property>
</bean>
<bean id="nimbus-rm.home.instance"
class="org.globus.workspace.service.impls.WorkspaceHomeImpl"
init-method="validate">
<lookup-method name="newEmptyResource"
bean="nimbus-rm.resource.instance"/>
<!-- configs from *.conf files -->
<property name="backendPath" value="$VMM{control.path}" />
<property name="scpPath" value="$SSH{scp.path}" />
<property name="sshPath" value="$SSH{ssh.path}" />
<property name="sshAccount" value="$SSH{control.ssh.user}" />
<property name="sshIdentityFile" value="$SSH{use.identity}" />
<!-- defaults -->
<property name="sweeperDelay" value="6000" /> <!-- ms -->
<property name="threadPoolInitialSize" value="5" />
<property name="threadPoolMaxSize" value="50" />
<!-- dependencies -->
<constructor-arg ref="nimbus-rm.persistence.PersistenceAdapter" />
<constructor-arg ref="nimbus-rm.LockManager" />
<constructor-arg ref="nimbus-rm.loglevels" />
<constructor-arg ref="nimbus-rm.persistence.DataConvert" />
<constructor-arg ref="other.cacheManager" />
<property name="scheduler" ref="nimbus-rm.scheduler.Scheduler" />
</bean>
<bean id="nimbus-rm.resource.group"
scope="prototype"
class="org.globus.workspace.service.impls.GroupResourceImpl">
<constructor-arg ref="nimbus-rm.home.group" />
<constructor-arg ref="nimbus-rm.home.instance" />
<constructor-arg ref="nimbus-rm.scheduler.Scheduler" />
<constructor-arg ref="nimbus-rm.loglevels" />
</bean>
<bean id="nimbus-rm.home.group"
class="org.globus.workspace.service.impls.GroupHomeImpl">
<lookup-method name="newEmptyResource"
bean="nimbus-rm.resource.group"/>
<constructor-arg ref="nimbus-rm.home.instance" />
<constructor-arg ref="other.cacheManager" />
<constructor-arg ref="nimbus-rm.LockManager" />
<constructor-arg ref="nimbus-rm.loglevels" />
<constructor-arg ref="nimbus-rm.persistence.PersistenceAdapter" />
</bean>
<bean id="nimbus-rm.resource.cosched"
scope="prototype"
class="org.globus.workspace.service.impls.CoschedResourceImpl">
<constructor-arg ref="nimbus-rm.home.cosched" />
<constructor-arg ref="nimbus-rm.home.instance" />
<constructor-arg ref="nimbus-rm.scheduler.Scheduler" />
<constructor-arg ref="nimbus-rm.loglevels" />
</bean>
<bean id="nimbus-rm.home.cosched"
class="org.globus.workspace.service.impls.CoschedHomeImpl">
<lookup-method name="newEmptyResource"
bean="nimbus-rm.resource.cosched"/>
<constructor-arg ref="nimbus-rm.home.instance" />
<constructor-arg ref="nimbus-rm.persistence.PersistenceAdapter" />
<constructor-arg ref="nimbus-rm.LockManager" />
<constructor-arg ref="nimbus-rm.loglevels" />
<constructor-arg ref="other.cacheManager" />
</bean>
<!-- ===================================================================
org.globus.workspace.persistence.* interfaces
=================================================================== -->
<bean id="nimbus-rm.persistence.PersistenceAdapter"
class="org.globus.workspace.persistence.PersistenceAdapterImpl">
<constructor-arg ref="other.MainDataSource" />
<constructor-arg ref="nimbus-rm.loglevels" />
<constructor-arg ref="nimbus-rm.persistence.dbloader" />
</bean>
<bean id="nimbus-rm.persistence.dbloader"
class="org.globus.workspace.persistence.DerbyLoad"
init-method="setDerbySystemProperty">
<property name="derbySystemHome" value="$COMMON{derby.home.dir}" />
</bean>
<bean id="nimbus-rm.persistence.DataConvert"
class="org.globus.workspace.persistence.DataConvert">
<constructor-arg ref="nimbus-repr.ReprFactory" />
</bean>
<!-- ===================================================================
org.globus.workspace.service.impls.* interfaces
=================================================================== -->
<bean id="nimbus-rm.service.StateTransition"
class="org.globus.workspace.service.impls.StateTransition">
<constructor-arg ref="nimbus-rm.service.binding.GlobalPolicies" />
<constructor-arg ref="nimbus-rm.service.async.RequestFactory" />
<constructor-arg ref="nimbus-rm.persistence.DataConvert" />
<constructor-arg ref="nimbus-rm.loglevels" />
<constructor-arg ref="nimbus-rm.locator" />
</bean>
<!-- ===================================================================
org.globus.workspace.service.impls.site.* interfaces
=================================================================== -->
<bean id="nimbus-rm.service.propagation"
class="org.globus.workspace.service.impls.site.PropagationAdapterImpl"
init-method="validate">
<!-- configs from *.conf files -->
<property name="enabled" value="$REPO{propagation.enabled}" />
<property name="notificationInfo"
value="$SSH{service.sshd.contact.string}" />
<!--
pollScript is the path to the notifications program that the
notification mechanism (ssh) uses. You should not need to edit
this but if you do use an absolute path.
-->
<property name="pollScript"
value="$COMMON{msgsinks.dir}/notifications" />
<!--
Milliseconds between polls to find new notifications from
workspace-control
-->
<property name="watcherDelay" value="500" />
<!-- dependencies -->
<constructor-arg ref="nimbus-rm.persistence.PersistenceAdapter" />
<constructor-arg ref="nimbus-rm.home.instance" />
<constructor-arg ref="nimbus-rm.service.async.ResourceMessage" />
<constructor-arg ref="other.timerManager" />
<constructor-arg ref="nimbus-rm.service.binding.GlobalPolicies" />
<constructor-arg ref="nimbus-rm.loglevels" />
</bean>
<!-- ===================================================================
org.globus.workspace.service.impls.async.* interfaces
=================================================================== -->
<bean id="nimbus-rm.service.async.RequestFactory"
class="org.globus.workspace.service.impls.async.RequestFactoryImpl">
<constructor-arg ref="nimbus-rm.loglevels" />
<!-- Current choices: xenlocal, xenssh -->
<property name="commandSet" value="xenssh" />
<!--
Not exposing the distinction between xenlocal and xenssh anymore,
the user should just set up localhost ssh logins if there is one
VMM node and it happens to be colocated. workspace-control needs
to send notifications back over sshd anyhow, so this login has to
work regardless until reliable messaging system is introduced.
-->
</bean>
<bean id="nimbus-rm.service.async.ResourceMessage"
class="org.globus.workspace.service.impls.async.ResourceMessage">
<constructor-arg ref="nimbus-rm.home.instance" />
<constructor-arg ref="nimbus-rm.persistence.DataConvert" />
</bean>
<!-- ===================================================================
org.globus.workspace.scheduler.* interfaces
=================================================================== -->
<!-- Retrieve the active slot management bean definition: -->
<import resource="resource-locator-ACTIVE.xml" />
<bean id="nimbus-rm.scheduler.Scheduler"
class="org.globus.workspace.scheduler.defaults.DefaultSchedulerAdapter"
init-method="validate">
<constructor-arg ref="nimbus-rm.LockManager" />
<!-- definition of this bean is in "resource-locator-ACTIVE.xml" -->
<constructor-arg ref="nimbus-rm.scheduler.SlotManagement" />
<constructor-arg ref="other.MainDataSource" />
<constructor-arg ref="other.timerManager" />
<constructor-arg ref="nimbus-rm.service.binding.GlobalPolicies" />
<constructor-arg ref="nimbus-rm.persistence.DataConvert" />
<constructor-arg ref="nimbus-rm.loglevels" />
<!-- set after object creation time to avoid circular dep with home -->
<property name="home" ref="nimbus-rm.home.instance" />
</bean>
<!-- ===================================================================
org.globus.workspace.accounting.* interfaces
=================================================================== -->
<!--
The service allows for an AccountingEventAdapter implementation
to be both an AccountingEventAdapter and AccountingReaderAdapter.
If an AccountingReaderAdapter is also enabled, that will be used.
The legal configurations:
- One AccountingEventAdapter for logging only (query will not be available)
- One AccountingEventAdapter that does both jobs
- One AccountingEventAdapter, one AccountingReaderAdapter
-->
<bean id="nimbus-rm.accounting"
class="org.globus.workspace.accounting.impls.dbdefault.DBAccountingAdapter"
init-method="initialize">
<constructor-arg ref="other.AccountingDataSource" />
<constructor-arg ref="other.timerManager" />
<constructor-arg ref="nimbus-rm.loglevels" />
<constructor-arg ref="nimbus-rm.persistence.dbloader" />
<property name="currentReservationsPath"
value="$COMMON{persistence.dir}/current-reservations.txt" />
<property name="eventsPath"
value="$COMMON{persistence.dir}/accounting-events.txt" />
<property name="chargeGranularity" value="$ACCOUNTING{charge.granularity}" />
<property name="writeDelayMilliseconds" value="$ACCOUNTING{write.delay.ms}" />
</bean>
<!-- ===================================================================
metadata server related
=================================================================== -->
<bean id="nimbus-metadata-server"
class="org.nimbustools.metadataserver.defaults.DefaultMetadataServer"
init-method="initServerAndListen">
<constructor-arg ref="other.metadataCacheManager" />
<property name="manager"
ref="nimbus-rm.manager" />
<property name="customizationPath"
value="$METADATA{customization.path}" />
<property name="listenSocket"
value="$METADATA{contact.socket}" />
<property name="enabled"
value="$METADATA{listen}" />
<property name="publicNets"
value="$METADATA{public.networks}" />
<property name="localNets"
value="$METADATA{local.networks}" />
</bean>
<!-- ===================================================================
Externally written classes that are brought in as beans
=================================================================== -->
<bean id="other.timerManager"
class="org.globus.workspace.scheduler.TimerManagerImpl" />
<bean id="other.cacheManager"
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
<property name="configLocation">
<value>classpath:org/globus/workspace/service/impls/default-ehcache.xml</value>
</property>
</bean>
<bean id="other.metadataCacheManager"
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
<property name="configLocation">
<value>classpath:org/nimbustools/metadataserver/defaults/default-ehcache.xml</value>
</property>
</bean>
<bean id="other.MainDataSource"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="maxActive" value="10" />
<property name="maxIdle" value="4" />
<property name="maxWait" value="2000" />
<property name="poolPreparedStatements" value="true" />
<property name="driverClassName"
value="org.apache.derby.jdbc.EmbeddedDriver" />
<property name="url"
value="jdbc:derby:nimbus/WorkspacePersistenceDB" />
</bean>
<bean id="other.AccountingDataSource"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="maxActive" value="10" />
<property name="maxIdle" value="4" />
<property name="maxWait" value="2000" />
<property name="poolPreparedStatements" value="true" />
<property name="driverClassName"
value="org.apache.derby.jdbc.EmbeddedDriver" />
<property name="url"
value="jdbc:derby:nimbus/WorkspaceAccountingDB" />
</bean>
</beans>
Jump to Line
Something went wrong with that request. Please try again.