Page MenuHomeDevCentral

D1891.diff
No OneTemporary

D1891.diff

diff --git a/PORTS b/PORTS
--- a/PORTS
+++ b/PORTS
@@ -24,6 +24,7 @@
paas-docker
5000 Docker registry HTTP
9090 Openfire HTTP
+ 20080 Nasqueron API - Docker registry API
22220 Phabricator Aphlict (client)
22221 Phabricator Aphlict (admin)
24080 Tommy HTTP - CI
diff --git a/pillar/paas/docker.sls b/pillar/paas/docker.sls
--- a/pillar/paas/docker.sls
+++ b/pillar/paas/docker.sls
@@ -39,6 +39,9 @@
# Nasqueron services
- nasqueron/auth-grove
+ # Nasqueron API microservices
+ - nasqueron/docker-registry-api
+
# Infrastructure and development services
- nasqueron/aphlict
- nasqueron/etherpad:production
@@ -258,6 +261,14 @@
credential: nasqueron.auth-grove.mysql
mysql_link: acquisitariat
+ # API microservices
+
+ docker-registry-api:
+ api-docker-registry:
+ app_port: 20080
+ api_entry_point: /docker/registry
+ registry_instance: registry
+
# phpBB SaaS
# The SaaS uses a MySQL instance, declared in the MySQL section.
diff --git a/roles/paas-docker/containers/docker-registry-api.sls b/roles/paas-docker/containers/docker-registry-api.sls
new file mode 100644
--- /dev/null
+++ b/roles/paas-docker/containers/docker-registry-api.sls
@@ -0,0 +1,31 @@
+# -------------------------------------------------------------
+# 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['docker-registry-api'].items() %}
+
+# -------------------------------------------------------------
+# Container
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{{ instance }}:
+ docker_container.running:
+ - detach: True
+ - interactive: True
+ - image: nasqueron/docker-registry-api
+ - binds: /srv/{{ container['registry_instance'] }}:/var/lib/registry
+ - environment:
+ - API_ENTRY_POINT: {{ container['api_entry_point'] }}
+ - ports:
+ - 8000
+ - port_bindings:
+ - {{ container['app_port'] }}:8000
+
+{% endfor %}

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 18:56 (19 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2264985
Default Alt Text
D1891.diff (2 KB)

Event Timeline