Page MenuHomeDevCentral

D1412.id3620.diff
No OneTemporary

D1412.id3620.diff

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

Mime Type
text/plain
Expires
Wed, Nov 27, 04:27 (21 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2265685
Default Alt Text
D1412.id3620.diff (2 KB)

Event Timeline