Commit 630e9246 authored by Jürgen Haas's avatar Jürgen Haas

Initial commit

parents
The MIT License (MIT)
Copyright (c) 2015, 2016 Jürgen Haas, PARAGON Executive Services GmbH
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
camunda_version: 7.14.0
---
- name: Re-create Docker Network and Containers
docker_compose:
project_src: /opt/camunda
build: yes
---
galaxy_info:
role_name: camunda
author: Jürgen Haas
description: Install camunda
company: LakeDrops
license: MIT
min_ansible_version: 2.5.0
platforms:
- name: Ubuntu
versions:
- 16
- 18
dependencies:
- role: apache
- role: docker
- role: letsencrypt
---
# file: roles/camunda/tasks/apache.yml
- name: Set facts
set_fact:
apacheUser: www-data
- name: Apache Modules
apache2_module:
state: present
name: '{{ item }}'
with_items:
- proxy
- proxy_http
notify:
- Restart Apache
- name: Apache Configuration File
template:
src: vhost.conf
dest: /etc/apache2/sites-available/camunda{{ apache_conf_ext }}
owner: root
group: root
mode: 0664
notify:
- Restart Apache
- name: Apache enable site
command: a2ensite camunda
args:
creates: /etc/apache2/sites-enabled/camunda{{ apache_conf_ext }}
notify:
- Restart Apache
---
# file: roles/camunda/tasks/camunda.yml
- name: Ensure directory
file:
path: '{{ item }}'
state: directory
with_items:
- /opt/camunda
- name: Copy camunda config files
template:
src: '{{ item }}'
dest: /opt/camunda/{{ item }}
with_items:
- docker-compose.yml
notify:
- Re-create Docker Network and Containers
##
# Ansible file to install Camunda from https://github.com/camunda
#
---
# file: roles/camunda/tasks/main.yml
- name: Camunda Role
set_fact:
role_camunda_started: yes
tags:
- always
- block:
- name: Install Certs
include_tasks: ../../letsencrypt/tasks/cert.yml
with_items: '{{ camunda_settings|default([]) }}'
loop_control:
loop_var: domain
when: domain.protocol|default("https") == "https" and domain.letsencrypt|default(true)
when: (not excluded_roles or "letsencrypt" not in excluded_roles) and groups.proxyserver is not defined
- block:
- name: Import apache
import_tasks: apache.yml
- name: Import camunda
import_tasks: camunda.yml
- name: Remember that this role had been run
set_fact:
role_camunda_completed: yes
tags:
- always
when: (not excluded_roles or "camunda" not in excluded_roles) and role_camunda_completed is not defined
version: '3'
services:
camundadb:
image: postgres
environment:
POSTGRES_ROOT_PASSWORD: camunda
POSTGRES_DB: camunda
POSTGRES_USER: camunda
POSTGRES_PASSWORD: camunda
restart: unless-stopped
camunda:
image: camunda/camunda-bpm-platform:{{ camunda_version }}
environment:
DB_DRIVER: org.postgresql.Driver
DB_URL: jdbc:postgresql://camundadb:5432/camunda
DB_USERNAME: camunda
DB_PASSWORD: camunda
WAIT_FOR: camundadb:5432
links:
- camundadb
ports:
- "8093:8080"
restart: unless-stopped
depends_on:
- camundadb
../../letsencrypt/templates/letsencrypt.ini
\ No newline at end of file
<VirtualHost *:80>
Include /etc/apache2/conf-available/global-redirect.conf
ServerAdmin webmaster@paragon-es.de
ServerName {{ camunda_domain }}
Include /etc/apache2/conf-available/redirect-ssl.conf
Include /etc/apache2/conf-available/letsencrypt-redirect.conf
ErrorLog ${APACHE_LOG_DIR}/{{ camunda_domain }}-error.log
LogLevel warn
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
CustomLog ${APACHE_LOG_DIR}/{{ camunda_domain }}-access.log combined env=!forwarded
CustomLog ${APACHE_LOG_DIR}/{{ camunda_domain }}-access.log proxy env=forwarded
</VirtualHost>
<VirtualHost *:443>
Include /etc/apache2/conf-available/global-redirect.conf
ServerAdmin webmaster@paragon-es.de
ServerName {{ camunda_domain }}
Header always add Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
<Proxy *>
Include /etc/apache2/conf-available/global-deny.conf
</Proxy>
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://127.0.0.1:8093/
ProxyPassReverse / http://127.0.0.1:8093/
ErrorLog ${APACHE_LOG_DIR}/{{ camunda_domain }}-error.log
LogLevel warn
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
CustomLog ${APACHE_LOG_DIR}/{{ camunda_domain }}-access.log combined env=!forwarded
CustomLog ${APACHE_LOG_DIR}/{{ camunda_domain }}-access.log proxy env=forwarded
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A14400
ExpiresByType text/html A900
</IfModule>
SetEnvIf X-Forwarded-Proto https HTTPS=on
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
# MSIE 7 and newer should be able to use keepalive
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
SSLEngine on
Include /etc/apache2/conf-available/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/{{ camunda_domain }}/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/{{ camunda_domain }}/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/{{ camunda_domain }}/chain.pem
</VirtualHost>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment