377 lines
15 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <https://www.gnu.org/licenses/>.
*
-->
<project xmlns="http://tiles.bluetrainsoftware.com/maven/tiles/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tiles.bluetrainsoftware.com/maven/tiles/1.1.0 https://git.inteligr8.com/inteligr8/maven-tiles/raw/xsd/src/main/resources/maven-tiles.xsd">
<build>
<plugins>
<!-- Using Docker to host the web application -->
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${beedk.plugins.fabric8.docker.version}</version>
<executions>
<execution>
<id>start-acs-platform</id>
<phase>pre-integration-test</phase>
<goals><goal>start</goal></goals>
<configuration>
<startParallel>true</startParallel>
<images>
<image>
<name>postgres:${acs-postgres.version}</name>
<alias>acs-db</alias>
<run>
<skip>${skipTests}</skip>
<env>
<POSTGRES_PASSWORD>alfresco</POSTGRES_PASSWORD>
<POSTGRES_USER>alfresco</POSTGRES_USER>
<POSTGRES_DB>alfresco</POSTGRES_DB>
</env>
<ports>
<port>${acs-postgres.port}:5432</port>
</ports>
<network>
<mode>custom</mode>
<name>${project.artifactId}</name>
</network>
</run>
</image>
<image>
<name>apache/activemq-classic:${acs-activemq.version}</name>
<alias>acs-mq</alias>
<run>
<skip>${skipTests}</skip>
<env>
<ACTIVEMQ_WEBCONSOLE_USE_DEFAULT_ADDRESS>false</ACTIVEMQ_WEBCONSOLE_USE_DEFAULT_ADDRESS>
<ACTIVEMQ_USERNAME>alfresco</ACTIVEMQ_USERNAME>
<ACTIVEMQ_PASSWORD>alfresco</ACTIVEMQ_PASSWORD>
<ACTIVEMQ_WEBADMIN_USERNAME>admin</ACTIVEMQ_WEBADMIN_USERNAME>
<ACTIVEMQ_WEBADMIN_PASSWORD>admin</ACTIVEMQ_WEBADMIN_PASSWORD>
</env>
<ports>
<port>${acs-activemq.port}:8161</port>
</ports>
<network>
<mode>custom</mode>
<name>${project.artifactId}</name>
</network>
</run>
</image>
<image>
<name>docker.inteligr8.com/inteligr8/tomcat-rad:${tomcat-rad.version}</name>
<alias>acs-platform</alias>
<run>
<skip>${skipTests}</skip>
<env>
<JAVA_MEMORY_MAX>${acs-platform.memory}</JAVA_MEMORY_MAX>
<ENABLE_JDWP>false</ENABLE_JDWP>
<ENABLE_HOTSWAP>false</ENABLE_HOTSWAP>
<CATALINA_OPTS>--add-opens=java.base/java.net=ALL-UNNAMED \
-Dencryption.keystore.location=/tmp/metadata.keystore \
-Dmetadata-keystore.password=alfresco \
-Dmetadata-keystore.aliases=metadata \
-Dmetadata-keystore.metadata.password=alfresco \
-Dmetadata-keystore.metadata.algorithm=AES \
-Ddir.root=/tmp/alf_data \
-Ddb.driver=org.postgresql.Driver \
-Ddb.url=jdbc:postgresql://${project.artifactId}-acs-db:5432/alfresco \
-Dmessaging.broker.url=failover:\(tcp://${project.artifactId}-acs-mq:61616\)?timeout\=3000\&amp;jms.useCompression\=true \
-Dmessaging.broker.username=alfresco \
-Dmessaging.broker.password=alfresco \
-Dtransform.service.enabled=${beedk.deploy.ats.enabled} \
-Dtransform.service.url=http://${project.artifactId}-ats-atr:8095 \
-Dsfs.url=http://${project.artifactId}-ats-sfs:8099 \
-Dlocal.transform.service.enabled=${beedk.deploy.alts.enabled} \
-DlocalTransform.core-aio.url=http://${project.artifactId}-ate-aio:8090 \
-DlocalTransform.ate.url=http://${project.artifactId}-ate:8090 \
-Djodconverter.enabled=false \
-Dsystem.workflow.engine.activiti.enabled=false \
-Dalfresco-pdf-renderer.url=http://${project.artifactId}-ate-aio:8090 \
-Djodconverter.url=http://${project.artifactId}-ate-aio:8090 \
-Dimg.url=http://${project.artifactId}-ate-aio:8090 \
-Dtika.url=http://${project.artifactId}-ate-aio:8090 \
-Dtransform.misc.url=http://${project.artifactId}-ate-aio:8090 \
-Dindex.subsystem.name=${beedk.deploy.platform.index} \
-Dsolr.host=${project.artifactId}-acs-search \
-Dsolr.secureComms=secret \
-Dsolr.sharedSecret=alfresco-secret \
${acs-platform.tomcat.opts}</CATALINA_OPTS>
</env>
<ports>
<port>${acs-platform.port}:8080</port>
</ports>
<links>
<link>acs-db</link>
<link>acs-mq</link>
</links>
<network>
<mode>custom</mode>
<name>${project.artifactId}</name>
</network>
<extraHosts>
<host>host.docker.internal:host-gateway</host>
</extraHosts>
<volumes>
<bind>
<volume>${acs.license.directory}:/usr/local/tomcat/shared/classes/alfresco/extension/license:ro</volume>
<volume>${beedk.deploy.platform.warFile}:/var/lib/tomcat/webapps/alfresco.war:ro</volume>
<volume>${beedk.deploy.platform.classesDirectory}:/var/lib/tomcat/dev/classes:ro</volume>
<volume>${beedk.deploy.platform.testClassesDirectory}:/var/lib/tomcat/dev/classes-extra1:ro</volume>
<volume>${beedk.deploy.platform.extDirectory}:/var/lib/tomcat/dev/lib:ro</volume>
<volume>${beedk.deploy.platform.dataDirectory}:/tmp/alf_data:rw</volume>
<volume>${basedir}/metadata.keystore:/tmp/metadata.keystore:ro</volume>
</bind>
</volumes>
<wait>
<http>
<url>http://localhost:${acs-platform.port}/alfresco/service/api/server</url>
<method>GET</method>
<status>200..399</status>
</http>
<time>${acs-platform.timeout}</time>
</wait>
</run>
</image>
<image>
<name>docker.inteligr8.com/inteligr8/tomcat-rad:${tomcat-rad.version}</name>
<alias>acs-platform-ha</alias>
<run>
<skip>${beedk.deploy.acs-ha.skip}</skip>
<env>
<JAVA_MEMORY_MAX>${acs-platform.memory}</JAVA_MEMORY_MAX>
<ENABLE_JDWP>false</ENABLE_JDWP>
<ENABLE_HOTSWAP>false</ENABLE_HOTSWAP>
<CATALINA_OPTS>--add-opens=java.base/java.net=ALL-UNNAMED \
-Dencryption.keystore.location=/tmp/metadata.keystore \
-Dmetadata-keystore.password=alfresco \
-Dmetadata-keystore.aliases=metadata \
-Dmetadata-keystore.metadata.password=alfresco \
-Dmetadata-keystore.metadata.algorithm=AES \
-Ddir.root=/tmp/alf_data \
-Ddb.driver=org.postgresql.Driver \
-Ddb.url=jdbc:postgresql://${project.artifactId}-acs-db:5432/alfresco \
-Dmessaging.broker.url=failover:\(tcp://${project.artifactId}-acs-mq:61616\)?timeout\=3000\&amp;jms.useCompression\=true \
-Dmessaging.broker.username=alfresco \
-Dmessaging.broker.password=alfresco \
-Dtransform.service.enabled=${beedk.deploy.ats.enabled} \
-Dtransform.service.url=http://${project.artifactId}-ats-atr:8095 \
-Dsfs.url=http://${project.artifactId}-ats-sfs:8099 \
-Dlocal.transform.service.enabled=${beedk.deploy.alts.enabled} \
-DlocalTransform.core-aio.url=http://${project.artifactId}-ate-aio:8090 \
-DlocalTransform.ate.url=http://${project.artifactId}-ate:8090 \
-Djodconverter.enabled=false \
-Dsystem.workflow.engine.activiti.enabled=false \
-Dalfresco-pdf-renderer.url=http://${project.artifactId}-ate-aio:8090 \
-Djodconverter.url=http://${project.artifactId}-ate-aio:8090 \
-Dimg.url=http://${project.artifactId}-ate-aio:8090 \
-Dtika.url=http://${project.artifactId}-ate-aio:8090 \
-Dtransform.misc.url=http://${project.artifactId}-ate-aio:8090 \
-Dindex.subsystem.name=${beedk.deploy.platform.index} \
-Dsolr.host=${project.artifactId}-acs-search \
-Dsolr.secureComms=secret \
-Dsolr.sharedSecret=alfresco-secret \
${acs-platform-ha.tomcat.opts}</CATALINA_OPTS>
</env>
<ports>
<port>${acs-platform-ha.port}:8080</port>
</ports>
<links>
<link>acs-db</link>
<link>acs-mq</link>
</links>
<network>
<mode>custom</mode>
<name>${project.artifactId}</name>
</network>
<extraHosts>
<host>host.docker.internal:host-gateway</host>
</extraHosts>
<volumes>
<bind>
<volume>${acs.license.directory}:/usr/local/tomcat/shared/classes/alfresco/extension/license:ro</volume>
<volume>${beedk.deploy.platform.warFile}:/var/lib/tomcat/webapps/alfresco.war:ro</volume>
<volume>${beedk.deploy.platform.classesDirectory}:/var/lib/tomcat/dev/classes:ro</volume>
<volume>${beedk.deploy.platform.extDirectory}:/var/lib/tomcat/dev/lib:ro</volume>
<volume>${beedk.deploy.platform.dataDirectory}:/tmp/alf_data:rw</volume>
<volume>${basedir}/metadata.keystore:/tmp/metadata.keystore:ro</volume>
</bind>
</volumes>
<wait>
<http>
<url>http://localhost:${acs-platform-ha.port}/alfresco/service/api/server</url>
<method>GET</method>
<status>200..399</status>
</http>
<time>${acs-platform.timeout}</time>
</wait>
</run>
</image>
</images>
</configuration>
</execution>
<execution>
<id>stop-acs-platform</id>
<phase>post-integration-test</phase>
<goals><goal>stop</goal></goals>
<configuration>
<images>
<image>
<name>postgres:${acs-postgres.version}</name>
<alias>acs-db</alias>
</image>
<image>
<name>apache/activemq-classic:${acs-activemq.version}</name>
<alias>acs-mq</alias>
</image>
<image>
<name>docker.inteligr8.com/inteligr8/tomcat-rad:${tomcat-rad.version}</name>
<alias>acs-platform</alias>
</image>
<image>
<name>docker.inteligr8.com/inteligr8/tomcat-rad:${tomcat-rad.version}</name>
<alias>acs-platform-ha</alias>
</image>
</images>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>acs-ha-disabled</id>
<activation>
<property>
<name>!beedk.deploy.acs-ha.enabled</name>
</property>
</activation>
<properties>
<beedk.deploy.acs-ha.skip>true</beedk.deploy.acs-ha.skip>
</properties>
</profile>
<profile>
<id>acs-ha-enabled</id>
<activation>
<property>
<name>beedk.deploy.acs-ha.enabled</name>
</property>
</activation>
<properties>
<beedk.deploy.acs-ha.skip>${skipTests}</beedk.deploy.acs-ha.skip>
</properties>
</profile>
<profile>
<id>acs-search-disabled</id>
<activation>
<property>
<name>!beedk.deploy.acs-search.enabled</name>
</property>
</activation>
<properties>
<beedk.deploy.platform.index>noindex</beedk.deploy.platform.index>
</properties>
</profile>
<profile>
<id>acs-search-enabled</id>
<activation>
<property>
<name>beedk.deploy.acs-search.enabled</name>
</property>
</activation>
<properties>
<beedk.deploy.platform.index>solr6</beedk.deploy.platform.index>
</properties>
</profile>
<!-- allow downstream tiles to default this before this tile does -->
<profile>
<id>ats-unspecified</id>
<activation>
<property>
<name>!beedk.deploy.ats.enabled</name>
</property>
</activation>
<properties>
<beedk.deploy.ats.enabled>false</beedk.deploy.ats.enabled>
</properties>
</profile>
<!-- allow downstream tiles to default this before this tile does -->
<profile>
<id>alts-unspecified</id>
<activation>
<property>
<name>!beedk.deploy.alts.enabled</name>
</property>
</activation>
<properties>
<beedk.deploy.alts.enabled>false</beedk.deploy.alts.enabled>
</properties>
</profile>
<!-- allow downstream tiles to default this before this tile does -->
<profile>
<id>tomcat-opts-unspecified</id>
<activation>
<property>
<name>!acs-platform.tomcat.opts</name>
</property>
</activation>
<properties>
<acs-platform.tomcat.opts></acs-platform.tomcat.opts>
</properties>
</profile>
<profile>
<id>default-props</id>
<activation>
<property>
<name>!some-prop-that-never-exists</name>
</property>
</activation>
<properties>
<!-- configurable -->
<beedk.deploy.platform.classesDirectory>${project.build.directory}/doesnotexist</beedk.deploy.platform.classesDirectory>
<beedk.deploy.platform.testClassesDirectory>${project.build.directory}/doesnotexist</beedk.deploy.platform.testClassesDirectory>
<beedk.deploy.platform.extDirectory>${project.build.directory}/doesnotexist</beedk.deploy.platform.extDirectory>
<beedk.deploy.platform.dataDirectory>${project.build.directory}/alf_data</beedk.deploy.platform.dataDirectory>
<acs-platform.timeout>120000</acs-platform.timeout>
<acs-platform.memory>1g</acs-platform.memory>
<alfresco.license.directory>${user.home}/alfresco/license</alfresco.license.directory>
<acs.license.directory>${alfresco.license.directory}/acs</acs.license.directory>
<!-- ports -->
<acs-postgres.port>5432</acs-postgres.port>
<acs-activemq.port>8161</acs-activemq.port>
<acs-platform.port>8080</acs-platform.port>
<acs-platform-ha.port>8081</acs-platform-ha.port>
<!-- versions -->
<acs-postgres.version>12</acs-postgres.version>
<acs-activemq.version>5.18.4</acs-activemq.version>
<tomcat-rad.version>9-2.1</tomcat-rad.version>
</properties>
</profile>
</profiles>
<tiles>
<!-- Documentation: https://git.inteligr8.com/inteligr8/ootbee-beedk/src/branch/stable/beedk-run-tile -->
<tile>@project.groupId@:beedk-run-tile:@project.version@</tile>
</tiles>
</project>