Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3802045
D1412.id3620.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
D1412.id3620.diff
View Options
diff --git a/PORTS b/PORTS
new file mode 100644
--- /dev/null
+++ b/PORTS
@@ -0,0 +1,3 @@
+paas-docker
+ 38080 Jenkins HTTP
+ 50000 Jenkins master's port for JNLP-based Jenkins agents
diff --git a/pillar/paas/docker.sls b/pillar/paas/docker.sls
--- a/pillar/paas/docker.sls
+++ b/pillar/paas/docker.sls
@@ -25,3 +25,7 @@
# Continuous deployment jobs
- jenkinsci/jenkins
- nasqueron/jenkins-slave-php
+
+docker_containers:
+ equatower:
+ - jenkins # CD
diff --git a/roles/paas-docker/containers/init.sls b/roles/paas-docker/containers/init.sls
new file mode 100644
--- /dev/null
+++ b/roles/paas-docker/containers/init.sls
@@ -0,0 +1,14 @@
+# -------------------------------------------------------------
+# Salt — Provision Docker engine
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2018-03-11
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% set containers = salt['pillar.get']('docker_containers:' + grains['id'], []) %}
+
+include:
+{% for container in containers %}
+ - .{{ container }}
+{% endfor %}
diff --git a/roles/paas-docker/containers/jenkins.sls b/roles/paas-docker/containers/jenkins.sls
new file mode 100644
--- /dev/null
+++ b/roles/paas-docker/containers/jenkins.sls
@@ -0,0 +1,47 @@
+# -------------------------------------------------------------
+# Salt — Provision Docker engine
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2018-03-11
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% set has_selinux = salt['grains.get']('selinux:enabled', False) %}
+
+# -------------------------------------------------------------
+# Home directory
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+/srv/jenkins/jenkins_home:
+ file.directory:
+ - user: 1000
+ - group: 1000
+ - makedirs: True
+
+{% if has_selinux %}
+selinux_context_jenkins_home:
+ selinux.fcontext_policy_present:
+ - name: /srv/jenkins/jenkins_home
+ - sel_type: svirt_sandbox_file_t
+
+selinux_context_jenkins_home_applied:
+ selinux.fcontext_policy_applied:
+ - name: /srv/jenkins/jenkins_home
+{% endif %}
+
+# -------------------------------------------------------------
+# Container
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+jenkins:
+ docker_container.running:
+ - detach: True
+ - interactive: True
+ - image: jenkinsci/jenkins
+ - binds: /srv/jenkins/jenkins_home:/var/jenkins_home
+ - ports:
+ - 8080
+ - 50000
+ - port_bindings:
+ - 38080:8080 # HTTP
+ - 50000:50000 # Jenkins master's port for JNLP-based Jenkins agents
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 30, 08:14 (15 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2271676
Default Alt Text
D1412.id3620.diff (2 KB)
Attached To
Mode
D1412: Provision Jenkins CD container
Attached
Detach File
Event Timeline
Log In to Comment