Skip to content

Commit

Permalink
Merge branch 'master' into tomcat9
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanrdoherty committed Jun 11, 2024
2 parents 3a7452f + 09ce743 commit 0fa1564
Show file tree
Hide file tree
Showing 199 changed files with 5,027 additions and 3,948 deletions.
58 changes: 58 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# Build Service & Dependencies
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
FROM veupathdb/alpine-dev-base:jdk-18 AS prep

LABEL service="wdk-sample-build"

ARG GITHUB_USERNAME
ARG GITHUB_TOKEN

RUN apk add --no-cache git sed findutils coreutils make npm curl gawk jq openssh git apache-ant maven perl \
&& git config --global advice.detachedHead false

WORKDIR /gusApp

RUN mkdir gus_home
RUN mkdir project_home

ENV GUS_HOME=/gusApp/gus_home
ENV PROJECT_HOME=/gusApp/project_home
ENV PATH=$PROJECT_HOME/install/bin:$GUS_HOME/bin:$PATH

RUN cd project_home \
&& git clone https://github.com/VEuPathDB/install.git \
&& git clone https://github.com/VEuPathDB/FgpUtil.git \
&& git clone https://github.com/VEuPathDB/WSF.git \
&& git clone https://github.com/VEuPathDB/WDK.git

RUN mkdir /gusApp/gus_home/config && cp /gusApp/project_home/install/config/gus.config.sample /gusApp/gus_home/config/gus.config

RUN bld WDK


# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# Run the service
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
FROM amazoncorretto:18-alpine3.15

LABEL service="wdk-sample"

RUN apk add --no-cache tzdata bash git apache-ant maven perl npm \
&& cp /usr/share/zoneinfo/America/New_York /etc/localtime \
&& echo "America/New_York" > /etc/timezone

ENV GUS_HOME=/gusApp/gus_home
ENV PROJECT_HOME=/gusApp/project_home
ENV PATH=$PROJECT_HOME/install/bin:$GUS_HOME/bin:$PATH

COPY --from=prep /gusApp/gus_home /gusApp/gus_home
COPY --from=prep /gusApp/project_home /gusApp/project_home
COPY --from=prep /root/.m2/repository /root/.m2/repository

CMD bld WDK

11 changes: 11 additions & 0 deletions Model/bin/wdkCacheSeeder
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

if [ ! -d $GUS_HOME ]; then
echo "\$GUS_HOME ($GUS_HOME) is not a directory."
fi

# NOTE: this script assumes only one model-config.xml is created/populated
# if this is not the case, call fgpJava directly with your preferred project_id
projectId=`find $GUS_HOME -name model-config.xml | xargs dirname | xargs basename`

fgpJava org.gusdb.wdk.model.WdkCacheSeeder -model $projectId
47 changes: 0 additions & 47 deletions Model/lib/conifer/roles/conifer/templates/WDK/model-config.xml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -145,53 +145,6 @@ site_vars file: {{ site_vars }}
{% endif -%}
/>

<accountDb login="{{ modelconfig_accountDb_login }}"
password="{{ modelconfig_accountDb_password }}"
connectionUrl="{{ modelconfig_accountDb_connectionUrl }}"
platform="{{ modelconfig_accountDb_platform }}"
accountSchema="{{ modelconfig_accountDb_accountSchema }}"
{% if modelconfig_accountDb_maxActive is defined -%}
maxActive="{{ modelconfig_accountDb_maxActive }}"
{% endif -%}
{% if modelconfig_accountDb_maxIdle is defined -%}
maxIdle="{{ modelconfig_accountDb_maxIdle }}"
{% endif -%}
{% if modelconfig_accountDb_minIdle is defined -%}
minIdle="{{ modelconfig_accountDb_minIdle }}"
{% endif -%}
{% if modelconfig_accountDb_maxWait is defined -%}
maxWait="{{ modelconfig_accountDb_maxWait }}"
{% endif -%}
{% if modelconfig_accountDb_defaultFetchSize is defined -%}
defaultFetchSize="{{ modelconfig_accountDb_defaultFetchSize }}"
{% endif -%}
{% if modelconfig_accountDb_showConnections is defined -%}
showConnections="{{ modelconfig_accountDb_showConnections }}"
{% endif -%}
{% if modelconfig_accountDb_showConnectionsInterval is defined -%}
showConnectionsInterval="{{ modelconfig_accountDb_showConnectionsInterval }}"
{% endif -%}
{% if modelconfig_accountDb_showConnectionsDuration is defined -%}
showConnectionsDuration="{{ modelconfig_accountDb_showConnectionsDuration }}"
{% endif -%}
{% if modelconfig_accountDb_driverInitClass is defined -%}
driverInitClass="{{ modelconfig_accountDb_driverInitClass }}"
{% endif %}
>

<userProperty name="username" displayName="Username" dbKey="username"/>
<userProperty name="firstName" displayName="First Name" dbKey="first_name" required="true"/>
<userProperty name="middleName" displayName="Middle Name" dbKey="middle_name"/>
<userProperty name="lastName" displayName="Last Name" dbKey="last_name" required="true"/>
<userProperty name="organization" displayName="Organization" dbKey="organization" required="true"/>
<userProperty name="interests" displayName="Interests" dbKey="interests" multiLine="true"/>

</accountDb>

{% if modelconfig_userDatasetStoreConfig is defined -%}
{{ modelconfig_userDatasetStoreConfig|indent }}
{% endif -%}

<emailSubject>
{{ modelconfig_emailSubject|indent(6) }}
</emailSubject>
Expand Down
33 changes: 0 additions & 33 deletions Model/lib/rng/wdkModel-config.rng
Original file line number Diff line number Diff line change
Expand Up @@ -94,39 +94,6 @@
<attribute name="userSchema" />
</element>

<element name="accountDb">
<ref name="DBBaseContent" />
<attribute name="accountSchema" />
<zeroOrMore>
<element name="userProperty">
<attribute name="name">
<data type="string"/>
</attribute>
<attribute name="displayName">
<data type="string"/>
</attribute>
<attribute name="dbKey">
<data type="string"/>
</attribute>
<optional>
<attribute name="required">
<data type="boolean"/>
</attribute>
</optional>
<optional>
<attribute name="public">
<data type="boolean"/>
</attribute>
</optional>
<optional>
<attribute name="multiLine">
<data type="boolean"/>
</attribute>
</optional>
</element>
</zeroOrMore>
</element>

<optional>
<element name="userDatasetStore">
<attribute name="implementation"/>
Expand Down
35 changes: 29 additions & 6 deletions Model/lib/rng/wdkModel.rng
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@

<define name="ParamBaseTags">
<choice>
<optional>
<attribute name="visibleHelpPosition" />
</optional>
<element name="visibleHelp">
<ref name="IncludeExclude" />
<text />
Expand Down Expand Up @@ -986,6 +989,9 @@
<data type="double" />
</attribute>
</optional>
<optional>
<attribute name="visibleHelpPosition" />
</optional>
<zeroOrMore>
<element name="help">
<ref name="IncludeExclude" />
Expand Down Expand Up @@ -1383,6 +1389,7 @@
<attribute name="displayName" />
<attribute name="scopes" />
<attribute name="implementation" />
<ref name="buildTracking" />
<optional>
<attribute name="inReportMaker">
<data type="boolean" />
Expand All @@ -1400,6 +1407,15 @@
</element>
</define>

<define name="buildTracking">
<optional>
<choice>
<attribute name="newBuild" />
<attribute name="reviseBuild" />
</choice>
</optional>
</define>

<!-- Question -->
<define name="question">
<element name="question">
Expand Down Expand Up @@ -1430,12 +1446,7 @@
<data type="boolean" />
</attribute>
</optional>
<optional>
<choice>
<attribute name="newBuild" />
<attribute name="reviseBuild" />
</choice>
</optional>
<ref name="buildTracking" />

<zeroOrMore>
<choice>
Expand All @@ -1456,6 +1467,11 @@
<text />
</element>

<element name="searchVisibleHelp">
<ref name="IncludeExclude" />
<text />
</element>

<ref name="attributesList" />

<element name="dynamicAttributes">
Expand Down Expand Up @@ -1550,6 +1566,12 @@
<optional>
<attribute name="attributeCategory" />
</optional>
<optional>
<element name="htmlHelp">
<ref name="IncludeExclude" />
<text />
</element>
</optional>
<zeroOrMore>
<choice>
<ref name="reporterRef" />
Expand Down Expand Up @@ -1688,6 +1710,7 @@
<zeroOrMore>
<choice>
<element name="description">
<ref name="IncludeExclude" />
<text />
</element>
<ref name="attributes" />
Expand Down
60 changes: 32 additions & 28 deletions Model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,22 @@

<dependency>
<groupId>org.gusdb</groupId>
<artifactId>fgputil-accountdb</artifactId>
<artifactId>fgputil-server</artifactId>
</dependency>

<dependency>
<groupId>org.gusdb</groupId>
<artifactId>fgputil-server</artifactId>
<artifactId>fgputil-db</artifactId>
</dependency>

<dependency>
<groupId>org.gusdb</groupId>
<artifactId>fgputil-db</artifactId>
<artifactId>oauth2-client</artifactId>
</dependency>

<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
</dependency>

<dependency>
Expand All @@ -101,39 +106,23 @@
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>

<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-grizzly2-http</artifactId>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>

<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
</exclusions>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>

<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client</artifactId>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava-jdk5</artifactId>
</exclusion>
</exclusions>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-grizzly2-http</artifactId>
</dependency>

<dependency>
Expand Down Expand Up @@ -177,13 +166,19 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.irods.jargon</groupId>
<artifactId>jargon-core</artifactId>
</dependency>

<dependency>
<groupId>net.sf.opencsv</groupId>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
</dependency>

Expand All @@ -203,6 +198,15 @@
<artifactId>json-schema-builder</artifactId>
</dependency>

<dependency>
<groupId>io.prometheus</groupId>
<artifactId>simpleclient</artifactId>
</dependency>
<dependency>
<groupId>io.prometheus</groupId>
<artifactId>simpleclient_common</artifactId>
</dependency>

</dependencies>

</project>
Loading

0 comments on commit 0fa1564

Please sign in to comment.