Skip to content

Commit

Permalink
New metadata aggregator build:
Browse files Browse the repository at this point in the history
CLI now takes file path, not URI: switch back to stock CLI
CLI now takes pipeline name, not output file: rework all flows to have explicit serialization stages.
  • Loading branch information
iay committed Jun 21, 2011
1 parent d721b0c commit 38f0960
Show file tree
Hide file tree
Showing 14 changed files with 197 additions and 24 deletions.
30 changes: 21 additions & 9 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -568,10 +568,10 @@
<macrodef name="MDA">
<!-- Spring pipeline configuration file -->
<attribute name="config"/>
<!-- output file -->
<attribute name="out"/>
<!-- pipeline bean ID -->
<attribute name="pipeline"/>
<sequential>
<java classname="uk.org.ukfederation.mda.SimpleCommandLine"
<java classname="net.shibboleth.metadata.cli.SimpleCommandLine"
fork="true" failonerror="true" maxmemory="${java.max.memory}">
<classpath>
<fileset dir="${tools.mda}/lib">
Expand All @@ -591,7 +591,7 @@
<jvmarg value="-Dlogback.configurationFile=${tools.dir}/ukf-mda/logback.xml"/>
<jvmarg value="-Dbasedir=${basedir}"/>
<arg value="@{config}"/>
<arg value="@{out}"/>
<arg value="@{pipeline}"/>
</java>
</sequential>
</macrodef>
Expand Down Expand Up @@ -1047,6 +1047,19 @@
*********************************************
-->

<!--
Aggregator based work is divided into channels, each of
which lives in a directory under /mdx/. Channels are
mostly named country-source, but there are exceptions
to this rule. Some of the exceptions may be rationalised
in the future.
Each channel can have a number of verbs which can be
executed. The convention is that the verb names a
configuration file, and that the pipeline to execute
is named as channel.pipeline.
-->

<!--
CHANNEL.do
Expand All @@ -1055,11 +1068,10 @@
<macrodef name="CHANNEL.do">
<attribute name="channel"/><!-- channel name -->
<attribute name="verb"/><!-- verb to perform -->
<attribute name="out"/><!-- output file name -->
<sequential>
<echo>Running @{channel} @{verb} flow.</echo>
<MDA config="${mdx.dir}/@{channel}/@{verb}.xml"
out="${mdx.dir}/@{channel}/@{out}.xml"/>
pipeline="@{channel}.@{verb}"/>
<echo>Completed @{channel} @{verb} flow.</echo>
</sequential>
</macrodef>
Expand All @@ -1072,7 +1084,7 @@
<macrodef name="CHANNEL.import">
<attribute name="channel"/><!-- channel name -->
<sequential>
<CHANNEL.do channel="@{channel}" verb="import" out="imported"/>
<CHANNEL.do channel="@{channel}" verb="import"/>
</sequential>
</macrodef>

Expand Down Expand Up @@ -1113,7 +1125,7 @@
</target>

<target name="flow.edugain.test.import">
<CHANNEL.do channel="edugain" verb="test-import" out="test-imported"/>
<CHANNEL.do channel="edugain" verb="test-import"/>
</target>

<target name="flow.swamid.import">
Expand All @@ -1137,7 +1149,7 @@
-->

<target name="flow.uk.collect">
<CHANNEL.do channel="uk" verb="collect" out="collected"/>
<CHANNEL.do channel="uk" verb="collect"/>
</target>

<target name="flow.uk.pub.production">
Expand Down
16 changes: 15 additions & 1 deletion mdx/aaf/import.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,19 @@
-->
<import resource="beans.xml"/>

<bean id="pipeline" class="net.shibboleth.metadata.pipeline.SimplePipeline">
<bean id="aaf.serializeImported" class="net.shibboleth.metadata.pipeline.SerializationStage"
init-method="initialize" lazy-init="true">
<property name="id" value="aaf.serializeImported"/>
<property name="serializer" ref="serializer"/>
<property name="outputFile">
<bean class="java.io.File">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/aaf/imported.xml"/>
</bean>
</property>
</bean>

<bean id="aaf.import" class="net.shibboleth.metadata.pipeline.SimplePipeline"
init-method="initialize" lazy-init="true">
<property name="id" value="pipeline"/>
<property name="stages">
<list>
Expand All @@ -30,6 +42,8 @@
<ref bean="standardImportActions"/>

<ref bean="standardImportTail"/>

<ref bean="aaf.serializeImported"/>
</list>
</property>
</bean>
Expand Down
16 changes: 15 additions & 1 deletion mdx/arnes/import.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,19 @@
-->
<import resource="beans.xml"/>

<bean id="pipeline" class="net.shibboleth.metadata.pipeline.SimplePipeline">
<bean id="arnes.serializeImported" class="net.shibboleth.metadata.pipeline.SerializationStage"
init-method="initialize" lazy-init="true">
<property name="id" value="arnes.serializeImported"/>
<property name="serializer" ref="serializer"/>
<property name="outputFile">
<bean class="java.io.File">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/arnes/imported.xml"/>
</bean>
</property>
</bean>

<bean id="arnes.import" class="net.shibboleth.metadata.pipeline.SimplePipeline"
init-method="initialize" lazy-init="true">
<property name="id" value="pipeline"/>
<property name="stages">
<list>
Expand All @@ -30,6 +42,8 @@
<ref bean="standardImportActions"/>

<ref bean="standardImportTail"/>

<ref bean="arnes.serializeImported"/>
</list>
</property>
</bean>
Expand Down
16 changes: 15 additions & 1 deletion mdx/caf/import.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,19 @@
-->
<import resource="beans.xml"/>

<bean id="pipeline" class="net.shibboleth.metadata.pipeline.SimplePipeline">
<bean id="caf.serializeImported" class="net.shibboleth.metadata.pipeline.SerializationStage"
init-method="initialize" lazy-init="true">
<property name="id" value="caf.serializeImported"/>
<property name="serializer" ref="serializer"/>
<property name="outputFile">
<bean class="java.io.File">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/caf/imported.xml"/>
</bean>
</property>
</bean>

<bean id="caf.import" class="net.shibboleth.metadata.pipeline.SimplePipeline"
init-method="initialize" lazy-init="true">
<property name="id" value="pipeline"/>
<property name="stages">
<list>
Expand All @@ -30,6 +42,8 @@
<ref bean="standardImportActions"/>

<ref bean="standardImportTail"/>

<ref bean="caf.serializeImported"/>
</list>
</property>
</bean>
Expand Down
14 changes: 13 additions & 1 deletion mdx/cz-eduid/import.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,25 @@
-->
<import resource="beans.xml"/>

<bean id="pipeline" class="net.shibboleth.metadata.pipeline.SimplePipeline"
<bean id="cz-eduid.serializeImported" class="net.shibboleth.metadata.pipeline.SerializationStage"
init-method="initialize" lazy-init="true">
<property name="id" value="cz-eduid.serializeImported"/>
<property name="serializer" ref="serializer"/>
<property name="outputFile">
<bean class="java.io.File">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/cz-eduid/imported.xml"/>
</bean>
</property>
</bean>

<bean id="cz-eduid.import" class="net.shibboleth.metadata.pipeline.SimplePipeline"
init-method="initialize" lazy-init="true">
<property name="id" value="pipeline"/>
<property name="stages">
<list>
<ref bean="cz-eduid.exportedEntities"/>
<ref bean="standardImportTail"/>
<ref bean="cz-eduid.serializeImported"/>
</list>
</property>
</bean>
Expand Down
16 changes: 15 additions & 1 deletion mdx/edugain/import.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,19 @@
-->
<import resource="beans.xml"/>

<bean id="pipeline" class="net.shibboleth.metadata.pipeline.SimplePipeline">
<bean id="edugain.serializeImported" class="net.shibboleth.metadata.pipeline.SerializationStage"
init-method="initialize" lazy-init="true">
<property name="id" value="edugain.serializeImported"/>
<property name="serializer" ref="serializer"/>
<property name="outputFile">
<bean class="java.io.File">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/edugain/imported.xml"/>
</bean>
</property>
</bean>

<bean id="edugain.import" class="net.shibboleth.metadata.pipeline.SimplePipeline"
init-method="initialize" lazy-init="true">
<property name="id" value="pipeline"/>
<property name="stages">
<list>
Expand All @@ -34,6 +46,8 @@
<ref bean="standardImportActions"/>

<ref bean="standardImportTail"/>

<ref bean="edugain.serializeImported"/>
</list>
</property>
</bean>
Expand Down
16 changes: 15 additions & 1 deletion mdx/edugain/test-import.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,19 @@
-->
<import resource="beans.xml"/>

<bean id="pipeline" class="net.shibboleth.metadata.pipeline.SimplePipeline">
<bean id="edugain.serializeTestImported" class="net.shibboleth.metadata.pipeline.SerializationStage"
init-method="initialize" lazy-init="true">
<property name="id" value="edugain.serializeTestImported"/>
<property name="serializer" ref="serializer"/>
<property name="outputFile">
<bean class="java.io.File">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/edugain/test-imported.xml"/>
</bean>
</property>
</bean>

<bean id="edugain.test-import" class="net.shibboleth.metadata.pipeline.SimplePipeline"
init-method="initialize" lazy-init="true">
<property name="id" value="pipeline"/>
<property name="stages">
<list>
Expand All @@ -34,6 +46,8 @@
<ref bean="standardImportActions"/>

<ref bean="standardImportTail"/>

<ref bean="edugain.serializeTestImported"/>
</list>
</property>
</bean>
Expand Down
14 changes: 13 additions & 1 deletion mdx/ie-edugate/import.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,25 @@
-->
<import resource="beans.xml"/>

<bean id="pipeline" class="net.shibboleth.metadata.pipeline.SimplePipeline"
<bean id="ie-edugate.serializeImported" class="net.shibboleth.metadata.pipeline.SerializationStage"
init-method="initialize" lazy-init="true">
<property name="id" value="ie-edugate.serializeImported"/>
<property name="serializer" ref="serializer"/>
<property name="outputFile">
<bean class="java.io.File">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/ie-edugate/imported.xml"/>
</bean>
</property>
</bean>

<bean id="ie-edugate.import" class="net.shibboleth.metadata.pipeline.SimplePipeline"
init-method="initialize" lazy-init="true">
<property name="id" value="pipeline"/>
<property name="stages">
<list>
<ref bean="ie-edugate.exportedEntities"/>
<ref bean="standardImportTail"/>
<ref bean="ie-edugate.serializeImported"/>
</list>
</property>
</bean>
Expand Down
16 changes: 15 additions & 1 deletion mdx/incommon/import.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,19 @@
-->
<import resource="beans.xml"/>

<bean id="pipeline" class="net.shibboleth.metadata.pipeline.SimplePipeline">
<bean id="incommon.serializeImported" class="net.shibboleth.metadata.pipeline.SerializationStage"
init-method="initialize" lazy-init="true">
<property name="id" value="incommon.serializeImported"/>
<property name="serializer" ref="serializer"/>
<property name="outputFile">
<bean class="java.io.File">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/incommon/imported.xml"/>
</bean>
</property>
</bean>

<bean id="incommon.import" class="net.shibboleth.metadata.pipeline.SimplePipeline"
init-method="initialize" lazy-init="true">
<property name="id" value="pipeline"/>
<property name="stages">
<list>
Expand All @@ -30,6 +42,8 @@
<ref bean="standardImportActions"/>

<ref bean="standardImportTail"/>

<ref bean="incommon.serializeImported"/>
</list>
</property>
</bean>
Expand Down
16 changes: 15 additions & 1 deletion mdx/swamid/import.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,19 @@
-->
<import resource="beans.xml"/>

<bean id="pipeline" class="net.shibboleth.metadata.pipeline.SimplePipeline">
<bean id="swamid.serializeImported" class="net.shibboleth.metadata.pipeline.SerializationStage"
init-method="initialize" lazy-init="true">
<property name="id" value="swamid.serializeImported"/>
<property name="serializer" ref="serializer"/>
<property name="outputFile">
<bean class="java.io.File">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/swamid/imported.xml"/>
</bean>
</property>
</bean>

<bean id="swamid.import" class="net.shibboleth.metadata.pipeline.SimplePipeline"
init-method="initialize" lazy-init="true">
<property name="id" value="pipeline"/>
<property name="stages">
<list>
Expand All @@ -30,6 +42,8 @@
<ref bean="standardImportActions"/>

<ref bean="standardImportTail"/>

<ref bean="swamid.serializeImported"/>
</list>
</property>
</bean>
Expand Down
16 changes: 15 additions & 1 deletion mdx/switch/import.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,19 @@
-->
<import resource="beans.xml"/>

<bean id="pipeline" class="net.shibboleth.metadata.pipeline.SimplePipeline">
<bean id="switch.serializeImported" class="net.shibboleth.metadata.pipeline.SerializationStage"
init-method="initialize" lazy-init="true">
<property name="id" value="switch.serializeImported"/>
<property name="serializer" ref="serializer"/>
<property name="outputFile">
<bean class="java.io.File">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/switch/imported.xml"/>
</bean>
</property>
</bean>

<bean id="switch.import" class="net.shibboleth.metadata.pipeline.SimplePipeline"
init-method="initialize" lazy-init="true">
<property name="id" value="pipeline"/>
<property name="stages">
<list>
Expand All @@ -30,6 +42,8 @@
<ref bean="standardImportActions"/>

<ref bean="standardImportTail"/>

<ref bean="switch.serializeImported"/>
</list>
</property>
</bean>
Expand Down
Loading

0 comments on commit 38f0960

Please sign in to comment.