Page MenuHomeDevCentral

D1724.id4384.diff
No OneTemporary

D1724.id4384.diff

diff --git a/pillar/paas/docker.sls b/pillar/paas/docker.sls
--- a/pillar/paas/docker.sls
+++ b/pillar/paas/docker.sls
@@ -91,6 +91,7 @@
jenkins_cd:
host: cd.nasqueron.org
app_port: 38080
+ jnlp_port: 50000
jenkins_slave:
# Slaves for CD
diff --git a/roles/paas-docker/containers/jenkins.sls b/roles/paas-docker/containers/jenkins.sls
--- a/roles/paas-docker/containers/jenkins.sls
+++ b/roles/paas-docker/containers/jenkins.sls
@@ -8,11 +8,13 @@
{% set has_selinux = salt['grains.get']('selinux:enabled', False) %}
+{% for instance, container in containers['jenkins'].items() %}
+
# -------------------------------------------------------------
# Home directory
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-/srv/jenkins/jenkins_home:
+/srv/{{ instance }}/jenkins_home:
file.directory:
- user: 1000
- group: 1000
@@ -21,27 +23,29 @@
{% if has_selinux %}
selinux_context_jenkins_home:
selinux.fcontext_policy_present:
- - name: /srv/jenkins/jenkins_home
+ - name: /srv/{{ instance }}/jenkins_home
- sel_type: svirt_sandbox_file_t
selinux_context_jenkins_home_applied:
selinux.fcontext_policy_applied:
- - name: /srv/jenkins/jenkins_home
+ - name: /srv/{{ instance }}/jenkins_home
{% endif %}
# -------------------------------------------------------------
# Container
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-jenkins:
+{{ instance }}:
docker_container.running:
- detach: True
- interactive: True
- image: jenkinsci/jenkins
- - binds: /srv/jenkins/jenkins_home:/var/jenkins_home
+ - binds: /srv/{{ instance }}/jenkins_home:/var/jenkins_home
- ports:
- 8080
- 50000
- port_bindings:
- - 38080:8080 # HTTP
- - 50000:50000 # Jenkins master's port for JNLP-based Jenkins agents
+ - {{ container['app_port'] }}:8080 # HTTP
+ - {{ container['jnlp_port'] }}:50000 # Jenkins master's port for JNLP-based Jenkins agents
+
+{% endfor %}

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 11:25 (20 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2262424
Default Alt Text
D1724.id4384.diff (2 KB)

Event Timeline