Skip to content

Commit 0fd438d

Browse files
committed
first commit
1 parent 0e52bd0 commit 0fd438d

File tree

12 files changed

+1211
-2
lines changed

12 files changed

+1211
-2
lines changed

Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM alfresco/process-services:1.11.0
2+
3+
ARG TOMCAT_DIR=/usr/local/tomcat
4+
5+
USER root
6+
7+
#Uncomment the following lines for deploying extensions
8+
#RUN rm -rf $TOMCAT_DIR/webapps/activiti-app
9+
#COPY extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/webapps/activiti-app/WEB-INF/lib
10+
#COPY extensions/activiti-app.war $TOMCAT_DIR/webapps
11+
12+
COPY logging/logback.xml $TOMCAT_DIR/lib
13+
14+
COPY properties/activiti-app.properties $TOMCAT_DIR/lib
15+
16+
COPY activiti-license/*.* $TOMCAT_DIR/lib/

Dockerfile-admin

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM alfresco/process-services-admin:1.11.0
2+
3+
ARG TOMCAT_DIR=/usr/local/tomcat
4+
5+
USER root
6+
7+
COPY properties/activiti-admin.properties $TOMCAT_DIR/lib
8+
COPY admin/tomcat/conf/server.xml $TOMCAT_DIR/conf

README.md

Lines changed: 106 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,106 @@
1-
# alfresco-process-services-docker-deployment
2-
Docker Compose template for deploying the Alfresco Process Services Platform
1+
# Alfresco Process Services Docker Deployment
2+
Docker Compose template for deploying the Alfresco Process Services Platform.
3+
4+
The goal of this project is to help system administrators to manage a APS infrastructure deployed with Docker where they also need to configure parameters or install extensions.
5+
For developers interested to build extensions please see the [Alfresco Process Services SDK](https://github.com/OpenPj/alfresco-process-services-project-sdk):
6+
7+
The architecture template will deploy for you the following components:
8+
9+
* activiti-app 1.11.0
10+
* activiti-admin 1.11.0
11+
* ElasticSearch 7.6.0
12+
* PostgreSQL 10.9
13+
14+
Each component will have its own Docker Volume for managing the storage:
15+
16+
* aps-db-volume
17+
* aps-admin-db-volume
18+
* aps-contentstore-volume
19+
* aps-es-volume
20+
21+
The provided run script will create these volumes for you.
22+
23+
24+
# Getting started
25+
26+
Use these instructions to get started with deploying your Alfresco Process Services Platform with Docker
27+
28+
## Prerequisites
29+
30+
Before using this project you have to configure the following components:
31+
* Docker - Latest stable version
32+
* A valid APS license
33+
34+
### Docker
35+
36+
1. Download and install [Docker](https://docs.docker.com/install/)
37+
38+
2. Verify the installation of Docker:
39+
40+
```
41+
$ docker -v
42+
Docker version 19.03.8, build afacb8b
43+
```
44+
45+
3. Docker Compose is included as part of Windows and Mac Docker installers.
46+
For Linux-based users, install both the component separately with the following:
47+
48+
* [Install Docker Engine](https://docs.docker.com/engine/install/)
49+
* [Install Docker Compose](https://docs.docker.com/compose/install/)
50+
51+
4. Verify the installation of Docker Compose
52+
53+
```
54+
$ docker-compose -v
55+
docker-compose version 1.25.5, build 8a1c60f6
56+
```
57+
58+
### APS Valid License
59+
60+
Put your license in the activiti-license folder.
61+
62+
## Configuration
63+
64+
The structure of the project allows you to configure and install extensions against the APS platform as the following:
65+
66+
* admin/tomcat/conf: put here all the Tomcat configuration files
67+
* logging: change your logging strategy here using logback.xml
68+
* properties: change here your activiti-app and activiti-admin properties
69+
* activiti-license: put here your valid APS license
70+
* docker-compose.yml: change here your deployment structure
71+
* Dockerfile: change here your container build for activiti-app
72+
* Dockerfile-admin: change here your continer build for activiti-admin
73+
* extensions: put here your extensions (JARs or activiti-app.war)
74+
75+
For more informations about how to build extensions please see [Alfresco Process Services SDK](https://github.com/OpenPj/alfresco-process-services-project-sdk).
76+
77+
## Deploying your containers
78+
79+
A run script is provided in two formats:
80+
81+
* run.sh for Linux and Mac users
82+
* run.bat for Windows users
83+
84+
Run the following command to deploy:
85+
86+
```
87+
./run.sh start
88+
```
89+
90+
Stop with:
91+
92+
```
93+
./run.sh stop
94+
```
95+
96+
Purge Docker volumes with:
97+
98+
```
99+
./run.sh purge
100+
```
101+
102+
Return in tail with:
103+
104+
```
105+
./run.sh tail
106+
```

activiti-license/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# License
2+
3+
Put here your APS license file (activiti.lic)

admin/tomcat/conf/server.xml

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one or more
4+
contributor license agreements. See the NOTICE file distributed with
5+
this work for additional information regarding copyright ownership.
6+
The ASF licenses this file to You under the Apache License, Version 2.0
7+
(the "License"); you may not use this file except in compliance with
8+
the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
-->
18+
<!-- Note: A "Server" is not itself a "Container", so you may not
19+
define subcomponents such as "Valves" at this level.
20+
Documentation at /docs/config/server.html
21+
-->
22+
<Server port="9005" shutdown="SHUTDOWN">
23+
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
24+
<!-- Security listener. Documentation at /docs/config/listeners.html
25+
<Listener className="org.apache.catalina.security.SecurityListener" />
26+
-->
27+
<!--APR library loader. Documentation at /docs/apr.html -->
28+
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
29+
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
30+
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
31+
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
32+
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
33+
34+
<!-- Global JNDI resources
35+
Documentation at /docs/jndi-resources-howto.html
36+
-->
37+
<GlobalNamingResources>
38+
<!-- Editable user database that can also be used by
39+
UserDatabaseRealm to authenticate users
40+
-->
41+
<Resource name="UserDatabase" auth="Container"
42+
type="org.apache.catalina.UserDatabase"
43+
description="User database that can be updated and saved"
44+
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
45+
pathname="conf/tomcat-users.xml" />
46+
</GlobalNamingResources>
47+
48+
<!-- A "Service" is a collection of one or more "Connectors" that share
49+
a single "Container" Note: A "Service" is not itself a "Container",
50+
so you may not define subcomponents such as "Valves" at this level.
51+
Documentation at /docs/config/service.html
52+
-->
53+
<Service name="Catalina">
54+
55+
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
56+
<!--
57+
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
58+
maxThreads="150" minSpareThreads="4"/>
59+
-->
60+
61+
62+
<!-- A "Connector" represents an endpoint by which requests are received
63+
and responses are returned. Documentation at :
64+
Java HTTP Connector: /docs/config/http.html
65+
Java AJP Connector: /docs/config/ajp.html
66+
APR (HTTP/AJP) Connector: /docs/apr.html
67+
Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
68+
-->
69+
<Connector port="9090" protocol="HTTP/1.1"
70+
Server=" "
71+
connectionTimeout="20000"
72+
redirectPort="9443" />
73+
<!-- A "Connector" using the shared thread pool-->
74+
<!--
75+
<Connector executor="tomcatThreadPool"
76+
port="8080" protocol="HTTP/1.1"
77+
connectionTimeout="20000"
78+
redirectPort="8443" />
79+
-->
80+
<!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
81+
This connector uses the NIO implementation. The default
82+
SSLImplementation will depend on the presence of the APR/native
83+
library and the useOpenSSL attribute of the
84+
AprLifecycleListener.
85+
Either JSSE or OpenSSL style configuration may be used regardless of
86+
the SSLImplementation selected. JSSE style configuration is used below.
87+
-->
88+
<!--
89+
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
90+
maxThreads="150" SSLEnabled="true">
91+
<SSLHostConfig>
92+
<Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
93+
type="RSA" />
94+
</SSLHostConfig>
95+
</Connector>
96+
-->
97+
<!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
98+
This connector uses the APR/native implementation which always uses
99+
OpenSSL for TLS.
100+
Either JSSE or OpenSSL style configuration may be used. OpenSSL style
101+
configuration is used below.
102+
-->
103+
<!--
104+
<Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
105+
maxThreads="150" SSLEnabled="true" >
106+
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
107+
<SSLHostConfig>
108+
<Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
109+
certificateFile="conf/localhost-rsa-cert.pem"
110+
certificateChainFile="conf/localhost-rsa-chain.pem"
111+
type="RSA" />
112+
</SSLHostConfig>
113+
</Connector>
114+
-->
115+
116+
<!-- Define an AJP 1.3 Connector on port 8009 -->
117+
<Connector port="9009" protocol="AJP/1.3" redirectPort="9443" />
118+
119+
120+
<!-- An Engine represents the entry point (within Catalina) that processes
121+
every request. The Engine implementation for Tomcat stand alone
122+
analyzes the HTTP headers included with the request, and passes them
123+
on to the appropriate Host (virtual host).
124+
Documentation at /docs/config/engine.html -->
125+
126+
<!-- You should set jvmRoute to support load-balancing via AJP ie :
127+
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
128+
-->
129+
<Engine name="Catalina" defaultHost="localhost">
130+
131+
<!--For clustering, please take a look at documentation at:
132+
/docs/cluster-howto.html (simple how to)
133+
/docs/config/cluster.html (reference documentation) -->
134+
<!--
135+
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
136+
-->
137+
138+
<!-- Use the LockOutRealm to prevent attempts to guess user passwords
139+
via a brute-force attack -->
140+
<Realm className="org.apache.catalina.realm.LockOutRealm">
141+
<!-- This Realm uses the UserDatabase configured in the global JNDI
142+
resources under the key "UserDatabase". Any edits
143+
that are performed against this UserDatabase are immediately
144+
available for use by the Realm. -->
145+
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
146+
resourceName="UserDatabase"/>
147+
</Realm>
148+
149+
<Host name="localhost" appBase="webapps"
150+
unpackWARs="true" autoDeploy="true">
151+
152+
<!-- SingleSignOn valve, share authentication between web applications
153+
Documentation at: /docs/config/valve.html -->
154+
<!--
155+
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
156+
-->
157+
158+
<!-- Access log processes all example.
159+
Documentation at: /docs/config/valve.html
160+
Note: The pattern used is equivalent to using pattern="common" -->
161+
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
162+
prefix="localhost_access_log" suffix=".txt"
163+
pattern="%h %l %u %t &quot;%r&quot; %s %b" />
164+
165+
</Host>
166+
</Engine>
167+
</Service>
168+
</Server>

docker-compose.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
version: '3.8'
2+
services:
3+
process:
4+
build: .
5+
environment:
6+
JAVA_OPTS: " -Xms256m -Xmx1g"
7+
ports:
8+
- 8080:8080
9+
links:
10+
- postgres:postgres
11+
- elasticsearch:elasticsearch
12+
depends_on:
13+
- postgres
14+
- elasticsearch
15+
volumes:
16+
- aps-contentstore-volume:/act_data
17+
18+
process-admin:
19+
build:
20+
context: .
21+
dockerfile: Dockerfile-admin
22+
environment:
23+
JAVA_OPTS: " -Xms256m -Xmx512m"
24+
ports:
25+
- 9090:9090
26+
links:
27+
- postgres-admin:postgres-admin
28+
- process:process
29+
depends_on:
30+
- postgres-admin
31+
32+
elasticsearch:
33+
image: elasticsearch:7.6.0
34+
environment:
35+
discovery.type: single-node
36+
ES_JAVA_OPTS: -Xms512m -Xmx512m
37+
ports:
38+
- 9300:9300
39+
- 9200:9200
40+
volumes:
41+
- aps-es-volume:/usr/share/elasticsearch/data
42+
43+
postgres:
44+
image: postgres:10.9
45+
environment:
46+
POSTGRES_DB: activiti
47+
POSTGRES_USER: alfresco
48+
POSTGRES_PASSWORD: alfresco
49+
ports:
50+
- 5432:5432
51+
volumes:
52+
- aps-db-volume:/var/lib/postgresql/data
53+
54+
postgres-admin:
55+
image: postgres:10.9
56+
environment:
57+
POSTGRES_DB: activiti-admin
58+
POSTGRES_USER: alfresco
59+
POSTGRES_PASSWORD: alfresco
60+
ports:
61+
- 5433:5433
62+
expose:
63+
- "5433"
64+
volumes:
65+
- aps-admin-db-volume:/var/lib/postgresql/data
66+
command: -p 5433
67+
68+
volumes:
69+
aps-db-volume:
70+
external: true
71+
aps-admin-db-volume:
72+
external: true
73+
aps-contentstore-volume:
74+
external: true
75+
aps-es-volume:
76+
external: true

extensions/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Extensions
2+
3+
Put here your APS extensions (activiti-extensions.jar or activiti-app.war)

0 commit comments

Comments
 (0)