Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3815507
D1674.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D1674.diff
View Options
diff --git a/PORTS b/PORTS
--- a/PORTS
+++ b/PORTS
@@ -1,4 +1,5 @@
paas-docker
31080 Phabricator HTTP - DevCentral
+ 34080 Etherpad
38080 Jenkins HTTP - CD
50000 Jenkins master's port for JNLP-based Jenkins agents - CD
diff --git a/pillar/paas/docker.sls b/pillar/paas/docker.sls
--- a/pillar/paas/docker.sls
+++ b/pillar/paas/docker.sls
@@ -23,12 +23,13 @@
# Infrastructure and development services
- nasqueron/aphlict
- dereckson/cachet
- - nasqueron/etherpad
- nasqueron/notifications
- nasqueron/phabricator
equatower:
# Core services
- nasqueron/mysql
+ # Infrastructure and development services
+ - nasqueron/etherpad
# Continuous deployment jobs
- jenkinsci/jenkins
- nasqueron/jenkins-slave-php
@@ -55,6 +56,12 @@
# Infrastructure and development services
phabricator:
devcentral: {}
+ etherpad:
+ app_port: 34080
+ mysql_link: acquisitariat
+ plugins:
+ - ep_ether-o-meter
+ - ep_author_neat
# phpBB SaaS
# The SaaS uses a MySQL instance, declared in the MySQL section.
diff --git a/roles/paas-docker/containers/etherpad.sls b/roles/paas-docker/containers/etherpad.sls
new file mode 100644
--- /dev/null
+++ b/roles/paas-docker/containers/etherpad.sls
@@ -0,0 +1,65 @@
+# -------------------------------------------------------------
+# Salt — Provision Docker engine
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2018-06-18
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% set has_selinux = salt['grains.get']('selinux:enabled', False) %}
+{% set containers = pillar['docker_containers'][grains['id']] %}
+{% set container = containers['etherpad'] %}
+{% set instance = 'pad' %}
+
+# -------------------------------------------------------------
+# Storage directory
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+/srv/etherpad:
+ file.directory:
+ - makedirs: True
+
+{% if has_selinux %}
+selinux_context_etherpad_data:
+ selinux.fcontext_policy_present:
+ - name: /srv/etherpad
+ - sel_type: svirt_sandbox_file_t
+
+selinux_context_etherpad_data_applied:
+ selinux.fcontext_policy_applied:
+ - name: /srv/etherpad
+{% endif %}
+
+# -------------------------------------------------------------
+# Container
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{{ instance }}:
+ docker_container.running:
+ - detach: True
+ - interactive: True
+ - image: nasqueron/etherpad
+ - links: {{ container['mysql_link'] }}:mysql
+ - binds: /srv/etherpad/var:/opt/etherpad-lite/var
+ - ports:
+ - {{ container['app_port'] }}
+ - port_bindings:
+ - {{ container['app_port'] }}:9001
+
+pad_deploy_api:
+ cmd.run:
+ - creates: /srv/etherpad/.ok-apikey
+ - name: |
+ docker cp /srv/etherpad/var/APIKEY.txt {{ instance }}:opt/etherpad-lite/APIKEY.txt
+ docker restart {{ instance }}
+ touch /srv/etherpad/.ok-apikey
+
+pad_deploy_plugins:
+ cmd.run:
+ - creates: /srv/etherpad/.ok-plugins
+ - name: |
+ {% for plugin in container['plugins'] %}
+ docker exec {{ instance }} npm install {{ plugin }}
+ {% endfor %}
+ docker restart {{ instance }}
+ touch /srv/etherpad/.ok-plugins
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 3, 03:09 (21 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2276808
Default Alt Text
D1674.diff (3 KB)
Attached To
Mode
D1674: Migrate Etherpad container to Equatower
Attached
Detach File
Event Timeline
Log In to Comment