├── README.md ├── docker-compose ├── README.md ├── ps-only │ └── docker-compose.yml ├── ps-postgres-es │ └── docker-compose.yml └── ps-postgres │ └── docker-compose.yml └── kubernetes ├── README.md ├── ps-only └── ps-only.yml ├── ps-postgres-es └── ps-postgres-es.yml └── ps-postgres └── ps-postgres.yml /README.md: -------------------------------------------------------------------------------- 1 | [![Join the chat at https://gitter.im/Alfresco/aps-docker-library](https://badges.gitter.im/Alfresco/aps-docker-library.svg)](https://gitter.im/Alfresco/aps-docker-library?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 2 | 3 | Process Services Docker Library 4 | ================================ 5 | 6 | A small collections of examples on how to use process services for development purposes. 7 | 8 | We aim to support 3 main environments: 9 | - Compose 10 | - [README](./docker-compose/README.md) 11 | - [Process Services only](./docker-compose/ps-only/docker-compose.yml) 12 | - [Process Services + Postgres](./docker-compose/ps-postgres/docker-compose.yml) 13 | - [Process Services + Postgres + ElasticSearch](./docker-compose/ps-postgres-es/docker-compose.yml) 14 | - Kubernetes 15 | - [README](./kubernetes/README.md) 16 | - [Process Services only](./kubernetes/ps-only/ps-only.yml) 17 | - [Process Services + Postgres](./kubernetes/ps-postgres/ps-postgres.yml) 18 | - [Process Services + Postgres + ElasticSearch](./kubernetes/ps-postgres-es/ps-postgres-es.yml) 19 | - ECS 20 | - TBD 21 | 22 | 23 | ## Configuration 24 | 25 | The system provides two-way support for importing your own configuration. 26 | 27 | ### Updating the default properties 28 | 29 | If you want to change the default admin account details or change details of the CORS, CSRF or database configuration, you can override the following environment variables in any orchestration system. 30 | 31 | - `ACTIVITI_LICENSE_MULTI_TENANT` 32 | - `ACTIVITI_DATASOURCE_URL` 33 | - `ACTIVITI_DATASOURCE_DRIVER` 34 | - `ACTIVITI_DATASOURCE_USERNAME` 35 | - `ACTIVITI_DATASOURCE_PASSWORD` 36 | - `ACTIVITI_HIBERNATE_DIALECT` 37 | - `ACTIVITI_ADMIN_EMAIL` 38 | - `ACTIVITI_ADMIN_PASSWORD_HASH` 39 | - `ACTIVITI_CORS_ENABLED` 40 | - `ACTIVITI_CORS_ALLOWED_ORIGINS` 41 | - `ACTIVITI_CORS_ALLOWED_METHODS` 42 | - `ACTIVITI_CORS_ALLOWED_HEADERS` 43 | - `ACTIVITI_CSRF_DISABLED` 44 | - `ACTIVITI_ES_SERVER_TYPE` 45 | - `ACTIVITI_ES_CLUSTER_NAME` 46 | - `ACTIVITI_ES_DISCOVERY_TYPE` 47 | - `ACTIVITI_ES_DISCOVERY_HOSTS` 48 | 49 | For better explanation on the role of those environment variables, please consult the PS Documentation 50 | 51 | ### Importing your own configuration 52 | 53 | If you have already a valid Process Services configuration file, you can specify it in the environment variables. To do this, first substitute the exiting variables with: 54 | 55 | - `EXTERNAL_PROPERTIES_FILE` 56 | 57 | and then specify the url of the properties file. 58 | 59 | **Note**: The url must be visible from the container environment. It will be provisioned to the container at start time. 60 | 61 | ### Example 62 | 63 | ``` 64 | environment: 65 | EXTERNAL_PROPERTIES_FILE: https://your-s3-bucket.com/activiti-app.properties 66 | ``` 67 | 68 | ## Warning 69 | 70 | The examples are provided purely as a means to show you how to orchestrate. 71 | We would not advise bringing them directly into a production environment. 72 | 73 | ## License and Authors 74 | 75 | Author: Alfresco DevOps Team (devops@alfresco.com) 76 | 77 | Copyright 2017, Alfresco 78 | 79 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 80 | 81 | http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 82 | -------------------------------------------------------------------------------- /docker-compose/README.md: -------------------------------------------------------------------------------- 1 | # Process Services Compose Examples 2 | 3 | As well as the Docker container source files, we provide 3 worked examples that demonstrate the use of this container in a more practical environment. 4 | 5 | - [Process Services only](./ps-only/docker-compose.yml) 6 | - [Process Services + Postgres](./ps-postgres/docker-compose.yml) 7 | - [Process Services + Postgres + ElasticSearch](./ps-postgres-es/docker-compose.yml) 8 | -------------------------------------------------------------------------------- /docker-compose/ps-only/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | services: 4 | process: 5 | image: alfresco/process-services:1.6.2 6 | environment: 7 | ACTIVITI_CSRF_DISABLED: 'true' 8 | ACTIVITI_CORS_ENABLED: 'true' 9 | #volumes: 10 | # - "~/.activiti/enterprise-license:/root/.activiti/enterprise-license/:ro" 11 | ports: 12 | - 9999:8080 13 | -------------------------------------------------------------------------------- /docker-compose/ps-postgres-es/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | services: 4 | process: 5 | image: alfresco/process-services:1.6.2 6 | environment: 7 | ACTIVITI_DATASOURCE_USERNAME: alfresco 8 | ACTIVITI_DATASOURCE_PASSWORD: alfresco 9 | ACTIVITI_DATASOURCE_DRIVER: org.postgresql.Driver 10 | ACTIVITI_HIBERNATE_DIALECT: org.hibernate.dialect.PostgreSQLDialect 11 | ACTIVITI_DATASOURCE_URL: 'jdbc:postgresql://postgres:5432/activiti?characterEncoding=UTF-8' 12 | ACTIVITI_CSRF_DISABLED: 'true' 13 | ACTIVITI_CORS_ENABLED: 'true' 14 | ACTIVITI_ES_SERVER_TYPE: client 15 | ACTIVITI_ES_DISCOVERY_HOSTS: elasticsearch:9300 16 | ACTIVITI_ES_CLUSTER_NAME: elasticsearch 17 | #volumes: 18 | # - "~/.activiti/enterprise-license:/root/.activiti/enterprise-license/:ro" 19 | ports: 20 | - 9999:8080 21 | links: 22 | - elasticsearch:elasticsearch 23 | - postgres:postgres 24 | depends_on: 25 | - elasticsearch 26 | - postgres 27 | 28 | elasticsearch: 29 | image: elasticsearch:1.7.3 30 | postgres: 31 | image: postgres:9.6.2 32 | environment: 33 | POSTGRES_DB: activiti 34 | POSTGRES_USER: alfresco 35 | POSTGRES_PASSWORD: alfresco 36 | -------------------------------------------------------------------------------- /docker-compose/ps-postgres/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | services: 4 | process: 5 | image: alfresco/process-services:1.6.2 6 | environment: 7 | ACTIVITI_DATASOURCE_USERNAME: alfresco 8 | ACTIVITI_DATASOURCE_PASSWORD: alfresco 9 | ACTIVITI_DATASOURCE_DRIVER: org.postgresql.Driver 10 | ACTIVITI_HIBERNATE_DIALECT: org.hibernate.dialect.PostgreSQLDialect 11 | ACTIVITI_DATASOURCE_URL: 'jdbc:postgresql://postgres:5432/activiti?characterEncoding=UTF-8' 12 | ACTIVITI_CSRF_DISABLED: 'true' 13 | ACTIVITI_CORS_ENABLED: 'true' 14 | #volumes: 15 | # - "~/.activiti/enterprise-license:/root/.activiti/enterprise-license/:ro" 16 | ports: 17 | - 9999:8080 18 | links: 19 | - postgres:postgres 20 | depends_on: 21 | - postgres 22 | postgres: 23 | image: postgres:9.6.2 24 | environment: 25 | POSTGRES_DB: activiti 26 | POSTGRES_USER: alfresco 27 | POSTGRES_PASSWORD: alfresco 28 | -------------------------------------------------------------------------------- /kubernetes/README.md: -------------------------------------------------------------------------------- 1 | # Process Services Kubernetes Library 2 | ================================ 3 | 4 | As well as the Docker container source files, we provide 3 worked examples that demonstrate the use of kubernetes in a more practical environment. 5 | 6 | - [Process Services only](./ps-only/ps-only.yml) 7 | - [Process Services + Postgres](./ps-postgres/ps-postgres.yml) 8 | - [Process Services + Postgres + ElasticSearch](./ps-postgres-es/ps-postgres-es.yml) 9 | 10 | ================================ 11 | 12 | ## Instructions: 13 | 14 | Create the ps-postgres stack pod 15 | 16 | kubectl create -f ./ps-postgres/ps-postgres.yml 17 | 18 | Expose ps-postgres pod 19 | 20 | kubectl expose deployment ps-postgres --name=process-services --type=LoadBalancer 21 | 22 | Check the url and port to access the Process Services 23 | 24 | kubectl describe service process-services 25 | 26 | Open browser at http://${IP}:${NodePort}/activiti-app and you will see the application 27 | 28 | ================================ 29 | 30 | ## Using Minikube 31 | 32 | If using [minukube](https://github.com/kubernetes/minikube), you will need to do the following before doing the example: 33 | 34 | minikube start 35 | 36 | Create the ps-postgres stack pod: 37 | 38 | kubectl create -f ./ps-postgres/ps-postgres.yml 39 | 40 | Expose ps-postgres pod: 41 | 42 | kubectl expose deployment ps-postgres --name=process-services --type=LoadBalancer 43 | 44 | Retrieve the url and port from minikube: 45 | 46 | minikube service process-services --url 47 | 48 | Open browser on the indicated url, adding `/activiti-app` at the end of the address 49 | -------------------------------------------------------------------------------- /kubernetes/ps-only/ps-only.yml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | name: ps-only 5 | spec: 6 | replicas: 1 7 | template: 8 | metadata: 9 | labels: 10 | app: ps-only 11 | spec: 12 | containers: 13 | - name: process-services 14 | env: 15 | - name: ACTIVITI_CORS_ENABLED 16 | value: 'true' 17 | - name: ACTIVITI_CSRF_DISABLED 18 | value: 'true' 19 | image: alfresco/process-services:1.6.2 20 | ports: 21 | - containerPort: 8080 22 | -------------------------------------------------------------------------------- /kubernetes/ps-postgres-es/ps-postgres-es.yml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | name: ps-postgres-es 5 | spec: 6 | replicas: 1 7 | template: 8 | metadata: 9 | labels: 10 | app: ps-postgres-es 11 | spec: 12 | containers: 13 | - name: postgres 14 | env: 15 | - name: POSTGRES_DB 16 | value: activiti 17 | - name: POSTGRES_USER 18 | value: alfresco 19 | - name: POSTGRES_PASSWORD 20 | value: alfresco 21 | image: postgres:9.6.2 22 | - name: elasticsearch 23 | image: elasticsearch:1.7.3 24 | - name: process-services 25 | env: 26 | - name: ACTIVITI_CORS_ENABLED 27 | value: 'true' 28 | - name: ACTIVITI_CSRF_DISABLED 29 | value: 'true' 30 | - name: ACTIVITI_DATASOURCE_PASSWORD 31 | value: alfresco 32 | - name: ACTIVITI_DATASOURCE_USERNAME 33 | value: alfresco 34 | - name: ACTIVITI_DATASOURCE_DRIVER 35 | value: org.postgresql.Driver 36 | - name: ACTIVITI_HIBERNATE_DIALECT 37 | value: org.hibernate.dialect.PostgreSQLDialect 38 | - name: ACTIVITI_DATASOURCE_URL 39 | value: 'jdbc:postgresql://127.0.0.1:5432/activiti?characterEncoding=UTF-8' 40 | - name: ACTIVITI_ES_SERVER_TYPE 41 | value: client 42 | - name: ACTIVITI_ES_DISCOVERY_HOSTS 43 | value: 127.0.0.1:9300 44 | - name: ACTIVITI_ES_CLUSTER_NAME 45 | value: elasticsearch 46 | image: alfresco/process-services:1.6.2 47 | ports: 48 | - containerPort: 8080 49 | -------------------------------------------------------------------------------- /kubernetes/ps-postgres/ps-postgres.yml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | name: ps-postgres 5 | spec: 6 | replicas: 1 7 | template: 8 | metadata: 9 | labels: 10 | app: ps-postgres 11 | spec: 12 | containers: 13 | - name: postgres 14 | env: 15 | - name: POSTGRES_DB 16 | value: activiti 17 | - name: POSTGRES_USER 18 | value: alfresco 19 | - name: POSTGRES_PASSWORD 20 | value: alfresco 21 | image: postgres:9.6.2 22 | - name: process-services 23 | env: 24 | - name: ACTIVITI_CORS_ENABLED 25 | value: 'true' 26 | - name: ACTIVITI_CSRF_DISABLED 27 | value: 'true' 28 | - name: ACTIVITI_DATASOURCE_PASSWORD 29 | value: alfresco 30 | - name: ACTIVITI_DATASOURCE_USERNAME 31 | value: alfresco 32 | - name: ACTIVITI_DATASOURCE_DRIVER 33 | value: org.postgresql.Driver 34 | - name: ACTIVITI_HIBERNATE_DIALECT 35 | value: org.hibernate.dialect.PostgreSQLDialect 36 | - name: ACTIVITI_DATASOURCE_URL 37 | value: 'jdbc:postgresql://127.0.0.1:5432/activiti?characterEncoding=UTF-8' 38 | image: alfresco/process-services:1.6.2 39 | ports: 40 | - containerPort: 8080 41 | --------------------------------------------------------------------------------