Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3774910
D1724.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
D1724.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
@@ -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
@@ -7,12 +7,15 @@
# -------------------------------------------------------------
{% set has_selinux = salt['grains.get']('selinux:enabled', False) %}
+{% set containers = pillar['docker_containers'][grains['id']] %}
+
+{% 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 +24,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
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 15:04 (21 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2262688
Default Alt Text
D1724.diff (2 KB)
Attached To
Mode
D1724: Allow multiple Jenkins instances
Attached
Detach File
Event Timeline
Log In to Comment