Skip to content

Commit

Permalink
dcache-frontend: add hooks and context handler for dcache-view-admin
Browse files Browse the repository at this point in the history
Motivation:

Separate out dCacheView from admin monitoring.
Support them as different URLS on port 3880.

Modification:

dCacheView is still at `3880:/` but the
admin pages are at `3880:/admin`.

Because of `pages.js` and the prebuilt
module in the dCacheView `bower-components`,
these URLs have a full routing path as
`3880:/admin/#!/admin...`.  I did not
try to change the repeated `admin` segment
as that would mean having to recompile
the `admin-page` component as well.

Includes new dependencies and
`dcache-view-admin` packaging
instructions.

Result:

A raw but functional version of the
separation of these component pages.

Target: master
Patch: https://rb.dcache.org/r/14148/
Acked-by: Tigran
  • Loading branch information
alrossi committed Nov 14, 2023
1 parent 94e04e8 commit 2c55595
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,12 @@
-->

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:plugin="http://www.springframework.org/schema/plugin"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:plugin="http://www.springframework.org/schema/plugin"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/plugin http://www.springframework.org/schema/plugin/spring-plugin.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
http://www.springframework.org/schema/plugin http://www.springframework.org/schema/plugin/spring-plugin.xsd">

<context:property-placeholder/>
<context:annotation-config/>
Expand Down Expand Up @@ -398,6 +395,16 @@
</bean>
</property>
</bean>
<bean class="org.eclipse.jetty.server.handler.ContextHandler">
<description>Provide access to dcache-view-admin</description>
<property name="contextPath" value="/admin"/>
<property name="handler">
<bean class="org.eclipse.jetty.server.handler.ResourceHandler">
<property name="directoriesListed" value="true"/>
<property name="resourceBase" value="${frontend.dcache-view-admin.dir}"/>
</bean>
</property>
</bean>
<bean class="org.eclipse.jetty.server.handler.ContextHandler">
<description>Provide access to standard swagger-ui library</description>
<property name="contextPath" value="/api/libraries/swagger-ui"/>
Expand Down
11 changes: 11 additions & 0 deletions packages/fhs/src/main/assembly/fhs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<excludes>
<exclude>*saxon:saxon*:*:*</exclude>
<exclude>org.dcache:dcache-view:jar:*</exclude>
<exclude>org.dcache:dcache-view-admin:jar:*</exclude>
</excludes>
<outputDirectory>usr/share/dcache/classes</outputDirectory>
<useProjectArtifact>false</useProjectArtifact>
Expand All @@ -32,6 +33,16 @@
<directoryMode>755</directoryMode>
<unpack>true</unpack>
</dependencySet>
<dependencySet>
<includes>
<include>org.dcache:dcache-view-admin:jar:*</include>
</includes>
<outputDirectory>usr/share/dcache/dcache-view-admin</outputDirectory>
<useProjectArtifact>false</useProjectArtifact>
<fileMode>644</fileMode>
<directoryMode>755</directoryMode>
<unpack>true</unpack>
</dependencySet>
</dependencySets>

<fileSets>
Expand Down
4 changes: 4 additions & 0 deletions packages/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@
<groupId>org.dcache</groupId>
<artifactId>dcache-view</artifactId>
</dependency>
<dependency>
<groupId>org.dcache</groupId>
<artifactId>dcache-view-admin</artifactId>
</dependency>

<dependency>
<groupId>saxon</groupId>
Expand Down
10 changes: 10 additions & 0 deletions packages/system-test/src/main/assembly/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<exclude>saxon:saxon:*:*</exclude>
<exclude>org.dcache:dcache-plugin-hsqldb:zip:*</exclude>
<exclude>org.dcache:dcache-view:jar:*</exclude>
<exclude>org.dcache:dcache-view-admin:jar:*</exclude>
</excludes>
<outputDirectory>share/classes</outputDirectory>
<useProjectArtifact>false</useProjectArtifact>
Expand Down Expand Up @@ -41,6 +42,15 @@
<directoryMode>755</directoryMode>
<unpack>true</unpack>
</dependencySet>
<dependencySet>
<includes>
<include>org.dcache:dcache-view-admin:jar:*</include>
</includes>
<outputDirectory>share/dcache-view-admin</outputDirectory>
<fileMode>644</fileMode>
<directoryMode>755</directoryMode>
<unpack>true</unpack>
</dependencySet>
</dependencySets>

<fileSets>
Expand Down
10 changes: 10 additions & 0 deletions packages/tar/src/main/assembly/tar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<exclude>*:*:war:*</exclude>
<exclude>saxon:saxon:*:*</exclude>
<exclude>org.dcache:dcache-view:jar:*</exclude>
<exclude>org.dcache:dcache-view-admin:jar:*</exclude>
</excludes>
<outputDirectory>share/classes</outputDirectory>
<useProjectArtifact>false</useProjectArtifact>
Expand All @@ -31,6 +32,15 @@
<directoryMode>755</directoryMode>
<unpack>true</unpack>
</dependencySet>
<dependencySet>
<includes>
<include>org.dcache:dcache-view-admin:jar:*</include>
</includes>
<outputDirectory>share/dcache-view-admin</outputDirectory>
<fileMode>644</fileMode>
<directoryMode>755</directoryMode>
<unpack>true</unpack>
</dependencySet>
</dependencySets>

<fileSets>
Expand Down
9 changes: 8 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
<version.jetty>9.4.52.v20230823</version.jetty>
<version.xrootd4j>4.5.8</version.xrootd4j>
<version.jersey>2.28</version.jersey>
<version.dcache-view>2.1.0</version.dcache-view>
<version.dcache-view>3.0.0</version.dcache-view>
<version.dcache-view-admin>3.0.0</version.dcache-view-admin>
<version.netty>4.1.94.Final</version.netty>
<version.dcache>${project.version}</version.dcache>
<version.swagger-ui>3.1.7</version.swagger-ui>
Expand Down Expand Up @@ -745,6 +746,12 @@
<version>${version.dcache-view}</version>
</dependency>

<dependency>
<groupId>org.dcache</groupId>
<artifactId>dcache-view-admin</artifactId>
<version>${version.dcache-view-admin}</version>
</dependency>

<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>${bouncycastle.bcpkix}</artifactId>
Expand Down
Empty file.
6 changes: 6 additions & 0 deletions skel/share/defaults/frontend.properties
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,12 @@ frontend.service.billing.collection.timeout.unit = MINUTES
#
frontend.dcache-view.dir = ${dcache.paths.share}/dcache-view

# ---- Directory with default static content
#
# The directory in the local file system containing the dcache-view-admin
# files.
#
frontend.dcache-view-admin.dir = ${dcache.paths.share}/dcache-view-admin

# ---- Static values for frontend
#
Expand Down
1 change: 1 addition & 0 deletions skel/share/services/frontend.batch
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ check -strong frontend.restore-requests.topic
check -strong frontend.restore-requests.lifetime
check -strong frontend.restore-requests.lifetime.unit
check -strong frontend.dcache-view.dir
check -strong frontend.dcache-view-admin.dir

check -strong frontend.static!dcache-view.endpoints.webapi
check frontend.static!dcache-view.endpoints.webdav
Expand Down

0 comments on commit 2c55595

Please sign in to comment.