Browse files

service/service/ from 2009-01-10

  • Loading branch information...
1 parent 640784b commit 8d8c9c1e686650812d32403dc080cc087a1b004e @timf timf committed Sep 29, 2009
Showing with 19,382 additions and 0 deletions.
  1. +19 −0 service/service/java/source/build.properties
  2. +126 −0 service/service/java/source/build.xml
  3. +65 −0 service/service/java/source/etc/workspace-service/accounting.conf
  4. +69 −0 service/service/java/source/etc/workspace-service/global-policies.conf
  5. +59 −0 service/service/java/source/etc/workspace-service/group-authz/README.txt
  6. +30 −0 service/service/java/source/etc/workspace-service/group-authz/group01.properties
  7. +2 −0 service/service/java/source/etc/workspace-service/group-authz/group01.txt
  8. +15 −0 service/service/java/source/etc/workspace-service/group-authz/group02.properties
  9. +2 −0 service/service/java/source/etc/workspace-service/group-authz/group02.txt
  10. +15 −0 service/service/java/source/etc/workspace-service/group-authz/group03.properties
  11. +2 −0 service/service/java/source/etc/workspace-service/group-authz/group03.txt
  12. +22 −0 service/service/java/source/etc/workspace-service/group-authz/group04.properties
  13. +2 −0 service/service/java/source/etc/workspace-service/group-authz/group04.txt
  14. +153 −0 service/service/java/source/etc/workspace-service/logging.conf
  15. +57 −0 service/service/java/source/etc/workspace-service/metadata.conf
  16. +30 −0 service/service/java/source/etc/workspace-service/network-pools/private
  17. +28 −0 service/service/java/source/etc/workspace-service/network-pools/public
  18. +21 −0 service/service/java/source/etc/workspace-service/network.conf
  19. +7 −0 service/service/java/source/etc/workspace-service/other/README.txt
  20. +18 −0 service/service/java/source/etc/workspace-service/other/authz-callout-ACTIVE.xml
  21. +18 −0 service/service/java/source/etc/workspace-service/other/authz-callout-disabled.xml
  22. +98 −0 service/service/java/source/etc/workspace-service/other/authz-callout-groupauthz.xml
  23. +31 −0 service/service/java/source/etc/workspace-service/other/authz-callout-python.xml
  24. +64 −0 service/service/java/source/etc/workspace-service/other/common.conf
  25. +112 −0 service/service/java/source/etc/workspace-service/other/main.conflocator.xml
  26. +101 −0 service/service/java/source/etc/workspace-service/other/main.repr.xml
  27. +641 −0 service/service/java/source/etc/workspace-service/other/main.xml
  28. +32 −0 service/service/java/source/etc/workspace-service/other/resource-locator-ACTIVE.xml
  29. +32 −0 service/service/java/source/etc/workspace-service/other/resource-locator-default.xml
  30. +116 −0 service/service/java/source/etc/workspace-service/other/resource-locator-pilot.xml
  31. +5 −0 service/service/java/source/etc/workspace-service/other/shared-secret-suggestion.py
  32. +21 −0 service/service/java/source/etc/workspace-service/pilot-authz.conf
  33. +117 −0 service/service/java/source/etc/workspace-service/pilot.conf
  34. +47 −0 service/service/java/source/etc/workspace-service/repository.conf
  35. +60 −0 service/service/java/source/etc/workspace-service/ssh.conf
  36. +29 −0 service/service/java/source/etc/workspace-service/vmm-pools/pool1
  37. +36 −0 service/service/java/source/etc/workspace-service/vmm.conf
  38. BIN service/service/java/source/lib-compile/commonj.jar
  39. +202 −0 service/service/java/source/lib-compile/commons-dbcp-1.2.1.LICENSE
  40. BIN service/service/java/source/lib-compile/commons-dbcp.jar
  41. +202 −0 service/service/java/source/lib-compile/commons-pool-1.2.LICENSE
  42. BIN service/service/java/source/lib-compile/commons-pool.jar
  43. BIN service/service/java/source/lib-compile/servlet.jar
  44. BIN service/service/java/source/lib/backport-util-concurrent-3.1-jdk1.4.jar
  45. +39 −0 service/service/java/source/lib/backport-util-concurrent.LICENSE
  46. +202 −0 service/service/java/source/lib/derby.LICENSE
  47. BIN service/service/java/source/lib/derby.jar
  48. BIN service/service/java/source/lib/derbyclient.jar
  49. BIN service/service/java/source/lib/derbynet.jar
  50. BIN service/service/java/source/lib/derbyrun.jar
  51. BIN service/service/java/source/lib/derbytools.jar
  52. BIN service/service/java/source/lib/ehcache-1.5.0.jar
  53. +15 −0 service/service/java/source/lib/ehcache.LICENSE
  54. BIN service/service/java/source/lib/jetty-6.1.7.jar
  55. BIN service/service/java/source/lib/jetty-util-6.1.7.jar
  56. +202 −0 service/service/java/source/lib/jetty.LICENSE
  57. BIN service/service/java/source/lib/jug-2.0.0.jar
  58. +12 −0 service/service/java/source/lib/jug.LICENSE
  59. +8 −0 service/service/java/source/share/acctdb-delete.sh
  60. +8 −0 service/service/java/source/share/acctdb-reset.sh
  61. +8 −0 service/service/java/source/share/full-delete.sh
  62. +8 −0 service/service/java/source/share/full-reset.sh
  63. +1 −0 service/service/java/source/share/lib/README.txt
  64. +278 −0 service/service/java/source/share/lib/db-mgmt.xml
  65. +87 −0 service/service/java/source/share/lib/notifications
  66. +89 −0 service/service/java/source/share/lib/pilotnotifications
  67. +3 −0 service/service/java/source/share/lib/workspace_service_derby_accounting_dump.sql
  68. +30 −0 service/service/java/source/share/lib/workspace_service_derby_accounting_schema.sql
  69. +23 −0 service/service/java/source/share/lib/workspace_service_derby_dump.sql
  70. +216 −0 service/service/java/source/share/lib/workspace_service_derby_schema.sql
  71. +8 −0 service/service/java/source/share/servicedb-delete.sh
  72. +8 −0 service/service/java/source/share/servicedb-reset.sh
  73. +3 −0 service/service/java/source/share/workspace.persistence.conf
  74. +51 −0 service/service/java/source/src/org/globus/workspace/Counter.java
  75. +22 −0 service/service/java/source/src/org/globus/workspace/CounterCallback.java
  76. +54 −0 service/service/java/source/src/org/globus/workspace/DefaultLockManager.java
  77. +95 −0 service/service/java/source/src/org/globus/workspace/DefaultPathConfigs.java
  78. +48 −0 service/service/java/source/src/org/globus/workspace/ErrorUtil.java
  79. +97 −0 service/service/java/source/src/org/globus/workspace/ExceptionDuringBackoutHandlerException.java
  80. +209 −0 service/service/java/source/src/org/globus/workspace/Lager.java
  81. +39 −0 service/service/java/source/src/org/globus/workspace/LockAcquisitionFailure.java
  82. +28 −0 service/service/java/source/src/org/globus/workspace/LockManager.java
  83. +40 −0 service/service/java/source/src/org/globus/workspace/ModuleInitializationException.java
  84. +37 −0 service/service/java/source/src/org/globus/workspace/ModuleNotFoundException.java
  85. +23 −0 service/service/java/source/src/org/globus/workspace/PathConfigs.java
  86. +38 −0 service/service/java/source/src/org/globus/workspace/ProgrammingError.java
  87. +49 −0 service/service/java/source/src/org/globus/workspace/ReturnException.java
  88. +46 −0 service/service/java/source/src/org/globus/workspace/TempLocator.java
  89. +94 −0 service/service/java/source/src/org/globus/workspace/TempLocatorImpl.java
  90. +106 −0 service/service/java/source/src/org/globus/workspace/WorkspaceConstants.java
  91. +40 −0 service/service/java/source/src/org/globus/workspace/WorkspaceException.java
  92. +386 −0 service/service/java/source/src/org/globus/workspace/WorkspaceUtil.java
  93. +22 −0 service/service/java/source/src/org/globus/workspace/accounting/AccountingAdapter.java
  94. +33 −0 service/service/java/source/src/org/globus/workspace/accounting/AccountingEventAdapter.java
  95. +39 −0 service/service/java/source/src/org/globus/workspace/accounting/AccountingReaderAdapter.java
  96. +44 −0 service/service/java/source/src/org/globus/workspace/accounting/ElapsedAndReservedMinutes.java
  97. +55 −0 service/service/java/source/src/org/globus/workspace/accounting/impls/Util.java
  98. +418 −0 .../service/java/source/src/org/globus/workspace/accounting/impls/dbdefault/DBAccountingAdapter.java
  99. +64 −0 ...ervice/java/source/src/org/globus/workspace/accounting/impls/dbdefault/DBAccountingConstants.java
  100. +590 −0 ...vice/java/source/src/org/globus/workspace/accounting/impls/dbdefault/DBAccountingPersistence.java
  101. +448 −0 .../java/source/src/org/globus/workspace/accounting/impls/dbdefault/DelayedAccountingFileLogger.java
  102. +151 −0 service/service/java/source/src/org/globus/workspace/cmdutils/SSHUtil.java
  103. +199 −0 service/service/java/source/src/org/globus/workspace/cmdutils/TorqueUtil.java
  104. +39 −0 service/service/java/source/src/org/globus/workspace/creation/Creation.java
  105. +1,117 −0 service/service/java/source/src/org/globus/workspace/creation/defaults/DefaultCreation.java
  106. +553 −0 service/service/java/source/src/org/globus/workspace/groupauthz/DecisionLogic.java
  107. +257 −0 service/service/java/source/src/org/globus/workspace/groupauthz/Group.java
  108. +373 −0 service/service/java/source/src/org/globus/workspace/groupauthz/GroupAuthz.java
  109. +210 −0 service/service/java/source/src/org/globus/workspace/groupauthz/GroupRights.java
  110. +101 −0 service/service/java/source/src/org/globus/workspace/groupauthz/HashUtil.java
  111. +730 −0 service/service/java/source/src/org/globus/workspace/manager/DelegatingManager.java
  112. +60 −0 service/service/java/source/src/org/globus/workspace/network/Association.java
  113. +68 −0 service/service/java/source/src/org/globus/workspace/network/AssociationAdapter.java
  114. +123 −0 service/service/java/source/src/org/globus/workspace/network/AssociationEntry.java
  115. +271 −0 service/service/java/source/src/org/globus/workspace/network/defaults/DefaultAssociationAdapter.java
  116. +317 −0 service/service/java/source/src/org/globus/workspace/network/defaults/MacUtil.java
  117. +692 −0 service/service/java/source/src/org/globus/workspace/network/defaults/Util.java
  118. +22 −0 service/service/java/source/src/org/globus/workspace/persistence/DBLoader.java
  119. +534 −0 service/service/java/source/src/org/globus/workspace/persistence/DataConvert.java
  120. +82 −0 service/service/java/source/src/org/globus/workspace/persistence/DerbyLoad.java
  121. +84 −0 service/service/java/source/src/org/globus/workspace/persistence/ErrorUtil.java
  122. +193 −0 service/service/java/source/src/org/globus/workspace/persistence/PersistenceAdapter.java
  123. +225 −0 service/service/java/source/src/org/globus/workspace/persistence/PersistenceAdapterConstants.java
  124. +2,289 −0 service/service/java/source/src/org/globus/workspace/persistence/PersistenceAdapterImpl.java
  125. +39 −0 service/service/java/source/src/org/globus/workspace/persistence/WorkspaceDatabaseException.java
  126. +153 −0 ...ce/service/java/source/src/org/globus/workspace/persistence/impls/AssociationPersistenceUtil.java
  127. +103 −0 ...e/service/java/source/src/org/globus/workspace/persistence/impls/ResourcepoolPersistenceUtil.java
  128. +24 −0 service/service/java/source/src/org/globus/workspace/persistence/impls/VMPersistence.java
  129. +342 −0 ...service/java/source/src/org/globus/workspace/persistence/impls/VirtualMachinePersistenceUtil.java
  130. +68 −0 service/service/java/source/src/org/globus/workspace/scheduler/Event.java
  131. +27 −0 service/service/java/source/src/org/globus/workspace/scheduler/IdHostnameTuple.java
  132. +181 −0 service/service/java/source/src/org/globus/workspace/scheduler/Reservation.java
  133. +126 −0 service/service/java/source/src/org/globus/workspace/scheduler/Scheduler.java
  134. +90 −0 service/service/java/source/src/org/globus/workspace/scheduler/TimerImpl.java
  135. +125 −0 service/service/java/source/src/org/globus/workspace/scheduler/TimerListenerWrapper.java
  136. +179 −0 service/service/java/source/src/org/globus/workspace/scheduler/TimerManagerImpl.java
  137. +39 −0 service/service/java/source/src/org/globus/workspace/scheduler/WorkspaceSchedulingException.java
  138. +79 −0 service/service/java/source/src/org/globus/workspace/scheduler/defaults/CreationPending.java
  139. +877 −0 service/service/java/source/src/org/globus/workspace/scheduler/defaults/DefaultSchedulerAdapter.java
  140. +765 −0 ...ce/service/java/source/src/org/globus/workspace/scheduler/defaults/DefaultSchedulerAdapterDB.java
  141. +91 −0 ...ce/service/java/source/src/org/globus/workspace/scheduler/defaults/DefaultSchedulerConstants.java
  142. +215 −0 service/service/java/source/src/org/globus/workspace/scheduler/defaults/DefaultSchedulerSweeper.java
Sorry, we could not display the entire diff because it was too big.
View
19 service/service/java/source/build.properties
@@ -0,0 +1,19 @@
+nimbus.service.main.print-noun=Workspace Service module
+
+nimbus.service.main.build.dir=build
+nimbus.service.main.build.dest=build/classes
+nimbus.service.main.src.dir=src
+nimbus.service.main.lib.dir=lib
+nimbus.service.main.lib-compile.dir=lib-compile
+nimbus.service.main.dist.dir=dist
+nimbus.service.main.jar.name=nimbus-workspace-service.jar
+
+nimbus.basedir=../../../..
+
+# Compile dependencies from source tree
+nimbus.service.api.dist.dir=${nimbus.basedir}/service-api/java/source/dist/
+nimbus.service.api.lib.dir=${nimbus.basedir}/service-api/java/source/lib-compile/
+
+# you can override this in ~/nimbus.build.properties
+nimbus.java.compilerarg=-nowarn
+
View
126 service/service/java/source/build.xml
@@ -0,0 +1,126 @@
+<?xml version="1.0"?>
+
+<project default="dist" basedir="." name="Workspace Service">
+
+ <description>Workspace Service</description>
+
+ <!-- load user nimbus.build.properties file, if it exists -->
+ <property file="${user.home}/nimbus.build.properties"/>
+
+ <!-- load some defaults from colocated build.properties file -->
+ <property file="build.properties"/>
+
+
+ <!-- *******************************************************************
+ MODULE NAME
+ ******************************************************************* -->
+
+ <target name="disp">
+ <echo message="**** Module: ${basedir}" />
+ </target>
+
+
+ <!-- *******************************************************************
+ CHECK MINIMUM JDK
+ ******************************************************************* -->
+
+ <target name="checkjdk">
+ <available property="jdk1.4+" classname="java.lang.CharSequence"/>
+ <fail message="Aborting: determined you are not building with >= JDK 1.4"
+ unless="jdk1.4+" />
+ </target>
+
+
+ <!-- *******************************************************************
+ INITIALIZE
+ ******************************************************************* -->
+
+ <target name="init" depends="checkjdk">
+ <mkdir dir="${nimbus.service.main.build.dir}"/>
+ <mkdir dir="${nimbus.service.main.build.dest}"/>
+ <mkdir dir="${nimbus.service.main.dist.dir}"/>
+ </target>
+
+
+ <!-- *******************************************************************
+ COMPILATION
+ ******************************************************************* -->
+
+ <path id="nimbus.service.main.classpath">
+
+ <fileset dir="${nimbus.service.main.lib.dir}">
+ <include name="*.jar"/>
+ </fileset>
+
+ <fileset dir="${nimbus.service.main.lib-compile.dir}">
+ <include name="*.jar"/>
+ </fileset>
+
+ <fileset dir="${nimbus.service.api.dist.dir}">
+ <include name="*.jar"/>
+ </fileset>
+
+ <fileset dir="${nimbus.service.api.lib.dir}">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <target name="compile" depends="init">
+
+ <javac srcdir="${nimbus.service.main.src.dir}"
+ destdir="${nimbus.service.main.build.dest}"
+ classpathref="nimbus.service.main.classpath"
+ debug="on">
+
+ <include name="**/*.java"/>
+ <compilerarg value="${nimbus.java.compilerarg}" />
+
+ </javac>
+
+ <copy todir="${nimbus.service.main.build.dest}" >
+ <fileset dir="${nimbus.service.main.src.dir}"
+ includes="**/*.properties" />
+ <fileset dir="${nimbus.service.main.src.dir}"
+ includes="**/*.xml" />
+ <fileset dir="${nimbus.service.main.src.dir}"
+ includes="**/*.txt" />
+ </copy>
+
+ </target>
+
+
+ <!-- *******************************************************************
+ CREATE ARCHIVE FILE
+ ******************************************************************* -->
+
+ <target name="jar" depends="compile">
+ <jar destfile="${nimbus.service.main.dist.dir}/${nimbus.service.main.jar.name}"
+ basedir="${nimbus.service.main.build.dest}"/>
+ </target>
+
+
+ <!-- *******************************************************************
+ CREATE DISTRIBUTION
+ ******************************************************************* -->
+
+ <target name="dist">
+ <echo message="**** Module: ${basedir}" />
+ <echo>Building: ${nimbus.service.main.print-noun}</echo>
+ <antcall target="jar" />
+ <echo>Built: ${nimbus.service.main.print-noun}
+ </echo>
+ </target>
+
+
+ <!-- *******************************************************************
+ CLEAN
+ ******************************************************************* -->
+
+ <target name="clean">
+ <delete dir="${nimbus.service.main.build.dir}"/>
+ <delete dir="${nimbus.service.main.dist.dir}"/>
+ <delete dir="tmp"/>
+ <echo message="Cleaned: ${basedir}" />
+ </target>
+
+</project>
View
65 service/service/java/source/etc/workspace-service/accounting.conf
@@ -0,0 +1,65 @@
+################################################################################
+#
+# This file is used for configuring per-client usage logging into the accounting
+# database.
+#
+# NOTE: The accounting database is separate and stable, it can continue to be
+# used over multiple versions of Nimbus.
+#
+# Usage information is available for querying remotely (currently, each client
+# may only query about itself).
+#
+# If there is an authorization plugin enabled, current usage information will
+# be passed to it so that authorization decisions can be made based on past
+# usage history (see group-authz/README.txt)
+#
+################################################################################
+
+
+################################################################################
+#
+# Because the exact, up to date usage information is in the service's embedded
+# database and there is no administrator query mechanism in place, the
+# accounting module will periodically write out information.
+#
+# This file will contain current reservation information: a list of all current
+# instances, who started them, when they will terminate, etc.
+#
+# var/nimbus/current-reservations.txt
+#
+# This file will contain a history of "CREATED" and "REMOVED" event pairs that
+# give the entire usage history (there will not be a matching "REMOVED" line
+# for each "CREATED" line yet if the instance is still running)
+#
+# var/nimbus/accounting-events.txt
+#
+################################################################################
+
+
+#################
+# CONFIGURATIONS:
+#################
+
+
+# WRITE DELAY
+#
+# The files discussed above are written out every 5 seconds by default.
+# You can change that here, the value is the number of milliseconds. The
+# delay is actually *between* writes, so if the service or disk is very loaded
+# you could see the delay increase.
+
+write.delay.ms=5000
+
+
+# CHARGE GRANULARITY
+#
+# For every minute or partial minute that is used, one minute is recorded as
+# used. 51.24 minutes is 52 minutes of usage. etc.
+#
+# Some situations call for a different scheme where the charge is rounded up
+# even more. For example, on EC2 any amount of usage between 0 and 60 minutes
+# counts as 60 minutes. This setting is provided to mimic such behavior, it
+# can be any integer greater than zero. To do the "round up to every hour"
+# behavior, this value would be 60. But it could be 5. Or 42. ;-)
+
+charge.granularity=1
View
69 service/service/java/source/etc/workspace-service/global-policies.conf
@@ -0,0 +1,69 @@
+################################################################################
+#
+# This file is used for configuring global policies for creation requests.
+#
+################################################################################
+
+
+# POLICY: maximum.group.size
+#
+# Never grant a request for more than 'N' instances at once. If configuration
+# is zero, negative, or missing, there will be no limit to request size.
+# Note that the 'groupauthz' plugin allows you to have different values for
+# this policy on a per person basis.
+
+maximum.group.size=0
+
+
+# POLICY: maximum.runtime.seconds
+#
+# Never grant anyone longer than this amount of running time duration per
+# request. Note that the 'groupauthz' plugin allows you to have different
+# values for this policy on a per person basis (as well as a maximum aggregate
+# usage policy).
+#
+# (This value 1209600 is two weeks)
+
+maximum.runtime.seconds=1209600
+
+
+# POLICY: default.runtime.seconds
+#
+# If no requested duration is supplied, what is the default to give (or request
+# as the case may be).
+
+default.runtime.seconds=300
+
+
+# POLICY: termination.offset.seconds
+#
+# Instances run for a "running duration" but in-memory representations exist
+# for them after the running time has expired. This is useful, for example,
+# when the VMs may be moving back to the client's repository directory and the
+# client is informed when this is done.
+#
+# The "termination.offset" configuration is how long this period of time will
+# last. When it is over, everything about the instance will be destroyed
+# (except for accounting records and logs).
+#
+# NOTE: the network address is currently held in reserve for the instance during
+# this period and not released back to the pool of network addresses.
+#
+#
+
+termination.offset.seconds=600
+
+
+# POLICY: allow.static.addresses
+#
+# If this is false, the clients may only use the Allocate networking method,
+# not statically assigned or independent networking. i.e., if it is false the
+# remote client may not request specific IP addresses.
+#
+# This provides a convenient way to achieve this (very common) setup without
+# needing to use an authorization callout. With a callout it is possible to
+# allow static IPs from just certain clients (based on DN or attribute) but it
+# is not worth looking into that or worth the expense of making the callout
+# per-use if one justs wants to limit all static IP use
+
+allow.static.addresses=false
View
59 service/service/java/source/etc/workspace-service/group-authz/README.txt
@@ -0,0 +1,59 @@
+Group based authorization plugin
+================================
+
+First, look at the contents of the "group01.properties" file to see what
+policies this plugin offers you (there are detailed comments in the file).
+
+The policies in the "group01.properties" file will be applied to any DN listed
+in the "group01.txt" file (and so forth). You can make multiple kinds of
+allocations in this manner, dropping people into different authorization groups
+as you add them to the cloud.
+
+You can have 1-15 groups (and zero groups, but that is just like disabling the
+plugin entirely).
+
+Changing the policies and changing group membership can be done WHILE RUNNING.
+The files' last-modified attributes are all tracked to ensure the system is
+always using the freshest information.
+
+Enabling and disabling the plugin can only be done between container restarts.
+Adding and removing groups entirely (see the end of this file) can only be done
+between container restarts.
+
+
+================================================================================
+
+
+To ENABLE the groupauthz authorization plugin, run:
+
+ cp ../other/authz-callout-groupauthz.xml ../other/authz-callout-ACTIVE.xml
+
+
+To DISABLE the groupauthz authorization plugin, run:
+
+ cp ../other/authz-callout-disabled.xml ../other/authz-callout-ACTIVE.xml
+
+
+================================================================================
+
+
+If you want to add more authorization groups, you must use the numbering and
+naming scheme seen in the samples:
+
+group##.properties <-- The group's policy properties
+group##.txt <-- The group member DNs
+
+
+================================================================================
+
+
+For each group ##, you must include BOTH "group##.properties" and "group##.txt"
+or NEITHER.
+
+You can go up to group15 for a total of fifteen groups.
+
+Valid values are {group01,group02, ... , group14,group15}
+
+Absence of lower numbered groups is not a problem. For example, if you want
+to get rid of group01 but keep group02, there is no error (it doesn't count
+up from 01, it just looks for any definitions between group01 and group15).
View
30 service/service/java/source/etc/workspace-service/group-authz/group01.properties
@@ -0,0 +1,30 @@
+# For logging and other side-purposes
+vws.group.authz.groupname=TESTING
+
+# Maximum currently reserved minutes at one point in time
+# If the caller has two other workspaces with 600 minutes scheduled
+# for each, the value being checked against this policy would be 1200 minutes
+# plus whatever time the current request is for.
+vws.group.authz.maxReservedMinutes=300
+
+# Maximum elapsed (finished) and currently reserved minutes at one point in time
+# If the caller has one other workspace with 600 minutes scheduled and 6000
+# minutes of recorded past usage, the value being checked against this policy
+# would be 6600 minutes plus whatever time the current request is for. This is
+# the all-time maximum usage cap.
+vws.group.authz.maxElapsedReservedMinutes=300
+
+# Maximum number of running workspaces at one point in time
+vws.group.authz.maxWorkspaceNumber=5
+
+# Maximum number of workspaces per request
+vws.group.authz.maxWorkspacesInGroup=1
+
+# Image node
+vws.group.authz.imageNodeHostname=example.com
+
+# Image node basedir
+vws.group.authz.imageBaseDirectory=/cloud
+
+# Use DN hashing convention for user-specific subdirectories (see documentation)
+vws.group.authz.dirHashMode=true
View
2 service/service/java/source/etc/workspace-service/group-authz/group01.txt
@@ -0,0 +1,2 @@
+/DC=org/DC=example/OU=People/CN=Example
+/DC=org/DC=example/OU=People/CN=Example 2
View
15 service/service/java/source/etc/workspace-service/group-authz/group02.properties
@@ -0,0 +1,15 @@
+vws.group.authz.groupname=DEVELOPMENT
+
+vws.group.authz.maxReservedMinutes=20160
+
+vws.group.authz.maxElapsedReservedMinutes=20160
+
+vws.group.authz.maxWorkspaceNumber=5
+
+vws.group.authz.maxWorkspacesInGroup=5
+
+vws.group.authz.imageNodeHostname=example.com
+
+vws.group.authz.imageBaseDirectory=/cloud
+
+vws.group.authz.dirHashMode=true
View
2 service/service/java/source/etc/workspace-service/group-authz/group02.txt
@@ -0,0 +1,2 @@
+/DC=org/DC=example/OU=People/CN=Example
+/DC=org/DC=example/OU=People/CN=Example 2
View
15 service/service/java/source/etc/workspace-service/group-authz/group03.properties
@@ -0,0 +1,15 @@
+vws.group.authz.groupname=SCIENCE
+
+vws.group.authz.maxReservedMinutes=0
+
+vws.group.authz.maxElapsedReservedMinutes=0
+
+vws.group.authz.maxWorkspaceNumber=16
+
+vws.group.authz.maxWorkspacesInGroup=16
+
+vws.group.authz.imageNodeHostname=example.com
+
+vws.group.authz.imageBaseDirectory=/cloud
+
+vws.group.authz.dirHashMode=true
View
2 service/service/java/source/etc/workspace-service/group-authz/group03.txt
@@ -0,0 +1,2 @@
+/DC=org/DC=example/OU=People/CN=Example
+/DC=org/DC=example/OU=People/CN=Example 2
View
22 service/service/java/source/etc/workspace-service/group-authz/group04.properties
@@ -0,0 +1,22 @@
+vws.group.authz.groupname=SUPERUSER
+
+# 0 means no restriction
+vws.group.authz.maxReservedMinutes=0
+
+# 0 means no restriction
+vws.group.authz.maxElapsedReservedMinutes=0
+
+# 0 means no restriction
+vws.group.authz.maxWorkspaceNumber=0
+
+# 0 means no restriction
+vws.group.authz.maxWorkspacesInGroup=0
+
+# not present means no restriction
+#vws.group.authz.imageNodeHostname=
+
+# not present means no restriction
+#vws.group.authz.imageBaseDirectory=
+
+# not present means false
+#vws.group.authz.dirHashMode=
View
2 service/service/java/source/etc/workspace-service/group-authz/group04.txt
@@ -0,0 +1,2 @@
+/DC=org/DC=example/OU=People/CN=Example
+/DC=org/DC=example/OU=People/CN=Example 2
View
153 service/service/java/source/etc/workspace-service/logging.conf
@@ -0,0 +1,153 @@
+################################################################################
+#
+# This file is used for configuring the logging setup.
+#
+#################################################################################
+
+
+################################################################################
+#
+# There are five major levels of logging output:
+#
+# FATAL, ERROR, WARN, INFO, DEBUG
+#
+# Which levels to get output from in the first place is controlled in the
+# container environment's log4j settings (or whatever logging implementation
+# it is using). For example the "container-log4j.properties" file.
+
+# Two lines to add to that file:
+#
+# log4j.category.org.nimbustools=DEBUG
+# log4j.category.org.globus.workspace=DEBUG
+#
+# It is good to start at DEBUG during setup and testing and move to INFO for
+# regular deployment:
+#
+# log4j.category.org.nimbustools=INFO
+# log4j.category.org.globus.workspace=INFO
+#
+################################################################################
+
+
+################################################################################
+#
+# Once the logging is configured like above, there are INTERNAL logging flags
+# (see CONFIGURATIONS section below) that can will increase the detail and
+# number of messages for different areas of the service.
+#
+# NOTE: Normally this information is unnecessary but there is one flag that is
+# is used for EVENT logging which is helpful to understand.
+#
+################################################################################
+
+
+################################################################################
+#
+# ERRORS:
+#
+# You should never set the logger to squelch anything above INFO (like WARN
+# or ERROR messages), you probably always want to see these.
+#
+# In DEBUG mode, a full stacktrace will often be logged, these will go away
+# with moving to INFO level.
+#
+# See the end of this file if you are struggling to understand a big error
+# wrapped in something like "**** Cause chain report ****"
+#
+################################################################################
+
+
+
+#################
+# CONFIGURATIONS:
+#################
+
+
+# EVENTS
+#
+# This logs key events to the INFO level, including major lifetime events,
+# remote interactions, major accounting events, and forked system invocations
+# to workspace-control etc. (high signal/noise)
+#
+# INFO level logging must be enabled for this to work (see above)
+
+log.events=on
+
+
+
+################################################################################
+#
+# The rest of the flags below only apply when logging is at DEBUG level.
+#
+################################################################################
+
+# ACCOUNTING
+#
+# Trace logging of accounting details other than major events
+
+log.accounting=off
+
+
+# STATE
+#
+# Traces state transitions and task dispatch
+
+log.state=off
+
+
+# GENERAL TRACE
+#
+# General trace, logs many method invocations as well as some small details
+# in many classes (low signal/noise)
+
+log.trace=off
+
+
+# DB
+#
+# Traces persistence interactions (low signal/noise)
+
+log.db=off
+
+
+
+
+
+################################################################################
+#
+# So ... you're seeing "**** Cause chain report ****"
+#
+# Some errors (especially initialization errors) are hooked up to do pretty
+# printing of the (often very long) list of wrapped errors from various
+# systems and frameworks (Spring, JNDI, Globus, etc).
+#
+# You can fine tune this pretty printing by passing:
+#
+# "nimbus.errors.parent.number" system property, set to #
+#
+# ... in to the container. This chooses how many parent messages you will see
+# messages from. Default is one.
+#
+# Example:
+#
+# ./start-something -Dnimbus.errors.parent.number=2 [OTHER ARGS]
+#
+# Globus example:
+#
+# export GLOBUS_OPTIONS="-Dnimbus.errors.parent.number=2"
+# ./bin/globus-start-container [OTHER ARGS]
+#
+#
+# Also, if you are a programmer working on the service or a programmer has asked
+# for it, you can generate (giant...) stack traces for each cause too, to help
+# hunt down some unexpected problem not explained in the errors messages.
+#
+# "nimbus.errors.stacktraces" system property, set to "true"
+#
+# Globus example:
+#
+# export GLOBUS_OPTIONS="-Dnimbus.errors.parent.number=2 -Dnimbus.errors.stacktraces=true"
+# ./bin/globus-start-container [OTHER ARGS]
+#
+################################################################################
+
View
57 service/service/java/source/etc/workspace-service/metadata.conf
@@ -0,0 +1,57 @@
+################################################################################
+#
+# Configurations for Metadata Server, something the VM queries for information.
+# See: http://docs.amazonwebservices.com/AWSEC2/2008-08-08/DeveloperGuide/index.html?AESDG-chapter-instancedata.html
+#
+################################################################################
+
+# If listen is true, a server will listen for requests and grant information to
+# clients whose IPs can be correlated with a running VM (modelled on EC2's
+# implementation).
+#
+# This implies that entities on your network cannot spoof addresses (VMs run
+# under Nimbus will not be able to because of the ebtables rules in place).
+#
+# This implies that the VMs themselves can ping an interface on this machine.
+#
+# To be safe, you should probably add an iptables rule that blocks traffic
+# from the WAN to this server's port.
+
+listen=false
+
+
+# host:port
+# This must be an address or hostname that is recognized on the VMM nodes.
+
+contact.socket=1.2.3.4:80
+
+
+# List of network names for "public-ipv4" queries. i.e., which pool did the
+# public NIC come from?
+#
+# - If there is a NIC in the VM with one of these network names, the metadata
+# server will respond to a "public-ipv4" query with the IP address and the
+# "public-hostname" query with the matching hostname.
+#
+# - If there is not a NIC in the VM with one of these network names, the
+# responses to those queries will be blank.
+#
+# - If there are multiple NICs in the VM with one or more of these network
+# names then the match from the first one in the list is chosen (the list's
+# order is maintained).
+
+public.networks=public
+
+
+# List of network names for "local-ipv4" and "local-hostname" queries. Same
+# rules as above.
+
+local.networks=private, privatenogw
+
+
+# Customization path
+# If this setting is non-empty AND listen=true, the workspace service will
+# add an additional customization task which will place a file on the VM (at
+# this path) that contains the URL to use for the metadata server.
+
+customization.path=/var/nimbus-metadata-server-url
View
30 service/service/java/source/etc/workspace-service/network-pools/private
@@ -0,0 +1,30 @@
+# SEE "public" SAMPLE FOR NOTES
+
+# DNS IP address (or 'none'):
+4.2.2.1
+
+# hostname ipaddress gateway broadcast subnetmask
+
+priv002 172.20.6.2 172.20.6.1 172.20.6.255 255.255.255.0
+priv003 172.20.6.3 172.20.6.1 172.20.6.255 255.255.255.0
+priv004 172.20.6.4 172.20.6.1 172.20.6.255 255.255.255.0
+priv005 172.20.6.5 172.20.6.1 172.20.6.255 255.255.255.0
+priv006 172.20.6.6 172.20.6.1 172.20.6.255 255.255.255.0
+priv007 172.20.6.7 172.20.6.1 172.20.6.255 255.255.255.0
+priv008 172.20.6.8 172.20.6.1 172.20.6.255 255.255.255.0
+priv009 172.20.6.9 172.20.6.1 172.20.6.255 255.255.255.0
+priv010 172.20.6.10 172.20.6.1 172.20.6.255 255.255.255.0
+priv011 172.20.6.11 172.20.6.1 172.20.6.255 255.255.255.0
+priv012 172.20.6.12 172.20.6.1 172.20.6.255 255.255.255.0
+priv013 172.20.6.13 172.20.6.1 172.20.6.255 255.255.255.0
+priv014 172.20.6.14 172.20.6.1 172.20.6.255 255.255.255.0
+priv015 172.20.6.15 172.20.6.1 172.20.6.255 255.255.255.0
+priv016 172.20.6.16 172.20.6.1 172.20.6.255 255.255.255.0
+priv017 172.20.6.17 172.20.6.1 172.20.6.255 255.255.255.0
+priv018 172.20.6.18 172.20.6.1 172.20.6.255 255.255.255.0
+priv019 172.20.6.19 172.20.6.1 172.20.6.255 255.255.255.0
+priv020 172.20.6.20 172.20.6.1 172.20.6.255 255.255.255.0
+priv021 172.20.6.21 172.20.6.1 172.20.6.255 255.255.255.0
+priv022 172.20.6.22 172.20.6.1 172.20.6.255 255.255.255.0
+priv023 172.20.6.23 172.20.6.1 172.20.6.255 255.255.255.0
+priv024 172.20.6.24 172.20.6.1 172.20.6.255 255.255.255.0
View
28 service/service/java/source/etc/workspace-service/network-pools/public
@@ -0,0 +1,28 @@
+# A sample network pool 'public'
+
+# The first non-blank, non-comment line must be the DNS server you would
+# like to tell the VMs receiving addresses from this network pool to use.
+
+# DNS server IP address (or 'none')
+192.168.0.1
+
+# The rest of the file's non-blank, non-comment lines are the addresses
+# that will be leased out to VMs requesting this network.
+
+# Currently there are no syntax shortcuts, each field must have an entry
+# or the keyword 'none'.
+
+# The IP address and hostname fields may not be 'none'.
+# If the gateway is 'none', no gateway is assigned.
+# If broadcast or subnetmask are 'none' they are derived from the IP
+# - based on the normal subnet and broadcast for the IP class (A,B,C)
+
+
+# hostname ipaddress gateway broadcast subnetmask
+
+pub02 192.168.0.2 192.168.0.1 none none
+pub03 192.168.0.3 192.168.0.1 192.168.0.255 255.255.255.0
+pub04 192.168.0.4 192.168.0.1 192.168.0.255 255.255.255.0
+pub05 192.168.0.5 192.168.0.1 none none
+pub06 192.168.0.6 none none none
+pub07 192.168.0.7 192.168.0.1 none 255.255.255.0
View
21 service/service/java/source/etc/workspace-service/network.conf
@@ -0,0 +1,21 @@
+################################################################################
+#
+# This file is used for configuring network settings.
+#
+# NOTE: The addresses to give out to VMs are configured in the "network-pools"
+# directory. Each filename in that directory is the name of a pool
+# (public, private, etc) and its contents contain the addresses in that
+# pool.
+#
+################################################################################
+
+
+# Prefix for unique MAC address assignments.
+#
+# Quoting admin guide: "In summary, an address of the following form should
+# be OK: XY:XX:XX:XX:XX:XX where X is any hexadecimal digit, and Y is one
+# of 2, 6, A or E"
+#
+# Setting a too-long prefix will limit the amount of IPs you can support.
+
+mac.prefix=A2:AA:BB
View
7 service/service/java/source/etc/workspace-service/other/README.txt
@@ -0,0 +1,7 @@
+This directory contains the authorative configuration sources (starting with
+"main.xml" that point into the conf settings in the directory above. Also
+contains some internal things.
+
+You shouldn't need to do anything in this directory unless you were specifically
+directed to by documentation, are making extensions or doing something esoteric
+(or just having fun ;-)).
View
18 service/service/java/source/etc/workspace-service/other/authz-callout-ACTIVE.xml
@@ -0,0 +1,18 @@
+<?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">
+
+ <!--
+
+ If this is your "authz-callout-ACTIVE.xml" file, then there is no
+ enabled authorization callout.
+
+ -->
+
+ <bean id="nimbus-rm.service.binding.AuthorizationCallout"
+ class="org.globus.workspace.service.binding.authorization.DisabledCallout" />
+
+</beans>
View
18 service/service/java/source/etc/workspace-service/other/authz-callout-disabled.xml
@@ -0,0 +1,18 @@
+<?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">
+
+ <!--
+
+ If this is your "authz-callout-ACTIVE.xml" file, then there is no
+ enabled authorization callout.
+
+ -->
+
+ <bean id="nimbus-rm.service.binding.AuthorizationCallout"
+ class="org.globus.workspace.service.binding.authorization.DisabledCallout" />
+
+</beans>
View
98 service/service/java/source/etc/workspace-service/other/authz-callout-groupauthz.xml
@@ -0,0 +1,98 @@
+<?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">
+
+ <!--
+
+ If this is your "authz-callout-ACTIVE.xml" file, then you have enabled
+ the "groupauthz" plugin.
+
+ -->
+
+ <import resource="main.conflocator.xml" />
+
+ <bean id="nimbus-rm.service.binding.AuthorizationCallout"
+ class="org.globus.workspace.groupauthz.GroupAuthz"
+ init-method="initializeCallout">
+
+ <property name="def01"
+ value="$COMMON{conf.dir}/group-authz/group01.properties" />
+ <property name="group01"
+ value="$COMMON{conf.dir}/group-authz/group01.txt" />
+
+ <property name="def02"
+ value="$COMMON{conf.dir}/group-authz/group02.properties" />
+ <property name="group02"
+ value="$COMMON{conf.dir}/group-authz/group02.txt" />
+
+ <property name="def03"
+ value="$COMMON{conf.dir}/group-authz/group03.properties" />
+ <property name="group03"
+ value="$COMMON{conf.dir}/group-authz/group03.txt" />
+
+ <property name="def04"
+ value="$COMMON{conf.dir}/group-authz/group04.properties" />
+ <property name="group04"
+ value="$COMMON{conf.dir}/group-authz/group04.txt" />
+
+ <property name="def05"
+ value="$COMMON{conf.dir}/group-authz/group05.properties" />
+ <property name="group05"
+ value="$COMMON{conf.dir}/group-authz/group05.txt" />
+
+ <property name="def06"
+ value="$COMMON{conf.dir}/group-authz/group06.properties" />
+ <property name="group06"
+ value="$COMMON{conf.dir}/group-authz/group06.txt" />
+
+ <property name="def07"
+ value="$COMMON{conf.dir}/group-authz/group07.properties" />
+ <property name="group07"
+ value="$COMMON{conf.dir}/group-authz/group07.txt" />
+
+ <property name="def08"
+ value="$COMMON{conf.dir}/group-authz/group08.properties" />
+ <property name="group08"
+ value="$COMMON{conf.dir}/group-authz/group08.txt" />
+
+ <property name="def09"
+ value="$COMMON{conf.dir}/group-authz/group09.properties" />
+ <property name="group09"
+ value="$COMMON{conf.dir}/group-authz/group09.txt" />
+
+ <property name="def10"
+ value="$COMMON{conf.dir}/group-authz/group10.properties" />
+ <property name="group10"
+ value="$COMMON{conf.dir}/group-authz/group10.txt" />
+
+ <property name="def11"
+ value="$COMMON{conf.dir}/group-authz/group11.properties" />
+ <property name="group11"
+ value="$COMMON{conf.dir}/group-authz/group11.txt" />
+
+ <property name="def12"
+ value="$COMMON{conf.dir}/group-authz/group12.properties" />
+ <property name="group12"
+ value="$COMMON{conf.dir}/group-authz/group12.txt" />
+
+ <property name="def13"
+ value="$COMMON{conf.dir}/group-authz/group13.properties" />
+ <property name="group13"
+ value="$COMMON{conf.dir}/group-authz/group13.txt" />
+
+ <property name="def14"
+ value="$COMMON{conf.dir}/group-authz/group14.properties" />
+ <property name="group14"
+ value="$COMMON{conf.dir}/group-authz/group14.txt" />
+
+ <property name="def15"
+ value="$COMMON{conf.dir}/group-authz/group15.properties" />
+ <property name="group15"
+ value="$COMMON{conf.dir}/group-authz/group15.txt" />
+
+ </bean>
+
+</beans>
View
31 service/service/java/source/etc/workspace-service/other/authz-callout-python.xml
@@ -0,0 +1,31 @@
+<?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">
+
+ <!--
+
+ If this is your "authz-callout-ACTIVE.xml" file, then you have enabled
+ the "python authz" plugin.
+
+ -->
+
+ <import resource="main.conflocator.xml" />
+
+ <bean id="nimbus-rm.service.binding.AuthorizationCallout"
+ class="org.globus.workspace.interceptors.jython.PythonAuthorization"
+ init-method="initializeCallout">
+
+ <!-- hardcoded/relative path discovery like this might not always
+ work, might need to adjust value
+
+ You can just make value equal absolute path to the chosen .py file.
+ -->
+ <property name="scriptLocation"
+ value="$COMMON{conf.dir}/../../workspace_python_authorization/printinfo.py" />
+
+ </bean>
+
+</beans>
View
64 service/service/java/source/etc/workspace-service/other/common.conf
@@ -0,0 +1,64 @@
+
+################################################################################
+#
+# Fake mode. Used by default to get going.
+#
+################################################################################
+
+
+# Do actual VMM related requests get made? If "fake.mode" is set to true
+# then nothing will happen, "pretend" requests are made instead. This is
+# useful for installing things for the first time to test security etc.
+#
+# Also useful for developing new clients or for just experimenting or working
+# on an airplane, etc.
+
+fake.mode=true
+
+
+# If fake mode is enabled, taking time for work to be accomplished can be
+# simulated with a countdown timer that is triggered after a period of time.
+# Setting this to zero or removing the configuration triggers immediate
+# notifications of (fake) completion. Milliseconds.
+
+fake.lag.ms=3000
+
+
+
+################################################################################
+#
+# You should not need to edit these settings.
+#
+# Hidden or general settings used across Spring configurations. These are either
+# esoteric or autogenerated.
+#
+################################################################################
+
+
+# Absolute path to the directory above, which is likely to look like
+# "$ANYWHERE/nimbus/workspace-service"
+
+conf.dir=/@WORKSPACE_CONFDIR@
+
+
+# Path to the base derby directory (for setting the "derby.system.home"
+# system property if it is not already set by something else).
+
+derby.home.dir=/@DERBY_DIR@
+
+
+# Absolute path to the workspace persistence directory
+
+persistence.dir=/@WORKSPACE_PERSISTENCEDIR@
+
+
+# Absolute path to directory with any disk-persistent caches
+
+caches.dir=/@WORKSPACE_PERSISTENCEDIR@/caches
+
+
+# Absolute path to directory with any disk/SSH based notification sinks
+
+msgsinks.dir=/@WORKSPACE_PERSISTENCEDIR@/msg-sinks
+
+
View
112 service/service/java/source/etc/workspace-service/other/main.conflocator.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Discover conf files. The conf files hold name/value pairs that are
+ brought into the XML files in this directory via Spring's nice properties
+ mechanism.
+
+ Concentrate all uses of PropertyPlaceholderConfigurer into this bean
+ config so that the install script can do token replacements for absolute
+ paths throughout the entire spring configuration by just running the
+ token replacement on this file.
+
+ Spring wants "//" in front of absolute filesystem paths so that is why
+ "/TOKEN" is used here instead of "TOKEN"
+-->
+
+<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">
+
+ <bean id="commonSettings"
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+
+ <property name="location"
+ value="/@WORKSPACE_CONFDIR@/other/common.conf" />
+ <property name="placeholderPrefix"
+ value="$COMMON{" />
+ </bean>
+
+ <bean id="logSettings"
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+
+ <property name="location"
+ value="/@WORKSPACE_CONFDIR@/logging.conf" />
+ <property name="placeholderPrefix"
+ value="$LOGGING{" />
+ </bean>
+
+ <bean id="globalPolicies"
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+
+ <property name="location"
+ value="/@WORKSPACE_CONFDIR@/global-policies.conf" />
+ <property name="placeholderPrefix"
+ value="$GLOBAL{" />
+ </bean>
+
+ <bean id="repositorySettings"
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+
+ <property name="location"
+ value="/@WORKSPACE_CONFDIR@/repository.conf" />
+ <property name="placeholderPrefix"
+ value="$REPO{" />
+ </bean>
+
+ <bean id="accountingSettings"
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+
+ <property name="location"
+ value="/@WORKSPACE_CONFDIR@/accounting.conf" />
+ <property name="placeholderPrefix"
+ value="$ACCOUNTING{" />
+ </bean>
+
+ <bean id="sshSettings"
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+
+ <property name="location"
+ value="/@WORKSPACE_CONFDIR@/ssh.conf" />
+ <property name="placeholderPrefix"
+ value="$SSH{" />
+ </bean>
+
+ <bean id="networkSettings"
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+
+ <property name="location"
+ value="/@WORKSPACE_CONFDIR@/network.conf" />
+ <property name="placeholderPrefix"
+ value="$NETWORK{" />
+ </bean>
+
+ <bean id="vmmReqs"
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+
+ <property name="location"
+ value="/@WORKSPACE_CONFDIR@/vmm.conf" />
+ <property name="placeholderPrefix"
+ value="$VMM{" />
+ </bean>
+
+ <bean id="pilotSettings"
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+
+ <property name="location"
+ value="/@WORKSPACE_CONFDIR@/pilot.conf" />
+ <property name="placeholderPrefix"
+ value="$PILOT{" />
+ </bean>
+
+ <bean id="metadataSettings"
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+
+ <property name="location"
+ value="/@WORKSPACE_CONFDIR@/metadata.conf" />
+ <property name="placeholderPrefix"
+ value="$METADATA{" />
+ </bean>
+
+</beans>
View
101 service/service/java/source/etc/workspace-service/other/main.repr.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ WARNING: It is unlikely you would need to edit anything here, most of these
+ objects are POJOs/beans.
+
+ New implementations of these representation objects are possible
+ using these mappings but it's recommended that you familiarize
+ yourself at the code level with how the default impls are used.
+-->
+
+<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">
+
+ <bean id="nimbus-repr.ReprFactory"
+ class="org.nimbustools.api.defaults.repr.DefaultReprFactory">
+
+ <!-- repr package, writable: -->
+
+ <lookup-method name="_newAdvertised" bean="nimbus-repr.Advertised"/>
+ <lookup-method name="_newCaller" bean="nimbus-repr.Caller"/>
+ <lookup-method name="_newCreateRequest" bean="nimbus-repr.CreateRequest"/>
+ <lookup-method name="_newCreateResult" bean="nimbus-repr.CreateResult"/>
+ <lookup-method name="_newCustomizationRequest" bean="nimbus-repr.CustomizationRequest"/>
+ <lookup-method name="_newShutdownTasks" bean="nimbus-repr.ShutdownTasks"/>
+ <lookup-method name="_newUsage" bean="nimbus-repr.Usage"/>
+
+ <!-- vm package, writable: -->
+
+ <lookup-method name="_newKernel" bean="nimbus-repr.vm.Kernel"/>
+ <lookup-method name="_newNIC" bean="nimbus-repr.vm.NIC"/>
+ <lookup-method name="_newRequiredVMM" bean="nimbus-repr.vm.RequiredVMM"/>
+ <lookup-method name="_newResourceAllocation" bean="nimbus-repr.vm.ResourceAllocation"/>
+ <lookup-method name="_newSchedule" bean="nimbus-repr.vm.Schedule"/>
+ <lookup-method name="_newState" bean="nimbus-repr.vm.State"/>
+ <lookup-method name="_newVM" bean="nimbus-repr.vm.VM"/>
+ <lookup-method name="_newVMFile" bean="nimbus-repr.vm.VMFile"/>
+
+ <!-- ctx package, writable: -->
+
+ <lookup-method name="_newContext" bean="nimbus-repr.ctx.Context"/>
+
+ </bean>
+
+ <!-- repr package beans: -->
+
+ <bean id="nimbus-repr.Advertised" scope="prototype"
+ class="org.nimbustools.api.defaults.repr.DefaultAdvertised" />
+
+ <bean id="nimbus-repr.Caller" scope="prototype"
+ class="org.nimbustools.api.defaults.repr.DefaultCaller" />
+
+ <bean id="nimbus-repr.CreateRequest" scope="prototype"
+ class="org.nimbustools.api.defaults.repr.DefaultCreateRequest" />
+
+ <bean id="nimbus-repr.CreateResult" scope="prototype"
+ class="org.nimbustools.api.defaults.repr.DefaultCreateResult" />
+
+ <bean id="nimbus-repr.CustomizationRequest" scope="prototype"
+ class="org.nimbustools.api.defaults.repr.DefaultCustomizationRequest" />
+
+ <bean id="nimbus-repr.ShutdownTasks" scope="prototype"
+ class="org.nimbustools.api.defaults.repr.DefaultShutdownTasks" />
+
+ <bean id="nimbus-repr.Usage" scope="prototype"
+ class="org.nimbustools.api.defaults.repr.DefaultUsage" />
+
+ <!-- vm package beans: -->
+
+ <bean id="nimbus-repr.vm.Kernel" scope="prototype"
+ class="org.nimbustools.api.defaults.repr.vm.DefaultKernel" />
+
+ <bean id="nimbus-repr.vm.NIC" scope="prototype"
+ class="org.nimbustools.api.defaults.repr.vm.DefaultNIC" />
+
+ <bean id="nimbus-repr.vm.RequiredVMM" scope="prototype"
+ class="org.nimbustools.api.defaults.repr.vm.DefaultRequiredVMM" />
+
+ <bean id="nimbus-repr.vm.ResourceAllocation" scope="prototype"
+ class="org.nimbustools.api.defaults.repr.vm.DefaultResourceAllocation" />
+
+ <bean id="nimbus-repr.vm.Schedule" scope="prototype"
+ class="org.nimbustools.api.defaults.repr.vm.DefaultSchedule" />
+
+ <bean id="nimbus-repr.vm.State" scope="prototype"
+ class="org.nimbustools.api.defaults.repr.vm.DefaultState" />
+
+ <bean id="nimbus-repr.vm.VM" scope="prototype"
+ class="org.nimbustools.api.defaults.repr.vm.DefaultVM" />
+
+ <bean id="nimbus-repr.vm.VMFile" scope="prototype"
+ class="org.nimbustools.api.defaults.repr.vm.DefaultVMFile" />
+
+ <!-- ctx package bean: -->
+
+ <bean id="nimbus-repr.ctx.Context" scope="prototype"
+ class="org.nimbustools.api.defaults.repr.ctx.DefaultContext" />
+
+</beans>
View
641 service/service/java/source/etc/workspace-service/other/main.xml
@@ -0,0 +1,641 @@
+<?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" />
+
+ </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>
View
32 service/service/java/source/etc/workspace-service/other/resource-locator-ACTIVE.xml
@@ -0,0 +1,32 @@
+<?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">
+
+ <!--
+
+ If this is your "resource-locator-ACTIVE.xml" file, then you have enabled
+ the default resource location functionality that leases out VMM resources
+ defined in the "vmm-pools" directory.
+
+ -->
+
+ <import resource="main.conflocator.xml" />
+
+ <bean id="nimbus-rm.scheduler.SlotManagement"
+ class="org.globus.workspace.scheduler.defaults.DefaultSlotManagement"
+ init-method="validate">
+
+ <constructor-arg ref="nimbus-rm.persistence.PersistenceAdapter" />
+ <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" />
+ <property name="vmmpoolDirectory"
+ value="$COMMON{conf.dir}/vmm-pools" />
+
+ </bean>
+
+</beans>
View
32 service/service/java/source/etc/workspace-service/other/resource-locator-default.xml
@@ -0,0 +1,32 @@
+<?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">
+
+ <!--
+
+ If this is your "resource-locator-ACTIVE.xml" file, then you have enabled
+ the default resource location functionality that leases out VMM resources
+ defined in the "vmm-pools" directory.
+
+ -->
+
+ <import resource="main.conflocator.xml" />
+
+ <bean id="nimbus-rm.scheduler.SlotManagement"
+ class="org.globus.workspace.scheduler.defaults.DefaultSlotManagement"
+ init-method="validate">
+
+ <constructor-arg ref="nimbus-rm.persistence.PersistenceAdapter" />
+ <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" />
+ <property name="vmmpoolDirectory"
+ value="$COMMON{conf.dir}/vmm-pools" />
+
+ </bean>
+
+</beans>
View
116 service/service/java/source/etc/workspace-service/other/resource-locator-pilot.xml
@@ -0,0 +1,116 @@
+<?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">
+
+ <import resource="main.conflocator.xml" />
+
+ <bean id="nimbus-rm.scheduler.SlotManagement"
+ class="org.globus.workspace.scheduler.defaults.pilot.PilotSlotManagement"
+ init-method="validate">
+
+
+ <!--
+ sshNotificationInfo is for an alternate notification method
+ (disabled by default)
+
+ sshNotificationInfo - host:port of service node's (this node's)
+ sshd. sshd is used to receive notifications from the pilot program
+ running on cluster nodes. Make this configuration blank or remove
+ it to disable this notification method altogether.
+
+ (Currently the account running the pilot can not differ from the
+ account running the container. In the future you may be able to
+ use the "user@host:port" variation for this configuration but
+ right now we do not support submitting pilot jobs under different
+ accounts than the account used to run the container so only use
+ "host:port")
+ -->
+ <property name="sshNotificationInfo" value="" />
+
+
+ <!--
+ logdirPath is the absolute path to directory that the stdout/stderr
+ logs of the workspace-pilot program itself will be written to by
+ the LRM.
+ -->
+ <property name="logdirPath"
+ value="$COMMON{persistence.dir}/pilot-logs" />
+
+
+ <!--
+ Absolute path to the users file that Jetty needs for setting up
+ the HTTP digest access authentication shared secret. The pilot
+ program must be configured with the shared secret in this file.
+ -->
+ <property name="accountsPath"
+ value="$COMMON{conf.dir}/pilot-authz.conf" />
+
+
+ <!--
+ pollScript is the path to the notifications program that the
+ alternative notification mechanism (ssh) uses. Should not need
+ to edit this but if you do use an absolute path.
+ -->
+ <property name="pollScript"
+ value="$COMMON{msgsinks.dir}/pilotnotifications" />
+
+
+ <!--
+ Should not need to edit, this is the number of seconds to pad the
+ walltime with so that the pilot is assured a clean exit strategy
+ (see design for discussion).
+ -->
+ <property name="padding" value="2" />
+
+
+ <!--
+ This allows the possibility to support upgrading the service and
+ pilot independently of each other. This version of the service
+ can be configured with pilot version(s): 0.2
+ -->
+ <property name="pilotVersion" value="0.2" />
+
+
+
+ <!--
+ Milliseconds between polls for the backup SSH based notifications
+ (mechanism II). Defaults to 200ms if configuration is missing.
+ -->
+ <property name="watcherDelay" value="200" />
+
+
+ <!--
+ Torque is the only supported value, do not edit (configuration is
+ for the future).
+ -->
+ <property name="LRM" value="torque" />
+
+
+ <!-- Property values coming via pilot.conf -->
+ <property name="contactPort" value="$PILOT{contact.socket}"/>
+ <property name="multiJobPrefix" value="$PILOT{pbs.multijob.prefix}" />
+ <property nam