Skip to content

Commit

Permalink
Revert "revert deployment changes (#228)" (#229)
Browse files Browse the repository at this point in the history
This reverts commit 7773db3.
  • Loading branch information
roflinn authored and wwelling committed Feb 23, 2023
1 parent 96a6fbf commit ecce9d3
Show file tree
Hide file tree
Showing 17 changed files with 167 additions and 358 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
java-version: 11

- name: Maven Build
run: mvn clean package -s installer/example-settings.xml
run: mvn clean install
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
server-password: MAVEN_PASSWORD

- name: Maven Deploy
run: mvn --batch-mode deploy -Pskip
run: mvn --batch-mode deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
java-version: 11

- name: Maven Build
run: mvn clean package -s installer/example-settings.xml
run: mvn clean install

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
Expand Down
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
FROM tomcat:9-jdk11-openjdk

ARG SOLR_URL=http://localhost:8983/solr/vivocore
ARG VIVO_DIR=/usr/local/vivo/home
ARG VIVO_DIR=/opt/vivo/home
ARG TDB_FILE_MODE=direct

ENV SOLR_URL=${SOLR_URL}
ENV JAVA_OPTS="${JAVA_OPTS} -Dtdb:fileMode=$TDB_FILE_MODE"
ENV JAVA_OPTS="${JAVA_OPTS} -Dvivo-dir=$VIVO_DIR -Dtdb:fileMode=$TDB_FILE_MODE"

RUN mkdir /usr/local/vivo
RUN mkdir /usr/local/vivo/home
RUN mkdir /opt/vivo
RUN mkdir /opt/vivo/home

COPY ./installer/home/target/vivo /vivo-home
COPY ./installer/webapp/target/vivo.war /usr/local/tomcat/webapps/ROOT.war

COPY ./home/src/main/resources/config/default.applicationSetup.n3 /applicationSetup.n3
COPY ./home/src/main/resources/config/default.runtime.properties /runtime.properties

COPY start.sh /start.sh

EXPOSE 8080
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ RESET_CORE=false
```

- `LOCAL_VIVO_HOME`: VIVO home directory on your host machine which will mount to volume in docker container.
- `RESET_HOME`: Convinience to reset VIVO home when starting container. **Caution**, will delete local configuration, content, and configuration model.
- `RESET_CORE`: Convinience to reset VIVO Solr core when starting container. **Caution**, will require complete reindex.
- `RESET_HOME`: Convinience to reset VIVO home when starting container. **Caution** will delete local configuration, content, and configuration model.
- `RESET_CORE`: Convinience to reset VIVO Solr core when starting container. **Caution** will require complete reindex.

Build and start VIVO.

```
mvn clean package -s installer/example-settings.xml
mvn clean install
docker-compose up
```

Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
context: ./
dockerfile: Dockerfile
args:
- VIVO_DIR=/usr/local/vivo/home
- VIVO_DIR=/opt/vivo/home
- TDB_FILE_MODE=direct
- SOLR_URL=http://solr:8983/solr/vivocore
environment:
Expand All @@ -28,7 +28,7 @@ services:
ports:
- 8080:8080
volumes:
- ${LOCAL_VIVO_HOME}:/usr/local/vivo/home
- ${LOCAL_VIVO_HOME}:/opt/vivo/home
networks:
- vivo

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,6 @@
# BASIC PROPERTIES
# -----------------------------------------------------------------------------

#
# This namespace will be used when generating URIs for objects created in the
# editor. In order to serve linked data, the default namespace must be composed
# as follows (optional elements in parentheses):
#
# scheme + server_name (+ port) (+ servlet_context) + "/individual/"
#
# For example, Cornell's default namespace is:
#
# http://vivo.cornell.edu/individual/
#
Vitro.defaultNamespace = http://vivo.mydomain.edu/individual/

#
# The email address of the root user for the VIVO application. The password
# for this user is initially set to "rootPassword", but you will be asked to
# change the password the first time you log in.
#
rootUser.emailAddress = vivo_root@mydomain.edu

#
# Argon2 password hashing parameters for time, memory and parallelism required to
# compute a hash.
Expand Down
21 changes: 0 additions & 21 deletions installer/example-settings.xml

This file was deleted.

110 changes: 13 additions & 97 deletions installer/home/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,108 +23,24 @@
<default-theme>wilma</default-theme>
</properties>

<profiles>
<profile>
<id>package</id>
<activation>
<property><name>vivo-dir</name></property>
</activation>
<build>
<finalName>${app-name}</finalName>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/main/assembly/home.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>install</id>
<activation>
<property><name>vivo-dir</name></property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/main/assembly/home.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>remove-webapp</id>
<phase>verify</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<delete dir="${vivo-dir}/rdf" />
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>install</id>
<phase>install</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${vivo-dir}</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}/${project.build.finalName}</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<skip>true</skip>
<descriptors>
<descriptor>src/main/assembly/home.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
1 change: 1 addition & 0 deletions installer/home/src/main/assembly/home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<id>home</id>
<formats>
<format>dir</format>
<format>tar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
Expand Down
66 changes: 0 additions & 66 deletions installer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
Expand Down Expand Up @@ -148,12 +142,6 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
Expand All @@ -177,60 +165,6 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<executions>
<execution>
<id>default-war</id>
<phase/>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>install</id>
<activation>
<property><name>vivo-dir</name></property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-properties</id>
<phase>validate</phase>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>app-name</property>
<message>You must provide an application name (app-name)</message>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>skip</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
Expand Down

0 comments on commit ecce9d3

Please sign in to comment.