initial checkin

This commit is contained in:
2021-04-22 15:58:20 -04:00
commit a7fef4641b
278 changed files with 14028 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
# Eclipse
.project
.classpath
.settings
# Maven
pom.xml.versionsBackup
target

View File

@@ -0,0 +1,93 @@
# BeeDK Abstract ACS Platform Maven Tile for RAD
This is a component within the proposed [BeeDK](/inteligr8/ootbee-beedk). It is considered to be part of the **Private API** of the BeeDK.
## Purpose
This project creates a [Maven Tile](https://github.com/repaint-io/maven-tiles) that provides the basis for rapid application development of any ACS module, extension, service, or web application. It is intended to be used by other BeeDK components and not directly by any development project.
## Usage
To use this plugin, just reference it with the Maven Tiles plugin as shown in the following snippet. Do not forget the `extensions` element in the *plugin* configuration.
```xml
<project ...>
...
<build>
...
<plugins>
<plugin>
<groupId>io.repaint.maven</groupId>
<artifactId>tiles-maven-plugin</artifactId>
<version>[2.0,3.0)</version>
<extensions>true</extensions>
<configuration>
<tiles>
...
<!-- Documentation: https://bitbucket.org/inteligr8/ootbee-beedk/src/stable/beedk-acs-platform-rad-tile -->
<tile>com.inteligr8.ootbee:beedk-acs-platform-rad-tile:[1.0.0,2.0.0)</tile>
</tiles>
</configuration>
</plugin>
...
</plugins>
...
</build>
...
</project>
```
See the [BeeDK documentation](/inteligr8/ootbee-beedk) on instructions for how to start and stop RAD capabilities.
## Configuration
In your Maven project, set the following properties to define the behavior of this Maven Tile. Unless otherwise stated, they can only be overridden in the project POM or other Maven Tiles loaded earlier than this Maven Tile.
### Public API
The following properties are intended to be exposed by inheriting Public API Maven Tiles.
| Maven Property | Required | Default | Description |
| -------------------------- |:--------:| --------------- | ----------- |
| `acs-platform.port` | | 8080 | The port to expose on `localhost` for the developer; not for other applications or users. |
| `acs-postgres.port` | | 5432 | The port to expose on `localhost` for the developer; not for other applications or users. |
| `acs-activemq.port` | | 8161 | The port to expose on `localhost` for the developer; not for other applications or users. |
| `acs-platform.debugger.port` | | 8000 | The port to expose on `localhost` for the developer; not for other applications or users. |
| `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.* |
| `acs-platform.timeout` | | 120000 | The time to wait for the startup to complete, in milliseconds. |
| `tomcat-rad.version` | | *not important* | The version of the [Apache Tomcat Rapid Application Development Docker container](/inteligr8/tomcat-rad-docker). |
| `acs-postgres.version` | | *not important* | The version of PostgreSQL to use in the integration testing infrastructure. |
| `acs-activemq.version` | | *not important* | The version of Alfresco ActiveMQ to use in the integration testing infrastructure. |
| `acs-api-explorer.war.groupId` | | `org.alfresco` | The API Explorer WAR Maven Group ID. |
| `acs-api-explorer.war.artifactId` | | `api-explorer` | The API Explorer WAR Maven Artifact ID. |
| `acs-api-explorer.war.version` | | `${acs-api-explorer.version}` | The API Explorer WAR Maven version. See the [Alfresco Maven Repository](https://artifacts.alfresco.com/nexus/content/groups/public/org/alfresco/api-explorer/) for details on available versions. |
| `acs-aos.war.version` | | `1.3.2.1` | The Alfresco Office Services WAR Maven version. See the [Alfresco Maven Repository](https://artifacts.alfresco.com/nexus/content/groups/public/org/alfresco/aos-module/alfresco-vti-bin/) for details on available versions. |
### Private API
The following properties are only intended to be defined by BeeDK components.
| Maven Property | Required | Default | Description |
| ------------------------------------ |:--------:| ------------------ | ----------- |
| `beedk.deploy.platform.warFile` | **Yes** | | The WAR file to deploy in the Apache Tomcat instance. |
| `beedk.deploy.platform.classesDirectory` | | | An additional classpath directory to sideload into the web application. |
| `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.webDirectory` | | | An additional directory of web resources to sideload in the web application. |
| `beedk.deploy.platform.warDirectory` | | `${project.build.warDirectory}` | A build directory for WAR files. |
| `beedk.deploy.platform.dataDirectory` | | `${project.build.directory}/alf_data` | The temporary binary storage location for ACS. |
| `beedk.deploy.api-explorer.warFile` | | *Not important* | The API Explorer WAR file to deploy in the Apache Tomcat instance. |
| `beedk.rad.acs-search.enabled` | | false | **Do not** set explicitly; just include the [`beedk-acs-search-rad-tile`](/inteligr8/ootbee-beedk/src/stable/beedk-acs-search-rad-tile) tile **AFTER** this tile. |
| `beedk.rad.alts.enabled` | | false | **Do not** set explicitly; just include the [`beedk-acs-lts-rad-tile`](/inteligr8/ootbee-beedk/src/stable/beedk-acs-lts-rad-tile) tile **AFTER** this tile. |
| `beedk.rad.ats.enabled` | | false | **Do not** set explicitly; just include the [`beedk-ats-rad-tile`](/inteligr8/ootbee-beedk/src/stable/beedk-ats-rad-tile) tile **AFTER** this tile. |
| `acs-api-explorer.version` | | `6.2.0` | The API Explorer version. You could use `${alfresco.platform.version}` in ACS Enterprise. This will eventually parse the ACS Platform version for the right value. |
### Other APIs
Additional less important configurations are inherited from the following Maven Tiles.
* [`beedk-run-tile`](/inteligr8/ootbee-beedk/src/stable/beedk-run-tile)
## Results
The ACS Platform, database, and MQ components will be started during the `process-classes` Maven phase.

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.inteligr8.ootbee</groupId>
<artifactId>beedk-acs-platform-rad-tile</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>tile</packaging>
<name>Order of the Bee Development Kit: RAD for ACS Platform Core</name>
<scm>
<url>https://bitbucket.org/inteligr8/ootbee-beedk</url>
</scm>
<organization>
<name>Order of the Bee</name>
<url>https://orderofthebee.net</url>
</organization>
<developers>
<developer>
<name>Brian Long</name>
<email>brian@inteligr8.com</email>
<organization>Inteligr8</organization>
<organizationUrl>https://www.inteligr8.com</organizationUrl>
<url>https://twitter.com/brianmlong</url>
</developer>
</developers>
<build>
<plugins>
<plugin>
<groupId>io.repaint.maven</groupId>
<artifactId>tiles-maven-plugin</artifactId>
<version>2.20</version>
<extensions>true</extensions>
<configuration>
<tiles>
<tile>com.inteligr8:maven-public-deploy-tile:[1.0.0,2.0.0)</tile>
</tiles>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,260 @@
<?xml version="1.0" encoding="UTF-8"?>
<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://bitbucket.org/inteligr8/maven-tiles/raw/xsd/src/main/resources/maven-tiles.xsd">
<profiles>
<profile>
<id>rad-acs-platform</id>
<activation>
<property>
<name>rad</name>
</property>
</activation>
<build>
<plugins>
<!-- This plugin downloads ancillary WARs -->
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
<executions>
<!-- This execution downloads the API Explorer WAR -->
<execution>
<id>download-api-explorer-webapp</id>
<phase>generate-resources</phase>
<goals><goal>copy</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${acs-api-explorer.war.groupId}</groupId>
<artifactId>${acs-api-explorer.war.artifactId}</artifactId>
<version>${acs-api-explorer.war.version}</version>
<type>war</type>
</artifactItem>
</artifactItems>
<outputDirectory>${beedk.deploy.platform.warDirectory}</outputDirectory>
</configuration>
</execution>
<!-- This execution downloads the AOS WAR -->
<execution>
<id>download-aos-webapp</id>
<phase>generate-resources</phase>
<goals><goal>copy</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.alfresco.aos-module</groupId>
<artifactId>alfresco-vti-bin</artifactId>
<version>${acs-aos.war.version}</version>
<type>war</type>
</artifactItem>
</artifactItems>
<outputDirectory>${beedk.deploy.platform.warDirectory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- 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>run-acs-platform</id>
<phase>process-classes</phase>
<goals><goal>start</goal></goals>
<configuration>
<images>
<image>
<name>postgres:${acs-postgres.version}</name>
<alias>acs-db</alias>
<run>
<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>alfresco/alfresco-activemq:${acs-activemq.version}</name>
<alias>acs-mq</alias>
<run>
<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>
<env>
<JAVA_MEMORY_MAX>${acs-platform.memory}</JAVA_MEMORY_MAX>
<CATALINA_OPTS>-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 \
-Dtransform.service.enabled=${beedk.rad.ats.enabled} -Dtransform.service.url=http://${project.artifactId}-ats-atr:8095 -Dsfs.url=http://${project.artifactId}-ats-sfs:8099 \
-Dlocal.transform.service.enabled=${beedk.rad.alts.enabled} \
-DlocalTransform.core-aio.url=http://${project.artifactId}-ate-aio:8090 -DlocalTransform.ate.url=http://${project.artifactId}-ate:8090 \
-Djodconverter.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.rad.platform.index} -Dsolr.host=${project.artifactId}-acs-search -Dsolr.secureComms=none \
${acs-platform.tomcat.opts}</CATALINA_OPTS>
</env>
<ports>
<port>${acs-platform.port}:8080</port>
<port>${acs-platform.debugger.port}:8000</port>
</ports>
<network>
<mode>custom</mode>
<name>${project.artifactId}</name>
</network>
<volumes>
<bind>
<volume>${beedk.deploy.platform.warFile}:/var/lib/tomcat/webapps/alfresco.war:ro</volume>
<volume>${beedk.deploy.api-explorer.warFile}:/var/lib/tomcat/webapps/api-explorer.war:ro</volume>
<volume>${beedk.deploy.aos.warFile}:/var/lib/tomcat/webapps/_vti_bin.war:ro</volume>
<volume>${beedk.deploy.platform.classesDirectory}:/var/lib/tomcat/dev/classes:ro</volume>
<volume>${beedk.deploy.platform.modClassesDirectory}:/var/lib/tomcat/dev/classes-extra1:ro</volume>
<volume>${beedk.deploy.platform.extClassesDirectory}:/var/lib/tomcat/dev/classes-extra2:ro</volume>
<volume>${beedk.deploy.platform.testClassesDirectory}:/var/lib/tomcat/dev/classes-extra3:ro</volume>
<volume>${beedk.deploy.platform.extDirectory}:/var/lib/tomcat/dev/lib:ro</volume>
<volume>${beedk.deploy.platform.webDirectory}:/var/lib/tomcat/dev/web:ro</volume>
<volume>${beedk.deploy.platform.dataDirectory}:/tmp/alf_data:rw</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>
</images>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>acs-search-disabled</id>
<activation>
<property>
<name>!beedk.rad.acs-search.enabled</name>
</property>
</activation>
<properties>
<beedk.rad.platform.index>noindex</beedk.rad.platform.index>
</properties>
</profile>
<profile>
<id>acs-search-enabled</id>
<activation>
<property>
<name>beedk.rad.acs-search.enabled</name>
</property>
</activation>
<properties>
<beedk.rad.platform.index>solr6</beedk.rad.platform.index>
</properties>
</profile>
<!-- allow downstream tiles to default this before this tile does -->
<profile>
<id>ats-unspecified</id>
<activation>
<property>
<name>!beedk.rad.ats.enabled</name>
</property>
</activation>
<properties>
<beedk.rad.ats.enabled>false</beedk.rad.ats.enabled>
</properties>
</profile>
<!-- allow downstream tiles to default this before this tile does -->
<profile>
<id>alts-unspecified</id>
<activation>
<property>
<name>!beedk.rad.alts.enabled</name>
</property>
</activation>
<properties>
<beedk.rad.alts.enabled>false</beedk.rad.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.modClassesDirectory>${project.build.directory}/doesnotexist</beedk.deploy.platform.modClassesDirectory>
<beedk.deploy.platform.extClassesDirectory>${project.build.directory}/doesnotexist</beedk.deploy.platform.extClassesDirectory>
<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.webDirectory>${project.build.directory}/doesnotexist</beedk.deploy.platform.webDirectory>
<beedk.deploy.platform.dataDirectory>${project.build.directory}/alf_data</beedk.deploy.platform.dataDirectory>
<beedk.deploy.platform.warDirectory>${project.build.warDirectory}</beedk.deploy.platform.warDirectory>
<acs-platform.timeout>150000</acs-platform.timeout>
<acs-platform.memory>1g</acs-platform.memory>
<acs-api-explorer.war.groupId>org.alfresco</acs-api-explorer.war.groupId>
<acs-api-explorer.war.artifactId>api-explorer</acs-api-explorer.war.artifactId>
<acs-api-explorer.war.version>${acs-api-explorer.version}</acs-api-explorer.war.version>
<beedk.deploy.api-explorer.warFile>${beedk.deploy.platform.warDirectory}/${acs-api-explorer.war.artifactId}-${acs-api-explorer.war.version}.war</beedk.deploy.api-explorer.warFile>
<beedk.deploy.aos.warFile>${beedk.deploy.platform.warDirectory}/alfresco-vti-bin-${acs-aos.war.version}.war</beedk.deploy.aos.warFile>
<!-- ports -->
<acs-postgres.port>5432</acs-postgres.port>
<acs-activemq.port>8161</acs-activemq.port>
<acs-platform.port>8080</acs-platform.port>
<acs-platform.debugger.port>8000</acs-platform.debugger.port>
<!-- versions -->
<acs-api-explorer.version>6.2.0</acs-api-explorer.version> <!-- TODO use and parse alfresco.platform.version -->
<acs-aos.war.version>1.3.2.1</acs-aos.war.version>
<acs-postgres.version>9.6</acs-postgres.version>
<acs-activemq.version>5.15.8</acs-activemq.version>
<tomcat-rad.version>9-1.3</tomcat-rad.version>
</properties>
</profile>
</profiles>
<tiles>
<!-- Documentation: https://bitbucket.org/inteligr8/ootbee-beedk/src/stable/beedk-run-tile -->
<tile>com.inteligr8.ootbee:beedk-run-tile:1.0-SNAPSHOT</tile>
</tiles>
</project>