add support for HA IT testing

This commit is contained in:
Brian Long 2024-08-15 18:14:27 -04:00
parent 6c3d5ebf52
commit 0807afbcf9
5 changed files with 119 additions and 2 deletions

View File

@ -48,6 +48,7 @@ The following properties are intended to be exposed by inheriting Public API Mav
| Maven Property | Required | Default | Description |
| -------------------------- |:--------:| --------------- | ----------- |
| `acs-platform.port` | | 8080 | The port to expose on `localhost` for scripts to use during integration testing to verify the state of the application; not for a developer or user. |
| `acs-platform-ha.port` | | 8081 | The port to expose on `localhost` for scripts to use during integration testing to verify the state of the application; not for a developer or user. |
| `acs-postgres.port` | | 5432 | The port to expose on `localhost` for scripts to use during integration testing to verify the state of the application; not for a developer or user. |
| `acs-activemq.port` | | 8161 | The port to expose on `localhost` for scripts to use during integration testing to verify the state of the application; not for a developer or user. |
| `acs-platform.tomcat.opts` | | | Additional `CATALINA_OPTS` to add to the Apache Tomcat startup.<br/>*May be overridden by any POM parent or Maven Tile.* |
@ -67,6 +68,7 @@ The following properties are only intended to be defined by BeeDK components.
| `beedk.deploy.platform.testClassesDirectory` | | | An additional test classpath directory to sideload into the web application. |
| `beedk.deploy.platform.extDirectory` | | | An additional directory of JARs to sideload into the web application. |
| `beedk.deploy.platform.dataDirectory` | | `${project.build.directory}/alf_data` | The temporary binary storage location for ACS. |
| `beedk.deploy.acs-ha.enabled` | | false | Start an additional instance of the ACS platform for cluster-related testing. |
| `beedk.deploy.acs-search.enabled` | | false | **Do not** set explicitly; just include the [`beedk-acs-search-it-tile`](/inteligr8/ootbee-beedk/src/stable/beedk-acs-search-it-tile) tile **AFTER** this tile. |
| `beedk.deploy.alts.enabled` | | false | **Do not** set explicitly; just include the [`beedk-acs-lts-it-tile`](/inteligr8/ootbee-beedk/src/stable/beedk-acs-lts-it-tile) tile **AFTER** this tile. |
| `beedk.deploy.ats.enabled` | | false | **Do not** set explicitly; just include the [`beedk-ats-it-tile`](/inteligr8/ootbee-beedk/src/stable/beedk-ats-it-tile) tile **AFTER** this tile. |

View File

@ -31,6 +31,7 @@
<phase>pre-integration-test</phase>
<goals><goal>start</goal></goals>
<configuration>
<startParallel>true</startParallel>
<images>
<image>
<name>postgres:${acs-postgres.version}</name>
@ -115,6 +116,10 @@
<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>
@ -123,7 +128,8 @@
<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.testClassesDirectory}:/var/lib/tomcat/dev/classes: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>
@ -139,6 +145,77 @@
</wait>
</run>
</image>
<image>
<name>docker.inteligr8.com/inteligr8/tomcat-rad:${tomcat-rad.version}</name>
<alias>acs-platform-ha</alias>
<run>
<skip>false</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>
<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>
@ -151,15 +228,27 @@
<image>
<name>postgres:${acs-postgres.version}</name>
<alias>acs-db</alias>
<links>
<link>acs-platform</link>
<link>acs-platform-ha</link>
</links>
</image>
<image>
<name>apache/activemq-classic:${acs-activemq.version}</name>
<alias>acs-mq</alias>
<links>
<link>acs-platform</link>
<link>acs-platform-ha</link>
</links>
</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>
@ -169,6 +258,28 @@
</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>
@ -236,6 +347,7 @@
</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>
@ -248,6 +360,7 @@
<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>

View File

@ -156,6 +156,7 @@
-Dsolr.host=${project.artifactId}-acs-search \
-Dsolr.secureComms=secret \
-Dsolr.sharedSecret=alfresco-secret \
-Dcsrf.filter.enabled=false \
${acs-platform.tomcat.opts}</CATALINA_OPTS>
</env>
<ports>

View File

@ -103,6 +103,7 @@
<!-- configuring beedk-acs-platform-it-tile -->
<beedk.deploy.platform.warFile>${project.build.warFile}</beedk.deploy.platform.warFile>
<beedk.deploy.platform.classesDirectory>${project.build.outputDirectory}</beedk.deploy.platform.classesDirectory>
<beedk.deploy.platform.testClassesDirectory>${project.build.testOutputDirectory}</beedk.deploy.platform.testClassesDirectory>
<beedk.deploy.platform.extDirectory>${project.build.extDirectory}</beedk.deploy.platform.extDirectory>

View File

@ -43,7 +43,7 @@
</activation>
<properties>
<!-- versions -->
<beedk.plugins.fabric8.docker.version>0.34.1</beedk.plugins.fabric8.docker.version>
<beedk.plugins.fabric8.docker.version>0.45.0</beedk.plugins.fabric8.docker.version>
</properties>
</profile>
</profiles>