Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3936805
D1725.id4388.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D1725.id4388.diff
View Options
diff --git a/pillar/paas/docker.sls b/pillar/paas/docker.sls
--- a/pillar/paas/docker.sls
+++ b/pillar/paas/docker.sls
@@ -40,6 +40,17 @@
# phpBB SaaS
- nasqueron/mysql
+# -------------------------------------------------------------
+# Networks
+#
+# Containers can be grouped by network, instead to use links.
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+docker_networks:
+ equatower:
+ cd:
+ subnet: 172.18.1.0/24
+
# -------------------------------------------------------------
# Containers
#
diff --git a/roles/paas-docker/docker/init.sls b/roles/paas-docker/docker/init.sls
--- a/roles/paas-docker/docker/init.sls
+++ b/roles/paas-docker/docker/init.sls
@@ -8,3 +8,4 @@
include:
- .software
+ - .networks
diff --git a/roles/paas-docker/docker/network.sls b/roles/paas-docker/docker/network.sls
new file mode 100644
--- /dev/null
+++ b/roles/paas-docker/docker/network.sls
@@ -0,0 +1,23 @@
+# -------------------------------------------------------------
+# Salt — Provision Docker engine
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2018-09-11
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% set networks = pillar['docker_networks'][grains['id']] %}
+
+# -------------------------------------------------------------
+# Bridge networks
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% for network, args in networks.items() %}
+
+docker_network_{{ network }}:
+ docker_network.present:
+ - name: {{ network }}
+ - driver: bridge
+ - subnet: {{ args['subnet'] }}
+
+{% endfor %}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 13:28 (19 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2314012
Default Alt Text
D1725.id4388.diff (1 KB)
Attached To
Mode
D1725: Create Docker networks
Attached
Detach File
Event Timeline
Log In to Comment