Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3748100
D1768.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D1768.id.diff
View Options
diff --git a/PORTS b/PORTS
--- a/PORTS
+++ b/PORTS
@@ -1,4 +1,5 @@
paas-docker
+ 5000 Docker registry HTTP
9090 Openfire HTTP
22220 Phabricator Aphlict (client)
22221 Phabricator Aphlict (admin)
diff --git a/pillar/paas/docker.sls b/pillar/paas/docker.sls
--- a/pillar/paas/docker.sls
+++ b/pillar/paas/docker.sls
@@ -29,6 +29,7 @@
- nasqueron/notifications
equatower:
# Core services
+ - library/registry
- nasqueron/mysql
# Infrastructure and development services
- nasqueron/aphlict
@@ -93,6 +94,11 @@
acquisitariat: {}
phpbb_db: {}
+ registry:
+ registry:
+ app_port: 5000
+ ip: 127.0.0.1
+
#
# CD
#
diff --git a/roles/paas-docker/containers/registry.sls b/roles/paas-docker/containers/registry.sls
new file mode 100644
--- /dev/null
+++ b/roles/paas-docker/containers/registry.sls
@@ -0,0 +1,48 @@
+# -------------------------------------------------------------
+# Salt — Provision Docker engine
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2018-09-18
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% set has_selinux = salt['grains.get']('selinux:enabled', False) %}
+{% set containers = pillar['docker_containers'][grains['id']] %}
+
+{% for instance, container in containers['registry'].items() %}
+
+# -------------------------------------------------------------
+# Data directory
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+/srv/{{ instance }}:
+ file.directory:
+ - makedirs: True
+
+{% if has_selinux %}
+selinux_context_{{ instance }}:
+ selinux.fcontext_policy_present:
+ - name: /srv/{{ instance }}
+ - sel_type: container_file_t
+
+selinux_context_{{ instance }}_applied:
+ selinux.fcontext_policy_applied:
+ - name: /srv/{{ instance }}
+{% endif %}
+
+# -------------------------------------------------------------
+# Container
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{{ instance }}:
+ docker_container.running:
+ - detach: True
+ - interactive: True
+ - image: library/registry
+ - binds: /srv/{{ instance }}:/var/lib/registry
+ - ports:
+ - 5000
+ - port_bindings:
+ - {{ container['ip'] }}:{{ container['app_port'] }}:5000 # HTTP
+
+{% endfor %}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 17, 06:39 (11 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2248836
Default Alt Text
D1768.id.diff (2 KB)
Attached To
Mode
D1768: Deploy Docker registry
Attached
Detach File
Event Timeline
Log In to Comment